Permalink
Browse files

altered build script to be completely automated

updated README
  • Loading branch information...
1 parent 37030d3 commit 062cf8af999d9caf7c9599dbcd142bb969bdd940 @mshorts committed Mar 12, 2012
Showing with 48 additions and 29 deletions.
  1. +1 −2 Belvedere.ahk
  2. +13 −7 README.md
  3. +34 −20 build.ahk
View
@@ -4,7 +4,6 @@
[AHK2EXE]
Exe_File=%In_Dir%\Belvedere.exe
No_UPX=1
-NoDecompile=1
Created_Date=1
Execution_Level=2
[VERSION]
@@ -14,7 +13,7 @@ File_Description=Belvedere
Inc_File_Version=0
Internal_Name=Belvedere
Product_Name=Belvedere
-Product_Version=1.0.48.5
+Product_Version=1.1.7.1
Set_AHK_Version=1
[ICONS]
Icon_1=%In_Dir%\resources\belvedere.ico
View
@@ -8,19 +8,25 @@ An automated file manager for Windows
* Language(s): AutoHotkey, NSIS (for the installer)
* License: GPL v3
-See [LICENSE.txt](https://github.com/imaginationac/belvedere/blob/master/LICENSE.txt) for licensing details.
+See [LICENSE.txt](https://github.com/mshorts/belvedere/blob/master/LICENSE.txt) for licensing details.
-#How to build the installer.
+#How to build the installer manually.
-1. Clone the repo: `git clone git://github.com/imaginationac/belvedere.git`
+1. Clone the repo: `git clone git://github.com/mshorts/belvedere.git`
2. Download and install [NSIS](http://prdownloads.sourceforge.net/nsis/nsis-2.46-setup.exe?download)
3. Download [KIllProc plug-in for NSIS](http://code.google.com/p/mulder/downloads/detail?name=NSIS-KillProc-Plugin.2011-04-09.zip&can=4&q=)
4. Download and install [Microsoft HTML Help Workshop 1.3](http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=21138).
5. Download and install [AutoHotkey_L](http://www.autohotkey.com/download/).
-6. Compile Belvedere.ahk (in the root of the repo) and move the .exe into the /installer directory.
-7. Compile /help/Belvedere Help.hhp with HTML Help Workshop and move the .chm to the /installer directory.
-8. Compile /installer/install.nsi
-9. Make sure to test the installer.
+6. Download and install [Compile_AHK](http://www.autohotkey.com/forum/topic22975.html).
+7. Compile Belvedere.ahk with Compile_AHK(in the root of the repo) and move the .exe into the /installer directory.
+8. Compile /help/Belvedere Help.hhp with HTML Help Workshop and move the .chm to the /installer directory.
+9. Compile /installer/install.nsi
+10. Make sure to test the installer.
+
+#How to build the installer automatically.
+
+1. Run build.ahk
+2. Find the installer in the /dist directory.
#How to run.
View
@@ -31,19 +31,30 @@ installerScript = %buildDir%\installer.nsi
; Check dependencies
; AutoHotkey script compiler.
-RegRead, ahk2exe, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Ahk2Exe.exe
+RegRead, ahk2exe, HKEY_LOCAL_MACHINE, SOFTWARE\AutoHotkey, InstallDir
if ErrorLevel{
MsgBox, "You do not have AutoHotkey_L installed. Please download it."
ExitApp, 1
}
+
+ahk2exe .= "\Compiler\Compile_AHK.exe"
+
; Help manual compiler.
-RegRead, hhw, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\hhw.exe
+RegRead, hhc, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\hhw.exe, Path
if ErrorLevel{
MsgBox, "You do not have Microsoft HTML Help Workshop installed. Please download it."
ExitApp, 1
}
+
+hhc .= "\hhc.exe"
+
; Commandline compiler for NSIS (makensis.exe)
-RegRead, makensis, HKEY_LOCAL_MACHINE, SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NSIS, InstallLocation
+RegRead, makensis, HKEY_LOCAL_MACHINE, SOFTWARE\NSIS
+if ErrorLevel{
+ MsgBox, "You do not have NSIS Installed, the installer will not be compiled."
+ skipInstaller := 1
+}
+
makensis .= "\makensis.exe"
; Clean old build files
@@ -52,30 +63,33 @@ IfExist, %buildDir%
FileCreateDir, %buildDir%
; Compile Belvedere.ahk
-RunWait, %ahk2exe% /in Belvedere.ahk
+RunWait, %ahk2exe% /nogui %A_ScriptDir%\Belvedere.ahk
; Move to build folder
-FileMove, %executableName%, %buildDir%
+IfExist, %executableName%
+{
+ FileMove, %executableName%, %buildDir%
+}Else{
+ MsgBox, "Application Compile Failed, exiting..."
+ ExitApp, 1
+}
; Compile help.
-; FIXME: Not able to exit loop on fail.
-While(!helpCompiled){
- RunWait %hhw% %helpProject%
- MsgBox, 4, , Did you compile the help manual successfully?
- IfMsgBox Yes
- helpCompiled = 1
- Else{
- MsgBox, 0, , "Fix the errors in the help manual project and try again."
- If MsgBox OK{
- ExitApp, 1
- }
- }
+RunWait, %hhc% "%helpProject%"
+
+IfNotExist, %A_ScriptDir%\build\Belvedere Help.chm
+{
+ MsgBox, "Help Compile Failed, the installer will not be compiled."
+ skipInstaller := 1
}
; Copy installer files to build
FileCopy, %installerDir%\*.*, %buildDir%\*.*
; Build the installer
-CompileCommand = %makensis% /V1 %installerScript%
-FileCreateDir, %A_WorkingDir%\dist
-RunWait, %CompileCommand%
+if(!skipInstaller)
+{
+ CompileCommand = %makensis% /V1 %installerScript%
+ FileCreateDir, %A_WorkingDir%\dist
+ RunWait, %CompileCommand%
+}

0 comments on commit 062cf8a

Please sign in to comment.