diff --git a/source/vcpp/buildEnv/INSTALLER README.txt b/source/vcpp/buildEnv/INSTALLER README.txt index c23f5b70..ca600e68 100644 --- a/source/vcpp/buildEnv/INSTALLER README.txt +++ b/source/vcpp/buildEnv/INSTALLER README.txt @@ -1,6 +1,13 @@ -quick notes: +License: -* install command line cvs, include it in your system path variable -* edit the cvs command in exportCVS.bat and set your own username +The installer script if free to use for any other purpose. However you MUST NOT make +your installer look like an official AssaultCube release, therefore DO NOT use the +official AssaultCube media to redistribute your own work. + + +Quick installation notes: + +* install command line SVN, include it in your system path variable +* edit the svn commands and set your own username * install NSIS * edit ac.nsi and fix the CURPATH variable \ No newline at end of file diff --git a/source/vcpp/buildEnv/ac.nsi b/source/vcpp/buildEnv/ac.nsi index 37f73c59..1bf6f594 100644 --- a/source/vcpp/buildEnv/ac.nsi +++ b/source/vcpp/buildEnv/ac.nsi @@ -117,13 +117,15 @@ SetCompressor /SOLID lzma !define CURPATH "R:\projects\ActionCube\ac\source\vcpp\buildEnv" ; CHANGE ME !define AC_VERSION "v1.0" +!define AC_FULLVERSION "v1.0.2" +!define AC_FULLVERSIONINT "1.0.2" !define AC_SHORTNAME "AssaultCube" !define AC_FULLNAME "AssaultCube v1.0" !define AC_FULLNAMESAVE "AssaultCube_v1.0" Name "AssaultCube" VAR StartMenuFolder -OutFile "AssaultCube_${AC_VERSION}.exe" +OutFile "AssaultCube_${AC_FULLVERSION}.exe" InstallDir "$PROGRAMFILES\${AC_FULLNAMESAVE}" InstallDirRegKey HKLM "Software\${AC_FULLNAMESAVE}" "" RequestExecutionLevel admin ; require admin in vista @@ -504,7 +506,7 @@ FunctionEnd ; Installer Sections -Section "AssaultCube v1.0" AC +Section "AssaultCube ${AC_FULLVERSION}" AC SectionIn RO @@ -513,6 +515,7 @@ Section "AssaultCube v1.0" AC File /r ac\*.* WriteRegStr HKLM "Software\${AC_FULLNAMESAVE}" "" $INSTDIR + WriteRegStr HKLM "Software\${AC_FULLNAMESAVE}" "version" ${AC_FULLVERSIONINT} ; Create uninstaller WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AC_FULLNAMESAVE}" "DisplayName" "${AC_FULLNAME}" diff --git a/source/vcpp/buildEnv/ac_patch.nsi b/source/vcpp/buildEnv/ac_patch.nsi index f6135376..09836b71 100644 --- a/source/vcpp/buildEnv/ac_patch.nsi +++ b/source/vcpp/buildEnv/ac_patch.nsi @@ -80,10 +80,10 @@ FunctionEnd SetCompressor /SOLID lzma -!define CURPATH "C:\temp\ac\ac\source\vcpp\buildEnv" ; CHANGE ME +!define CURPATH "R:\projects\actioncube\_svn\trunk\ac\source\vcpp\buildEnv" ; CHANGE ME !define AC_VERSION "v1.0" -!define AC_FULLVERSION "v1.0.1" -!define AC_FULLVERSIONINT "1.0.1" +!define AC_FULLVERSION "v1.0.2" +!define AC_FULLVERSIONINT "1.0.2" !define AC_SHORTNAME "AssaultCube" !define AC_FULLNAME "AssaultCube v1.0" !define AC_FULLNAMESAVE "AssaultCube_v1.0" @@ -349,6 +349,15 @@ Function WelcomePage # MessageBox MB_OK "This is a TEST BUILD, do NOT redistribute this file! This is NOT a final release!" + # validate existing installation + ClearErrors + ReadRegStr $0 HKLM "Software\${AC_FULLNAMESAVE}" "" + IfErrors 0 success + MessageBox MB_OK|MB_ICONSTOP "Could not find an existing installation of AssaultCube that could be updated with this Update package. Please get the full package at http://assault.cubers.net/download.html" + Quit + success: + + FunctionEnd Function FinishPage @@ -397,7 +406,7 @@ Section "AssaultCube ${AC_FULLVERSION} Update" PATCH SetOutPath "$INSTDIR" - File /r ac\*.* + File /r ac_patch\*.* SectionEnd diff --git a/source/vcpp/buildEnv/new-patch.ps1 b/source/vcpp/buildEnv/new-patch.ps1 index 9ab98382..aea381d1 100644 --- a/source/vcpp/buildEnv/new-patch.ps1 +++ b/source/vcpp/buildEnv/new-patch.ps1 @@ -1,23 +1,23 @@ function new-patch { - param($from, $to); + param($from, $to) # get diff summary as XML - [xml] $summary = (svn diff $to $from -x --ignore-eol-style --xml --summarize); + [xml] $summary = (svn diff $to $from -x --ignore-eol-style --xml --summarize) # loop through all diff/paths/path nodes # each node represents a modified/new file foreach($item in $summary.diff.paths.path) { # the SVN url - $url=$_."#text"; + $url=$item."#text" # the relative filename - $file=($_."#text".Substring($to.Length)); + $file=($item."#text".Substring($to.Length)) # the parent directory - $dir=($file | split-path -parent); + $dir=($file | split-path -parent) # create parent directory if it doesn't exist already - if((test-path $dir) -eq $false) { mkdir $dir -force}; + if((test-path $dir) -eq $false) { mkdir $dir -force} # export current files from the SVN repository svn export $url $file } # package the current dir (.) into patch.zip sevenzip.exe a patch.zip . -} \ No newline at end of file +}