[Greater-commits] r3789 - trunk/packaging
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Oct 6 15:24:14 CEST 2011
Author: aheinecke
Date: 2011-10-06 15:24:12 +0200 (Thu, 06 Oct 2011)
New Revision: 3789
Modified:
trunk/packaging/README-installer
trunk/packaging/greater-installer.nsi
Log:
- No longer package python as an installer
- No longer package usf branch
- Always install sediment database
- Show splashscreen
Modified: trunk/packaging/README-installer
===================================================================
--- trunk/packaging/README-installer 2011-10-06 13:22:43 UTC (rev 3788)
+++ trunk/packaging/README-installer 2011-10-06 13:24:12 UTC (rev 3789)
@@ -25,12 +25,19 @@
/greater/packaging
In the packaging directory you have to put external packages like Postgres
-and Python and the redistributable packages of the msvc runtime.
+and the redistributable packages of the msvc runtime.
The redistributable packages should be named:
vcredist_x86.exe (For vc9 runtime)
vcredist-80_x86.exe (For vc8 runtime)
-Both are obtainable from microsoft.com
+Both are obtainable from microsoft.com and may be redistributed as part
+of an installer package.
+Python is expected to live in /greater/python and will be packaged
+as "is" from there.
+
+To package the greater_pre_processing you also need to have cygwin
+installed
+
Then from your
/greater directory execute:
python packaging/makepackage.py
Modified: trunk/packaging/greater-installer.nsi
===================================================================
--- trunk/packaging/greater-installer.nsi 2011-10-06 13:22:43 UTC (rev 3788)
+++ trunk/packaging/greater-installer.nsi 2011-10-06 13:24:12 UTC (rev 3789)
@@ -28,9 +28,6 @@
;--------------------------------
; Variable declarations
Var POSTGRESQL_INSTALLED
- Var SEDIMENT_SELECTED
- Var USF_SELECTED
- Var PYTHON_PATH
;--------------------------------
;Version Information (for installer file properties)
@@ -134,7 +131,6 @@
; Also the sediment database?
CALL CheckIfSedimentSelected
- StrCmp $SEDIMENT_SELECTED "no" no_sediment
File "defaultdata\sedimentdb.backup"
ExecDos::exec '"$INSTDIR\postgres9\bin\pg_restore.exe" -C -O -d postgres -U greater \
"$TEMP\sedimentdb.backup"' "" "$TEMP\greater_sediment_insert.log"
@@ -144,18 +140,6 @@
"$TEMP\90_grant_access.sql"' "" "$TEMP\greater_sediment_insert.log"
Delete "$TEMP\sedimentdb.backup"
- no_sediment:
- CALL CheckIfUSFSelected
- StrCmp $USF_SELECTED "no" no_usf
- File "defaultdata\usfdb.backup"
- ExecDos::exec '"$INSTDIR\postgres9\bin\pg_restore.exe" -C -O -d postgres -U greater \
- "$TEMP\usfdb.backup"' "" "$TEMP\greater_usf_insert.log"
- ExecDos::exec '"$INSTDIR\postgres9\bin\psql" -d greater-usf -U greater -f \
- "$TEMP\10_create_users.sql"' "" "$TEMP\greater_usf_insert.log"
- ExecDos::exec '"$INSTDIR\postgres9\bin\psql" -d greater-usf -U greater -f \
- "$TEMP\90_grant_access.sql"' "" "$TEMP\greater_usf_insert.log"
- Delete "$TEMP\usfdb.backup"
-
no_usf:
Delete "$TEMP\defaultdb.backup"
Delete "$TEMP\10_create_users.sql"
@@ -164,17 +148,6 @@
; Database should now be ready
SectionEnd
-Section "Python 2.7.2" SecPython
- Banner::show /NOUNLOAD /set 76 "Installing..." "Python 2.7.2" ""
- SetOutPath "$TEMP"
- File "python-2.7.2.msi" ; Should be more generalized
- DetailPrint "Installing Python..."
- ExecWait '"msiexec" /i $TEMP\python-2.7.2.msi /quiet TARGETDIR="$INSTDIR\Python2.7"' $0
- Delete "$TEMP\python-2.7.2.msi"
- StrCpy $PYTHON_PATH '"$INSTDIR\Python2.7\pythonw"'
- banner::destroy
-SectionEnd
-
;---------------------------
; General Section - Included in all installations
Section ""
@@ -259,7 +232,7 @@
# Create new Start menu entries
CreateDirectory "$SMPROGRAMS\${productname}"
CreateShortCut "$SMPROGRAMS\${productname}\${productname_short} USF.lnk" \
- "$PYTHON_PATH" '"$INSTDIR\greater-pre-processing\upload-catchment.py"' \
+ "$INSTDIR\python\pythonw.exe" '"$INSTDIR\greater-pre-processing\upload-catchment.py"' \
"$INSTDIR\GREAT-ER\Resources\greater2.ico"
no_start_menu:
Return
@@ -267,53 +240,9 @@
;-----------------------------
; Client sections
-Section "Client (USF)" usf_section_id
- !include ${usf-in}
- ; Set Path to $PROFILE
- SetOutPath "%HOMEDRIVE%%HOMEPATH%"
- # 'all users' shell folder is used (for $DESKTOP, $SMPROGRAMS, $QUICKLAUNCH,...)
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
- "Field 4" "State"
- SetShellVarContext all
- IntCmp $R0 0 just_current_user all_users
- just_current_user:
- SetShellVarContext current
- all_users:
-
- # ** Start menu **
- # Delete old Start menu entries.
- RMDir /R "$SMPROGRAMS\${productname_short} ${version_number}"
- # Check if the start menu entries where requested.
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
- "Field 2" "State"
- IntCmp $R0 0 no_start_menu
- # Create new Start menu entries
- CreateDirectory "$SMPROGRAMS\${productname}"
- CreateShortCut "$SMPROGRAMS\${productname}\${productname_short} USF.lnk" \
- "$PYTHON_PATH" '"$INSTDIR\GREAT-ER-USF\GREAT-ER\${executable}" "greater/greater at greater-usf"' \
- "$INSTDIR\GREAT-ER\Resources\greater2.ico"
- no_start_menu:
-
- # ** Desktop Icon **
- # Delete old Desktop link
- Delete "$DESKTOP\${productname_short}.lnk"
- # Check if the desktop entries where requested.
- !insertmacro MUI_INSTALLOPTIONS_READ $R0 "installer-options.ini" \
- "Field 3" "State"
- IntCmp $R0 0 no_desktop
- # Create new Desktop link
- CreateShortCut "$DESKTOP\${productname_short} USF.lnk" \
- "$PYTHON_PATH" '"$INSTDIR\GREAT-ER-USF\GREAT-ER\${executable}" \
- "greater/greater at greater-usf"' \
- "$INSTDIR\GREAT-ER-USF\GREAT-ER\Resources\greater2.ico"
- no_desktop:
-
- Return
-
-SectionEnd
-
Section "Client (Sediment Model)" sediment_section_id
+ !include ${common-in}
!include ${sediment-in}
; Set Path to $PROFILE
@@ -338,7 +267,7 @@
# Create new Start menu entries
CreateDirectory "$SMPROGRAMS\${productname}"
CreateShortCut "$SMPROGRAMS\${productname}\${productname_short} Sediment.lnk" \
- "$PYTHON_PATH" '"$INSTDIR\GREAT-ER-Sediment\GREAT-ER\${executable}" \
+ "$INSTDIR\python\pythonw.exe" '"$INSTDIR\GREAT-ER-Sediment\GREAT-ER\${executable}" \
"greater/greater at greater-sediment"' \
"$INSTDIR\GREAT-ER\Resources\greater2.ico"
no_start_menu:
@@ -352,7 +281,7 @@
IntCmp $R0 0 no_desktop
# Create new Desktop link
CreateShortCut "$DESKTOP\${productname_short} Sediment.lnk" \
- "$PYTHON_PATH" '"$INSTDIR\GREAT-ER-Sediment\GREAT-ER\${executable}" \
+ "$INSTDIR\python\pythonw.exe" '"$INSTDIR\GREAT-ER-Sediment\GREAT-ER\${executable}" \
"greater/greater at greater-sediment"' \
"$INSTDIR\GREAT-ER-Sediment\GREAT-ER\Resources\greater2.ico"
no_desktop:
@@ -389,7 +318,7 @@
# Create new Start menu entries
CreateDirectory "$SMPROGRAMS\${productname}"
CreateShortCut "$SMPROGRAMS\${productname}\${productname_short}.lnk" \
- "$PYTHON_PATH" '"$INSTDIR\GREAT-ER\${executable}" greater/greater at greater' \
+ "$INSTDIR\python\pythonw.exe" '"$INSTDIR\GREAT-ER\${executable}" greater/greater at greater' \
"$INSTDIR\GREAT-ER\Resources\greater2.ico"
no_start_menu:
@@ -402,7 +331,7 @@
IntCmp $R0 0 no_desktop
# Create new Desktop link
CreateShortCut "$DESKTOP\${productname_short}.lnk" \
- "$PYTHON_PATH" '"$INSTDIR\GREAT-ER\${executable}" greater/greater at greater' \
+ "$INSTDIR\python\pythonw.exe" '"$INSTDIR\GREAT-ER\${executable}" greater/greater at greater' \
"$INSTDIR\GREAT-ER\Resources\greater2.ico"
no_desktop:
@@ -414,26 +343,23 @@
;Install Functions
Function ".onInit"
+ newadvsplash::show /NOUNLOAD 2000 1000 500 -2 /BANNER "banner.png"
+
InstTypeSetText 0 "Full (recommended)"
InstTypeSetText 1 "Client only (no Database)"
InstTypeSetText 2 "Server only"
- SectionSetInstTypes ${usf_section_id} 1
SectionSetInstTypes ${sediment_section_id} 1
SectionSetInstTypes ${client_section_id} 3
SectionSetInstTypes ${SecPostgreSQL} 5
- SectionSetInstTypes ${SecPython} 3
SectionSetInstTypes ${admin_section_id} 5
SectionSetInstTypes ${gpp_section_id} 1
SectionSetFlags ${client_section_id} 1
SectionSetFlags ${SecPostgreSQL} 1
- SectionSetFlags ${SecPython} 1
SectionSetFlags ${admin_section_id} 1
- SectionSetFlags ${usf_section_id} 1
SectionSetFlags ${sediment_section_id} 1
SectionSetFlags ${gpp_section_id} 1
SectionSetSize ${SecPostgreSQL} "207330"
- SectionSetSize ${SecPython} "55279"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "installer-options.ini"
call CheckExistingVersion
CALL DetectPostgreSQL
@@ -522,13 +448,6 @@
StrCpy $SEDIMENT_SELECTED "yes"
no_sediment:
FunctionEnd
-Function CheckIfUSFSelected
- SectionGetFlags ${usf_section_id} $R0
- StrCpy $USF_SELECTED "no"
- IntCmp $R0 0 no_sediment
- StrCpy $USF_SELECTED "yes"
- no_sediment:
-FunctionEnd
;---------------------
; Disable the next button on the components page as long as there
@@ -542,9 +461,6 @@
; SectionGetFlags ${sediment_section_id} $1
; IntOp $1 ${SF_SELECTED} & $1
; IntOp $0 $1 | $0
-; SectionGetFlags ${usf_section_id} $1
-; IntOp $1 ${SF_SELECTED} & $1
-; IntOp $0 $1 | $0
; SectionGetFlags ${client_section_id} $1
; IntOp $0 $1 | $0
; SectionSetFlags ${client_section_id} $0
@@ -553,17 +469,11 @@
Push $0
Push $1
- SectionGetFlags ${SecPython} $0
+ SectionGetFlags ${SecPostgreSQL} $0
IntOp $0 ${SF_SELECTED} & $0
- SectionGetFlags ${SecPostgreSQL} $1
- IntOp $1 ${SF_SELECTED} & $1
- IntOp $0 $1 | $0
SectionGetFlags ${sediment_section_id} $1
IntOp $1 ${SF_SELECTED} & $1
IntOp $0 $1 | $0
- SectionGetFlags ${usf_section_id} $1
- IntOp $1 ${SF_SELECTED} & $1
- IntOp $0 $1 | $0
SectionGetFlags ${client_section_id} $1
IntOp $1 ${SF_SELECTED} & $1
IntOp $0 $1 | $0
@@ -578,15 +488,6 @@
;--------------------------------
;Uninstaller
-Section "un.Python"
- Banner::show /NOUNLOAD /set 76 "Uninstalling Python..."
- SetOutPath "$TEMP"
- File "python-2.7.2.msi"
- ExecWait '"msiexec" /uninstall $TEMP\python-2.7.2.msi'
- Delete "$TEMP\python-2.7.2.msi"
- Banner::destroy
-SectionEnd
-
Section "un.PostgreSQL" UnSecPostgreSQL
Banner::show /NOUNLOAD /set 76 "Uninstalling PostgreSQL..."
; TODO find path from registry and uninstall
@@ -605,9 +506,8 @@
SectionEnd
Section "un."
-
+ !include ${common-un}
!include ${client-un}
- !include ${usf-un}
!include ${sediment-un}
!include ${admin-un}
!include ${gpp-un}
@@ -626,10 +526,10 @@
Delete "$QUICKLAUNCH\${productname_short}.lnk"
; Cleanup
- RMDir /R "$INSTDIR\GREAT-ER"
+ RMDir /R "$INSTDIR\GREAT-ER-Cefic"
RMDir /R "$INSTDIR\GREAT-ER-Sediment"
- RMDir /R "$INSTDIR\GREAT-ER-USF"
RMDir "$INSTDIR\GREAT-ER-DB"
+ RMDir "$INSTDIR\greater-pre-processing"
RMDir "$INSTDIR\Administration"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
@@ -675,14 +575,10 @@
basic ${productname_short} datasets."
!insertmacro MUI_DESCRIPTION_TEXT ${client_section_id} "Installs the ${productname_short} \
client. $\r$\n With the CEFIC approved models from GREAT-ER II $\r$\n"
- !insertmacro MUI_DESCRIPTION_TEXT ${usf_section_id} "Installs the client together with \
- additional Models:$\r$\n Lakes $\r$\n Metals"
!insertmacro MUI_DESCRIPTION_TEXT ${sediment_section_id} "Installs the client together with \
additional Models:$\r$\n Sediment"
!insertmacro MUI_DESCRIPTION_TEXT ${admin_section_id} "Installs the Administration tool for the \
GREAT-ER Database."
- !insertmacro MUI_DESCRIPTION_TEXT ${SecPython} "Installs Python Version 2.7.2 necessary for \
- GREAT-ER"
!insertmacro MUI_DESCRIPTION_TEXT ${gpp_section_id} "Installs the catchment preprocessing and \
upload tools."
More information about the Greater-commits
mailing list