Startlazarus
Overview
Startlazarus is an application that works together with the IDE. Its primary task is to start the right IDE executable. Its secondary task is to restart the IDE.
At the moment FPC cannot compile dynamic libraries with shared classes. That's why designtime packages are compiled statically into the IDE, which means every time you install/uninstall a package a new IDE executable must be compiled.
Linux and macOS users compiling Lazarus from svn don't need startlazarus, but it does not hurt to use it.
Under Windows
Windows locks exe files while running the application. The IDE compiles a lazarus.new.exe. When the IDE restarts it starts startlazarus and quits itself. startlazarus then renames the old lazarus.exe to lazarus.old.exe and renames the new lazarus.new.exe to lazarus.exe. Then it starts lazarus.exe and quits itself.
Searching the right executable
When the Lazarus directory is write protected, as in Unix systems, the IDE builds its new executable into a sub folder of the primary config path, for example ~/.lazarus/bin/. You can see the primary config path in View / IDE internals / About IDE.
Once you run startlazarus, it searches and starts the newest lazarus executable. Initially it starts the original from the installation directory. After Lazarus has rebuilt itself, startlazarus starts the newly built version.
Restarting the IDE
When the IDE restarts, it starts startlazarus and quits. startlazarus waits for the IDE to quit, searches for the new executable and starts it. Under Windows it renames the exe.
Parameters
--debug
if given, startlazarus calls the IDE with "--debug-log=<primaryconfigpath>/debug.log".
--lazarus-pid=
passed by the IDE on restart. startlazarus waits for this process ID before starting a new IDE.
--no-splash-screen or --nsc
do not show splash screen
--primary-config-path= or --pcp=
primary config path, passed to the IDE, since 0.9.31 used by startlazarus to find the new executable
--secondary-config-path= or --scp=
secondary config path, passed to the IDE, not used by startlazarus
See also
From the Free Pascal wiki, page "Startlazarus", as it stood on 2022-06-03 after a change by FTurtle, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Edited on wiki.freepascal.org by 10 people, 2011–2022
From the official wiki's backup of 26 May 2024: who edited this page there, and when. Edits made there after that date were not recorded, and the earlier versions are not shown here; the main page says why.
| When | Who | What changed |
|---|---|---|
| Mattias2 | New page: =Overview= startlazarus is an application that works together with the IDE. It's primal task is to start the right IDE executable, it's secondary is to restart the IDE. At the moment FPC... | |
| Mattias2 | Searching the right executable | |
| Mattias2 | Restarting the IDE | |
| Mattias2 | Parameters | |
| Mattias2 | Parameters | |
| Mattias2 | Overview | |
| Mattias2 | Overview | |
| HowardPC | Overview (minor) | |
| JuhaManninen | Searching the right executable | |
| BigChimp | category | |
| BigChimp | wiki header level 2 default, not 1 (minor) | |
| BigChimp | link to Lazarus directory permissions on Linux and Unix | |
| BigChimp | (minor) | |
| Socke | Parameters: expanded pid to "process id" | |
| Jwdietrich | ||
| FTurtle | FTurtle moved page startlazarus to Startlazarus (minor) | |
| FTurtle | ||
| FTurtle | ||
| Arent | ||
| Trev | Overview: OS X > macOS (minor) | |
| Skalogryz | Parameters (minor) | |
| Trev | Add category (minor) | |
| FTurtle | Deleted categories from page. Configuration, Debugging moved to template. |
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
