View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023385 | Lazarus | Other | public | 2012-11-26 18:27 | 2013-01-11 15:17 |
Reporter | Assigned To | Martin Friebe | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x64 (with x86 compiler) | OS | Windows | ||
Product Version | 1.1 (SVN) | ||||
Target Version | 1.2.0 | Fixed in Version | 1.1 (SVN) | ||
Summary | 0023385: create_installer.bat fails | ||||
Description | Create_installer.bat fails, probably due to the recent change in r39332 Error occurred on Win64. | ||||
Steps To Reproduce | Checked out fpcbuild and laz binaries repos, as well as bootstrap compiler+fpc+laz repos. Inno setup compiler installed but not in path. cd /d c:\development set iscc=D:\Program Files (x86)\Inno Setup 5\ISCC.exe C:\Development\lazarus\tools\install\win\create_installer.bat installer\fpcbuild lazarus installer\lazbin fpcbootstrap\ppc386.exe Batch file errors out with c:\Development>if [installer\fpcbuild] == [] goto USAGE c:\Development>if [lazarus] == [] goto USAGE c:\Development>if [installer\lazbin] == [] goto USAGE c:\Development>if [fpcbootstrap\ppc386.exe] == [] goto USAGE c:\Development>set ProgramFiles32bits=C:\Program Files c:\Development>if not "C:\Program Files (x86)" == "" set ProgramFiles32bits=C:\P rogram Files (x86) Files was unexpected at this time. c:\Development>if [D:\Program Files (x86)\Inno Setup 5\ISCC.exe]==[] SET ISCC="C :\Program Files (x86)\Inno Setup 5\iscc.exe" | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 39436 ,39444 | ||||
LazTarget | 1.2 | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
related to | 0023084 | resolved | Martin Friebe | Possible error building Windows Instaler under windows 64bits |
|
Please test with rev 39382 |
|
Still aborts with r39382: C:\Windows\system32>cd \Development C:\Development>svn up lazarus Updating 'lazarus': At revision 39383. C:\Development>cd /d c:\development C:\Development>set iscc=D:\Program Files (x86)\Inno Setup 5\ISCC.exe C:\Development>C:\Development\lazarus\tools\install\win\create_installer.bat ins taller\fpcbuild lazarus installer\lazbin fpcbootstrap\ppc386.exe C:\Development>if [installer\fpcbuild] == [] goto USAGE C:\Development>if [lazarus] == [] goto USAGE C:\Development>if [installer\lazbin] == [] goto USAGE C:\Development>if [fpcbootstrap\ppc386.exe] == [] goto USAGE Files was unexpected at this time. C:\Development>if [D:\Program Files (x86)\Inno Setup 5\ISCC.exe]==[] SET ISCC="C :\Program Files\Inno Setup 5\iscc.exe" |
|
Did you use the script before, with success? This line has been like that since 2006. |
|
Yes, I have succesfully used the script before but always by editing the script file regarding the inno setup compiler location etc. Some confirmation from others who don't have inno setup in default locations would be nice. Alternatively, I'm willing to look into rewriting these batch files into fpc code. |
|
Please test with rev 39436 (trunk 1.1 only) |
|
Thanks, Martin, that fixes a lot of things! With the attached patch: cd /d c:\development\lazarus\tools\install\win set iscc=D:\Program Files (x86)\Inno Setup 5\ISCC.exe set SVN="D:\Program Files\SlikSvn\bin\svn.exe" set SVNVER="D:\Program Files\SlikSvn\bin\svnversion.exe" create_installer.bat c:\development\installer\fpcbuild c:\development\lazarus c:\development\installer\lazbin c:\development\fpcbootstrap\ppc386.exe works. See attached patch - all of them cosmetic, but the first 2 changes are required if you blindly just follow the instructions: - readme: specify SVNVER variable should also be set - readme: specify current directory must be the dir where the script is - readme: clarified which Lazarus binaries tree is meant - readme: specify lazbuilddir should not exist when running the script - readme: clarified fpc build sources versus fpc sources; fpcbuild contain fpc sources (so user has an idea that those sources will be used) - batch file: cosmetic: grammar/spelling - batch file: cosmetic: warning messages instead of just ending when no compiler found, no installer found, no lazarus.exe/startlazarus.exe found - lazarus.iss: cosmetic (typo) Thanks a lot! |
2012-12-05 14:06
|
installer.diff (7,383 bytes)
Index: C:/development/lazarus/tools/install/win/create_installer.bat =================================================================== --- C:/development/lazarus/tools/install/win/create_installer.bat (revision 39439) +++ C:/development/lazarus/tools/install/win/create_installer.bat (working copy) @@ -18,7 +18,7 @@ SET RELEASE_PPC=%4 ::--------------------------------------------------------------------- -:: Optional parameter to indicate the LCL Widget set used by the IDE +:: Optional parameter to indicate the LCL Widgetset used by the IDE IF [%5]==[] GOTO EMPTY5 IF [%5]==[""] GOTO EMPTY5 SET IDE_WIDGETSET=%5 @@ -53,12 +53,12 @@ if not exist %ISCC% GOTO ERROR_INNO ::--------------------------------------------------------------------- -:: Path to the svn executable +:: Path to the svn executable; make sure it has quotes SET SVN="%SVN%" SET SVN=%SVN:"=% SET SVN="%SVN%" if not [%SVN%]==[""] GOTO SVN_BY_USER -:: set Subversion if no exist try TortoiseSVN 32bits and 64bits else error info +:: set Subversion; if it doesn't exist try TortoiseSVN 32bits and 64bits else error info SET SVN="%ProgramFiles%\subversion\bin\svn.exe" if not exist %SVN% SET SVN="%ProgramFiles%\TortoiseSVN\bin\svn.exe" if not exist %SVN% SET SVN="%ProgramFiles32bits%\subversion\bin\svn.exe" @@ -67,12 +67,12 @@ if not exist %SVN% GOTO ERROR_SVN ::--------------------------------------------------------------------- -:: Path to the svnversion executable +:: Path to the svnversion executable; make sure it has quotes SET SVNVER="%SVNVER%" SET SVNVER=%SVNVER:"=% SET SVNVER="%SVNVER%" if not [%SVNVER%]==[""] GOTO SVNVER_BY_USER -:: set Subversion if no exist try TortoiseSVN 32bits and 64bits else error info +:: set Subversion if it doesn't exist try TortoiseSVN 32bits and 64bits else error info SET SVNVER="%ProgramFiles%\subversion\bin\svnversion.exe" if not exist %SVNVER% SET SVNVER="%ProgramFiles%\TortoiseSVN\bin\svnversion.exe" if not exist %SVNVER% SET SVNVER="%ProgramFiles32bits%\subversion\bin\svnversion.exe" @@ -144,7 +144,7 @@ del %INSTALL_BINDIR%\gdb.exe :: exit if no compiler has been made -if not exist %INSTALL_BINDIR%\fpc.exe goto END +if not exist %INSTALL_BINDIR%\fpc.exe goto WARNING_NO_COMPILER_MADE %INSTALL_BINDIR%\fpcmkcfg.exe -d "basepath=%INSTALL_BASE%" -o %INSTALL_BINDIR%\fpc.cfg @@ -155,8 +155,8 @@ del %INSTALL_BINDIR%\fpc.cfg :: do not create installer, if the required executables are not there -if not exist %BUILDDIR%\lazarus.exe goto END -if not exist %BUILDDIR%\startlazarus.exe goto END +if not exist %BUILDDIR%\lazarus.exe goto WARNING_NO_LAZARUS +if not exist %BUILDDIR%\startlazarus.exe goto WARNING_NO_LAZARUS ::--------------------------------------------------------------------- :: copy gdb into build dir @@ -181,7 +181,7 @@ %ISCC% lazarus.iss >> installer.log :: do not delete build dir, if installer failed. -if not exist "output\%OutputFileName%.exe" goto END +if not exist "output\%OutputFileName%.exe" goto WARNING_INSTALLER_FAILED :: delete build dir rd /s /q %BUILDDIR% > NUL @@ -202,15 +202,27 @@ goto STOP +:WARNING_INSTALLER_FAILED +echo Installer was not created in output\%OutputFileName%.exe. Ending now. +GOTO END + +:WARNING_NO_COMPILER_MADE +echo Could not find compiler at %INSTALL_BINDIR%\fpc.exe. Ending now. +GOTO END + +:WARNING_NO_LAZARUS +echo Could not find %BUILDDIR%\lazarus.exe or %BUILDDIR%\startlazarus.exe. Ending now. +GOTO END + :ERROR_INNO -echo Inno setup instalation %ISCC% no exist. -echo Please download and install this program is required to create installer. +echo Inno setup instalation %ISCC% does not exist. +echo Please download and install this program; it is required to create the installer. echo http://www.jrsoftware.org GOTO STOP :ERROR_SVN -echo Subversion or TortoiseSVN instalation %SVN% no exist. -echo Please download and install this program is required to create installer. +echo Subversion or TortoiseSVN instalation %SVN% does not exist. +echo Please download and install this program; it is required to create the installer. echo http://subversion.apache.org/packages.html or http://tortoisesvn.net/downloads.html GOTO STOP Index: C:/development/lazarus/tools/install/win/readme.txt =================================================================== --- C:/development/lazarus/tools/install/win/readme.txt (revision 39439) +++ C:/development/lazarus/tools/install/win/readme.txt (working copy) @@ -12,14 +12,15 @@ A.2 Subversion The build script assumes you have the Subversion client installed. You can download it from http://subversion.tigris.org/, you can use the package with setup in name. -A.3 FPC sources -The build script assumes you have a svn version of the fpcbuild sources. For information about getting the fpc sources from svn see: http://www.freepascal.org/ +A.3 FPC build sources +The build script assumes you have a svn version of the fpcbuild sources (this repository includes the regular FPC sources). For information about getting the fpc sources from svn see: http://www.freepascal.org/ A.4 Lazarus sources -A Lazarus svn tree, containing the lazarus sources. +A Lazarus svn tree, containing the Lazarus sources. A.5 Lazarus binaries Some binaries from a lazarus/binaries svn tree. These binaries (like gdb and the qt interface dll) are distributed with Lazarus, but are not built from source. +Your directory should have i386-win32, x86_64-win64 etc subdirectories; the URL is currently http://svn.freepascal.org/svn/lazarus/binaries/ A.6. The latest release of the fpc compiler Currently the latest release is fpc 2.6.0. You need just the ppcXXX.exe (ppc386.exe for win32 and ppcx64.exe for win64) to bootstrap compilation of the current fpc version. @@ -31,16 +32,20 @@ Open the create_installer.bat in a text editor and check the variables, to see if they match your configuration: ISCC: Path to the Inno Setup Compiler .exe file. -BUILDDIR: Path to build directory. +BUILDDIR: Path to build directory (this directory should not yet exist). SVN: Path to the Subversion .exe file. +SVNVER: Path to the Subversion svnversion .exe file Alternatively, you can set these as environment variables before you run the batch script, e.g.: SET ISCC="C:\Program Files (x86)\Inno Setup 5\ISCC.exe" SET LAZTEMPBUILDDIR="c:\temp\lazarusbuild" SET SVN="C:\Program Files\Subversion\bin\svn.exe" +SET SVNVER="C:\Program Files\Subversion\bin\svnversion.exe" C Run create_installer.bat +If not already done, change to the directory where create_installer.bat is. This is needed because the script calls other scripts which it otherwise won't find. + Run the script: create_installer.bat FPCSVNDIR LAZSVNDIR LAZSVNBINDIR RELEASE_PPC Index: C:/development/lazarus/tools/install/win/lazarus.iss =================================================================== --- C:/development/lazarus/tools/install/win/lazarus.iss (revision 39439) +++ C:/development/lazarus/tools/install/win/lazarus.iss (working copy) @@ -47,7 +47,7 @@ TimeStampRounding=0 PrivilegesRequired=none ChangesAssociations=yes -; prevent chekbox pre-set (for delete user conf). Latest inno supports unchecked checkedonce +; prevent checkbox pre-set (for delete user conf). Latest inno supports unchecked checkedonce UsePreviousTasks=no UninstallDisplayIcon={app}\lazarus.exe |
|
I can confirm the current version broke snapshot building for win64. c:\Lazarus\source\lazarus\tools\install\win>SET SVNVER="C:\Program Files\subversion\bin\svnversion.exe" c:\Lazarus\source\lazarus\tools\install\win>if not exist "C:\Program Files\subversion\bin\svnversion.exe" SET SVNVER="C:\Program Files\TortoiseSVN\bin\svnversion.exe" c:\Lazarus\source\lazarus\tools\install\win>if not exist "C:\Program Files\TortoiseSVN\bin\svnversion.exe" SET SVNVER="C:\Program Files (x86)\subversion\bin\svnversion.exe" c:\Lazarus\source\lazarus\tools\install\win>if not exist "C:\Program Files (x86)\subversion\bin\svnversion.exe" SET SVNVER="C:\Program Files (x86)\TortoiseSVN\bin\svnversion.exe" c:\Lazarus\source\lazarus\tools\install\win>if not exist "C:\Program Files (x86)\TortoiseSVN\bin\svnversion.exe" GOTO ERROR_SVN c:\Lazarus\source\lazarus\tools\install\win>echo Subversion or TortoiseSVN instalation "C:\Program Files\sliksvn\bin\svn.exe" no exist. Subversion or TortoiseSVN instalation "C:\Program Files\sliksvn\bin\svn.exe" no exist. But svn and svnver are on the path, so it should just work. |
|
Fixed %path% issue in rev 39444 There is no way (not that I know) to iterate through the path, to see if it exists in any of the path entries. A FOR loop will fail if the path contains (). |
|
applied |
|
You could just run the unqualified command (without any path) and check that no errors occur. |
|
Fixed in trunk. I guess something needs to be merged to fixes: c:\Lazarus\source\lazarus\tools\install\win>if not exist "svnversion.exe" GOTO ERROR_SVN c:\Lazarus\source\lazarus\tools\install\win>echo Subversion or TortoiseSVN instalation "C:\Program Files\sliksvn\bin\svn.exe" does not exist. Subversion or TortoiseSVN instalation "C:\Program Files\sliksvn\bin\svn.exe" does not exist. |
|
There is still an issue. I call the create_installer.bat more than onec, the first time with the fpc sources of the latest release, then with the sources of the fixes branch. The second time I get this output: c:\Lazarus\source\lazarus\tools\install\win>if not ["svnversion.exe"] == [""] GOTO SVNVER_BY_USER c:\Lazarus\source\lazarus\tools\install\win>if not exist "svnversion.exe" GOTO ERROR_SVN c:\Lazarus\source\lazarus\tools\install\win>echo Subversion or TortoiseSVN instalation "C:\Program Files\sliksvn\bin\svn.exe" does not exist. Subversion or TortoiseSVN instalation "C:\Program Files\sliksvn\bin\svn.exe" does not exist. c:\Lazarus\source\lazarus\tools\install\win>echo Please download and install this program; it is required to create the installer. Please download and install this program; it is required to create the installer. Probably because it assumes that I did explicitly set it to svnversion.exe (but this is actually done in the previous run because I did not set it explicitly). |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-11-26 18:27 |
|
New Issue | |
2012-11-26 18:27 |
|
LazTarget | => - |
2012-11-26 18:27 |
|
Widgetset | => Win32/Win64 |
2012-11-26 18:28 |
|
Status | new => assigned |
2012-11-26 18:28 |
|
Assigned To | => Martin Friebe |
2012-11-26 20:00 | Martin Friebe | Status | assigned => resolved |
2012-11-26 20:00 | Martin Friebe | Resolution | open => fixed |
2012-11-26 20:00 | Martin Friebe | Note Added: 0064044 | |
2012-11-26 20:06 | Martin Friebe | Relationship added | related to 0023084 |
2012-11-26 20:45 |
|
Note Added: 0064046 | |
2012-11-26 20:45 |
|
Status | resolved => feedback |
2012-11-26 21:23 | Martin Friebe | Note Added: 0064048 | |
2012-11-27 08:32 |
|
Note Added: 0064050 | |
2012-11-27 08:37 |
|
Note Edited: 0064050 | |
2012-11-27 18:32 | Martin Friebe | Status | feedback => assigned |
2012-12-04 03:32 | Martin Friebe | Note Added: 0064117 | |
2012-12-04 03:32 | Martin Friebe | Status | assigned => feedback |
2012-12-05 14:04 |
|
Note Added: 0064155 | |
2012-12-05 14:06 |
|
File Added: installer.diff | |
2012-12-05 14:26 | Vincent Snijders | Note Added: 0064156 | |
2012-12-05 14:32 | Vincent Snijders | Note Edited: 0064156 | |
2012-12-05 15:50 | Martin Friebe | Note Added: 0064158 | |
2012-12-05 16:12 | Martin Friebe | Fixed in Revision | => 39436 ,39444 |
2012-12-05 16:12 | Martin Friebe | LazTarget | - => 1.2 |
2012-12-05 16:12 | Martin Friebe | Status | feedback => resolved |
2012-12-05 16:12 | Martin Friebe | Fixed in Version | => 1.1 (SVN) |
2012-12-05 16:12 | Martin Friebe | Note Added: 0064159 | |
2012-12-05 16:12 | Martin Friebe | Target Version | => 1.2.0 |
2012-12-05 16:28 |
|
Status | resolved => closed |
2012-12-05 18:19 | Vincent Snijders | Note Added: 0064161 | |
2012-12-06 08:22 | Vincent Snijders | Note Added: 0064171 | |
2012-12-28 08:08 | Vincent Snijders | Status | closed => assigned |
2012-12-28 08:08 | Vincent Snijders | Resolution | fixed => reopened |
2012-12-28 08:08 | Vincent Snijders | Note Added: 0064510 | |
2013-01-09 11:01 | Martin Friebe | Status | assigned => resolved |
2013-01-09 11:01 | Martin Friebe | Resolution | reopened => fixed |
2013-01-11 15:17 |
|
Status | resolved => closed |