Browse Source

Update windows installer

Jakob Truelsen 15 years ago
parent
commit
519616f970
2 changed files with 21 additions and 5 deletions
  1. 5 2
      scripts/release.sh
  2. 16 3
      wkhtmltopdf.nsi.m4

+ 5 - 2
scripts/release.sh

@@ -75,7 +75,10 @@ tar -cjvf "../release-$v/wkhtmltopdf-$v-static-amd64.tar.bz2" wkhtmltopdf-amd64
 tar -cjvf "../release-$v/wkhtmltoimage-$v-static-i386.tar.bz2" wkhtmltoimage-i386
 tar -cjvf "../release-$v/wkhtmltoimage-$v-static-amd64.tar.bz2" wkhtmltoimage-amd64
 cd "../release-$v"
-for x in libgcc_s_dw2-1.dll ssleay32.dll libeay32.dll EnvVarUpdate.nsh; do
-    [ -f "$x" ] ||  wget http://wkhtmltopdf.googlecode.com/files/$x -O $x
+for x in libgcc_s_dw2-1.dll ssleay32.dll libeay32.dll mingwm10.dll EnvVarUpdate.nsh; do
+	[ -f "$x" ] && continue
+	l=$(find -name "$x" ../static-build/windows/)
+	[ -f "$l" ] && cp "$l" "$x" && continue
+    wget "http://wkhtmltopdf.googlecode.com/files/$x" -O "$x" && continue
 done
 makensis wkhtmltopdf.nsi 

+ 16 - 3
wkhtmltopdf.nsi.m4

@@ -21,7 +21,7 @@ InstallDirRegKey HKCU "Software\wkhtmltopdf" ""
 ;Pages
 	
 !insertmacro MUI_PAGE_LICENSE "../COPYING"
-; !insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_COMPONENTS
 !insertmacro MUI_PAGE_DIRECTORY
 !insertmacro MUI_PAGE_INSTFILES
   
@@ -36,13 +36,26 @@ InstallDirRegKey HKCU "Software\wkhtmltopdf" ""
 ;--------------------------------
 ;Installer Sections
 
-Section
+Section Wkhtmltopdf 
   SetOutPath "$INSTDIR"
   file wkhtmltopdf.exe
+SectionEnd
+
+Section Wkhtmltoimage
+  SetOutPath "$INSTDIR"
   file wkhtmltoimage.exe
+SectionEnd
+
+Section \o "Update PATH, WILL BREAK PATH IN VISTA AN WIN7"
+  ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR" 
+SectionEnd
+
+Section
+  SetOutPath "$INSTDIR"
   file libgcc_s_dw2-1.dll
   file ssleay32.dll
   file libeay32.dll
+  file mingwm10.dll
   WriteRegStr HKCU "Software\wkhtmltopdf" "" $INSTDIR
   WriteUninstaller "$INSTDIR\uninstall.exe"
 
@@ -50,7 +63,6 @@ Section
                    "DisplayName" "wkhtmltopdf"
   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\wkhtmltopdf" \
                    "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
-;  ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR" 
 SectionEnd
 
 
@@ -63,6 +75,7 @@ Section "Uninstall"
   Delete "$INSTDIR\libgcc_s_dw2-1.dll"
   Delete "$INSTDIR\ssleay32.dll"
   Delete "$INSTDIR\libeay32.dll"
+  Delete "$INSTDIR\mingwm10.dll"
 ;  ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR"
   Delete "$INSTDIR\uninstall.exe"
   RMDir "$INSTDIR"