SQLite from Windows to Linux lazarus / 32-Linux ---------------------------------------------------------------------- dodgebros · 2020-12-28 23:36 I have created a simple app that runs on Windows.  It uses the SQLite3 database.  On Windows, all one has to do is to make sure the database file, database.sqlite3, and the SQLite.dll file are in the same folder as the app executable.  Will this work on Linux? TD ---------------------------------------------------------------------- lucamar · 2020-12-29 02:40 In Linux just make sure the database file is accessible (e.g. in the same folder); the dynamic lib will be taken from the standard lib directory. Worth of note is that Linux has very definite ideas as to where executables, libs, config files, etc. should be placed in a "normal" installation and it is almost never "dump all in the same folder" (though it can be), so you should make sure your program takes this into account if it's to be distributed to random people out there. If, on the contrary, you can control exactly where your program and its associatd files will go (as e.g. fpcupdeluxe does) then you can make a "Windows-style" install. Sounds a little confusing, I know, though it's not really that much in practice; best for you would be to find info about how Linux normally organizes all this (it has its logic) and learn it by heart. I promise it's not as difficult as it sounds ---------------------------------------------------------------------- dodgebros · 2020-12-29 03:56 Thank you! TD ---------------------------------------------------------------------- af0815 · 2020-12-29 08:29 Quote from: lucamar on December 29, 2020, 03:40:45 amWorth of note is that Linux has very definite ideas as to where executables, libs, config files, There is nearly no difference between system, but the programmer must use it. Lazarus/FPC have funtion to query where the correct dir is, but it have to used. If you use it in windows and the programm can correct run as a normal user, it will run correct in Linux as user too. use pathseperator, pathdelim, lineending, GetTempFileName, Getuserdir, getappconfigfile, getappconfigdir and a lot more. With this functions you can find your rigth places to store/read data and this correct mapped to the actual System. And this work excellent too if you use standard deploymentstools of the system. With non standard path you will bulid your own deployment and rights hell :-) ---------------------------------------------------------------------- PierceNg · 2021-01-01 15:38 Quote from: lucamar on December 29, 2020, 03:40:45 amIn Linux just make sure the database file is accessible (e.g. in the same folder); The directory that contains the database file has to be writeable by the ID running the application, for SQLite to write its transaction journal or write-ahead log (WAL). On Windows, Linux and Mac, well on any properly set up multi-user operating system, one usually doesn't want an application's executable, DLLs and other static support files to be writeable except by the system administrator, whereas any non-static data files including SQLite databases used by the application ought to be writeable by the user running the application.