Subversion Repositories RAND

Rev

Blame | Last modification | View Log | RSS feed

; Get revision string
FileRead, v, %A_ScriptDir%\Rise of Mankind - A New Dawn\Assets\Python\Contrib\CvModName.py
RegExMatch(v, "modVersion = ""2.2 \(rev([\d]*)\)""", vers)
version := vers1

; Replace revision in install file
FileRead, inst, %A_ScriptDir%\Installer\full_installer_script.nsi
FileDelete, %A_ScriptDir%\Installer\full_installer_script.nsi
def_revision = !define REVISION "%version%"
inst := RegExReplace(inst, "!define REVISION "".*""", def_revision)
FileAppend, %inst%, %A_ScriptDir%\Installer\full_installer_script.nsi


; Generate installer
nsis = %A_ScriptDir%\Tools\nsis\makensis.exe
IfNotExist, %nsis%
{
    Msgbox, NSIS (Unicode version) need to be installed for the installer to be compiled. Go to http://nsis.sourceforge.net/Main_Page to download it.
    ExitApp, 1
}
RunWait, %nsis% %A_ScriptDir%\Installer\full_installer_script.nsi
Msgbox, The full installer has been generated.