(Sorry for the French in the IDE; I installed too quickly; I prefer an interface in English for the homogeneity of the discussion)@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)...:
@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_Files\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_recompile_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 COMPILATEUR=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_recompile_auto\$commun\build_EDI_seul.bat.output.txt | type E:\Lazarus\Projets\copieW_test_recompile_auto\$commun\build_EDI_seul.bat.output.txt
@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_Files\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:
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 --comp
iler=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...:
D:/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:
Configfile 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\i386-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\i386-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:\Lazarus\Projects\copyW_test_recompile_auto\current_primary_config_file\infos_debug\onStartLazarus.log",
Lazarus IDE no longer "complains", now, about not finding the file fpc.cfg .@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").
Can 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...
@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).