Windows installer: script package sizes and md5 checksums
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3620 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
# Autogenerated by procpkgs.cmd
|
||||||
|
#
|
||||||
|
!define PKG_CONTENT_FILE "uqm-0.7.0-content.uqm"
|
||||||
|
!define PKG_CONTENT_MD5SUM "2f36dcb15274dbbcb5e266f2ed84d5b2"
|
||||||
|
!define PKG_CONTENT_SIZE 11268
|
||||||
|
!define PKG_3DOMUSIC_FILE "uqm-0.7.0-3domusic.uqm"
|
||||||
|
!define PKG_3DOMUSIC_MD5SUM "86a5e376d9b76888add1d10818f0ab9f"
|
||||||
|
!define PKG_3DOMUSIC_SIZE 18535
|
||||||
|
!define PKG_VOICE_FILE "uqm-0.7.0-voice.uqm"
|
||||||
|
!define PKG_VOICE_MD5SUM "b78e0606325810f9f2e9ec786191c01b"
|
||||||
|
!define PKG_VOICE_SIZE 112444
|
||||||
|
!define PKG_REMIX1_FILE "uqm-remix-disc1.uqm"
|
||||||
|
!define PKG_REMIX1_MD5SUM "09f242d8d72166d1d5ccbd3d99c93e7d"
|
||||||
|
!define PKG_REMIX1_SIZE 49012
|
||||||
|
!define PKG_REMIX2_FILE "uqm-remix-disc2.uqm"
|
||||||
|
!define PKG_REMIX2_MD5SUM "fbc8bdcb709939d559d8c7216ad15cc2"
|
||||||
|
!define PKG_REMIX2_SIZE 58869
|
||||||
|
!define PKG_REMIX3_FILE "uqm-remix-disc3.uqm"
|
||||||
|
!define PKG_REMIX3_MD5SUM "5ccc6d4ac301ae98e172ac6835dcdead"
|
||||||
|
!define PKG_REMIX3_SIZE 38989
|
||||||
Executable
+70
@@ -0,0 +1,70 @@
|
|||||||
|
@echo off
|
||||||
|
REM Generates a .nsh file for the NSIS Windows installer with MD5 checksums
|
||||||
|
REM and file sizes of the UQM packages.
|
||||||
|
REM CMD command extension must be enabled to use this script.
|
||||||
|
REM The packages must be in the current directory.
|
||||||
|
REM Uses GNU md5sum utility, such as in Cygwin, which you must have somewhere
|
||||||
|
REM in PATH.
|
||||||
|
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
set nsh_file=packages.nsh
|
||||||
|
set md5_tool=md5sum
|
||||||
|
set pkg_version=0.7.0
|
||||||
|
|
||||||
|
set content_pkg=uqm-%pkg_version%-content.uqm
|
||||||
|
set music_pkg=uqm-%pkg_version%-3domusic.uqm
|
||||||
|
set voice_pkg=uqm-%pkg_version%-voice.uqm
|
||||||
|
set remix1_pkg=uqm-remix-disc1.uqm
|
||||||
|
set remix2_pkg=uqm-remix-disc2.uqm
|
||||||
|
set remix3_pkg=uqm-remix-disc3.uqm
|
||||||
|
set remix4_pkg=uqm-remix-disc4.uqm
|
||||||
|
|
||||||
|
call :check_exists %content_pkg%
|
||||||
|
call :check_exists %music_pkg%
|
||||||
|
call :check_exists %voice_pkg%
|
||||||
|
call :check_exists %remix1_pkg%
|
||||||
|
call :check_exists %remix2_pkg%
|
||||||
|
call :check_exists %remix3_pkg%
|
||||||
|
REM call :check_exists %remix4_pkg%
|
||||||
|
|
||||||
|
call :check_md5_tool
|
||||||
|
|
||||||
|
echo # Autogenerated by procpkgs.cmd>%nsh_file%
|
||||||
|
echo #>>%nsh_file%
|
||||||
|
|
||||||
|
call :process_pkg %content_pkg% PKG_CONTENT
|
||||||
|
call :process_pkg %music_pkg% PKG_3DOMUSIC
|
||||||
|
call :process_pkg %voice_pkg% PKG_VOICE
|
||||||
|
call :process_pkg %remix1_pkg% PKG_REMIX1
|
||||||
|
call :process_pkg %remix2_pkg% PKG_REMIX2
|
||||||
|
call :process_pkg %remix3_pkg% PKG_REMIX3
|
||||||
|
REM call :process_pkg %remix4_pkg% PKG_REMIX4
|
||||||
|
|
||||||
|
echo All packages processed. %nsh_file% generated.
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
:process_pkg
|
||||||
|
setlocal
|
||||||
|
echo Processing %1...>&2
|
||||||
|
echo !define %2_FILE "%1">>%nsh_file%
|
||||||
|
for /f %%s in ('%md5_tool% %1') do (set md5=%%s)
|
||||||
|
echo !define %2_MD5SUM "%md5%">>%nsh_file%
|
||||||
|
for /f "tokens=4" %%s in ('dir /n /-c %1 ^|find "%1"') do (set size=%%s)
|
||||||
|
set /a size/=1024
|
||||||
|
echo !define %2_SIZE %size%>>%nsh_file%
|
||||||
|
endlocal
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
:check_exists
|
||||||
|
if not exist %1 (echo %1 not found & exit 1)
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
:check_md5_tool
|
||||||
|
setlocal
|
||||||
|
echo Checking for GNU %md5_tool%...>&2
|
||||||
|
%md5_tool% --version >nul 2>&1 || (echo GNU %md5_tool% not found & exit 1)
|
||||||
|
for /f %%s in ('echo foo^|%md5_tool%') do (set md5=%%s)
|
||||||
|
if not "%md5%"=="2145971cf82058b108229a3a2e3bff35" (echo %md5_tool% is not GNU or does not operate correctly & exit 1)
|
||||||
|
endlocal
|
||||||
|
goto :eof
|
||||||
@@ -14,6 +14,9 @@ Var UQMUSERDATA
|
|||||||
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
||||||
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
|
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
|
||||||
|
|
||||||
|
; UQM Package definitions
|
||||||
|
!include "packages.nsh"
|
||||||
|
|
||||||
; MUI 1.67 compatible ------
|
; MUI 1.67 compatible ------
|
||||||
!include "MUI.nsh"
|
!include "MUI.nsh"
|
||||||
|
|
||||||
@@ -77,7 +80,7 @@ var ICONS_GROUP
|
|||||||
; MUI end ------
|
; MUI end ------
|
||||||
|
|
||||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||||
OutFile "uqm-0.7.0-installer.exe"
|
OutFile "uqm-${PRODUCT_VERSION}-installer.exe"
|
||||||
InstallDir "$PROGRAMFILES\The Ur-Quan Masters\"
|
InstallDir "$PROGRAMFILES\The Ur-Quan Masters\"
|
||||||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
||||||
ShowInstDetails show
|
ShowInstDetails show
|
||||||
@@ -334,11 +337,11 @@ SectionGroup "!UQM" SECGRP01
|
|||||||
CreateDirectory "$INSTDIR\content\addons"
|
CreateDirectory "$INSTDIR\content\addons"
|
||||||
SetOutPath "$INSTDIR\content"
|
SetOutPath "$INSTDIR\content"
|
||||||
SetOverwrite ifnewer
|
SetOverwrite ifnewer
|
||||||
AddSize 12261
|
AddSize ${PKG_CONTENT_SIZE}
|
||||||
StrCpy $MANDATORY 1
|
StrCpy $MANDATORY 1
|
||||||
StrCpy $MD5SUM "5c9114112ed84bd372755f881e235f61"
|
StrCpy $MD5SUM "${PKG_CONTENT_MD5SUM}"
|
||||||
File "content\version"
|
File "content\version"
|
||||||
Push "uqm-0.7.0-content.uqm"
|
Push "${PKG_CONTENT_FILE}"
|
||||||
Push "$INSTDIR\content\packages"
|
Push "$INSTDIR\content\packages"
|
||||||
Call HandlePackage
|
Call HandlePackage
|
||||||
|
|
||||||
@@ -356,10 +359,10 @@ SectionGroupEnd
|
|||||||
SectionGroup /e "3DO Content" SECGRP02
|
SectionGroup /e "3DO Content" SECGRP02
|
||||||
Section "Music" SEC03
|
Section "Music" SEC03
|
||||||
SectionIn 1 4 6
|
SectionIn 1 4 6
|
||||||
AddSize 18536
|
AddSize ${PKG_3DOMUSIC_SIZE}
|
||||||
StrCpy $MANDATORY 0
|
StrCpy $MANDATORY 0
|
||||||
StrCpy $MD5SUM "86a5e376d9b76888add1d10818f0ab9f"
|
StrCpy $MD5SUM "${PKG_3DOMUSIC_MD5SUM}"
|
||||||
Push "uqm-0.7.0-3domusic.uqm"
|
Push "${PKG_3DOMUSIC_FILE}"
|
||||||
Push "$INSTDIR\content\addons"
|
Push "$INSTDIR\content\addons"
|
||||||
Call HandlePackage
|
Call HandlePackage
|
||||||
; Shortcuts
|
; Shortcuts
|
||||||
@@ -369,10 +372,10 @@ SectionGroup /e "3DO Content" SECGRP02
|
|||||||
|
|
||||||
Section "Voiceovers" SEC04
|
Section "Voiceovers" SEC04
|
||||||
SectionIn 1 4 6
|
SectionIn 1 4 6
|
||||||
AddSize 112291
|
AddSize ${PKG_VOICE_SIZE}
|
||||||
StrCpy $MANDATORY 0
|
StrCpy $MANDATORY 0
|
||||||
StrCpy $MD5SUM "320bd2f278ea06c443048b9fa1e40dbf"
|
StrCpy $MD5SUM "${PKG_VOICE_MD5SUM}"
|
||||||
Push "uqm-0.7.0-voice.uqm"
|
Push "${PKG_VOICE_FILE}"
|
||||||
Push "$INSTDIR\content\addons"
|
Push "$INSTDIR\content\addons"
|
||||||
Call HandlePackage
|
Call HandlePackage
|
||||||
; Shortcuts
|
; Shortcuts
|
||||||
@@ -384,10 +387,10 @@ SectionGroupEnd
|
|||||||
SectionGroup "Modern Remixes" SECGRP03
|
SectionGroup "Modern Remixes" SECGRP03
|
||||||
Section "Pack 1" SEC05
|
Section "Pack 1" SEC05
|
||||||
SectionIn 6
|
SectionIn 6
|
||||||
AddSize 49012
|
AddSize ${PKG_REMIX1_SIZE}
|
||||||
StrCpy $MANDATORY 0
|
StrCpy $MANDATORY 0
|
||||||
StrCpy $MD5SUM "09f242d8d72166d1d5ccbd3d99c93e7d"
|
StrCpy $MD5SUM "${PKG_REMIX1_MD5SUM}"
|
||||||
Push "uqm-remix-disc1.uqm"
|
Push "${PKG_REMIX1_FILE}"
|
||||||
Push "$INSTDIR\content\addons"
|
Push "$INSTDIR\content\addons"
|
||||||
Call HandlePackage
|
Call HandlePackage
|
||||||
SetOutPath $UQMUSERDATA
|
SetOutPath $UQMUSERDATA
|
||||||
@@ -400,10 +403,10 @@ SectionGroup "Modern Remixes" SECGRP03
|
|||||||
|
|
||||||
Section "Pack 2" SEC06
|
Section "Pack 2" SEC06
|
||||||
SectionIn 6
|
SectionIn 6
|
||||||
AddSize 58869
|
AddSize ${PKG_REMIX2_SIZE}
|
||||||
StrCpy $MANDATORY 0
|
StrCpy $MANDATORY 0
|
||||||
StrCpy $MD5SUM "fbc8bdcb709939d559d8c7216ad15cc2"
|
StrCpy $MD5SUM "${PKG_REMIX2_MD5SUM}"
|
||||||
Push "uqm-remix-disc2.uqm"
|
Push "${PKG_REMIX2_FILE}"
|
||||||
Push "$INSTDIR\content\addons"
|
Push "$INSTDIR\content\addons"
|
||||||
Call HandlePackage
|
Call HandlePackage
|
||||||
SetOutPath $UQMUSERDATA
|
SetOutPath $UQMUSERDATA
|
||||||
@@ -416,10 +419,10 @@ SectionGroup "Modern Remixes" SECGRP03
|
|||||||
|
|
||||||
Section "Pack 3" SEC07
|
Section "Pack 3" SEC07
|
||||||
SectionIn 6
|
SectionIn 6
|
||||||
AddSize 38989
|
AddSize ${PKG_REMIX3_SIZE}
|
||||||
StrCpy $MANDATORY 0
|
StrCpy $MANDATORY 0
|
||||||
StrCpy $MD5SUM "5ccc6d4ac301ae98e172ac6835dcdead"
|
StrCpy $MD5SUM "${PKG_REMIX3_MD5SUM}"
|
||||||
Push "uqm-remix-disc3.uqm"
|
Push "${PKG_REMIX3_FILE}"
|
||||||
Push "$INSTDIR\content\addons"
|
Push "$INSTDIR\content\addons"
|
||||||
Call HandlePackage
|
Call HandlePackage
|
||||||
SetOutPath $UQMUSERDATA
|
SetOutPath $UQMUSERDATA
|
||||||
@@ -432,9 +435,10 @@ SectionGroup "Modern Remixes" SECGRP03
|
|||||||
|
|
||||||
# Section "Pack 4" SEC08
|
# Section "Pack 4" SEC08
|
||||||
# SectionIn 6
|
# SectionIn 6
|
||||||
# AddSize 50000 # ESTIMATE: Update later
|
# AddSize ${PKG_REMIX4_SIZE}
|
||||||
# StrCpy $MANDATORY 0
|
# StrCpy $MANDATORY 0
|
||||||
# Push "uqm-remix-pack4.zip"
|
# StrCpy $MD5SUM "${PKG_REMIX4_MD5SUM}"
|
||||||
|
# Push "${PKG_REMIX4_FILE}"
|
||||||
# Push "$INSTDIR\content\addons"
|
# Push "$INSTDIR\content\addons"
|
||||||
# Call HandlePackage
|
# Call HandlePackage
|
||||||
# ; Shortcuts
|
# ; Shortcuts
|
||||||
@@ -536,9 +540,9 @@ Section Uninstall
|
|||||||
Delete "$INSTDIR\content\addons\uqm-remix-disc3.uqm"
|
Delete "$INSTDIR\content\addons\uqm-remix-disc3.uqm"
|
||||||
Delete "$INSTDIR\content\addons\uqm-remix-disc2.uqm"
|
Delete "$INSTDIR\content\addons\uqm-remix-disc2.uqm"
|
||||||
Delete "$INSTDIR\content\addons\uqm-remix-disc1.uqm"
|
Delete "$INSTDIR\content\addons\uqm-remix-disc1.uqm"
|
||||||
Delete "$INSTDIR\content\addons\uqm-0.7.0-voice.uqm"
|
Delete "$INSTDIR\content\addons\${PKG_VOICE_FILE}"
|
||||||
Delete "$INSTDIR\content\addons\uqm-0.7.0-3domusic.uqm"
|
Delete "$INSTDIR\content\addons\${PKG_3DOMUSIC_FILE}"
|
||||||
Delete "$INSTDIR\content\packages\uqm-0.7.0-content.uqm"
|
Delete "$INSTDIR\content\packages\${PKG_CONTENT_FILE}"
|
||||||
Delete "$INSTDIR\content\version"
|
Delete "$INSTDIR\content\version"
|
||||||
Delete "$INSTDIR\zlib.dll"
|
Delete "$INSTDIR\zlib.dll"
|
||||||
Delete "$INSTDIR\zlib1.dll"
|
Delete "$INSTDIR\zlib1.dll"
|
||||||
|
|||||||
Reference in New Issue
Block a user