SF.net SVN: geany: [1513] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Mon May 7 15:36:44 UTC 2007
Revision: 1513
http://svn.sourceforge.net/geany/?rev=1513&view=rev
Author: eht16
Date: 2007-05-07 08:36:43 -0700 (Mon, 07 May 2007)
Log Message:
-----------
Prevent installation in a directory without proper write permissions under Windows. Display an error message instead.
Modified Paths:
--------------
trunk/ChangeLog
trunk/geany.nsi
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-07 13:57:03 UTC (rev 1512)
+++ trunk/ChangeLog 2007-05-07 15:36:43 UTC (rev 1513)
@@ -1,6 +1,9 @@
2007-05-07 Enrico Tröger <enrico.troeger at uvena.de>
* data/filetypes.haskell: Added build instructions.
+ * geany.nsi: Prevent installation in a directory without proper
+ write permissions under Windows.
+ Display an error message instead.
2007-05-06 Enrico Tröger <enrico.troeger at uvena.de>
Modified: trunk/geany.nsi
===================================================================
--- trunk/geany.nsi 2007-05-07 13:57:03 UTC (rev 1512)
+++ trunk/geany.nsi 2007-05-07 15:36:43 UTC (rev 1513)
@@ -20,7 +20,7 @@
!define RESOURCEDIR "geany-${PRODUCT_VERSION}"
; only used when embedding GTK+ installer
-!define GTK_INSTALLER "gtk+-2.8.18-setup-1.exe"
+!define GTK_INSTALLER "gtk+-2.10.6-1-setup.exe"
SetCompressor /SOLID lzma
XPStyle on
@@ -89,6 +89,7 @@
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE OnDirLeave
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
@@ -145,7 +146,7 @@
Section "Documentation" SEC03
SectionIn 1
- SetOverwrite try
+ SetOverwrite ifnewer
SetOutPath "$INSTDIR"
File /r "${RESOURCEDIR}\doc"
@@ -169,7 +170,7 @@
; Include GTK runtime library but only if desired from command line
!ifdef INCLUDE_GTK
-Section "GTK 2.8 Runtime Environment" SEC05
+Section "GTK 2.10 Runtime Environment" SEC05
SectionIn 1
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
@@ -243,6 +244,23 @@
Abort
FunctionEnd
+Function OnDirLeave
+ ClearErrors
+ SetOutPath "$INSTDIR" ; what about IfError creating $INSTDIR?
+ GetTempFileName $1 "$INSTDIR" ; creates tmp file (or fails)
+ FileOpen $0 "$1" "w" ; error to open?
+ FileWriteByte $0 "0"
+ IfErrors notPossible possible
+
+notPossible:
+ RMDir "$INSTDIR" ; removes folder if empty
+ MessageBox MB_OK "The given directory is not writeable. Please choose another one!"
+ Abort
+possible:
+ FileClose $0
+ Delete "$1"
+FunctionEnd
+
Section Uninstall
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
Delete "$INSTDIR\${PRODUCT_NAME}.url"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list