Startlazarus

From Lazarus wiki
Jump to navigationJump to search

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 task is to restart the IDE.

At the moment FPC can not 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.

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, the IDE puts the 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. startlazarus searches the newest lazarus executable.

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 pid 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