Gabriel Sieben
17th May 2005 09:05 UTC
Create the installation exe before compiler finish
Hi There!
I created a compiler entry to create an installation ISO file. But the exe file will be created on the end of the script. Is there a way to create the install exe before?
Cheers
Gabriel
# Create a installation CD Image
!ifdef CreateISO
!system '${InstallScriptInput}\mkisofs -R -V "eCognition-${PRODUCT_VERSION}" \
-P Definiens -J -joliet-long "${Output}" > "${Output}\..\${FileName}.iso"'
!endif
Instructor
17th May 2005 09:45 UTC
For what you need that?
Gabriel Sieben
17th May 2005 09:54 UTC
Well... to create a iso file within the script
Instructor
17th May 2005 10:24 UTC
But the exe file will be created on the end of the script. Is there a way to create the install exe before?
For what you need that?
What algorithm you trying to realize?
Gabriel Sieben
17th May 2005 10:33 UTC
I create a whole installation package using NIS. I use one script for 10 different products. This works perfect. At the end of the compilation I would create an ISO file within all files to be able to burn cd’s. But if the installation executable doesn’t exist I couldn’t create such an ISO. I’m would be happy if I don’t need external scripts to do that.
[code]
#######################################################
### FINAL COMPILER COMMANDS
#######################################################
# copy files which are neede on the installation CD
!system '${InstallScriptInput}\robocopy /NFL /E "${ProductInput}\cd-Root" "${Output}" '
!system '${InstallScriptInput}\robocopy /NFL /E "${InstallInput}\AllVersions-CD-Root" "${Output}"'
!system '${InstallScriptInput}\robocopy /NFL /E "${ProductInput}\UserGuides" "${Output}" '
# Create a installation CD Image
!ifdef CreateISO
!system '${InstallScriptInput}\waitForFile.bat "${Output}\Setup.exe"'
!system '${InstallScriptInput}\mkisofs -R -V "eCognition-${PRODUCT_VERSION}" \
-P Definiens -J -joliet-long "${Output}" > "${Output}\..\${FileName}.iso"'
!endif
Instructor
17th May 2005 11:16 UTC
I’m would be happy if I don’t need external scripts to do that.
:) I suppose no other ways. You need just one external exe that will be run with !execute and do all FINAL COMPILER COMMANDS.
Instructor
17th May 2005 11:31 UTC
Hm.. There is another way.
Compile.bat (in the same directory of the script)
@echo off
SET NSISDIR=C:\Program Files\NSIS
SET SCRIPT=MyProgram.nsi
IF EXIST "%temp%\CreateISO.bat" DEL "%temp%\CreateISO.bat"
"%NSISDIR%\makensis.exe" %SCRIPT%
"%temp%\CreateISO.bat"
DEL "%temp%\CreateISO.bat"
SET NSISDIR=
SET SCRIPT=
MyProgram.nsi
Name "MyProgram.exe"
OutFile "MyProgram.exe"
Section
!define EXEC MyProgram.exe
!system `ECHO START ${EXEC}>"$%temp%\CreateISO.bat"`
SectionEnd
Gabriel Sieben
17th May 2005 12:46 UTC
Ok. This is a possible solution. Thanks.
But the better would be a compiler command like… :-)
!CreateInstallallationExeNOW
Cheers
Gabriel
Afrow UK
17th May 2005 16:51 UTC
Well how is that possible when the compiler has to parse the whole script from start to finish before creating the exe? That is defeating logic in one way or another!
Edit: A better solution would be for NSIS to reserve a special macro name which would be used when the exe has been created - e.g. !macro .onCompileComplete
Obviously the macro can only be allowed to contain compile time (!) instructions.
Similarely, an .onCompileEnd would be useful too, i.e. just before the exe is created.
-Stu