[Greater-commits] r3717 - trunk/packaging
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Jul 27 17:26:32 CEST 2011
Author: aheinecke
Date: 2011-07-27 17:26:32 +0200 (Wed, 27 Jul 2011)
New Revision: 3717
Modified:
trunk/packaging/greater-installer.nsi
trunk/packaging/makeinstaller.py
Log:
Improved shortcut placing
Modified: trunk/packaging/greater-installer.nsi
===================================================================
--- trunk/packaging/greater-installer.nsi 2011-07-27 14:48:34 UTC (rev 3716)
+++ trunk/packaging/greater-installer.nsi 2011-07-27 15:26:32 UTC (rev 3717)
@@ -28,6 +28,7 @@
;--------------------------------
; Variable declarations
Var POSTGRESQL_INSTALLED
+ Var SEDIMENT_SELECTED
Var PYTHON_PATH
;--------------------------------
;Version Information (for installer file properties)
@@ -131,9 +132,8 @@
"$TEMP\90_grant_access.sql"' "" "$TEMP\greater_insert.log"
; Also the sediment database?
- push $R0
- SectionGetFlags ${sediment_section_id} $R0
- IntCmp $R0 0 no_sediment
+ CALL CheckIfSedimentSelected
+ StrCmp $R0 "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"
@@ -141,9 +141,9 @@
"$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_sediment:
- pop $RO
Delete "$TEMP\defaultdb.backup"
Delete "$TEMP\10_create_users.sql"
Delete "$TEMP\90_grant_access.sql"
@@ -158,7 +158,7 @@
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"'
+ StrCpy $PYTHON_PATH '"$INSTDIR\Python2.7\pythonw"'
banner::destroy
SectionEnd
@@ -332,11 +332,11 @@
SectionSetInstTypes ${usf_section_id} 1
SectionSetInstTypes ${sediment_section_id} 1
SectionSetInstTypes ${client_section_id} 3
- SectionSetInstTypes ${SecPostgeSQL} 5
+ SectionSetInstTypes ${SecPostgreSQL} 5
SectionSetInstTypes ${SecPython} 3
SectionSetInstTypes ${admin_section_id} 5
SectionSetFlags ${client_section_id} 1
- SectionSetFlags ${SecPostgeSQL} 1
+ SectionSetFlags ${SecPostgreSQL} 1
SectionSetFlags ${SecPython} 1
SectionSetFlags ${admin_section_id} 1
SectionSetFlags ${usf_section_id} 1
@@ -425,6 +425,14 @@
Return
FunctionEnd
+Function CheckIfSedimentSelected
+ SectionGetFlags ${sediment_section_id} $R0
+ StrCpy $SEDIMENT_SELECTED "no"
+ IntCmp $R0 0 no_sediment
+ StrCpy $SEDIMENT_SELECTED "yes"
+ no_sediment:
+FunctionEnd
+
;---------------------
; Disable the next button on the components page as long as there
; are no sections selected
@@ -440,6 +448,8 @@
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
Pop $1
Pop $0
Modified: trunk/packaging/makeinstaller.py
===================================================================
--- trunk/packaging/makeinstaller.py 2011-07-27 14:48:34 UTC (rev 3716)
+++ trunk/packaging/makeinstaller.py 2011-07-27 15:26:32 UTC (rev 3717)
@@ -179,7 +179,10 @@
cmd.append(os.path.join("packaging", "greater-installer.nsi"))
print "Calling NSIS with command: \n %s " % " ".join(cmd)
try:
- run.capture_output(cmd, env = os.environ.copy(), shell=True)
+ output = run.capture_output(cmd, env = os.environ.copy(), shell=True)
+ for line in output.splitlines():
+ if line.startswith("warning:"):
+ print line
except run.SubprocessError, e:
print e.output[:-20]
More information about the Greater-commits
mailing list