Browse Source

Adding Windows installer task

JoshEngebretson 10 years ago
parent
commit
6ed7303502

+ 25 - 0
Build/CIScripts/GenWindowsEditor.js

@@ -8,6 +8,31 @@ var dstDir = bcommon.artifactsRoot + "Build/WindowsEditor/";
 
 namespace('build', function() {
 
+  task('genwindowsinstaller', ["build:genwindowseditor"], {
+    async: true
+  }, function() {
+
+    console.log("Creating Windows Installer");
+
+    bcommon.cleanCreateDir(bcommon.artifactsRoot + "Build/WindowsInstaller");
+
+    var nsisDefines = "/DATOMIC_ROOT=" + atomicRoot;
+    nsisDefines += " /DEDITOR_VERSION=1";
+
+    var makeNSISCmd = atomicRoot + "\\Build\\CIScripts\\Windows\\CreateInstaller.bat";
+
+    makeNSISCmd += " " + nsisDefines + " " + atomicRoot + "/Build/CIScripts/Windows/Installer/AtomicEditor.nsi";
+
+    var cmds = [makeNSISCmd];
+
+    jake.exec(cmds, function() {
+      complete();
+    }, {
+      printStdout: true
+    });
+
+  });
+
   task('genwindowseditor', {
     async: true
   }, function() {

+ 0 - 0
Build/Windows/CreateInstaller.bat → Build/CIScripts/Windows/CreateInstaller.bat


+ 4 - 4
Build/Windows/Installer/AtomicEditor.nsi → Build/CIScripts/Windows/Installer/AtomicEditor.nsi

@@ -12,7 +12,7 @@
 
 !define prodname "Atomic Editor"
 !define coname "THUNDERBEAST GAMES LLC"
-!define outfile "${ATOMIC_ROOT}\Artifacts\Windows_Installer\AtomicEditorSetup.exe"
+!define outfile "${ATOMIC_ROOT}\Artifacts\Build\WindowsInstaller\AtomicEditorSetup.exe"
 !define appexe "AtomicEditor.exe"
 !define produrl "http://www.atomicgameengine.com/"
 
@@ -68,20 +68,20 @@ Section "${prodname}" SecMain
 
 	SetOutPath "$INSTDIR"
 
-  File /r "${ATOMIC_ROOT}\Artifacts\Dist\AtomicEditorInstallerSourceFiles\Windows_Package\*.*"
+  File /r "${ATOMIC_ROOT}\Artifacts\Build\WindowsEditor\*.*"
 
 	;Store installation folder
 	WriteRegStr HKLM "Software\${coname}\InstallDir" "${prodname}" $INSTDIR
 
 	; Create shortcut
-	CreateShortCut "$SMPROGRAMS\${prodname}.lnk" "$INSTDIR\${appexe}"
+	CreateShortCut "$SMPROGRAMS\${prodname}.lnk" "$INSTDIR\AtomicEditor\${appexe}"
 
 	; Update Add/Remove Programs
 	DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}"
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}" "DisplayName" "${prodname}"
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}" "UninstallString" "$INSTDIR\Uninstall.exe"
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}" "InstallLocation" "$INSTDIR"
-	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}" "DisplayIcon" "$INSTDIR\${appexe},0"
+	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}" "DisplayIcon" "$INSTDIR\AtomicEditor\${appexe},0"
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}" "Publisher" "${coname}"
 	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}" "URLInfoAbout" "${produrl}"
 	WriteRegDWord HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${prodname}" "NoRepair" 1