More Windows install updates contributed by Steve Hall and Stephen George <steve_geo@optusnet.com.au>.

svn: r11206
This commit is contained in:
Brian Matherly 2008-10-28 04:04:15 +00:00
parent 74e9e7daa2
commit 4ef7a9eeeb
2 changed files with 366 additions and 322 deletions

View File

@ -1,6 +1,7 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2008 Steve Hall
# Copyright (C) 2008 Stephen George # Copyright (C) 2008 Stephen George
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify

View File

@ -1,9 +1,25 @@
# #
# Filename: gramps.nsi # Gramps - a GTK+ based genealogy program
#
# Copyright (C) 2008 Steve Hall [ digitect dancingpaper com ]
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: $
# #
# Description: Nullsoft Installer (NSIS) file to build Windows installer: # Description: Nullsoft Installer (NSIS) file to build Windows installer:
# Updated: 2007-06-18 07:09:38-0400
# Author: Steve Hall [ digitect dancingpaper com ]
# #
# Requires: NSIS version 2.0 or later. # Requires: NSIS version 2.0 or later.
# Notes: # Notes:
@ -134,8 +150,47 @@ SilentInstall normal
# 4. Custom functions {{{1 # 4. Custom functions {{{1
# 5. Language files {{{1 # 5. Language files {{{1
# Languages
# TODO: These are pretty badly broken at the moment.
# Note: This appears to be due to building on Win95 which does not
# support Unicode:
# (http://nsis.sf.net/archive/nsisweb.php?page=247&instances=0,235)
#
# So what happens if we use only ASCII?
#
#!insertmacro MUI_LANGUAGE "Arabic"
#!insertmacro MUI_LANGUAGE "Bulgarian"
#!insertmacro MUI_LANGUAGE "Catalan"
#!insertmacro MUI_LANGUAGE "Croatian"
#!insertmacro MUI_LANGUAGE "Czech"
#!insertmacro MUI_LANGUAGE "Default"
#!insertmacro MUI_LANGUAGE "Estonian"
#!insertmacro MUI_LANGUAGE "Farsi"
#!insertmacro MUI_LANGUAGE "Finnish"
#!insertmacro MUI_LANGUAGE "Greek"
#!insertmacro MUI_LANGUAGE "Hebrew"
#!insertmacro MUI_LANGUAGE "Hungarian"
#!insertmacro MUI_LANGUAGE "Indonesian"
#!insertmacro MUI_LANGUAGE "Japanese"
#!insertmacro MUI_LANGUAGE "Korean"
#!insertmacro MUI_LANGUAGE "Latvian"
#!insertmacro MUI_LANGUAGE "Lithuanian"
#!insertmacro MUI_LANGUAGE "Macedonian"
#!insertmacro MUI_LANGUAGE "Norwegian"
#!insertmacro MUI_LANGUAGE "Polish"
#!insertmacro MUI_LANGUAGE "Romanian"
#!insertmacro MUI_LANGUAGE "Russian"
#!insertmacro MUI_LANGUAGE "Serbian"
#!insertmacro MUI_LANGUAGE "SerbianLatin"
#!insertmacro MUI_LANGUAGE "SimpChinese"
#!insertmacro MUI_LANGUAGE "Slovak"
#!insertmacro MUI_LANGUAGE "Slovenian"
#!insertmacro MUI_LANGUAGE "Swedish"
#!insertmacro MUI_LANGUAGE "Thai"
#!insertmacro MUI_LANGUAGE "TradChinese"
#!insertmacro MUI_LANGUAGE "Turkish"
#!insertmacro MUI_LANGUAGE "Ukrainian"
# Latin1
!insertmacro MUI_LANGUAGE "Danish" !insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Dutch" !insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
@ -146,40 +201,6 @@ SilentInstall normal
!insertmacro MUI_LANGUAGE "PortugueseBR" !insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Spanish" !insertmacro MUI_LANGUAGE "Spanish"
# non-Latin1 below (bugs in NSIS?)
!insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "Bulgarian"
!insertmacro MUI_LANGUAGE "Catalan"
!insertmacro MUI_LANGUAGE "Croatian"
!insertmacro MUI_LANGUAGE "Czech"
#!insertmacro MUI_LANGUAGE "Default" <= WHAT IS THIS?
!insertmacro MUI_LANGUAGE "Estonian"
!insertmacro MUI_LANGUAGE "Farsi"
!insertmacro MUI_LANGUAGE "Finnish"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Hebrew"
!insertmacro MUI_LANGUAGE "Hungarian"
!insertmacro MUI_LANGUAGE "Indonesian"
!insertmacro MUI_LANGUAGE "Japanese"
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "Latvian"
!insertmacro MUI_LANGUAGE "Lithuanian"
!insertmacro MUI_LANGUAGE "Macedonian"
!insertmacro MUI_LANGUAGE "Norwegian"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Serbian"
!insertmacro MUI_LANGUAGE "SerbianLatin"
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Slovenian"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Thai"
!insertmacro MUI_LANGUAGE "TradChinese"
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Ukrainian"
# 6. Reserve Files {{{1 # 6. Reserve Files {{{1
# 1}}} # 1}}}
@ -232,6 +253,8 @@ SubSectionEnd
# Language Files {{{1 # Language Files {{{1
Section "Language Files" LangFiles Section "Language Files" LangFiles
# off by default
#SectionIn 1 3
#CreateDirectory $INSTDIR\lang #CreateDirectory $INSTDIR\lang
SetOutPath $INSTDIR SetOutPath $INSTDIR
@ -533,12 +556,14 @@ Function .onInit
; TODO: request path from user/browse (can NSIS do this?) ; TODO: request path from user/browse (can NSIS do this?)
MessageBox MB_OK "GRAMPS requires Python to be installed, please see:$\n \ #MessageBox MB_OK "GRAMPS requires Python to be installed, please see:$\n \
$\n \ # $\n \
http://gramps-project.org/windows/ $\n \ # http://gramps-project.org/windows/ $\n \
$\n \ # $\n \
for installation help. Unable to continue installation." # for installation help. Unable to continue installation."
Abort #Abort
MessageBox MB_OK "Python not found."
StrCpy $4 "flag"
HavePython: HavePython:
#MessageBox MB_OK "DEBUG: Final path for pythonw.exe...$\n$\nFound: $\"$3$\"" #MessageBox MB_OK "DEBUG: Final path for pythonw.exe...$\n$\nFound: $\"$3$\""
@ -551,18 +576,22 @@ Function .onInit
#MessageBox MB_OK "DEBUG: Attempting to run:$\n$\n $\"$3$\" $TEMP\gcheck.py $1" #MessageBox MB_OK "DEBUG: Attempting to run:$\n$\n $\"$3$\" $TEMP\gcheck.py $1"
; run gcheck ; run gcheck
Exec '"$3" $TEMP\gcheck.py $1' Exec '"$3" $TEMP\gcheck.py $1'
#Exec '"$3" "$TEMP\gcheck.py" "$1"'
#Exec '$\"$3$\" $\"$TEMP\gcheck.py$\" $\"$1$\"'
; Note The Exec above is a fork, meaning the following file test #; Note The Exec above is a fork, meaning the following file test
; will fail because it happens faster than the Exec can run #; will fail because it happens faster than the Exec can run
; to create it! #; to create it!
DetailPrint "Pausing for gcheck.py exectution..." DetailPrint "Pausing for gcheck.py exectution..."
; sleep #; sleep
Sleep 6000 Sleep 1000
; verify INI created ; verify INI created
IfFileExists $1 YesINI 0 IfFileExists $1 YesINI 0
MessageBox MB_OK "Dependency test INI creation failed, unable to continue." #MessageBox MB_OK "Dependency test INI creation failed, unable to continue."
Abort #Abort
MessageBox MB_OK "Dependency test INI creation failed."
StrCpy $4 "flag"
YesINI: YesINI:
; verify environment test results ; verify environment test results
@ -585,20 +614,24 @@ Function .onInit
IfFileExists $3\*.* NoHavePyGTK 0 IfFileExists $3\*.* NoHavePyGTK 0
; if we make it this far, we don't have GTK+ ; if we make it this far, we don't have GTK+
MessageBox MB_OK "GRAMPS requires GTK+ and PyGTK to be installed, please see:$\n \ #MessageBox MB_OK "GRAMPS requires GTK+ and PyGTK to be installed, please see:$\n \
$\n \ # $\n \
http://gramps-project.org/windows/ $\n \ # http://gramps-project.org/windows/ $\n \
$\n \ # $\n \
for installation help. Unable to continue installation." # for installation help. Unable to continue installation."
Abort #Abort
MessageBox MB_OK "GTK+ and PyGTK not found."
StrCpy $4 "flag"
NoHavePyGTK: NoHavePyGTK:
MessageBox MB_OK "GTK+/PyGTK import failed (GTK+ found on system), please see:$\n \ #MessageBox MB_OK "PyGTK import failed (GTK+ found on system), please see:$\n \
$\n \ # $\n \
http://gramps-project.org/windows/ $\n \ # http://gramps-project.org/windows/ $\n \
$\n \ # $\n \
for installation help. Unable to continue installation." # for installation help. Unable to continue installation."
Abort #Abort
MessageBox MB_OK "PyGTK not found."
StrCpy $4 "flag"
HaveGTK: HaveGTK:
@ -607,18 +640,28 @@ Function .onInit
; glade ; glade
ReadINIStr $0 $1 tests glade ReadINIStr $0 $1 tests glade
StrCmp $0 "yes" Haveglade 0 StrCmp $0 "yes" Haveglade 0
MessageBox MB_OK "glade not installed, unable to continue." #MessageBox MB_OK "glade not installed, unable to continue."
Abort #Abort
MessageBox MB_OK "Glade not found."
StrCpy $4 "flag"
Haveglade: Haveglade:
; pycairo ; pycairo
ReadINIStr $0 $1 tests pycairo ReadINIStr $0 $1 tests pycairo
StrCmp $0 "yes" Havepycairo 0 StrCmp $0 "yes" Havepycairo 0
MessageBox MB_OK "pycairo not installed, unable to continue." #MessageBox MB_OK "pycairo not installed, unable to continue."
Abort #Abort
MessageBox MB_OK "pycairo not found."
StrCpy $4 "flag"
Havepycairo: Havepycairo:
#!insertmacro MUI_LANGDLL_DISPLAY #!insertmacro MUI_LANGDLL_DISPLAY
StrCmp $4 "flag" +1 DependantsOK
MessageBox MB_OK "At least one dependency was not found, unable to continue."
Abort
DependantsOK:
# default install directory ($INSTDIR) # default install directory ($INSTDIR)
StrCpy $INSTDIR $PROGRAMFILES\gramps StrCpy $INSTDIR $PROGRAMFILES\gramps