[Greater-commits] r3800 - trunk/packaging
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Oct 13 16:29:04 CEST 2011
Author: aheinecke
Date: 2011-10-13 16:29:03 +0200 (Thu, 13 Oct 2011)
New Revision: 3800
Modified:
trunk/packaging/greater-installer.nsi
trunk/packaging/makeinstaller.py
Log:
Fix pre-processing installation
Modified: trunk/packaging/greater-installer.nsi
===================================================================
--- trunk/packaging/greater-installer.nsi 2011-10-13 14:17:07 UTC (rev 3799)
+++ trunk/packaging/greater-installer.nsi 2011-10-13 14:29:03 UTC (rev 3800)
@@ -137,9 +137,8 @@
"$TEMP\10_create_users.sql"' "" "$TEMP\greater_sediment_insert.log"
ExecDos::exec '"$INSTDIR\postgres9\bin\psql" -d greater-sediment -U greater -f \
"$TEMP\90_grant_access.sql"' "" "$TEMP\greater_sediment_insert.log"
+
Delete "$TEMP\sedimentdb.backup"
-
- no_usf:
Delete "$TEMP\defaultdb.backup"
Delete "$TEMP\10_create_users.sql"
Delete "$TEMP\90_grant_access.sql"
@@ -230,9 +229,12 @@
IntCmp $R0 0 no_start_menu
# Create new Start menu entries
CreateDirectory "$SMPROGRAMS\${productname}"
- CreateShortCut "$SMPROGRAMS\${productname}\${productname_short} USF.lnk" \
+ CreateShortCut "$SMPROGRAMS\${productname}\Upload Catchment.lnk" \
"$INSTDIR\python\pythonw.exe" '"$INSTDIR\greater-pre-processing\upload-catchment.py"' \
- "$INSTDIR\GREAT-ER\Resources\greater2.ico"
+ "$INSTDIR\greater-pre-processing\greater2.ico"
+ CreateShortCut "$SMPROGRAMS\${productname}\Catchment Pre Processing.lnk" \
+ "$INSTDIR\python\pythonw.exe" '"$INSTDIR\greater-pre-processing\greater-pre-processing.py"' \
+ "$INSTDIR\greater-pre-processing\greater.ico"
no_start_menu:
Return
SectionEnd
@@ -240,8 +242,11 @@
;-----------------------------
; Client sections
-Section "Client (Sediment Model)" sediment_section_id
+Section "GREAT-ER Common Files" common_section_id
!include ${common-in}
+SectionEnd
+
+Section "GREAT-ER Sediment Ext." sediment_section_id
!include ${sediment-in}
; Set Path to $PROFILE
@@ -266,9 +271,9 @@
# Create new Start menu entries
CreateDirectory "$SMPROGRAMS\${productname}"
CreateShortCut "$SMPROGRAMS\${productname}\${productname_short} Sediment.lnk" \
- "$INSTDIR\python\pythonw.exe" '"$INSTDIR\GREAT-ER-Sediment\GREAT-ER\${executable}" \
+ "$INSTDIR\python\pythonw.exe" '"$INSTDIR\GREAT-ER-Sediment\${executable}" \
"greater/greater at greater-sediment"' \
- "$INSTDIR\GREAT-ER\Resources\greater2.ico"
+ "$INSTDIR\GREAT-ER-Sediment\Resources\greater2.ico"
no_start_menu:
# ** Desktop Icon **
@@ -280,15 +285,15 @@
IntCmp $R0 0 no_desktop
# Create new Desktop link
CreateShortCut "$DESKTOP\${productname_short} Sediment.lnk" \
- "$INSTDIR\python\pythonw.exe" '"$INSTDIR\GREAT-ER-Sediment\GREAT-ER\${executable}" \
+ "$INSTDIR\python\pythonw.exe" '"$INSTDIR\GREAT-ER-Sediment\${executable}" \
"greater/greater at greater-sediment"' \
- "$INSTDIR\GREAT-ER-Sediment\GREAT-ER\Resources\greater2.ico"
+ "$INSTDIR\GREAT-ER-Sediment\Resources\greater2.ico"
no_desktop:
Return
SectionEnd
-Section "GREAT-ER Desktop" client_section_id
+Section "GREAT-ER Standard" client_section_id
; Include the input files
; package all files, recursively, preserving attributes
; assume files are in the correct places
@@ -349,6 +354,7 @@
InstTypeSetText 2 "Server only"
SectionSetInstTypes ${sediment_section_id} 1
SectionSetInstTypes ${client_section_id} 3
+ SectionSetInstTypes ${common_section_id} 3
SectionSetInstTypes ${SecPostgreSQL} 5
SectionSetInstTypes ${admin_section_id} 5
SectionSetInstTypes ${gpp_section_id} 1
@@ -357,7 +363,7 @@
SectionSetFlags ${admin_section_id} 1
SectionSetFlags ${sediment_section_id} 1
SectionSetFlags ${gpp_section_id} 1
-
+ SectionSetFlags ${common_section_id} 17
SectionSetSize ${SecPostgreSQL} "207330"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "installer-options.ini"
call CheckExistingVersion
@@ -446,16 +452,19 @@
; Also make sure that the greater desktop is enabled as soon as
; at least sediment or usf is enabled
Function .onSelChange
-; Push $0
-; Push $1
-; SectionGetFlags ${sediment_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
-; Pop $1
-; Pop $0
+ Push $0
+ Push $1
+ SectionGetFlags ${sediment_section_id} $1
+ IntOp $1 ${SF_SELECTED} & $1
+ IntOp $0 $1 | $0
+ SectionGetFlags ${gpp_section_id} $1
+ IntOp $0 $1 | $0
+ SectionGetFlags ${client_section_id} $1
+ IntOp $0 $1 | $0
+ IntOp $0 16 | $0
+ SectionSetFlags ${common_section_id} $0
+ Pop $1
+ Pop $0
Push $0
Push $1
@@ -479,7 +488,7 @@
;Uninstaller
Section "un.PostgreSQL" UnSecPostgreSQL
- Banner::show /NOUNLOAD /set 76 "Uninstalling PostgreSQL..."
+ Banner::show /NOUNLOAD /set 76 "Uninstalling..." "PostgreSQL..." ""
; TODO find path from registry and uninstall
ExecDos::exec '"$INSTDIR\postgres9\bin\pg_ctl.exe" stop -D "$INSTDIR\GREAT-ER-DB\database"'
ExecWait '"$INSTDIR\postgres9\uninstall-postgresql.exe" --mode unattended'
@@ -514,12 +523,17 @@
RMDir /R "$SMPROGRAMS\${productname}"
Delete "$DESKTOP\${productname_short}.lnk"
Delete "$QUICKLAUNCH\${productname_short}.lnk"
+ Delete "$DESKTOP\${productname_short} Sediment.lnk"
; Cleanup
RMDir /R "$INSTDIR\GREAT-ER-Cefic"
RMDir /R "$INSTDIR\GREAT-ER-Sediment"
+ RMDir /R "$INSTDIR\Thuban"
+ RMDir /R "$INSTDIR\python"
+ RMDir /R "$INSTDIR\greater-pre-processing"
+ RMDir /R "$INSTDIR\Lib"
+ RMDir "$INSTDIR\postgres9"
RMDir "$INSTDIR\GREAT-ER-DB"
- RMDir "$INSTDIR\greater-pre-processing"
RMDir "$INSTDIR\Administration"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
@@ -564,13 +578,14 @@
!insertmacro MUI_DESCRIPTION_TEXT ${SecPostgreSQL} "Installs the PostgreSQL 9.0.4 Database with \
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 ${sediment_section_id} "Installs the client together with \
- additional Models:$\r$\n Sediment"
+ client. $\r$\n With the CEFIC approved simulation models.$\r$\n"
+ !insertmacro MUI_DESCRIPTION_TEXT ${sediment_section_id} "Installs a client with the \
+ Sediment Model extension."
!insertmacro MUI_DESCRIPTION_TEXT ${admin_section_id} "Installs the Administration tool for the \
GREAT-ER Database."
!insertmacro MUI_DESCRIPTION_TEXT ${gpp_section_id} "Installs the catchment preprocessing and \
- upload tools."
+ upload tools."
+ !insertmacro MUI_DESCRIPTION_TEXT ${common_section_id} "Libraries necessary to run GREAT-ER$\r$\n"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Modified: trunk/packaging/makeinstaller.py
===================================================================
--- trunk/packaging/makeinstaller.py 2011-10-13 14:17:07 UTC (rev 3799)
+++ trunk/packaging/makeinstaller.py 2011-10-13 14:29:03 UTC (rev 3800)
@@ -26,6 +26,8 @@
import compileall
+COMPILEALL=True
+
ADMINTOOL_PATH = "../bin"
CYGWIN_PATH = "/cygwin/bin"
@@ -114,7 +116,7 @@
def generate_clientfiles():
instdirs = ["GREAT-ER-Cefic"]
for idir in instdirs:
- compileall.compile_dir(idir, quiet = True)
+ if COMPILEALL: compileall.compile_dir(idir, quiet = True)
def whitelist(f):
for bad in [".svn", "test_", ".log"]:
if bad in f:
@@ -130,7 +132,7 @@
instdirs = ["Lib", "python", "sciparam",
"Thuban", "GREAT-ER-DB"]
for idir in instdirs:
- compileall.compile_dir(idir, quiet = True)
+ if COMPILEALL: compileall.compile_dir(idir, quiet = True)
def whitelist(f):
for bad in [".svn", "test_", ".log"]:
if bad in f:
@@ -145,7 +147,7 @@
def generate_sediment():
instdirs = ["GREAT-ER-Sediment"]
for idir in instdirs:
- compileall.compile_dir(idir, quiet = True)
+ if COMPILEALL: compileall.compile_dir(idir, quiet = True)
def whitelist(f):
for bad in [".svn", "test_", ".log"]:
if bad in f:
@@ -183,7 +185,8 @@
def generate_pre_processing_dependencies():
gpp_files = ["awk"]
- cygwin_exectables = ["gawk", "sh", "rm", "sort", "join", "cut", "paste", "echo"]
+ cygwin_exectables = ["gawk", "sh", "rm", "sort", "join", "cut", "paste", "echo",
+ "gen2shp", "dbf2txt", "txt2dbf"]
for exc in [os.path.abspath(os.path.join(CYGWIN_PATH, "%s.exe" % name)) \
for name in cygwin_exectables]:
gpp_files += walk_dependencies(exc)
@@ -212,7 +215,7 @@
def generate_pre_processing():
instdirs = ["greater-pre-processing"]
for idir in instdirs:
- compileall.compile_dir(idir, quiet = True)
+ if COMPILEALL: compileall.compile_dir(idir, quiet = True)
def whitelist(f):
for bad in [".svn", "test_", ".log"]:
if bad in f:
More information about the Greater-commits
mailing list