Is it possible to automate the creation of a inno setup package with ant?

后端 未结 2 1152
滥情空心
滥情空心 2021-02-03 15:57

I am creating an Eclipse RCP application.

I am following Joel\'s advice in the following article \"Daily Builds are your friend\":

http://www.joelonsoftware.com/

2条回答
  •  醉话见心
    2021-02-03 16:43

    sure its easy, Inno project is a plain text file so you can even edit setupper script easily by ant, however I would recommend creating a separate small include file by your script. You can have store there "variables" such as version+build number that you show in begin of setup.

    put this line to your setupper:

    #include "settings.txt"
    

    and make settings.txt have something like this

    #define myver=xxx.xxx
    #define tags
    

    now you don't need to touch the actual setupper code from build script.

    below is a snippet from my build script to compile the setupper. you need to execute batch file from ant like this:

    
      
    
    

    sample batch build.bat:

    set isxpath="c:\program files\inno setup 5"
    set isx=%isxpath%\iscc.exe
    set iwz=myproj.iss
    if not exist %isx% set errormsg=%isx% not found && goto errorhandler
    %isx% "%iwz%" /O"%buildpath%" /F"MySetupper.exe" >>%logfile%
    goto :eof
    

提交回复
热议问题