Results 1 to 8 of 8

Thread: Freepascal programs and Linux distros?

  1. #1

    Freepascal programs and Linux distros?

    Hi all,
    I wasn't sure where to put this post LOL

    Anyway, I am attempting to make a cross-platform "engine" that will run under Windows, and at least Linux (maybe Mac OSX later on...).

    The engine is inside a DLL on Windows, and I know that I need to make a .SO version under Linux...

    I am happy with how it is running under windows, but now I want to see if I can add Linux code and then when ready, run/install the engine in the Linux distro (Ubuntu to start with).

    I have installed Ubuntu into a virtual machine and will install Lazarus-freepascal into it, but I have no idea how to go about installing my freepascal app!!!

    I am used to having the engine DLL in the same folder as the application exe under Windows, but I guess this isn't done this way using Linux when installing .SO dynamic libraries?

    If not, how does one 'install' a freepascal program (using a precompiled .SO + application) in a Linux distro? Do I need to put the .SO file somewhere in the system where the app will find it?

    Also where would I put program resources like archives and other files that it loads from? Again I am used to looking in sub-folders of the app folder (using ExtractFilePath(ParamStr(0)) and similar stuff), but I don't think this is going to work in Linux?

    cheers,
    Paul
    Last edited by paul_nicholls; 23-08-2011 at 04:16 AM.

  2. #2
    Since *nix doesn't USE DLL's, having the engine in a DLL pretty much makes it useless cross platform... DLL==Windows only...
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

  3. #3
    Sorry, I should probably have added .so there too, but I had mentioned .so files below that

    Now edited!

    cheers,
    Paul

  4. #4
    I guess under Ubuntu, I should use .deb files, but I am still unsure where to put different parts of my application (.SO and the 'executable' + other support files)...I am finding the Linux world so confusing! haha

    Does anyone here know the best practice for placing different files of a program under Linux (Ubuntu)?

    cheers,
    Paul

  5. #5

  6. #6
    Thanks Carver413, I will have a read - I did notice that is mostly about compiling libs, but I guess the output folders /usr/lib and other info should still apply

    cheers,
    Paul

  7. #7
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    If working in a VM does not piss you off (does for me...) You could always install that ubuntu onto you HDD (best distro to begin with IMHO) and leave windows permanently. Ubuntu is very nice indeed. If you find it slow / don't like unity (I only like it for touch screen integration) you can always try 10.10 (me), the classic desktop or mint (faster).

    As for deb files, they are a nice way of doing things, but only for a finished product. I would refrain from trying every build/version in deb format because linux will keep every single version you install from debs Oo and that lib folder may start growing...

    However, a deb file is an archive (tar.gz if I recall) of multiple other archives on of which is (data? correct if wrong) which conatains an image of how you want to change the target system from the / folder... Think of it as an archive you extract into / and it merges the lib, usr, sbin and etc folders onto the root and places your files. Simples really.

    Edit:
    Or you could read Carvers link that just showed up when I hit refresh (yesterdays browsing session )
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  8. #8
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    there are a few other useful things in there like setting lib paths,naming an such. I would still try just dropping the lib in the local folder with the rest of the stuff if it works so much easier. nothing to install easy to move.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •