Scripts with lazbuild lazarus / 11-Options ---------------------------------------------------------------------- devEric69 · 2019-10-08 13:40 Hello, I'm testing different Bash scripts calling lazbuild.exe, on a Win7 netbook, with msys32 (a Linux Bash emulator on Windows). • Building a package: QuoteLAZBUILD_CMD=$LAZ_FULL_DIR"/lazbuild.exe --pcp="$PRIMARY_CONFIG_PATH" --cpu="$CPU" --widgetset="$WIDGETSET" --verbose-pkgsearch dmath.lpk --build-mode="$PROJET_MODE #Launch of the cmd... $LAZBUILD_CMD==> it works. • Construction of a project: QuoteLAZBUILD_CMD=$LAZ_FULL_DIR"/lazbuild.exe -B --pcp="$PRIMARY_CONFIG_PATH" --cpu="$CPU" --widgetset="$WIDGETSET" --verbose --verbose --build-mode="$PROJET_MODE" "$WORKING_DIR"\projRecompilAuto.lpi" #Launch of the cmd... $LAZBUILD_CMD==> it works. • Construction of the EDI: QuoteLAZBUILD_CMD=$LAZ_FULL_DIR"/lazbuild.exe "$BUILD_OPTS" --pcp="$PRIMARY_CONFIG_PATH" --cpu="$CPU" --widgetset="$WIDGETSET" --build-ide="$EDI_MODE #Launch of the cmd... $LAZBUILD_CMD==> It compiles, but it ends with the following error message: Quote[...snip] C:/msys32/usr/bin/rm.exe -f make[1]: Leaving directory `D:/Program_Files/lazarus/ide' make: Leaving directory `D:/Program_Files/lazarus' make: *** No rule to make target `cleanide ide'.  Stop. Error: (lazarus) EDI creation: stopped with exit code 2 nb: creating Lazarus, from the menu in Lazarus, with the IDE profile named "normal IDE", works perfectly. So I am neither blocked nor obliged to reinstall from FPCupDeluxe. Are there "relatively easy" ways to understand what is blocked (ps: I don't have a lot of knowledge, neither of fpc.exe, nor of fpc.cfg)? ---------------------------------------------------------------------- Cyrax · 2019-10-08 14:35 It fails due to MSYS2 environment and its utilities. FPC have its own. You need to convert Linux directory separator (/) to Windows one (\). Also you need make sure that PATH environment variable contains only full path to FPC binaries which contains Linux utilities (built in MinGW environment) (rm, make etc) so FPC's make doesn't call MSYS2/Linux Bash Shell on Windows 10 equivalent ones. Simplest and easiest method is to generate Windows command batch script (which includes modification to PATH environment variable and expansion of all Linux variables; namely paths to directories to Windows format)  and call it under Windows Command Shell (cmd.exe). ---------------------------------------------------------------------- marcov · 2019-10-08 19:29 The main problem is afaik that the FPC (old mingw) utils change their behaviour and start executing stuff over the shell if they find pwd.exe or sh.exe. So I keep mingw and FPC out of the path. Then I use a batchfiles like this: Code: [Select]@echo off Rem we save oldpath only once, so we can always revert to it. if "%OLDPATH%" neq "" goto :nosave set OLDPATH=%PATH% :nosave SET PATH=%OLDPATH% PATH c:\pp32\bin\i386-win32;%PATH% where c:\pp32 is where my 32-bit 3.3.1 compiler is. I also have one for 64-bit FPC, mingw, cygwin, release FPC versions and even (tex4live)latex. ---------------------------------------------------------------------- devEric69 · 2019-10-09 09:45 @Cyrax and @marcov: thank you for your answers. Unfortunately, the construction of the IDE via a batch file does not go any further. This is my batch: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i @echo off@color 1F @echo on@echo. @REM We save old PATH only once, so we can always revert to it.@REM if OLDPATH<>"" then...@if "%PATH%" neq "" (goto :save) else (goto :nosave):save@SET OLDPATH=%PATH%:nosave @REM Set new PATH towards ppc386.exe, fpc.exe and its fpc.cfg, make.exe, @REM ..., Win32-bits tools@PATH D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32;@echo OLDPATH saved=%OLDPATH%@echo. @echo new PATH=%PATH%@pause @REM Creation of the cmd... --build-ide@SET CPU=i386@SET WIDGETSET=win32@SET EDI_MODE="EDI normal"@SET LAZ_FULL_DIR=D:\Program_Files\lazarus@SET BUILD_OPTS= -B --quiet --quiet@SET WORKING_DIR=E:\Lazarus\Projets\copieW_test_recompile_auto@SET PRIMARY_CONFIG_PATH=%WORKING_DIR%\current_primary_config_file @SET LAZBUILD_CMD=%LAZ_FULL_DIR%\lazbuild.exe %BUILD_OPTS% --pcp=%PRIMARY_CONFIG_PATH% --cpu=%CPU% --widgetset=%WIDGETSET% --build-ide=%EDI_MODE%@REM Launch the cmd...@echo This cmd will be launched: %LAZBUILD_CMD%@pause%LAZBUILD_CMD% @REM Shall we restore the original PATH?@if "%OLDPATH%" neq "" (goto :restore_path) else (goto :norestore_path):restore_path@set PATH=%OLDPATH%:norestore_path @echo PATH restored=%PATH%@echo It's over!@pause The cmd launched is...: QuoteD:\Program_Files\lazarus\lazbuild.exe  -B --quiet --quiet --pcp=E :\Lazarus\Projets\copieW_test_recompile_auto\current_primary_config_fi le --cpu=i386 --widgetset=win32 --build-ide="EDI normal"...and my Window's PATH has only one path: D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32; ==> I started by renaming D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32\pwd.exe to ...\_pwd.exe, and I get this message: Quote{...snip} make: Entering directory `D:/Program_Files/lazarus' make: Leaving directory `D:/Program_Files/lazarus' Makefile:29: *** You need the GNU utils package to use this Makefile.  Stop. Error: (lazarus) Nettoyer les codes sources de Lazarus: stopped with exit code 2 ==> Then, I restarted it without renaming pwd.exe, and it ends like this: Quote{...snip} make: Entering directory `D:/Program_Files/lazarus' D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/make -C ide make[1]: Entering directory `D:/Program_Files/lazarus/ide' D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f make[1]: Leaving directory `D:/Program_Files/lazarus/ide' make: Leaving directory `D:/Program_Files/lazarus' make: Entering directory `D:/Program_Files/lazarus' D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/make -C ide make[1]: Entering directory `D:/Program_Files/lazarus/ide' D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f make[1]: Leaving directory `D:/Program_Files/lazarus/ide' make: Leaving directory `D:/Program_Files/lazarus' make: *** No rule to make target `cleanide ide'.  Stop. Error: (lazarus) Création de l'EDI: stopped with exit code 2 If you see other tests to do, or have other informations to check, they are welcome (but again, I'm not blocked). ---------------------------------------------------------------------- devEric69 · 2019-10-09 11:43 I've new hints. Well, actually, my tests broke something. To be exhaustive, before testing my Bash or Batch script files, I first moved my original --pcp that was in...: C:\Users\ParoleDeMainate\AppData\Local\lazarus ...to a subdirectory of my Subversion working directory, named copyW_test_recompile_auto. My new --pcp is now...: E:\Lazarus\Projects\copyW_test_recompile_auto\current_primary_config_f ile . I had too, renamed all the paths ad'hoc, in all the files of my new --pcp. But, fpc.exe no longer sees its file fpc.cfg which is still placed in the same directory (I can't even trace anymore in step-by-step debugging)... So, I'm now looking for how and where to tell fpc.exe that its fpc.cfg is still placed in D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32. ---------------------------------------------------------------------- marcov · 2019-10-09 12:59 The binaries that come with FPC are good, just make sure he doesn't find other ones (mingw or cygwin). IOW you should have a FPC release install dir in your path, and it can allow the pwd.exe that came with FPC. ---------------------------------------------------------------------- Cyrax · 2019-10-09 13:31 Quote from: devEric69 on October 09, 2019, 01:43:39 pmI've new hints. Well, actually, my tests broke something. To be exhaustive, before testing my Bash or Batch script files, I first moved my original --pcp that was in...: C:\Users\ParoleDeMainate\AppData\Local\lazarus ...to a subdirectory of my Subversion working directory, named copyW_test_recompile_auto. My new --pcp is now...: E:\Lazarus\Projects\copyW_test_recompile_auto\current_primary_config_f ile . I had too, renamed all the paths ad'hoc, in all the files of my new --pcp. But, fpc.exe no longer sees its file fpc.cfg which is still placed in the same directory (I can't even trace anymore in step-by-step debugging)... So, I'm now looking for how and where to tell fpc.exe that its fpc.cfg is still placed in D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32. Is directory D:\Program_Files created by you? Can you install whole package (FPC and Lazarus) under different directory with lowercase characters and without underscore? QuoteD:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f Are you running your batch script under MSYS2 or Windows Command Shell environment? ---------------------------------------------------------------------- devEric69 · 2019-10-10 14:34 (Sorry for the French in the IDE; I installed too quickly; I prefer an interface in English for the homogeneity of the discussion) Quote@marcov: The binaries that come with FPC are good, just make sure he doesn't find other ones (mingw or cygwin). IOW you should have a FPC release install dir in your path, and it can allow the pwd.exe that came with FPC. I only have the directory D:\Program_Files\lazarus\mingw\i386-win32\bin in the MS-Windows environment variables (see environment_variables.png). I run this batch script (with the "-vut" switch to get as much information as possible, and the output is written in a text file (you can see the big file build_EDI.bat.output.txt.zip - here: https://mon- partage.fr/f/aUBKvRWr/ - and [^^]:, below)...: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i @echo off@color 1F @echo on@echo. @REM We save old PATH only once, so we can always revert to it.@REM if OLDPATH<>"" then...@if "%PATH%" neq "" (goto :save) else (goto :nosave):save@SET OLDPATH=%PATH%:nosave @REM Set new PATH towards ppc386.exe, fpc.exe and its fpc.cfg, make.exe, @REM ..., Win32-bits tools@PATH D:\Program_Files\lazarus;D:\Program_Fi les\lazarus\ide;D:\Program_Files\lazarus\mingw\i386- win32\bin;D:\Program_Files\lazarus\fpc\3.0.4\bin\i386- win32;D:\Program_Files\lazarus\tools;E:\Lazarus\Projets\copieW_test_re compile_auto\current_primary_config_file;@REM PPC_CONFIG_PATH ==> Cf. https://www.freepascal.org/docs-html/user/usersu10.html@setx PPC_CONFIG_PATH D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32@echo OLDPATH saved=%OLDPATH%@echo. @echo new PATH=%PATH%@pause @REM Creation of the cmd... --build-ide@SET CPU=i386@SET WIDGETSET=win32@SET EDI_MODE_1=""@SET BUILD_MODE_1="EDI normal"@REM : le mode de compilation enregistré dans le projet Debug_Compilation_verbeuse @REM peut contenir plein d'options verbeuses: -vut -va -s etc, certes, mais ne peut pas être appliqué @REM à la compilation d'un profi de l'EDI-même, qui existe à un niveau supérieur. Les modes Debug_Compilation_verbeuse, Debug, Release, etc @REM ne semblent pouvoir être appliqués que pour la recompilation de paquets ou de projets.@SET EDI_MODE_2="-vut"@SET BUILD_MODE_2="EDI normal"@REM @SET BUILD_MODE_2="EDI optimise"@SET LAZ_FULL_DIR=D:\Program_Files\lazarus@SET BUILD_OPTS= -B --verbose --verbose@REM @SET BUILD_OPTS= -B --quiet --quiet@SET WORKING_DIR=E:\Lazarus\Projets\copieW_test_recompile_auto@SET PRIMARY_CONFIG_PATH=%WORKING_DIR%\current_primary_config_file@SET COMP ILATEUR=D:\Program_Files\lazarus\fpc\3.0.4\bin\i386- win32\ppc386.exe @REM --ok-- @SET LAZBUILD_CMD=%LAZ_FULL_DIR%\lazbuild.exe %BUILD_OPTS% --pcp=%PRIMARY_CONFIG_PATH% --cpu=%CPU% --widgetset=%WIDGETSET% --compiler=%COMPILATEUR% --build-mode=%BUILD_MODE_1% --build- ide=%EDI_MODE_1%@SET LAZBUILD_CMD=%LAZ_FULL_DIR%\lazbuild.exe %BUILD_OPTS% --pcp=%PRIMARY_CONFIG_PATH% --cpu=%CPU% --widgetset=%WIDGETSET% --compiler=%COMPILATEUR% --build- mode=%BUILD_MODE_2% --build-ide=%EDI_MODE_2%@REM Launch the cmd...@echo This cmd will be launched: %LAZBUILD_CMD%@pause%LAZBUILD_CMD% > E:\Lazarus\Projets\copieW_test_re compile_auto\$commun\build_EDI_seul.bat.output.txt | type E:\Lazarus\P rojets\copieW_test_recompile_auto\$commun\build_EDI_seul.bat.output.tx t@pause @REM Shall we restore the original PATH?@if "%OLDPATH%" neq "" (goto :restore_path) else (goto :norestore_path):restore_path@set PATH=%OLDPATH%:norestore_path @echo PATH restored=%PATH%@echo It's over!@pause ...which affects PATH:=new PATH=D:\Program_Files\lazarus;D:\Program_Fi les\lazaruside;D:\Program_Files\lazarus\mingw\i386- win32\bin;D:\Program_Files\lazarus\fpc\3.0.4\bin\i386- win32;D:\Program_Files\lazarus\tools;E:\Lazarus \Projects\copy\W_test_recompile_auto\current_primary_config_file; This cmd launched is: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i D:\Program_Files\lazarus\lazbuild.exe  -B --quiet --quiet --pcp =E:\Lazarus\Projets\copieW_test_recompile_auto\current_primary_config_ file --cpu=i386 --widgetset=win32 --compiler=D:\Program_Files\lazarus\ fpc\3.0.4\bin\i386-win32\ppc386.exe --build-mode="EDI normal" --build- ide="-vut" The script always ends in error, due to the cmd...: QuoteD:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/make -C ide cleanide make[1]: Entering directory `D:/Program_Files/lazarus/ide''. D:/Program_Files/lazarus/fpc/3.0.4/bin/i386-win32/rm.exe -f {...snip...} make[1]: Leaving directory `D:/Program_Files/lazarus/ide'. make: Leaving directory `D:/Program_Files/lazarus' make: *** No rule to make target `cleanide ide'.  Stop. Error: (lazarus) EDI creation: stopped with exit code 2...I added D:\Program_Files\lazarus\ide to the PATH, since it's make -C ide cleanide that stops everything. But it didn't change anything for the better. [^^]: I've attached the batch execution output big file, build_EDI.bat.output.txt.zip, here: https://mon- partage.fr/f/aUBKvRWr/. I didn't see anything extraordinary in it, that could explain the erreor. The only notable things that are always coming back, are those: - "several "*.pas not found, but not seemingly necessary files - and this, when reading the fpc.cfg: QuoteConfigfile search: D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32\fpc.cfg (11026) Reading options from file D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32\fpc.cfg Path "C:\Users\ParoleDeMainate\AppData\Local\FreePascal\fppkg\units\i3 86-win32\*\" not found Path "D:\Program_Files\lazarus\fpc\3.0.4\lib\i386-win32\" not found Path "C:\Users\ParoleDeMainate\AppData\Local\FreePascal\fppkg\units\i3 86-win32\*\" not found Path "D:\Program_Files\lazarus\fpc\3.0.4\lib\i386-win32\" not found But, these paths have no equivalent in my --pcp or in D:\Program_Files\lazarus\... - Warning like: {snip}...use an unsigned type instead. ==> One last point: in the Lazarus environment variables, I say that the compiler is the "real compiler", i. e. D:\Program_Files\lazarus\fpc\3.0.4\bin\i386-win32\ppc386.exe, instead of the path to the "proxy compiler" fpc.exe. Now, when I open Lazarus with its MS-shortcut-symlink, which is D:\Program_Files\lazarus\lazarus.exe --pcp="E:\Lazarus\Projects\copyW_ test_recompile_auto\current_primary_config_file" --debug-log="E:\Lazar us\Projects\copyW_test_recompile_auto\current_primary_config_file\info s_debug\onStartLazarus.log", Lazarus IDE no longer "complains", now, about not finding the file fpc.cfg  . Quote@Cyrax wrote: Is directory D:\Program_Files created by you? Can you install whole package (FPC and Lazarus) under different directory with lowercase characters and without underscore?Yes (C:\=Windows, D:\=\Program_Files and \Program Files, E:\=data, including the code and the PCP "Subversioned" in a Subversion "working directory"). QuoteCan you install whole package (FPC and Lazarus) under different directory with lowercase characters and without underscore?Yes: I will do it. I'll post the result... Quote@Cyrax wrote: Are you running your batch script under MSYS2 or Windows Command Shell environment?The batch runs now under MS-Windows Command Shell environment (msys32 has been disabled (its directory is called \_msys32, and it is no longer accessible from the MS-Windows environment variables. See attached MS-DOS_batch_execution.png). ---------------------------------------------------------------------- marcov · 2019-10-10 14:49 Quote from: devEric69 on October 10, 2019, 04:34:28 pm(Sorry for the French in the IDE; I installed too quickly; I prefer an interface in English for the homogeneity of the discussion) Quote@marcov: The binaries that come with FPC are good, just make sure he doesn't find other ones (mingw or cygwin). IOW you should have a FPC release install dir in your path, and it can allow the pwd.exe that came with FPC. I only have the directory D:\Program_Files\lazarus\mingw\i386-win32\bin in the MS-Windows environment variables (see environment_variables.png). spaces in filenames, and mingw or cygwin utils that are not provided by FPC in the path are not supported. This makes bash as scripting langauge undesirable. Make sure only the release directory of FPC is in the PATH and that no other tools that offer such binaries (sh.exe, pwd.exe, rm.exe make.exe etc etc) are in the path. I mentioned sh.exe because that is the only case that hurts if mingw is anywhere in the path, even if the FPC dir is first (because fpc doesn't have it). ---------------------------------------------------------------------- devEric69 · 2019-10-10 17:14 So, quickly: - I've searched for sh.exe, pwd.exe, rm.exe, make.exe on my computer: I've found an old Git installation (but that wasn't \ no longer, in my PATH), that I've deleted; - backup of my PCP (E:\Lazarus\Projects\copy\W_test_recompile_auto\cur rent_primary_config_file), moved elsewhere; - uninstalling Lazarus+FCP; - reinstallation of Lazarus+FCP in D:\programs; - I've checked to see, if it had created a PCP for me in C:\Users\Me\AppData\Local? No. I am happy; - I put my PCP (E:\Lazarus\Projects\copy\W_test_recompile_auto\current _primary_config_file) back in its location; - I recreate a shortcut to Lazarus.exe, on the MS-Windows desktop, with D:\programs\lazarus.exe --pcp="E:\Lazarus\Projects\copyW_test_rec ompile_auto\current_primary_config_file" --debug-log="E:\Lazarus\Proje cts\copyW_test_recompile_auto\current_primary_config_file\infos_debug\ onStartLazarus.log"; - launch of Lazarus: a window tells me that it detects the PCP of an old installation (E:\Lazarus\Projects\copyW_test_recompile_auto\curren t_primary_config_file). It suggests me, to upgrade this information, to ignore it, or to abort the Lazarus's launch; - I choose to "upgrade" (even if I've reinstalled the same versions, of Lazarus and FPC); - Lazarus.exe starts: everything works, and it points well to my PCP=E :\Lazarus\Projects\copy\W_test_recompile_auto\current_primary_config_f ile. The compiler is again fpc.exe (it finds fpc.cfg), which runs well ppc386.exe. I can debug... <== nice functionality; - I adjust my batch script, and I only have one PATH=D:\programs\fpc\3.0.4\bin; ==> I get the same result: QuoteNote: (lazarus) renamed file "D:\programs\lazarus.exe" to "D:\programs\lazarus.old.exe" make: Entering directory `D:/programs' `D:/programs' D:/programs/fpc/3.0.4/bin/i386-win32/make -C ide cleanide make[1]: Entering directory `D:/programs/ide''. D:/programs/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/programs/fpc/3.0.4/bin/i386-win32/rm.exe -f {...snip...} D:/programs/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/programs/fpc/3.0.4/bin/i386-win32/rm.exe -f make[1]: Leaving directory `D:/programs/ide' `D:/programs/ide make: Leaving directory `D:/programs' `D:/programs' make: Entering directory `D:/programs' `D:/programs' D:/programs/fpc/3.0.4/bin/i386-win32/make -C ide cleanide make[1]: Entering directory `D:/programs/ide''. D:/programs/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/programs/fpc/3.0.4/bin/i386-win32/rm.exe -f {...snip...} D:/programs/fpc/3.0.4/bin/i386-win32/rm.exe -f D:/programs/fpc/3.0.4/bin/i386-win32/rm.exe -f make[1]: Leaving directory `D:/programs/ide' `D:/programs/ide make: Leaving directory `D:/programs' make: *** No rule to make target `cleanide ide'.  Stop. Error: (lazarus) Creating the IDE: stopped with exit code 2 Okay, as I've said, I'm not stuck. Now, I have no skills in make.exe and makefile. However, the thing that surprises me, is that it does the same thing twice (normal or not: a success then a failure, by doing the same thing)??! If you want me to do more tests, I'm at your disposal...