mirror of https://github.com/CGAL/cgal
Remove these old files. Subversion handles the versioning.
This commit is contained in:
parent
c6e0cdbfd4
commit
b74f75b4bc
|
|
@ -3831,7 +3831,4 @@ wininst/developer_scripts/cgal.ico -text svneol=unset#image/x-icon
|
|||
wininst/developer_scripts/cgal_very_small_FFFFFF.bmp -text svneol=unset#image/bmp
|
||||
wininst/developer_scripts/locate.zip -text svneol=unset#application/zip
|
||||
wininst/developer_scripts/script_cgal.nsh -text
|
||||
wininst/developer_scripts/script_cgal_3_3.nsh -text
|
||||
wininst/developer_scripts/script_cgal_3_4.nsh -text
|
||||
wininst/developer_scripts/script_cgal_3_5.nsh -text
|
||||
wininst/developer_scripts/zirkel.bmp -text svneol=unset#image/bmp
|
||||
|
|
|
|||
|
|
@ -1,443 +0,0 @@
|
|||
; The name of the installer
|
||||
Name "CgalInstaller"
|
||||
|
||||
; The file to write
|
||||
OutFile "CGAL3.0Setup.exe"
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $PROGRAMFILES\CGAL-3.0
|
||||
|
||||
!define MUI_PRODUCT "CGAL" ;Define your own software name here
|
||||
!define MUI_VERSION "3.0" ;Define your own software version here
|
||||
!define MUI_ICON "Icons\cgal.ico"
|
||||
!define MUI_UNICON "Icons\cgal-uninstall2.ico"
|
||||
|
||||
|
||||
!include "MUI.nsh"
|
||||
|
||||
;Remember the Start Menu Folder
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${MUI_PRODUCT}{MUI_VERSION}"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
|
||||
!define TEMP $R0
|
||||
XPStyle on
|
||||
|
||||
;--------------------------------
|
||||
;Modern UI Configuration
|
||||
!define MUI_WELCOMEPAGE
|
||||
!define MUI_CUSTOMPAGECOMMANDS
|
||||
!define MUI_LICENSEPAGE
|
||||
!define MUI_COMPONENTSPAGE
|
||||
!define MUI_DIRECTORYPAGE
|
||||
!define MUI_STARTMENUPAGE
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_UNINSTALLER
|
||||
!define MUI_UNCONFIRMPAGE
|
||||
;Modern UI System
|
||||
;!insertmacro MUI_SYSTEM
|
||||
|
||||
|
||||
;--------------------------------
|
||||
;Languages
|
||||
|
||||
;!insertmacro MUI_LANGUAGE "Bulgarian"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
!insertmacro MUI_LANGUAGE "TradChinese"
|
||||
!insertmacro MUI_LANGUAGE "Danish"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "Macedonian"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
||||
!insertmacro MUI_LANGUAGE "Romanian"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "Thai"
|
||||
!insertmacro MUI_LANGUAGE "Ukrainian"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
|
||||
;--------------------------------
|
||||
;Data
|
||||
|
||||
LicenseData /LANG=${LANG_ENGLISH} "License.txt"
|
||||
LicenseData /LANG=${LANG_FRENCH} "License.txt"
|
||||
LicenseData /LANG=${LANG_GERMAN} "License.txt"
|
||||
LicenseData /LANG=${LANG_SPANISH} "License.txt"
|
||||
LicenseData /LANG=${LANG_SIMPCHINESE} "License.txt"
|
||||
LicenseData /LANG=${LANG_TRADCHINESE} "License.txt"
|
||||
LicenseData /LANG=${LANG_JAPANESE} "License.txt"
|
||||
LicenseData /LANG=${LANG_ITALIAN} "License.txt"
|
||||
LicenseData /LANG=${LANG_DUTCH} "License.txt"
|
||||
LicenseData /LANG=${LANG_DANISH} "License.txt"
|
||||
LicenseData /LANG=${LANG_GREEK} "License.txt"
|
||||
LicenseData /LANG=${LANG_RUSSIAN} "License.txt"
|
||||
LicenseData /LANG=${LANG_PORTUGUESEBR} "License.txt"
|
||||
LicenseData /LANG=${LANG_POLISH} "License.txt"
|
||||
LicenseData /LANG=${LANG_UKRAINIAN} "License.txt"
|
||||
LicenseData /LANG=${LANG_CZECH} "License.txt"
|
||||
LicenseData /LANG=${LANG_SLOVAK} "License.txt"
|
||||
;LicenseData /LANG=${LANG_BULGARIAN} "License.txt"
|
||||
LicenseData /LANG=${LANG_HUNGARIAN} "License.txt"
|
||||
LicenseData /LANG=${LANG_THAI} "License.txt"
|
||||
LicenseData /LANG=${LANG_ROMANIAN} "License.txt"
|
||||
LicenseData /LANG=${LANG_MACEDONIAN} "License.txt"
|
||||
|
||||
|
||||
|
||||
|
||||
;--------------------------------
|
||||
;Pages
|
||||
!insertmacro MUI_PAGECOMMAND_WELCOME
|
||||
!insertmacro MUI_PAGECOMMAND_LICENSE
|
||||
!insertmacro MUI_PAGECOMMAND_COMPONENTS
|
||||
!insertmacro MUI_PAGECOMMAND_DIRECTORY
|
||||
!insertmacro MUI_PAGECOMMAND_STARTMENU
|
||||
!insertmacro MUI_PAGECOMMAND_INSTFILES
|
||||
|
||||
;--------------------------------
|
||||
;Installer Sections
|
||||
|
||||
|
||||
Section "CGAL library" SecCopyUI
|
||||
SectionIn RO
|
||||
SetOutPath "$INSTDIR\auxiliary"
|
||||
FILE /r "CGAL3.0\auxiliary\*.*"
|
||||
SetOutPath "$INSTDIR\config"
|
||||
FILE /r "CGAL3.0\config\*.*"
|
||||
SetOutPath "$INSTDIR\include"
|
||||
FILE /r "CGAL3.0\include\*.*"
|
||||
SetOutPath "$INSTDIR\lib"
|
||||
FILE /r "CGAL3.0\lib\*.*"
|
||||
SetOutPath "$INSTDIR\make"
|
||||
FILE /r "CGAL3.0\make\*.*"
|
||||
SetOutPath "$INSTDIR\src"
|
||||
FILE /r "CGAL3.0\src\*.*"
|
||||
; SetOutPath "$INSTDIR\winutils"
|
||||
; FILE /r "CGAL3.0\winutils\*.*"
|
||||
SetOutPath "$INSTDIR\examples"
|
||||
FILE /r "CGAL3.0\examples\*.*"
|
||||
SetOutPath "$INSTDIR\demo"
|
||||
FILE /r "CGAL3.0\demo\*.*"
|
||||
SetOutPath "$INSTDIR\scripts"
|
||||
FILE /r "CGAL3.0\scripts\*.*"
|
||||
SetOutPath "$INSTDIR\doc_html"
|
||||
FILE /r "CGAL3.0\doc_html\*.*"
|
||||
SetOutPath "$INSTDIR\doc_pdf"
|
||||
FILE /r "CGAL3.0\doc_pdf\*.*"
|
||||
SetOutPath "$INSTDIR\doc_ps"
|
||||
FILE /r "CGAL3.0\doc_ps\*.*"
|
||||
|
||||
|
||||
|
||||
;the next will not be part of the public release
|
||||
; SetOutPath "$INSTDIR\developer_scripts"
|
||||
; FILE /r "CGAL3.0\developer_scripts\*.*"
|
||||
; SetOutPath "$INSTDIR\doc_tex"
|
||||
; FILE /r "CGAL3.0\doc_tex\*.*"
|
||||
; SetOutPath "$INSTDIR\test"
|
||||
; FILE /r "CGAL3.0\test\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
FILE "CGAL3.0\Changes"
|
||||
FILE "CGAL3.0\Install"
|
||||
FILE "CGAL3.0\INSTALL.win32"
|
||||
FILE "CGAL3.0\Install_win32.chm"
|
||||
FILE "CGAL3.0\install_cgal"
|
||||
FILE "CGAL3.0\License"
|
||||
FILE "CGAL3.0\LICENSE.LGPL"
|
||||
FILE "CGAL3.0\LICENSE.QPL"
|
||||
FILE "CGAL3.0\Readme"
|
||||
FILE "Icons\cgal.ico"
|
||||
;Read a value from an InstallOptions INI File
|
||||
;!insertmacro MUI_INSTALLOPTIONS_READ ${TEMP} "ioCGAL.ini" "Field 2" "State"
|
||||
;StrCmp ${TEMP} "0" "" +2
|
||||
;Checked
|
||||
;MessageBox MB_OK "A MessageBox..."
|
||||
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN
|
||||
;Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}"
|
||||
CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\DOC"
|
||||
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\DOC\installation_pdf.lnk" "$INSTDIR\doc_pdf\installation.pdf"
|
||||
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\DOC\installation_ps.lnk" "$INSTDIR\doc_ps\installation.ps"
|
||||
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\DOC\contents.lnk" "$INSTDIR\doc_html\installation\contents.html"
|
||||
|
||||
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\Install_win32.lnk" "$INSTDIR\Install_win32.chm"
|
||||
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\README.lnk" "$INSTDIR\Readme"
|
||||
CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
|
||||
;Write shortcut location to the registry (for Uninstaller)
|
||||
WriteRegStr HKCU "Software\${MUI_PRODUCT}${MUI_VERSION}" "Start Menu Folder" "${MUI_STARTMENUPAGE_VARIABLE}"
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
|
||||
; WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall" "${MUI_PRODUCT}${MUI_VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}${MUI_VERSION}" "DisplayName" "${MUI_PRODUCT}${MUI_VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}${MUI_VERSION}" "UninstallString" "$INSTDIR\Uninstall.exe"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}${MUI_VERSION}" "DisplayIcon" "$INSTDIR\cgal.ico"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}${MUI_VERSION}" "DisplayVersion" "${MUI_VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}${MUI_VERSION}" "Publisher" "Geometry Factory"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}${MUI_VERSION}" "HelpLink" "mailto:contact@cgal.org"
|
||||
; WriteRegStr HKCU "Software\${MUI_PRODUCT}${MUI_VERSION}" "Installer Language"
|
||||
|
||||
;Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
|
||||
|
||||
Section "Set CGALROOT" ROOTSec5
|
||||
Call GetWindowsVersion
|
||||
Pop $R0
|
||||
Push $R1
|
||||
StrCpy $R1 "You are running on Windows $R0.$\r$\nI configure CGALROOT to be $INSTDIR" 100 0
|
||||
MessageBox MB_OK $R1
|
||||
Pop $R1
|
||||
StrCmp $R0 "ME" lbl_me
|
||||
StrCmp $R0 "98" lbl_ninetyeight
|
||||
StrCmp $R0 "98" lbl_ninetyfive
|
||||
Goto lbl_ntlike
|
||||
|
||||
lbl_me:
|
||||
Goto lbl_autoexec
|
||||
Goto lbl_done
|
||||
lbl_ninetyeight:
|
||||
Goto lbl_autoexec
|
||||
Goto lbl_done
|
||||
lbl_ninetyfive:
|
||||
Goto lbl_autoexec
|
||||
Goto lbl_done
|
||||
lbl_ntlike:
|
||||
WriteRegStr HKCU "Environment" "CGALROOT" $INSTDIR
|
||||
MessageBox MB_YESNO "Do you want to set it for every user on this computer?$\r$\nYou need administrator rights to do it." IDNO no
|
||||
WriteRegStr HKEY_LOCAL_MACHINE "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "CGALROOT" "$INSTDIR"
|
||||
MessageBox MB_OK "You must logout and login to have CGALROOT set in your environment.$\r$\nAlso you should copy $INSTDIR\auxiliary\wingmp\gmp-4.1.2\gmp.dll on your PATH. (eg. C:\Windows\System32)"
|
||||
no:
|
||||
MessageBox MB_OK "You must logout and login to have CGALROOT set in your environment.$\r$\nAlso you should copy $INSTDIR\auxiliary\wingmp\gmp-4.1.2\gmp.dll on your PATH. (eg. C:\Windows\System32)"
|
||||
|
||||
Goto lbl_done
|
||||
lbl_autoexec:
|
||||
FileOpen $1 "$1\autoexec.bat" a
|
||||
FileSeek $1 0 END
|
||||
FileWrite $1 "$\r$\nSET CGALROOT=$INSTDIR$\r$\n"
|
||||
FileClose $1
|
||||
MessageBox MB_OK "You will have to reboot before the CGALROOT is set in your environment.$\r$\nAlso you should copy $INSTDIR\auxiliary\wingmp\gmp-4.1.2\gmp.dll on your PATH. (eg. C:\Windows\System32)"
|
||||
SetRebootFlag true
|
||||
Goto lbl_done
|
||||
|
||||
|
||||
lbl_done:
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
|
||||
;Display the Finish header
|
||||
;Insert this macro after the sections if you are not using a finish page
|
||||
!insertmacro MUI_SECTIONS_FINISHHEADER
|
||||
|
||||
|
||||
|
||||
|
||||
;--------------------------------
|
||||
;Installer Functions
|
||||
|
||||
Function .onInit
|
||||
|
||||
# the plugins dir is automatically deleted when the installer exits
|
||||
InitPluginsDir
|
||||
File /oname=$PLUGINSDIR\splash.bmp "LOGO\CGAL.bmp"
|
||||
advsplash::show 1000 600 400 -1 $PLUGINSDIR\splash
|
||||
|
||||
;Language selection
|
||||
|
||||
;Font
|
||||
Push Tahoma
|
||||
Push 8
|
||||
|
||||
;!insertmacro MUI_LANGDLL_PUSH "Bulgarian"
|
||||
|
||||
Push ""
|
||||
Push ${LANG_CZECH}
|
||||
Push Czech
|
||||
Push ${LANG_SIMPCHINESE}
|
||||
Push SimpChinese
|
||||
Push ${LANG_TRADCHINESE}
|
||||
Push TradChinese
|
||||
Push ${LANG_DANISH}
|
||||
Push Danish
|
||||
Push ${LANG_GERMAN}
|
||||
Push German
|
||||
Push ${LANG_ENGLISH}
|
||||
Push English
|
||||
Push ${LANG_SPANISH}
|
||||
Push Spanish
|
||||
Push ${LANG_FRENCH}
|
||||
Push French
|
||||
Push ${LANG_GREEK}
|
||||
Push Greek
|
||||
Push ${LANG_ITALIAN}
|
||||
Push Italian
|
||||
Push ${LANG_JAPANESE}
|
||||
Push Japanese
|
||||
Push ${LANG_MACEDONIAN}
|
||||
Push Macedonian
|
||||
Push ${LANG_HUNGARIAN}
|
||||
Push Hungarian
|
||||
Push ${LANG_DUTCH}
|
||||
Push Dutch
|
||||
Push ${LANG_POLISH}
|
||||
Push Polish
|
||||
Push ${LANG_PORTUGUESE}
|
||||
Push Portuguese
|
||||
Push ${LANG_ROMANIAN}
|
||||
Push Romanian
|
||||
Push ${LANG_RUSSIAN}
|
||||
Push Russian
|
||||
Push ${LANG_SLOVAK}
|
||||
Push Slovak
|
||||
Push ${LANG_THAI}
|
||||
Push Thai
|
||||
Push ${LANG_UKRAINIAN}
|
||||
Push Ukrainian
|
||||
|
||||
Push A ; A means auto count languages
|
||||
; for the auto count to work the first empty push (Push "") must remain
|
||||
|
||||
LangDLL::LangDialog "Installer Language" "Please select a language."
|
||||
|
||||
Pop $LANGUAGE
|
||||
StrCmp $LANGUAGE "cancel" 0 +2
|
||||
Abort
|
||||
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
; GetWindowsVersion
|
||||
;
|
||||
; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
|
||||
; Returns on top of stack
|
||||
;
|
||||
; Windows Version (95, 98, ME, NT x.x, 2000, XP, .NET Server)
|
||||
; or
|
||||
; '' (Unknown Windows Version)
|
||||
;
|
||||
; Usage:
|
||||
; Call GetWindowsVersion
|
||||
; Pop $R0
|
||||
; ; at this point $R0 is "NT 4.0" or whatnot
|
||||
|
||||
Function GetWindowsVersion
|
||||
Push $R0
|
||||
Push $R1
|
||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
|
||||
StrCmp $R0 "" 0 lbl_winnt
|
||||
; we are not NT.
|
||||
;ReadRegStr $R0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion VersionNumber
|
||||
|
||||
StrCpy $R1 $R0 1
|
||||
StrCmp $R1 '4' 0 lbl_error
|
||||
|
||||
StrCpy $R1 $R0 3
|
||||
|
||||
StrCmp $R1 '4.0' lbl_win32_95
|
||||
StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
|
||||
|
||||
lbl_win32_95:
|
||||
StrCpy $R0 '95'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_win32_98:
|
||||
StrCpy $R0 '98'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_win32_ME:
|
||||
StrCpy $R0 'ME'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_winnt:
|
||||
|
||||
StrCpy $R1 $R0 1
|
||||
|
||||
StrCmp $R1 '3' lbl_winnt_x
|
||||
StrCmp $R1 '4' lbl_winnt_x
|
||||
|
||||
StrCpy $R1 $R0 3
|
||||
|
||||
StrCmp $R1 '5.0' lbl_winnt_2000
|
||||
StrCmp $R1 '5.1' lbl_winnt_XP
|
||||
StrCmp $R1 '5.2' lbl_winnt_dotNET lbl_error
|
||||
|
||||
lbl_winnt_x:
|
||||
StrCpy $R0 "NT $R0" 6
|
||||
Goto lbl_done
|
||||
|
||||
lbl_winnt_2000:
|
||||
Strcpy $R0 '2000'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_winnt_XP:
|
||||
Strcpy $R0 'XP'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_winnt_dotNET:
|
||||
Strcpy $R0 '.NET Server'
|
||||
Goto lbl_done
|
||||
|
||||
lbl_error:
|
||||
Strcpy $R0 ''
|
||||
lbl_done:
|
||||
Pop $R1
|
||||
Exch $R0
|
||||
FunctionEnd
|
||||
|
||||
|
||||
|
||||
|
||||
; special uninstall section.
|
||||
Section "Uninstall"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}${MUI_VERSION}"
|
||||
DeleteRegKey HKLM "SOFTWARE\${MUI_PRODUCT}${MUI_VERSION}"
|
||||
DeleteRegKey HKCU "SOFTWARE\${MUI_PRODUCT}${MUI_VERSION}"
|
||||
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
Delete "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\DOC\Installation_ps.lnk"
|
||||
Delete "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\DOC\Installation_pdf.lnk"
|
||||
Delete "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\DOC\contents.lnk"
|
||||
Delete "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\Install_win32.lnk"
|
||||
Delete "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\README.lnk"
|
||||
Delete "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\Uninstall.lnk"
|
||||
RMDir "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}\DOC" ;Only if empty, so it won't delete other
|
||||
RMDir "$SMPROGRAMS\${MUI_PRODUCT}${MUI_VERSION}" ;Only if empty, so it won't delete other shortcuts
|
||||
|
||||
IfFileExists "$INSTDIR" 0 NoErrorMsg
|
||||
MessageBox MB_OK "Note: $INSTDIR could not be removed!" IDOK 0 ; skipped if file doesn't exist
|
||||
NoErrorMsg:
|
||||
;Display the Finish header
|
||||
!insertmacro MUI_UNFINISHHEADER
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Functions
|
||||
|
||||
Function un.onInit
|
||||
;Get language from registry
|
||||
ReadRegStr $LANGUAGE HKCU "Software\${MUI_PRODUCT}" "Installer Language"
|
||||
FunctionEnd
|
||||
|
||||
|
|
@ -1,397 +0,0 @@
|
|||
;============================
|
||||
; Copyright 2007 GeometryFactory (France)
|
||||
; Author: Andreas Fabri (andreas.fabri@geometryfactrory.com), Fernando Cacciola (fernando.cacciola@geometryfactrory.com)
|
||||
;============================
|
||||
; Some portions of this file have been derived from "boost.nsi", the Boost Windows Installer, contributed by www.boost-consulting.org.
|
||||
;
|
||||
; Copyright 2006 Daniel Wallin
|
||||
; Copyright 2006 Eric Niebler
|
||||
; Distributed under the Boost Software License, Version 1.0. (See
|
||||
; accompanying file LICENSE_1_0.txt or copy at
|
||||
; http://www.boost.org/LICENSE_1_0.txt)
|
||||
;============================
|
||||
|
||||
${StrStr}
|
||||
|
||||
;!define SkipFiles
|
||||
;!define SkipSetEnvVar
|
||||
;!define SkipDownload
|
||||
;!define FetchLocal
|
||||
;!define DebugLog
|
||||
!define ViaFTP
|
||||
|
||||
Var no_default_compilers
|
||||
Var no_default_variants
|
||||
Var selected_libs
|
||||
Var FoundBoostFolder
|
||||
|
||||
;--------------------------------
|
||||
; Macros
|
||||
;--------------------------------
|
||||
|
||||
|
||||
!define MultiVariantSection "!insertmacro MultiVariantSection"
|
||||
|
||||
; Expands to a Section Group named "SecName" which contains all library variants.
|
||||
; For each variant, the macro "Handler" is expanded with the variant name as argument
|
||||
!macro MultiVariantSection SecName Handler Idx
|
||||
SectionGroup "${SecName}" ${Idx}
|
||||
SectionGroup "VC7.1"
|
||||
Section /o "Multithread Debug"
|
||||
!insertmacro "${Handler}" "vc71-mt-gd"
|
||||
SectionEnd
|
||||
Section /o "Multithread"
|
||||
!insertmacro "${Handler}" "vc71-mt"
|
||||
SectionEnd
|
||||
Section /o "Multithread, static runtime"
|
||||
!insertmacro "${Handler}" "vc71-mt-s"
|
||||
SectionEnd
|
||||
Section /o "Multithread Debug, static runtime"
|
||||
!insertmacro "${Handler}" "vc71-mt-sgd"
|
||||
SectionEnd
|
||||
Section /o "Single thread, static runtime"
|
||||
!insertmacro "${Handler}" "vc71-s"
|
||||
SectionEnd
|
||||
Section /o "Single thread Debug, static runtime"
|
||||
!insertmacro "${Handler}" "vc71-sgd"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
SectionGroup "VC8.0"
|
||||
Section /o "Multithread Debug"
|
||||
!insertmacro "${Handler}" "vc80-mt-gd"
|
||||
SectionEnd
|
||||
Section /o "Multithread"
|
||||
!insertmacro "${Handler}" "vc80-mt"
|
||||
SectionEnd
|
||||
Section /o "Multithread, static runtime"
|
||||
!insertmacro "${Handler}" "vc80-mt-s"
|
||||
SectionEnd
|
||||
Section /o "Multithread Debug, static runtime"
|
||||
!insertmacro "${Handler}" "vc80-mt-sgd"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
SectionGroupEnd
|
||||
!macroend
|
||||
|
||||
!ifdef ViaFTP
|
||||
!define DownloadOK "OK"
|
||||
!define DownloadAborted "cancel"
|
||||
!else
|
||||
!define DownloadOK "success"
|
||||
!define DownloadAborted "cancel"
|
||||
!endif
|
||||
|
||||
!macro DownloadFile SRC_FOLDER FILE TGT
|
||||
!ifndef SkipDownload
|
||||
!ifdef ViaFTP
|
||||
inetc::get ${FTP_SRC}${SRC_FOLDER}${FILE} ${TGT}\${FILE}
|
||||
!else
|
||||
NSISdl::download ${FTP_SRC}${SRC_FOLDER}${FILE} ${TGT}\${FILE}
|
||||
!endif
|
||||
Pop $0
|
||||
${If} "$0" == "OK"
|
||||
DetailPrint "${FILE} downloaded successfully."
|
||||
${ElseIf} "$0" == "URL Parts Error"
|
||||
DetailPrint "${FILE} downloaded successfully."
|
||||
${ElseIf} "$0" == "Terminated"
|
||||
DetailPrint "${FILE} download CANCELLED."
|
||||
${ElseIf} "$0" == "Cancelled"
|
||||
DetailPrint "${FILE} download CANCELLED."
|
||||
${Else}
|
||||
MessageBox MB_OK "Unable to download ${FTP_SRC}${SRC_FOLDER}${FILE}. Error: $0"
|
||||
DetailPrint "ERROR $0: Unable to download ${FTP_SRC}${SRC_FOLDER}${FILE}."
|
||||
${Endif}
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro Install_CGAL_libs VARIANT
|
||||
!ifndef FetchLocal
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "cgal-${VARIANT}.lib.zip" "$INSTDIR\lib"
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "CGALcore++-${VARIANT}.lib.zip" "$INSTDIR\lib"
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "CGALimageIO-${VARIANT}.lib.zip" "$INSTDIR\lib"
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "CGALPDB-${VARIANT}.lib.zip" "$INSTDIR\lib"
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "cgalqt-${VARIANT}.lib.zip" "$INSTDIR\lib"
|
||||
!else
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\lib"
|
||||
File /nonfatal "${CGAL_SRC}\lib\cgal-${VARIANT}.lib"
|
||||
File /nonfatal "${CGAL_SRC}\lib\CGALcore++-${VARIANT}.lib"
|
||||
File /nonfatal "${CGAL_SRC}\lib\CGALimageIO-${VARIANT}.lib"
|
||||
File /nonfatal "${CGAL_SRC}\lib\CGALPDB-${VARIANT}.lib"
|
||||
!endif
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro Install_CGAL_pdbs VARIANT
|
||||
!ifndef FetchLocal
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "cgal-${VARIANT}.pdb.zip" "$INSTDIR\lib"
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "cgalcore++-${VARIANT}.pdb.zip" "$INSTDIR\lib"
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "cgalimageio-${VARIANT}.pdb.zip" "$INSTDIR\lib"
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "cgalpdb-${VARIANT}.pdb.zip" "$INSTDIR\lib"
|
||||
!insertmacro DownloadFile "CGAL/3.3/" "cgalqt-${VARIANT}.pdb.zip" "$INSTDIR\lib"
|
||||
!else
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\lib"
|
||||
File /nonfatal "${CGAL_SRC}\lib\cgal-${VARIANT}.pdb"
|
||||
File /nonfatal "${CGAL_SRC}\lib\cgalcore++-${VARIANT}.pdb"
|
||||
File /nonfatal "${CGAL_SRC}\lib\cgalimageio-${VARIANT}.pdb"
|
||||
File /nonfatal "${CGAL_SRC}\lib\cgalpdb-${VARIANT}.pdb"
|
||||
!endif
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro Install_PDB_if_debug_variant HANDLER VARIANT
|
||||
${StrStr} $R0 ${VARIANT} "gd"
|
||||
${If} "$R0" != ""
|
||||
!insertmacro "${HANDLER}" ${VARIANT}
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
!macro Install_CGAL_bin VARIANT
|
||||
!insertmacro Install_CGAL_libs ${VARIANT}
|
||||
!insertmacro Install_PDB_if_debug_variant Install_CGAL_pdbs ${VARIANT}
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_libs VARIANT
|
||||
!ifndef FetchLocal
|
||||
!insertmacro DownloadFile "auxiliary/GMP/4.2.1/" "gmp-${VARIANT}.lib.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!insertmacro DownloadFile "auxiliary/MPFR/2.2.1/" "mpfr-${VARIANT}.lib.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!else
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\auxiliary\gmp\lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\gmp\lib\gmp-${VARIANT}.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\gmp\lib\mpfr-${VARIANT}.lib"
|
||||
!endif
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_pdbs VARIANT
|
||||
!ifndef FetchLocal
|
||||
!insertmacro DownloadFile "auxiliary/GMP/4.2.1/" "gmp-${VARIANT}.pdb.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!insertmacro DownloadFile "auxiliary/MPFR/2.2.1/" "mpfr-${VARIANT}.pdb.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!else
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\auxiliary\gmp\lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\gmp\lib\gmp-${VARIANT}.pdb"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\gmp\lib\mpfr-${VARIANT}.pdb"
|
||||
!endif
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_bin VARIANT
|
||||
${If} $IsGmpInstalled = 0
|
||||
StrCpy $IsGmpInstalled 1
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\auxiliary\gmp\include"
|
||||
File /r "${CGAL_SRC}\auxiliary\gmp\include\*.*"
|
||||
SetOutPath "$INSTDIR\auxiliary\gmp\lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\gmp\lib\README"
|
||||
!endif
|
||||
${Endif}
|
||||
|
||||
!insertmacro Install_GMP_MPFR_libs ${VARIANT}
|
||||
!insertmacro Install_PDB_if_debug_variant Install_GMP_MPFR_pdbs ${VARIANT}
|
||||
!macroend
|
||||
|
||||
|
||||
!macro SetEnvStr ALLUSERS VAR VALUE
|
||||
# ${ALLUSERS} is 0 or 1
|
||||
# ${VAR} is the env var to set
|
||||
# ${VALUE} is the env var value
|
||||
${WriteEnvStr} ${VAR} ${VALUE} ${ALLUSERS}
|
||||
!macroend
|
||||
|
||||
;--------------------------------
|
||||
; Functions
|
||||
;--------------------------------
|
||||
|
||||
Function initSelectionFlags
|
||||
|
||||
StrCpy $selected_libs ""
|
||||
ClearErrors
|
||||
StrCpy $0 0
|
||||
|
||||
|
||||
next:
|
||||
SectionGetText $0 $1
|
||||
IfErrors bail
|
||||
StrCpy $2 $1 "" -4
|
||||
StrCmp $2 "libs" 0 not_lib
|
||||
Push $0
|
||||
call SelectDefaultVariants
|
||||
StrCpy $selected_libs "$selected_libs1"
|
||||
not_lib:
|
||||
IntOp $0 $0 + 1
|
||||
goto next
|
||||
bail:
|
||||
FunctionEnd
|
||||
|
||||
; Stack 0: compiler name
|
||||
; Stack 1: variant name
|
||||
; Stack 2: section
|
||||
|
||||
Function MaybeSelectVariant
|
||||
Exch $2
|
||||
; c, v, r2
|
||||
Exch
|
||||
; c, r2, v
|
||||
Exch $1
|
||||
; c, r2, r1
|
||||
Exch
|
||||
; c, r1, r2
|
||||
Exch 2
|
||||
; r2, r1, c
|
||||
Exch $0
|
||||
; r2, r1, r0
|
||||
Exch 2
|
||||
; r0, r1, r2
|
||||
|
||||
Push $3
|
||||
Push $4
|
||||
|
||||
${If} $0 == "VC7.1"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "default_variants.ini" "Field 4" "State"
|
||||
${Else}
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "default_variants.ini" "Field 5" "State"
|
||||
${EndIf}
|
||||
|
||||
StrCpy $5 0
|
||||
|
||||
${If} $3 != 0
|
||||
|
||||
StrCpy $3 6
|
||||
next:
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $4 "default_variants.ini" "Field $3" "Text"
|
||||
IfErrors bail
|
||||
${If} $4 == $1
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $5 "default_variants.ini" "Field $3" "State"
|
||||
goto bail
|
||||
${EndIf}
|
||||
IntOp $3 $3 + 1
|
||||
goto next
|
||||
bail:
|
||||
${EndIf}
|
||||
|
||||
${If} $5 == 0
|
||||
!insertmacro UnselectSection $2
|
||||
${Else}
|
||||
!insertmacro SelectSection $2
|
||||
${EndIf}
|
||||
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
; Stack 0: top level section index
|
||||
Function SelectDefaultVariants
|
||||
Exch $0
|
||||
Push $1
|
||||
Push $2
|
||||
Push $3
|
||||
Push $4
|
||||
|
||||
IntOp $0 $0 + 1
|
||||
|
||||
StrCpy $1 0 ; Last section was group end
|
||||
StrCpy $4 "" ; Current compiler
|
||||
next:
|
||||
SectionGetFlags $0 $2
|
||||
IfErrors bail
|
||||
IntOp $3 $2 & ${SF_SECGRPEND}
|
||||
StrCmp $3 0 not_end
|
||||
StrCmp $1 0 0 bail ; two groups in a row means we are backing out
|
||||
not_end:
|
||||
StrCpy $1 $3
|
||||
IntOp $3 $2 & 6
|
||||
StrCmp $3 0 0 not_variant
|
||||
SectionGetText $0 $2
|
||||
Push $4
|
||||
Push $2
|
||||
Push $0
|
||||
call MaybeSelectVariant
|
||||
goto variant
|
||||
not_variant:
|
||||
SectionGetText $0 $4
|
||||
variant:
|
||||
IntOp $0 $0 + 1
|
||||
goto next
|
||||
bail:
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
Function FixupProjectFile
|
||||
Exch $0
|
||||
DetailPrint "Removing CGAL_USE_GMP from $0"
|
||||
!insertmacro ReplaceInFile $0 "CGAL_USE_GMP" ""
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
Function FixupProjectFiles
|
||||
Push $0
|
||||
Push $1
|
||||
Push $2
|
||||
Push $3
|
||||
Push $4
|
||||
Push $5
|
||||
Push $6
|
||||
|
||||
${locate::Open} "$INSTDIR" "/D=0 /X=vcproj" $0
|
||||
${If} $0 != 0
|
||||
${Do}
|
||||
${locate::Find} $0 $1 $2 $3 $4 $5 $6
|
||||
${If} "$1" != ""
|
||||
Push $1
|
||||
Call FixupProjectFile
|
||||
${EndIf}
|
||||
${LoopUntil} "$1" == ""
|
||||
${EndIf}
|
||||
${locate::Close} $0
|
||||
${locate::Unload}
|
||||
|
||||
Pop $6
|
||||
Pop $5
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
Function FindBoostFolder
|
||||
Push $0
|
||||
Push $1
|
||||
Push $2
|
||||
Push $3
|
||||
Push $4
|
||||
Push $5
|
||||
Push $6
|
||||
|
||||
${locate::Open} "$PROGRAMFILES\boost" "/F=0 /D=1 /M=boost_*" $0
|
||||
${If} $0 != 0
|
||||
${DoUntil} "$FoundBoostFolder" != ""
|
||||
${locate::Find} $0 $1 $2 $3 $4 $5 $6
|
||||
${If} "$2" != ""
|
||||
StrCpy $FoundBoostFolder $1
|
||||
${EndIf}
|
||||
${Loop}
|
||||
${EndIf}
|
||||
${locate::Close} $0
|
||||
${locate::Unload}
|
||||
|
||||
Pop $6
|
||||
Pop $5
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
|
||||
|
|
@ -1,558 +0,0 @@
|
|||
;===========================
|
||||
; Copyright 2007 GeometryFactory (France)
|
||||
; Author: Andreas Fabri (andreas.fabri@geometryfactrory.com), Fernando Cacciola (fernando.cacciola@geometryfactrory.com)
|
||||
;============================
|
||||
; Some portions of this file have been derived from "boost.nsi", the Boost Windows Installer, contributed by www.boost-consulting.org.
|
||||
;
|
||||
; Copyright 2006 Daniel Wallin
|
||||
; Copyright 2006 Eric Niebler
|
||||
; Distributed under the Boost Software License, Version 1.0. (See
|
||||
; accompanying file LICENSE_1_0.txt or copy at
|
||||
; http://www.boost.org/LICENSE_1_0.txt)
|
||||
;============================
|
||||
|
||||
|
||||
!include "MUI.nsh"
|
||||
!include "WriteEnvStr.nsh"
|
||||
!include "StrFunc.nsh"
|
||||
!include "Sections.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "Locate.nsh"
|
||||
!include "StrRep.nsh"
|
||||
!include "ReplaceInFile.nsh"
|
||||
|
||||
|
||||
!include "script_cgal_3_3.nsh"
|
||||
|
||||
!ifdef DebugLog
|
||||
!include "TextLog.nsh"
|
||||
!EndIf
|
||||
|
||||
!define CGAL_SRC "CGAL-3.3"
|
||||
;!define FTP_SRC "http://www.geometryfactory.com/precompiled_libs/"
|
||||
!define FTP_SRC "ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/precompiled_libs/"
|
||||
|
||||
;--------------------------------
|
||||
; General
|
||||
;--------------------------------
|
||||
|
||||
;Name and file
|
||||
Name "GAL-3.3"
|
||||
|
||||
!ifdef FetchLocal
|
||||
OutFile "CGAL-3.3-Full-Setup.exe"
|
||||
!else
|
||||
OutFile "CGAL-3.3-Setup.exe"
|
||||
!endif
|
||||
|
||||
;Default installation folder
|
||||
InstallDir "$PROGRAMFILES\CGAL-3.3"
|
||||
|
||||
;Get installation folder from registry if available
|
||||
InstallDirRegKey HKCU "Software\CGAL-3.3" ""
|
||||
|
||||
BrandingText "The CGAL Project and GeometryFactory - Installer created with NSIS."
|
||||
|
||||
VIProductVersion "3.3.0.0"
|
||||
VIAddVersionKey "ProductName" "CGAL Windows Installer"
|
||||
VIAddVersionKey "CompanyName" "The CGAL Project and GeometryFactory"
|
||||
VIAddVersionKey "LegalCopyright" "© The CGAL Project and GeometryFactory"
|
||||
VIAddVersionKey "FileDescription" "Windows Installer for CGAL"
|
||||
VIAddVersionKey "FileVersion" "3.3"
|
||||
|
||||
;--------------------------------
|
||||
; Variables
|
||||
;--------------------------------
|
||||
|
||||
Var MUI_TEMP
|
||||
Var STARTMENU_FOLDER
|
||||
Var DoFixupProjectFiles
|
||||
Var SetCGALROOT
|
||||
Var SetBOOSTROOT
|
||||
Var SetEnvAllUsers
|
||||
Var IsGmpInstalled
|
||||
|
||||
;--------------------------------
|
||||
; Interface Settings
|
||||
;--------------------------------
|
||||
|
||||
!define MUI_ICON "cgal-16.ico"
|
||||
!define MUI_UNICON "cgal-16.ico"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
|
||||
|
||||
!define MUI_HEADERIMAGE_BITMAP "cgal_very_small_FFFFFF.bmp" ; optional
|
||||
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP Zirkel.bmp
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
|
||||
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
|
||||
!define MUI_WELCOMEPAGE_TEXT "This installs CGAL-3.3 on your machine, precompiled with .Net 2003 and 2005 (VC 7.1 and 8.0).\r\nThe project files for building the library itself are provided for both VC7.1 and VC8.0 separatedly, but for examples and demos, only the VC7.1 project files are provided since all its settings are compatible with VC8.0 (thus you can just open them with Visual Studio 2005 and follow the conversion wizard)."
|
||||
|
||||
|
||||
!define MUI_FINISHPAGE_TITLE "Installation Not Finished Yet!!!"
|
||||
|
||||
!define MUI_FINISHPAGE_TEXT "CGAL needs part of the Boost Library which you must download yourself (from www.boost.org or www.boost-consulting.com/download.html).\r\nMost demos need the Qt 3 library which you must also download yourself (from www.trolltech.com).\r\nThe vcproj files in the example, demo amd src subdirectories all use the environment variables CGALROOT and BOOSTROOT to locate CGAL and Boost resp., but for other third-party libraries like Qt3 and ZLib, you must add the corresponding include/lib paths manually."
|
||||
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\INSTALL.win32.txt"
|
||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Read the full installation notes for further instructions"
|
||||
|
||||
!define MUI_FINISHPAGE_LINK "More information about CGAL and Visual C++"
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION http://www.cgal.org/platforms_frame.html
|
||||
|
||||
;--------------------------------
|
||||
; Pages
|
||||
;--------------------------------
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "${CGAL_SRC}\LICENSE"
|
||||
|
||||
; A page where the user can specify a default variant configuration (taken from the boost installer)
|
||||
Page custom defaultVariantsPage
|
||||
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
; A page where the user can check/uncheck the environment variables
|
||||
; used to specify paths in vproj files to be added.
|
||||
Page custom envarsPage
|
||||
|
||||
; A page where the user can decide not to remove CGAL_USE_GMP from project files.
|
||||
; This page is only shown if the MPFR/GMP component has not been installed.
|
||||
Page custom fixupPage
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "CGAL-3.3"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
;--------------------------------
|
||||
; Languages
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
;--------------------------------
|
||||
; Sections
|
||||
;--------------------------------
|
||||
|
||||
|
||||
;--------------------------------
|
||||
Section "!Main CGAL" MAIN_Idx
|
||||
|
||||
!ifndef SkipFiles
|
||||
SectionIn RO
|
||||
SetOutPath "$INSTDIR\config"
|
||||
File /r "${CGAL_SRC}\config\*.*"
|
||||
SetOutPath "$INSTDIR\include"
|
||||
File /r "${CGAL_SRC}\include\*.*"
|
||||
SetOutPath "$INSTDIR\make"
|
||||
File /r "${CGAL_SRC}\make\*.*"
|
||||
SetOutPath "$INSTDIR\src"
|
||||
File /r "${CGAL_SRC}\src\*.*"
|
||||
SetOutPath "$INSTDIR\examples"
|
||||
File /r "${CGAL_SRC}\examples\*.*"
|
||||
SetOutPath "$INSTDIR\scripts"
|
||||
File /r "${CGAL_SRC}\scripts\*.*"
|
||||
SetOutPath "$INSTDIR\lib"
|
||||
File /nonfatal "${CGAL_SRC}\lib\README"
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${CGAL_SRC}\Changes"
|
||||
File "${CGAL_SRC}\Install"
|
||||
File "${CGAL_SRC}\INSTALL.win32.txt"
|
||||
File "${CGAL_SRC}\install_cgal"
|
||||
File "${CGAL_SRC}\License"
|
||||
File "${CGAL_SRC}\LICENSE.LGPL"
|
||||
File "${CGAL_SRC}\LICENSE.QPL"
|
||||
File "${CGAL_SRC}\LICENSE.Free_Use"
|
||||
File "${CGAL_SRC}\Readme"
|
||||
File ".\cgal.ico"
|
||||
!endif
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
;Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
|
||||
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
;Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
;--------------------------------
|
||||
Section "CGAL Demos" DEMOS_Idx
|
||||
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\demo"
|
||||
File /r "${CGAL_SRC}\demo\*.*"
|
||||
!endif
|
||||
SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
;--------------------------------
|
||||
; Multi Variant Sections
|
||||
; Each of the sections below is a group enclosing all the variants for a given set of precomp libraries
|
||||
; NOTE: The variant selection code uses the trailing "libs" in the group name to identify components.
|
||||
; DO NOT change the trailing "libs" in the section name.
|
||||
;
|
||||
${MultiVariantSection} "CGAL precompiled libs" Install_CGAL_bin CGAL_LIB_Idx
|
||||
${MultiVariantSection} "GMP and MPFR precompiled libs" Install_GMP_MPFR_bin GMP_LIB_Idx
|
||||
;--------------------------------
|
||||
|
||||
;--------------------------------
|
||||
Section /o "LAPACK and TAUCS precompiled libs" TAUCS_LIB_Idx
|
||||
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\auxiliary\taucs\include"
|
||||
File /r "${CGAL_SRC}\auxiliary\taucs\include\*.*"
|
||||
!endif
|
||||
|
||||
!ifndef FetchLocal
|
||||
SetOutPath "$INSTDIR\auxiliary\taucs\lib"
|
||||
File "${CGAL_SRC}\auxiliary\taucs\lib\README"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libatlas.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libcblas.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libf77blas.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "liblapack.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libmetis-vc71-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libmetis-vc71-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libmetis-vc71-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libtaucs-vc71-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libtaucs-vc71-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libtaucs-vc71-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "libtstatlas.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "vcf2c-vc71-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "vcf2c-vc71-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "vcf2c-vc71-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "vcf2c-vc71-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "vcf2c-vc71-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/TAUCS-CGAL-3.3/" "vcf2c-vc71-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!else
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\auxiliary\taucs\lib"
|
||||
File "${CGAL_SRC}\auxiliary\taucs\lib\README"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libatlas.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libcblas.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libf77blas.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\liblapack.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libmetis-vc71-mt-s.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libmetis-vc71-mt.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libmetis-vc71-s.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libtaucs-vc71-mt-s.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libtaucs-vc71-mt.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\libtstatlas.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\vcf2c-vc71-mt-s.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\vcf2c-vc71-mt.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\vcf2c-vc71-s.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\vcf2c-vc71-mt-sgd.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\vcf2c-vc71-mt-gd.lib"
|
||||
File /nonfatal "${CGAL_SRC}\auxiliary\taucs\lib\vcf2c-vc71-sgd.lib"
|
||||
!endif
|
||||
!endif
|
||||
SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
Section "-unzip" UNZIP_Idx
|
||||
|
||||
${locate::Open} "$INSTDIR" "/D=0 /X=zip" $0
|
||||
${If} $0 != 0
|
||||
${Do}
|
||||
${locate::Find} $0 $1 $2 $3 $4 $5 $6
|
||||
${If} "$1" != ""
|
||||
ZipDLL::extractall $1 $2
|
||||
Pop $7
|
||||
${If} "$7" == "success"
|
||||
Delete $1
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${LoopUntil} "$1" == ""
|
||||
${EndIf}
|
||||
${locate::Close} $0
|
||||
${locate::Unload}
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Section
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
;ADD YOUR OWN FILES HERE...
|
||||
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
|
||||
|
||||
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
|
||||
|
||||
;Delete empty start menu parent diretories
|
||||
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
||||
|
||||
startMenuDeleteLoop:
|
||||
ClearErrors
|
||||
RMDir $MUI_TEMP
|
||||
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
|
||||
|
||||
IfErrors startMenuDeleteLoopDone
|
||||
|
||||
StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
|
||||
startMenuDeleteLoopDone:
|
||||
|
||||
DeleteRegKey /ifempty HKCU "Software\CGAL-3.3"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
|
||||
|
||||
;--------------------------------
|
||||
;Descriptions
|
||||
|
||||
;Language strings
|
||||
LangString DESC_MAIN ${LANG_ENGLISH} "The main components of the CGAL Library."
|
||||
LangString DESC_DEMOS ${LANG_ENGLISH} "The CGAL demos, for which you need Qt 3 in order to build them."
|
||||
LangString DESC_CGAL_LIB ${LANG_ENGLISH} "The precompiled CGAL libraries."
|
||||
LangString DESC_GMP_LIB ${LANG_ENGLISH} "The precompiled GMP and MPFR libraries (needed for exact constructions)."
|
||||
LangString DESC_TAUCS_LIB ${LANG_ENGLISH} "The precompiled LAPACK and TAUCS libraries."
|
||||
LangString DESC_ENVSET ${LANG_ENGLISH} "already set"
|
||||
|
||||
;Assign language strings to sections
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${MAIN_Idx} $(DESC_MAIN)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${DEMOS_Idx} $(DESC_DEMOS)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${CGAL_LIB_Idx} $(DESC_CGAL_LIB)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${GMP_LIB_Idx} $(DESC_GMP_LIB)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${TAUCS_LIB_Idx} $(DESC_TAUCS_LIB)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
|
||||
;--------------------------------
|
||||
; Functions
|
||||
;--------------------------------
|
||||
|
||||
Function .onInit
|
||||
|
||||
!ifdef DebugLog
|
||||
${LogSetFileName} "$INSTDIR\windows_install_log.txt"
|
||||
${LogSetOn}
|
||||
!endif
|
||||
|
||||
# the plugins dir is automatically deleted when the installer exits
|
||||
InitPluginsDir
|
||||
File /oname=$PLUGINSDIR\splash.bmp ".\CGAL.bmp"
|
||||
advsplash::show 1000 600 400 -1 $PLUGINSDIR\splash
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "default_variants.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "environment_variables.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "fixup_projects.ini"
|
||||
|
||||
!insertmacro SelectSection ${UNZIP_Idx}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function .onSelChange
|
||||
ClearErrors
|
||||
StrCpy $0 0 ; Section index
|
||||
StrCpy $1 0 ; Lib index
|
||||
next:
|
||||
SectionGetText $0 $2
|
||||
IfErrors bail
|
||||
StrCpy $3 $2 "" -4
|
||||
StrCmp $3 "libs" 0 not_lib
|
||||
StrCpy $3 $selected_libs 1 $1 ; $3 == old flag
|
||||
SectionGetFlags $0 $4 ; $4 == flag
|
||||
IntOp $5 $4 & 65
|
||||
StrCmp $5 0 not_true
|
||||
StrCpy $5 1
|
||||
not_true:
|
||||
StrCmp $3 $5 not_toggled 0
|
||||
StrCpy $6 $selected_libs $1 ; Before
|
||||
IntOp $7 $1 + 1
|
||||
StrCpy $7 $selected_libs "" $7 ; After
|
||||
StrCpy $selected_libs "$6$5$7"
|
||||
StrCmp $5 1 0 not_selected
|
||||
; -- New library was selected, select default variants
|
||||
Push $0
|
||||
call SelectDefaultVariants
|
||||
not_selected:
|
||||
not_toggled:
|
||||
IntOp $1 $1 + 1
|
||||
not_lib:
|
||||
IntOp $0 $0 + 1
|
||||
goto next
|
||||
bail:
|
||||
|
||||
!insertmacro SelectSection ${UNZIP_Idx}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function .onInstSuccess
|
||||
!insertmacro SelectSection ${UNZIP_Idx}
|
||||
|
||||
${If} "$SetBOOSTROOT" != ""
|
||||
!insertmacro SetEnvStr $SetEnvAllUsers "BOOSTROOT" $SetBOOSTROOT
|
||||
${EndIf}
|
||||
|
||||
${If} "$SetCGALROOT" != ""
|
||||
!insertmacro SetEnvStr $SetEnvAllUsers "CGALROOT" $SetCGALROOT
|
||||
${EndIf}
|
||||
|
||||
${If} "$DoFixupProjectFiles" == "y"
|
||||
Call FixupProjectFiles
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Function defaultVariantsPage
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT "Select Default Variants" "Choose the default variants to autoselect in the next page."
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "default_variants.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "default_variants.ini" "Field 4" "State"
|
||||
${If} $0 == 0
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "default_variants.ini" "Field 5" "State"
|
||||
${EndIf}
|
||||
|
||||
IntOp $0 $0 !
|
||||
StrCpy $no_default_compilers $0
|
||||
StrCpy $0 6
|
||||
StrCpy $1 0
|
||||
ClearErrors
|
||||
next:
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $2 "default_variants.ini" "Field $0" "State"
|
||||
IfErrors bail
|
||||
IntOp $1 $1 || $2
|
||||
IntOp $0 $0 + 1
|
||||
goto next
|
||||
bail:
|
||||
IntOp $1 $1 !
|
||||
StrCpy $no_default_variants $1
|
||||
|
||||
call initSelectionFlags
|
||||
FunctionEnd
|
||||
|
||||
# Disables the env var checkbox # FN and textbox # FN+1
|
||||
!macro UncheckEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "State" "0"
|
||||
!macroend
|
||||
|
||||
# Disables the env var checkbox # FN
|
||||
!macro SetEnvStrValueSlot FN VAL
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "State" "${VAL}"
|
||||
!macroend
|
||||
|
||||
!macro SetEnvStrLabel FN VAL
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "Text" "${VAL}"
|
||||
!macroend
|
||||
|
||||
|
||||
Function envarsPage
|
||||
|
||||
Push $1
|
||||
Push $2
|
||||
Push $3
|
||||
Push $4
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT "Setting Environment Variables" "Choose whether to set or not the following environment variables"
|
||||
|
||||
ReadEnvStr $1 "CGALROOT" # $1 = existing value for CGALROOT
|
||||
|
||||
!insertmacro SetEnvStrValueSlot 7 $INSTDIR
|
||||
!insertmacro SetEnvStrValueSlot 7 $INSTDIR
|
||||
|
||||
${If} $1 != ""
|
||||
StrCpy $3 "($(DESC_ENVSET): $1 )"
|
||||
!insertmacro UncheckEnvStrCheckbox 6
|
||||
!insertmacro SetEnvStrLabel 8 $3
|
||||
${Endif}
|
||||
|
||||
ReadEnvStr $2 "BOOSTROOT" # $2 = existing value for BOOSTROOT
|
||||
${If} $2 != ""
|
||||
StrCpy $4 "($(DESC_ENVSET): $2 )"
|
||||
!insertmacro UncheckEnvStrCheckbox 10
|
||||
!insertmacro SetEnvStrValueSlot 11 $2
|
||||
!insertmacro SetEnvStrLabel 12 $4
|
||||
${Else}
|
||||
Call FindBoostFolder
|
||||
${If} "$FoundBoostFolder" == ""
|
||||
StrCpy $FoundBoostFolder "(insert here the root folder of the boost libraries)"
|
||||
${EndIf}
|
||||
!insertmacro SetEnvStrValueSlot 11 $FoundBoostFolder
|
||||
${Endif}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "environment_variables.ini"
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW_RETURN
|
||||
Pop $0
|
||||
${If} "$0" = "success"
|
||||
# PROCESSING - Installs selected environment variables
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $SetEnvAllUsers "environment_variables.ini" "Field 2" "State" # $3=Is ALL USERS selected
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "environment_variables.ini" "Field 6" "State" # CGALROOT checkbox
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $4 "environment_variables.ini" "Field 7" "State" # CGALROOT value
|
||||
${If} $3 = 1
|
||||
StrCpy $SetCGALROOT $4
|
||||
${EndIF}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "environment_variables.ini" "Field 10" "State" # BOOSTROOT checkbox
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $4 "environment_variables.ini" "Field 11" "State" # BOOSTROOT value
|
||||
${If} $3 = 1
|
||||
StrCpy $SetBOOSTROOT $4
|
||||
${EndIF}
|
||||
${EndIf}
|
||||
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function fixupPage
|
||||
|
||||
!insertmacro SelectSection ${UNZIP_Idx}
|
||||
|
||||
${Unless} ${SectionIsSelected} ${GMP_LIB_Idx}
|
||||
${AndUnless} ${SectionIsPartiallySelected} ${GMP_LIB_Idx}
|
||||
!insertmacro MUI_HEADER_TEXT "Customizing Project Files" "Customize the installed project files"
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "fixup_projects.ini" "Field 2" "State" "1"
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "fixup_projects.ini" "Field 3" "Text" "(because MPFR/GMP has not been installed)"
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "fixup_projects.ini"
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW_RETURN
|
||||
Pop $0
|
||||
${If} "$0" = "success"
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $1 "fixup_projects.ini" "Field 2" "State" # $1=Remove CGAL_USE_GMP flags
|
||||
|
||||
${If} $1 == 1
|
||||
StrCpy $DoFixupProjectFiles "y"
|
||||
${EndIf}
|
||||
|
||||
${EndIf}
|
||||
${EndUnless}
|
||||
FunctionEnd
|
||||
|
|
@ -1,226 +0,0 @@
|
|||
;============================
|
||||
; Copyright 2007, 2008 GeometryFactory (France)
|
||||
; Author: Andreas Fabri (andreas.fabri@geometryfactrory.com), Fernando Cacciola (fernando.cacciola@geometryfactrory.com)
|
||||
;============================
|
||||
; Some portions of this file have been derived from "boost.nsi", the Boost Windows Installer, contributed by www.boost-consulting.org.
|
||||
;
|
||||
; Copyright 2006 Daniel Wallin
|
||||
; Copyright 2006 Eric Niebler
|
||||
; Distributed under the Boost Software License, Version 1.0. (See
|
||||
; accompanying file LICENSE_1_0.txt or copy at
|
||||
; http://www.boost.org/LICENSE_1_0.txt)
|
||||
;============================
|
||||
|
||||
;!define SkipFiles
|
||||
;!define SkipSetEnvVar
|
||||
;!define SkipDownload
|
||||
!define ViaFTP
|
||||
|
||||
Var Platform
|
||||
Var IsGmpInstalled
|
||||
|
||||
;--------------------------------
|
||||
; Macros
|
||||
;--------------------------------
|
||||
|
||||
|
||||
!define MultiVariantSection "!insertmacro MultiVariantSection"
|
||||
|
||||
; Expands to a Section Group named "SecName" which contains all library variants.
|
||||
; For each variant, the macro "Handler" is expanded with the variant name as argument
|
||||
!macro MultiVariantSection SecName Handler Platform Idx
|
||||
SectionGroup "${SecName}" ${Idx}
|
||||
SectionGroup "VC8.0"
|
||||
Section /o "Multithread Debug"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc80-mt-gd"
|
||||
SectionEnd
|
||||
Section /o "Multithread"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc80-mt"
|
||||
SectionEnd
|
||||
Section /o "Multithread, static runtime"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc80-mt-s"
|
||||
SectionEnd
|
||||
Section /o "Multithread Debug, static runtime"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc80-mt-sgd"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
SectionGroup "VC9.0"
|
||||
Section /o "Multithread Debug"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc90-mt-gd"
|
||||
SectionEnd
|
||||
Section /o "Multithread"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc90-mt"
|
||||
SectionEnd
|
||||
Section /o "Multithread, static runtime"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc90-mt-s"
|
||||
SectionEnd
|
||||
Section /o "Multithread Debug, static runtime"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc90-mt-sgd"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
SectionGroupEnd
|
||||
!macroend
|
||||
|
||||
!ifdef ViaFTP
|
||||
!define DownloadOK "OK"
|
||||
!define DownloadAborted "cancel"
|
||||
!else
|
||||
!define DownloadOK "success"
|
||||
!define DownloadAborted "cancel"
|
||||
!endif
|
||||
|
||||
!macro DownloadFileFrom SERVER SRC_FOLDER FILE TGT
|
||||
!ifndef SkipDownload
|
||||
!ifdef ViaFTP
|
||||
inetc::get ${SERVER}${SRC_FOLDER}${FILE} ${TGT}\${FILE}
|
||||
!else
|
||||
NSISdl::download ${SERVER}${SRC_FOLDER}${FILE} ${TGT}\${FILE}
|
||||
!endif
|
||||
Pop $0
|
||||
${If} "$0" == "OK"
|
||||
DetailPrint "${FILE} downloaded successfully."
|
||||
${ElseIf} "$0" == "URL Parts Error"
|
||||
DetailPrint "${FILE} downloaded successfully."
|
||||
${ElseIf} "$0" == "Terminated"
|
||||
DetailPrint "${FILE} download CANCELLED."
|
||||
${ElseIf} "$0" == "Cancelled"
|
||||
DetailPrint "${FILE} download CANCELLED."
|
||||
${Else}
|
||||
MessageBox MB_OK "Unable to download ${SERVER}${SRC_FOLDER}${FILE}. Error: $0"
|
||||
DetailPrint "ERROR $0: Unable to download ${SERVER}${SRC_FOLDER}${FILE}."
|
||||
${Endif}
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro DownloadFile SRC_FOLDER FILE TGT
|
||||
!insertmacro DownloadFileFrom ${FTP_SRC} ${SRC_FOLDER} ${FILE} ${TGT}
|
||||
!macroend
|
||||
|
||||
!macro Install_PDB_if_debug_variant HANDLER PLATFORM VARIANT
|
||||
${StrStr} $R0 ${VARIANT} "gd"
|
||||
${If} "$R0" != ""
|
||||
!insertmacro "${HANDLER}" "${PLATFORM}" "${VARIANT}"
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
!macro Install_DLL_if_dynamic_variant HANDLER PLATFORM VARIANT
|
||||
${StrStr} $R0 ${VARIANT} "s"
|
||||
${If} "$R0" == ""
|
||||
!insertmacro "${HANDLER}" "${PLATFORM}" "${VARIANT}"
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_libs PLATFORM VARIANT
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/GMP/4.2.4/" "gmp-${VARIANT}.lib.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/MPFR/2.3.2/" "mpfr-${VARIANT}.lib.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_dlls PLATFORM VARIANT
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/GMP/4.2.4/" "gmp-${VARIANT}.dll.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/MPFR/2.3.2/" "mpfr-${VARIANT}.dll.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_pdbs PLATFORM VARIANT
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/GMP/4.2.4/" "gmp-${VARIANT}.pdb.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/MPFR/2.3.2/" "mpfr-${VARIANT}.pdb.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_bin PLATFORM VARIANT
|
||||
|
||||
; Headers are not VARIANT dependent so we include this only once, but here since
|
||||
; we want to download headers only if at least one lib variant was selected.
|
||||
${If} $IsGmpInstalled = 0
|
||||
StrCpy $IsGmpInstalled 1
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/GMP/4.2.4/" "gmp.h.zip" "$INSTDIR\auxiliary\gmp\include"
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/MPFR/2.3.2/" "mpfr.h.zip" "$INSTDIR\auxiliary\gmp\include"
|
||||
${Endif}
|
||||
|
||||
!insertmacro Install_GMP_MPFR_libs "${PLATFORM}" "${VARIANT}"
|
||||
!insertmacro Install_PDB_if_debug_variant Install_GMP_MPFR_pdbs "${PLATFORM}" "${VARIANT}"
|
||||
!insertmacro Install_DLL_if_dynamic_variant Install_GMP_MPFR_dlls "${PLATFORM}" "${VARIANT}"
|
||||
!macroend
|
||||
|
||||
|
||||
;--------------------------------
|
||||
; Functions
|
||||
;--------------------------------
|
||||
|
||||
; Given a section ($2) implicitely corresponding
|
||||
; to a certain compiler ($0) and variant choice ($2)
|
||||
; select it or unselect it based on the user choices in the variants page
|
||||
Function __MaybeSelectVariant
|
||||
Exch $2
|
||||
; c, v, r2
|
||||
Exch
|
||||
; c, r2, v
|
||||
Exch $1
|
||||
; c, r2, r1
|
||||
Exch
|
||||
; c, r1, r2
|
||||
Exch 2
|
||||
; r2, r1, c
|
||||
Exch $0
|
||||
; r2, r1, r0
|
||||
Exch 2
|
||||
; r0, r1, r2
|
||||
|
||||
Push $3
|
||||
Push $4
|
||||
|
||||
${If} $0 == "VC8.0"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "variants.ini" "Field 5" "State"
|
||||
${Else}
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "variants.ini" "Field 6" "State"
|
||||
${EndIf}
|
||||
|
||||
; If the corresponding compiler+variant is not found in the variant page
|
||||
; the section is unselected
|
||||
StrCpy $5 0
|
||||
|
||||
${If} $3 <> 0 ; Is the compiler selected?
|
||||
|
||||
; variants are the fields 7 to 10
|
||||
${For} $3 7 10
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $4 "variants.ini" "Field $3" "Text"
|
||||
|
||||
${If} $4 == $1 ; Is this variant field the one we are looking for?
|
||||
|
||||
; Found the variant field. Read the state and exit the loop
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $5 "variants.ini" "Field $3" "State"
|
||||
|
||||
goto break ;
|
||||
|
||||
${EndIf}
|
||||
|
||||
${Next}
|
||||
|
||||
break:
|
||||
|
||||
${EndIf}
|
||||
|
||||
${If} $5 = 0
|
||||
!insertmacro UnselectSection $2
|
||||
${Else}
|
||||
!insertmacro SelectSection $2
|
||||
${EndIf}
|
||||
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
FunctionEnd
|
||||
|
||||
!macro _MaybeSelectVariant Compiler Variant Sec
|
||||
|
||||
Push "${Compiler}"
|
||||
Push "${Variant}"
|
||||
Push "${Sec}"
|
||||
|
||||
call __MaybeSelectVariant
|
||||
|
||||
!macroend
|
||||
|
||||
!define MaybeSelectVariant "!insertmacro _MaybeSelectVariant"
|
||||
|
|
@ -1,525 +0,0 @@
|
|||
;===========================
|
||||
; Copyright 2007, 2008 GeometryFactory (France)
|
||||
; Author: Andreas Fabri (andreas.fabri@geometryfactrory.com), Fernando Cacciola (fernando.cacciola@geometryfactrory.com)
|
||||
;============================
|
||||
; Some portions of this file have been derived from "boost.nsi", the Boost Windows Installer, contributed by www.boost-consulting.org.
|
||||
;
|
||||
; Copyright 2006 Daniel Wallin
|
||||
; Copyright 2006 Eric Niebler
|
||||
; Distributed under the Boost Software License, Version 1.0. (See
|
||||
; accompanying file LICENSE_1_0.txt or copy at
|
||||
; http://www.boost.org/LICENSE_1_0.txt)
|
||||
;============================
|
||||
|
||||
|
||||
!include "MUI.nsh"
|
||||
!include "Sections.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "Locate.nsh"
|
||||
!include "StrRep.nsh"
|
||||
!include "ReplaceInFile.nsh"
|
||||
!include "WriteEnvStr.nsh"
|
||||
!include "EnvVarUpdate.nsh"
|
||||
|
||||
;!define DebugLog
|
||||
|
||||
!ifdef DebugLog
|
||||
!include "TextLog.nsh"
|
||||
!endif
|
||||
|
||||
!include "script_cgal_3_4.nsh"
|
||||
|
||||
!define CGAL_SRC "CGAL-3.4"
|
||||
!define FTP_SRC "https://cgal.geometryfactory.com/CGAL/precompiled_libs/"
|
||||
;!define FTP_SRC "http://cgal.gforge.inria.fr/outgoing/precompiled_libs/"
|
||||
|
||||
;--------------------------------
|
||||
; General
|
||||
;--------------------------------
|
||||
|
||||
;Name and file
|
||||
Name "CGAL-3.4"
|
||||
|
||||
!ifdef FetchLocal
|
||||
OutFile "CGAL-3.4-Full-Setup.exe"
|
||||
!else
|
||||
OutFile "CGAL-3.4-Setup.exe"
|
||||
!endif
|
||||
|
||||
;Default installation folder
|
||||
InstallDir "$PROGRAMFILES\CGAL-3.4"
|
||||
|
||||
;Get installation folder from registry if available
|
||||
InstallDirRegKey HKCU "Software\CGAL-3.4" ""
|
||||
|
||||
BrandingText "The CGAL Project and GeometryFactory - Installer created with NSIS."
|
||||
|
||||
VIProductVersion "3.4.0.0"
|
||||
VIAddVersionKey "ProductName" "CGAL Windows Installer"
|
||||
VIAddVersionKey "CompanyName" "The CGAL Project and GeometryFactory"
|
||||
VIAddVersionKey "LegalCopyright" "© The CGAL Project and GeometryFactory"
|
||||
VIAddVersionKey "FileDescription" "Windows Installer for CGAL"
|
||||
VIAddVersionKey "FileVersion" "3.4"
|
||||
|
||||
;--------------------------------
|
||||
; Variables
|
||||
;--------------------------------
|
||||
|
||||
Var MUI_TEMP
|
||||
Var STARTMENU_FOLDER
|
||||
Var SetCGAL_DIR
|
||||
Var RegLoc
|
||||
Var Add_GMP_LIB_DIR_to_PATH
|
||||
|
||||
;--------------------------------
|
||||
; Interface Settings
|
||||
;--------------------------------
|
||||
|
||||
!define MUI_ICON "cgal-16.ico"
|
||||
!define MUI_UNICON "cgal-16.ico"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
|
||||
|
||||
!define MUI_HEADERIMAGE_BITMAP "cgal_very_small_FFFFFF.bmp" ; optional
|
||||
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP Zirkel.bmp
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
|
||||
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
|
||||
!define MUI_WELCOMEPAGE_TEXT "This downloads CGAL-3.4 to your machine."
|
||||
|
||||
!define MUI_FINISHPAGE_TITLE "Downloading finished"
|
||||
|
||||
!define MUI_FINISHPAGE_TEXT "You have downloaded CGAL successfully. Please continue the installation, reading the installation instructions."
|
||||
|
||||
!define MUI_FINISHPAGE_LINK "Installation instructions"
|
||||
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "file:///$INSTDIR/doc_html/index.html"
|
||||
|
||||
;--------------------------------
|
||||
; Pages
|
||||
;--------------------------------
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "${CGAL_SRC}\LICENSE"
|
||||
|
||||
; A page where the user can specify a default variant configuration (taken from the boost installer)
|
||||
Page custom VariantsPage
|
||||
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
; A page where the user can check/uncheck the environment variables
|
||||
; used to specify paths in vcproj files to be added.
|
||||
Page custom envarsPage
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "CGAL-3.4"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
;--------------------------------
|
||||
; Languages
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
;--------------------------------
|
||||
; Sections
|
||||
;--------------------------------
|
||||
|
||||
|
||||
;--------------------------------
|
||||
Section "!Main CGAL" MAIN_Idx
|
||||
|
||||
!ifndef SkipFiles
|
||||
SectionIn RO
|
||||
SetOutPath "$INSTDIR\auxiliary"
|
||||
File /nonfatal /r "${CGAL_SRC}\auxiliary\*.*"
|
||||
SetOutPath "$INSTDIR\cmake"
|
||||
File /r "${CGAL_SRC}\cmake\*.*"
|
||||
SetOutPath "$INSTDIR\config"
|
||||
File /r "${CGAL_SRC}\config\*.*"
|
||||
SetOutPath "$INSTDIR\doc_html"
|
||||
File /r "${CGAL_SRC}\doc_html\*.*"
|
||||
SetOutPath "$INSTDIR\include"
|
||||
File /r "${CGAL_SRC}\include\*.*"
|
||||
SetOutPath "$INSTDIR\scripts"
|
||||
File /r "${CGAL_SRC}\scripts\*.*"
|
||||
SetOutPath "$INSTDIR\src"
|
||||
File /r "${CGAL_SRC}\src\*.*"
|
||||
SetOutPath "$INSTDIR\demo\icons"
|
||||
File /r "${CGAL_SRC}\demo\icons\*.*"
|
||||
SetOutPath "$INSTDIR\demo\resources"
|
||||
File /r "${CGAL_SRC}\demo\resources\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${CGAL_SRC}\AUTHORS"
|
||||
File "${CGAL_SRC}\CHANGES"
|
||||
File "${CGAL_SRC}\CMakeLists.txt"
|
||||
File "${CGAL_SRC}\INSTALL"
|
||||
File "${CGAL_SRC}\LICENSE"
|
||||
File "${CGAL_SRC}\LICENSE.FREE_USE"
|
||||
File "${CGAL_SRC}\LICENSE.LGPL"
|
||||
File "${CGAL_SRC}\LICENSE.QPL"
|
||||
File "${CGAL_SRC}\VERSION"
|
||||
File ".\cgal.ico"
|
||||
!endif
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
;Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
|
||||
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
;Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
;--------------------------------
|
||||
Section "CGAL Examples and Demos" SAMPLES_Idx
|
||||
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\examples"
|
||||
File /r "${CGAL_SRC}\examples\*.*"
|
||||
SetOutPath "$INSTDIR\demo"
|
||||
File /r "${CGAL_SRC}\demo\*.*"
|
||||
!endif
|
||||
SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
;--------------------------------
|
||||
; Multi Variant Sections
|
||||
; Each of the sections below is a group enclosing all the variants for a given set of precomp libraries
|
||||
; NOTE: The variant selection code uses the trailing "libs" in the group name to identify components.
|
||||
; DO NOT change the trailing "libs" in the section name.
|
||||
;
|
||||
${MultiVariantSection} "GMP and MPFR precompiled libs" Install_GMP_MPFR_bin "$Platform" GMP_LIB_Idx
|
||||
|
||||
;--------------------------------
|
||||
|
||||
;--------------------------------
|
||||
Section /o "LAPACK and TAUCS precompiled libs" TAUCS_LIB_Idx
|
||||
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.4/" "taucs.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.4/" "taucs_private.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.4/" "taucs_config_tests.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.4/" "taucs_config_build.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.4/" "blaswrap.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
|
||||
${If} "$Platform" == "win32"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libatlas.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libcblas.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libf77blas.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "liblapack.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libtstatlas.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libmetis-vc71-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libmetis-vc71-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libmetis-vc71-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libmetis-vc71-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libtaucs-vc71-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libtaucs-vc71-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libtaucs-vc71-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libtaucs-vc71-mt-sgd.pdb.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libtaucs-vc71-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "libtaucs-vc71-mt-gd.pdb.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "vcf2c-vc71-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "vcf2c-vc71-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "vcf2c-vc71-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.4/" "vcf2c-vc71-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
${Else}
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libmetis-vc80-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libmetis-vc80-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libmetis-vc80-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libmetis-vc80-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libtaucs-vc80-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libtaucs-vc80-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libtaucs-vc80-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libtaucs-vc80-mt-sgd.pdb.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libtaucs-vc80-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "libtaucs-vc80-mt-gd.pdb.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "vcf2c-vc80-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "vcf2c-vc80-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "vcf2c-vc80-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "vcf2c-vc80-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "clapack-vc80-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "clapack-vc80-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "clapack-vc80-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "clapack-vc80-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "blas-vc80-mt-s.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "blas-vc80-mt.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "blas-vc80-mt-sgd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!insertmacro DownloadFile "auxiliary/x64/TAUCS-CGAL-3.4/" "blas-vc80-mt-gd.lib.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
${Endif}
|
||||
|
||||
SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
Section /o "HTML Manuals" DOC_Idx
|
||||
!ifndef FetchLocal
|
||||
!insertmacro DownloadFileFrom "https://cgal.geometryfactory.com/" "CGAL/3.4/Manual/" "cgal_manual.zip" "$INSTDIR\doc_html"
|
||||
!endif
|
||||
SectionEnd
|
||||
|
||||
Section "-Unzip"
|
||||
|
||||
${locate::Open} "$INSTDIR" "/D=0 /X=zip" $0
|
||||
${If} $0 <> 0
|
||||
${Do}
|
||||
${locate::Find} $0 $1 $2 $3 $4 $5 $6
|
||||
${If} "$1" != ""
|
||||
ZipDLL::extractall $1 $2
|
||||
Pop $7
|
||||
${If} "$7" == "success"
|
||||
Delete $1
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${LoopUntil} "$1" == ""
|
||||
${EndIf}
|
||||
${locate::Close} $0
|
||||
${locate::Unload}
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Section
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
;ADD YOUR OWN FILES HERE...
|
||||
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
|
||||
|
||||
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
|
||||
|
||||
;Delete empty start menu parent diretories
|
||||
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
||||
|
||||
startMenuDeleteLoop:
|
||||
ClearErrors
|
||||
RMDir $MUI_TEMP
|
||||
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
|
||||
|
||||
IfErrors startMenuDeleteLoopDone
|
||||
|
||||
StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
|
||||
startMenuDeleteLoopDone:
|
||||
|
||||
DeleteRegKey /ifempty HKCU "Software\CGAL-3.4"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
|
||||
|
||||
;--------------------------------
|
||||
;Descriptions
|
||||
|
||||
;Language strings
|
||||
LangString DESC_MAIN ${LANG_ENGLISH} "The main components of the CGAL Library."
|
||||
LangString DESC_SAMPLES ${LANG_ENGLISH} "The CGAL demos and examples, for which you need Qt 4 in order to build them (and Qt 3 for some)."
|
||||
LangString DESC_GMP_LIB ${LANG_ENGLISH} "The precompiled GMP and MPFR libraries (needed for exact constructions)."
|
||||
LangString DESC_TAUCS_LIB ${LANG_ENGLISH} "The precompiled LAPACK and TAUCS libraries."
|
||||
LangString DESC_DOC ${LANG_ENGLISH} "The HTML manuals."
|
||||
LangString DESC_ENVSET ${LANG_ENGLISH} "already set"
|
||||
|
||||
;Assign language strings to sections
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${MAIN_Idx} $(DESC_MAIN)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SAMPLES_Idx} $(DESC_SAMPLES)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${GMP_LIB_Idx} $(DESC_GMP_LIB)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${TAUCS_LIB_Idx} $(DESC_TAUCS_LIB)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${DOC_Idx} $(DESC_DOC)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
|
||||
;--------------------------------
|
||||
; Functions
|
||||
;--------------------------------
|
||||
|
||||
Function .onInit
|
||||
|
||||
!ifdef DebugLog
|
||||
${LogSetFileName} "CGAL-3.4_install_log.txt"
|
||||
${LogSetOn}
|
||||
!endif
|
||||
|
||||
StrCpy $Platform "win32"
|
||||
|
||||
# the plugins dir is automatically deleted when the installer exits
|
||||
InitPluginsDir
|
||||
File /oname=$PLUGINSDIR\splash.bmp ".\CGAL.bmp"
|
||||
advsplash::show 1000 600 400 -1 $PLUGINSDIR\splash
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "variants.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "environment_variables.ini"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function .onInstSuccess
|
||||
|
||||
${If} $SetCGAL_DIR != ""
|
||||
${WriteEnvStr} "CGAL_DIR" $SetCGAL_DIR $RegLoc
|
||||
${EndIf}
|
||||
|
||||
${If} $Add_GMP_LIB_DIR_to_PATH = 1
|
||||
${EnvVarUpdate} $0 "PATH" "A" $RegLoc "$INSTDIR\auxiliary\gmp\lib"
|
||||
${EndIf}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function VariantsPage
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT "Select Default Variants" "Choose the default variants to autoselect in the next page."
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "variants.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "variants.ini" "Field 5" "State"
|
||||
${If} $0 = 0
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "variants.ini" "Field 6" "State"
|
||||
${EndIf}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "variants.ini" "Field 11" "State"
|
||||
${If} $0 = 1
|
||||
StrCpy $Platform "win32"
|
||||
${Else}
|
||||
StrCpy $Platform "x64"
|
||||
${Endif}
|
||||
|
||||
;
|
||||
; These lines are TIGHTLY bound to the exact text in the Variants page
|
||||
; (from variants.ini) and the section numbers of the GMP/MPFR components
|
||||
;
|
||||
${MaybeSelectVariant} "VC8.0" "Multithread Debug" 4
|
||||
${MaybeSelectVariant} "VC8.0" "Multithread" 5
|
||||
${MaybeSelectVariant} "VC8.0" "Multithread, static runtime" 6
|
||||
${MaybeSelectVariant} "VC8.0" "Multithread Debug, static runtime" 7
|
||||
${MaybeSelectVariant} "VC9.0" "Multithread Debug" 10
|
||||
${MaybeSelectVariant} "VC9.0" "Multithread" 11
|
||||
${MaybeSelectVariant} "VC9.0" "Multithread, static runtime" 12
|
||||
${MaybeSelectVariant} "VC9.0" "Multithread Debug, static runtime" 13
|
||||
|
||||
FunctionEnd
|
||||
|
||||
# Disables the env var checkbox # FN and textbox # FN+1
|
||||
!macro UncheckEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "State" "0"
|
||||
!macroend
|
||||
|
||||
!macro CheckEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "State" "1"
|
||||
!macroend
|
||||
|
||||
!macro DisableEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "Flags" "DISABLED"
|
||||
!macroend
|
||||
|
||||
!macro EnableEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "Flags" ""
|
||||
!macroend
|
||||
|
||||
# Disables the env var checkbox # FN
|
||||
!macro SetEnvStrValueSlot FN VAL
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "State" "${VAL}"
|
||||
!macroend
|
||||
|
||||
!macro SetEnvStrLabel FN VAL
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "Text" "${VAL}"
|
||||
!macroend
|
||||
|
||||
|
||||
Function envarsPage
|
||||
|
||||
Push $0
|
||||
Push $1
|
||||
Push $2
|
||||
Push $3
|
||||
Push $4
|
||||
Push $5
|
||||
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT "Setting Environment Variables" "Choose whether to set or not the following environment variables"
|
||||
|
||||
ReadEnvStr $1 "CGAL_DIR" # $1 = existing value for CGAL_DIR
|
||||
|
||||
!insertmacro SetEnvStrValueSlot 7 $INSTDIR
|
||||
!insertmacro SetEnvStrValueSlot 7 $INSTDIR
|
||||
|
||||
${If} $1 != ""
|
||||
StrCpy $3 "($(DESC_ENVSET): $1 )"
|
||||
!insertmacro UncheckEnvStrCheckbox 6
|
||||
!insertmacro SetEnvStrLabel 8 $3
|
||||
${Endif}
|
||||
|
||||
SectionGetText ${GMP_LIB_Idx} $2
|
||||
|
||||
SectionGetFlags ${GMP_LIB_Idx} $1
|
||||
IntOp $2 $1 & ${SF_PSELECTED}
|
||||
|
||||
${If} $2 == 0
|
||||
!insertmacro UncheckEnvStrCheckbox 9
|
||||
!insertmacro DisableEnvStrCheckbox 9
|
||||
${Else}
|
||||
!insertmacro CheckEnvStrCheckbox 9
|
||||
!insertmacro EnableEnvStrCheckbox 9
|
||||
${Endif}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "environment_variables.ini"
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW_RETURN
|
||||
Pop $0
|
||||
${If} "$0" = "success"
|
||||
# PROCESSING - Installs selected environment variables
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "environment_variables.ini" "Field 2" "State" # $3=Is ALL USERS selected
|
||||
|
||||
${If} $3 == 1
|
||||
StrCpy $RegLoc "HKLM"
|
||||
${Else}
|
||||
StrCpy $RegLoc "HKCU"
|
||||
${EndIf}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "environment_variables.ini" "Field 6" "State" # CGAL_DIR checkbox
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $4 "environment_variables.ini" "Field 7" "State" # CGAL_DIR value
|
||||
${If} $3 == 1
|
||||
StrCpy $SetCGAL_DIR $4
|
||||
${EndIF}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $5 "environment_variables.ini" "Field 9" "State" # Add to PATH checkbox
|
||||
${If} $5 == 1
|
||||
StrCpy $Add_GMP_LIB_DIR_to_PATH 1
|
||||
${EndIF}
|
||||
|
||||
${EndIf}
|
||||
|
||||
Pop $5
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
|
||||
FunctionEnd
|
||||
|
|
@ -1,219 +0,0 @@
|
|||
;============================
|
||||
; Copyright 2007, 2008 GeometryFactory (France)
|
||||
; Author: Andreas Fabri (andreas.fabri@geometryfactrory.com), Fernando Cacciola (fernando.cacciola@geometryfactrory.com)
|
||||
;============================
|
||||
; Some portions of this file have been derived from "boost.nsi", the Boost Windows Installer, contributed by www.boost-consulting.org.
|
||||
;
|
||||
; Copyright 2006 Daniel Wallin
|
||||
; Copyright 2006 Eric Niebler
|
||||
; Distributed under the Boost Software License, Version 1.0. (See
|
||||
; accompanying file LICENSE_1_0.txt or copy at
|
||||
; http://www.boost.org/LICENSE_1_0.txt)
|
||||
;============================
|
||||
|
||||
;!define SkipFiles
|
||||
;!define SkipSetEnvVar
|
||||
;!define SkipDownload
|
||||
!define ViaFTP
|
||||
|
||||
Var Platform
|
||||
Var IsGmpInstalled
|
||||
Var IsTAUCSInstalled
|
||||
|
||||
;--------------------------------
|
||||
; Macros
|
||||
;--------------------------------
|
||||
|
||||
|
||||
!define MultiVariantSection "!insertmacro MultiVariantSection"
|
||||
|
||||
; Expands to a Section Group named "SecName" which contains all library variants.
|
||||
; For each variant, the macro "Handler" is expanded with the variant name as argument
|
||||
!macro MultiVariantSection SecName Handler Platform Idx
|
||||
SectionGroup "${SecName}" ${Idx}
|
||||
SectionGroup "VC8.0"
|
||||
Section /o "Multithread Debug"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc80-mt-gd"
|
||||
SectionEnd
|
||||
Section /o "Multithread"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc80-mt"
|
||||
SectionEnd
|
||||
Section /o "Multithread, static runtime"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc80-mt-s"
|
||||
SectionEnd
|
||||
Section /o "Multithread Debug, static runtime"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc80-mt-sgd"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
SectionGroup "VC9.0"
|
||||
Section /o "Multithread Debug"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc90-mt-gd"
|
||||
SectionEnd
|
||||
Section /o "Multithread"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc90-mt"
|
||||
SectionEnd
|
||||
Section /o "Multithread, static runtime"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc90-mt-s"
|
||||
SectionEnd
|
||||
Section /o "Multithread Debug, static runtime"
|
||||
!insertmacro "${Handler}" "${Platform}" "vc90-mt-sgd"
|
||||
SectionEnd
|
||||
SectionGroupEnd
|
||||
|
||||
SectionGroupEnd
|
||||
!macroend
|
||||
|
||||
!ifdef ViaFTP
|
||||
!define DownloadOK "OK"
|
||||
!define DownloadAborted "cancel"
|
||||
!else
|
||||
!define DownloadOK "success"
|
||||
!define DownloadAborted "cancel"
|
||||
!endif
|
||||
|
||||
!macro DownloadFileFrom SERVER SRC_FOLDER FILE TGT
|
||||
!ifndef SkipDownload
|
||||
!ifdef DebugLog
|
||||
${LogMsg} "Downloadimg ${SERVER}${SRC_FOLDER}${FILE} into ${TGT}\${FILE}"
|
||||
!endif
|
||||
!ifdef ViaFTP
|
||||
inetc::get ${SERVER}${SRC_FOLDER}${FILE} ${TGT}\${FILE}
|
||||
!else
|
||||
NSISdl::download ${SERVER}${SRC_FOLDER}${FILE} ${TGT}\${FILE}
|
||||
!endif
|
||||
Pop $0
|
||||
${If} "$0" == "OK"
|
||||
DetailPrint "${FILE} downloaded successfully."
|
||||
${ElseIf} "$0" == "URL Parts Error"
|
||||
DetailPrint "${FILE} downloaded successfully."
|
||||
${ElseIf} "$0" == "Terminated"
|
||||
DetailPrint "${FILE} download CANCELLED."
|
||||
${ElseIf} "$0" == "Cancelled"
|
||||
DetailPrint "${FILE} download CANCELLED."
|
||||
${Else}
|
||||
MessageBox MB_OK "Unable to download ${SERVER}${SRC_FOLDER}${FILE}. Error: $0"
|
||||
DetailPrint "ERROR $0: Unable to download ${SERVER}${SRC_FOLDER}${FILE}."
|
||||
${Endif}
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
!macro DownloadFile SRC_FOLDER FILE TGT
|
||||
!insertmacro DownloadFileFrom ${FTP_SRC} ${SRC_FOLDER} ${FILE} ${TGT}
|
||||
!macroend
|
||||
|
||||
!macro Install_PDB_if_debug_variant HANDLER PLATFORM VARIANT
|
||||
${StrStr} $R0 ${VARIANT} "gd"
|
||||
${If} "$R0" != ""
|
||||
!insertmacro "${HANDLER}" "${PLATFORM}" "${VARIANT}"
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
!macro Install_DLL_if_dynamic_variant HANDLER PLATFORM VARIANT
|
||||
${StrStr} $R0 ${VARIANT} "s"
|
||||
${If} "$R0" == ""
|
||||
!insertmacro "${HANDLER}" "${PLATFORM}" "${VARIANT}"
|
||||
${EndIf}
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_libs PLATFORM VARIANT
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/GMP/4.2.4/" "gmp-${VARIANT}.lib.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/MPFR/2.3.2/" "mpfr-${VARIANT}.lib.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_dlls PLATFORM VARIANT
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/GMP/4.2.4/" "gmp-${VARIANT}.dll.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/MPFR/2.3.2/" "mpfr-${VARIANT}.dll.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_pdbs PLATFORM VARIANT
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/GMP/4.2.4/" "gmp-${VARIANT}.pdb.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/MPFR/2.3.2/" "mpfr-${VARIANT}.pdb.zip" "$INSTDIR\auxiliary\gmp\lib"
|
||||
!macroend
|
||||
|
||||
!macro Install_LAPACK_TAUCS_libs PLATFORM VARIANT
|
||||
; Headers are not VARIANT dependent so we include this only once, but here since
|
||||
; we want to download headers only if at least one lib variant was selected.
|
||||
${If} $IsTAUCSInstalled = 0
|
||||
StrCpy $IsTAUCSInstalled 1
|
||||
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.5/" "taucs.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.5/" "taucs_private.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.5/" "taucs_config_tests.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.5/" "taucs_config_build.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
!insertmacro DownloadFile "auxiliary/$Platform/TAUCS-CGAL-3.5/" "blaswrap.h.zip" "$INSTDIR\auxiliary\taucs\include"
|
||||
|
||||
${If} "$Platform" == "win32"
|
||||
!insertmacro DownloadFile "auxiliary/win32/TAUCS-CGAL-3.5/" "common.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
${Endif}
|
||||
|
||||
${Endif}
|
||||
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/TAUCS-CGAL-3.5/" "libs-${VARIANT}.zip" "$INSTDIR\auxiliary\taucs\lib"
|
||||
!macroend
|
||||
|
||||
!macro Install_GMP_MPFR_bin PLATFORM VARIANT
|
||||
|
||||
; Headers are not VARIANT dependent so we include this only once, but here since
|
||||
; we want to download headers only if at least one lib variant was selected.
|
||||
${If} $IsGmpInstalled = 0
|
||||
StrCpy $IsGmpInstalled 1
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/GMP/4.2.4/" "gmp.h.zip" "$INSTDIR\auxiliary\gmp\include"
|
||||
!insertmacro DownloadFile "auxiliary/${PLATFORM}/MPFR/2.3.2/" "mpfr.h.zip" "$INSTDIR\auxiliary\gmp\include"
|
||||
${Endif}
|
||||
|
||||
!insertmacro Install_GMP_MPFR_libs "${PLATFORM}" "${VARIANT}"
|
||||
!insertmacro Install_PDB_if_debug_variant Install_GMP_MPFR_pdbs "${PLATFORM}" "${VARIANT}"
|
||||
!insertmacro Install_DLL_if_dynamic_variant Install_GMP_MPFR_dlls "${PLATFORM}" "${VARIANT}"
|
||||
!macroend
|
||||
|
||||
!macro _MaybeSelectVariant Compiler Variant Sec1 Sec2
|
||||
|
||||
Push $0
|
||||
Push $1
|
||||
|
||||
${If} "${Compiler}" == "VC8.0"
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "variants.ini" "Field 5" "State"
|
||||
${Else}
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "variants.ini" "Field 6" "State"
|
||||
${EndIf}
|
||||
|
||||
; If the corresponding compiler+variant is not found in the variant page
|
||||
; the section is unselected
|
||||
StrCpy $1 0
|
||||
|
||||
${If} $0 <> 0 ; Is the compiler selected?
|
||||
|
||||
; variants are the fields 7 to 10
|
||||
${For} $0 7 10
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $1 "variants.ini" "Field $0" "Text"
|
||||
|
||||
${If} "$1" == "${Variant}" ; Is this variant field the one we are looking for?
|
||||
|
||||
; Found the variant field. Read the state and exit the loop
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $1 "variants.ini" "Field $0" "State"
|
||||
|
||||
goto break_${Sec1} ;
|
||||
|
||||
${EndIf}
|
||||
|
||||
${Next}
|
||||
|
||||
break_${Sec1}:
|
||||
|
||||
${EndIf}
|
||||
|
||||
${If} $1 = 0
|
||||
!insertmacro UnselectSection ${Sec1}
|
||||
!insertmacro UnselectSection ${Sec2}
|
||||
${Else}
|
||||
!insertmacro SelectSection ${Sec1}
|
||||
!insertmacro SelectSection ${Sec2}
|
||||
${EndIf}
|
||||
|
||||
Pop $1
|
||||
Pop $0
|
||||
|
||||
!macroend
|
||||
|
||||
!define MaybeSelectVariant "!insertmacro _MaybeSelectVariant"
|
||||
|
|
@ -1,470 +0,0 @@
|
|||
;===========================
|
||||
; Copyright 2007, 2008 GeometryFactory (France)
|
||||
; Author: Andreas Fabri (andreas.fabri@geometryfactrory.com), Fernando Cacciola (fernando.cacciola@geometryfactrory.com)
|
||||
;============================
|
||||
; Some portions of this file have been derived from "boost.nsi", the Boost Windows Installer, contributed by www.boost-consulting.org.
|
||||
;
|
||||
; Copyright 2006 Daniel Wallin
|
||||
; Copyright 2006 Eric Niebler
|
||||
; Distributed under the Boost Software License, Version 1.0. (See
|
||||
; accompanying file LICENSE_1_0.txt or copy at
|
||||
; http://www.boost.org/LICENSE_1_0.txt)
|
||||
;============================
|
||||
|
||||
|
||||
!include "MUI.nsh"
|
||||
!include "Sections.nsh"
|
||||
!include "LogicLib.nsh"
|
||||
!include "Locate.nsh"
|
||||
!include "StrRep.nsh"
|
||||
!include "ReplaceInFile.nsh"
|
||||
!include "WriteEnvStr.nsh"
|
||||
!include "EnvVarUpdate.nsh"
|
||||
|
||||
;!define DebugLog
|
||||
|
||||
!ifdef DebugLog
|
||||
!include "TextLog.nsh"
|
||||
!endif
|
||||
|
||||
!include "script_cgal_3_5.nsh"
|
||||
|
||||
!define CGAL_SRC "CGAL-3.5"
|
||||
!define FTP_SRC "https://cgal.geometryfactory.com/CGAL/precompiled_libs/"
|
||||
|
||||
;--------------------------------
|
||||
; General
|
||||
;--------------------------------
|
||||
|
||||
;Name and file
|
||||
Name "CGAL-3.5"
|
||||
|
||||
!ifdef FetchLocal
|
||||
OutFile "CGAL-3.5-Full-Setup.exe"
|
||||
!else
|
||||
OutFile "CGAL-3.5-Setup.exe"
|
||||
!endif
|
||||
|
||||
;Default installation folder
|
||||
InstallDir "$PROGRAMFILES\CGAL-3.5"
|
||||
|
||||
;Get installation folder from registry if available
|
||||
InstallDirRegKey HKCU "Software\CGAL-3.5" ""
|
||||
|
||||
BrandingText "The CGAL Project and GeometryFactory - Installer created with NSIS."
|
||||
|
||||
VIProductVersion "3.5.0.0"
|
||||
VIAddVersionKey "ProductName" "CGAL Windows Installer"
|
||||
VIAddVersionKey "CompanyName" "The CGAL Project and GeometryFactory"
|
||||
VIAddVersionKey "LegalCopyright" "© The CGAL Project and GeometryFactory"
|
||||
VIAddVersionKey "FileDescription" "Windows Installer for CGAL"
|
||||
VIAddVersionKey "FileVersion" "3.5"
|
||||
|
||||
;--------------------------------
|
||||
; Variables
|
||||
;--------------------------------
|
||||
|
||||
Var MUI_TEMP
|
||||
Var STARTMENU_FOLDER
|
||||
Var SetCGAL_DIR
|
||||
Var RegLoc
|
||||
Var Add_GMP_LIB_DIR_to_PATH
|
||||
|
||||
;--------------------------------
|
||||
; Interface Settings
|
||||
;--------------------------------
|
||||
|
||||
!define MUI_ICON "cgal-16.ico"
|
||||
!define MUI_UNICON "cgal-16.ico"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
|
||||
|
||||
!define MUI_HEADERIMAGE_BITMAP "cgal_very_small_FFFFFF.bmp" ; optional
|
||||
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP Zirkel.bmp
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
|
||||
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
|
||||
!define MUI_WELCOMEPAGE_TEXT "This downloads CGAL-3.5 to your machine."
|
||||
|
||||
!define MUI_FINISHPAGE_TITLE "Downloading finished"
|
||||
|
||||
!define MUI_FINISHPAGE_TEXT "You have downloaded CGAL successfully. Please continue the installation, reading the installation instructions."
|
||||
|
||||
!define MUI_FINISHPAGE_LINK "Installation instructions"
|
||||
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "file:///$INSTDIR/doc_html/index.html"
|
||||
|
||||
;--------------------------------
|
||||
; Pages
|
||||
;--------------------------------
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE "${CGAL_SRC}\LICENSE"
|
||||
|
||||
; A page where the user can specify a default variant configuration (taken from the boost installer)
|
||||
Page custom VariantsPage
|
||||
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
; A page where the user can check/uncheck the environment variables
|
||||
; used to specify paths in vcproj files to be added.
|
||||
Page custom envarsPage
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "CGAL-3.5"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
;--------------------------------
|
||||
; Languages
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
;--------------------------------
|
||||
; Sections
|
||||
;--------------------------------
|
||||
|
||||
|
||||
;--------------------------------
|
||||
Section "!Main CGAL" MAIN_Idx
|
||||
|
||||
!ifndef SkipFiles
|
||||
SectionIn RO
|
||||
SetOutPath "$INSTDIR\auxiliary"
|
||||
File /nonfatal /r "${CGAL_SRC}\auxiliary\*.*"
|
||||
SetOutPath "$INSTDIR\cmake"
|
||||
File /r "${CGAL_SRC}\cmake\*.*"
|
||||
SetOutPath "$INSTDIR\config"
|
||||
File /r "${CGAL_SRC}\config\*.*"
|
||||
SetOutPath "$INSTDIR\doc_html"
|
||||
File /r "${CGAL_SRC}\doc_html\*.*"
|
||||
SetOutPath "$INSTDIR\include"
|
||||
File /r "${CGAL_SRC}\include\*.*"
|
||||
SetOutPath "$INSTDIR\scripts"
|
||||
File /r "${CGAL_SRC}\scripts\*.*"
|
||||
SetOutPath "$INSTDIR\src"
|
||||
File /r "${CGAL_SRC}\src\*.*"
|
||||
SetOutPath "$INSTDIR\demo\icons"
|
||||
File /r "${CGAL_SRC}\demo\icons\*.*"
|
||||
SetOutPath "$INSTDIR\demo\resources"
|
||||
File /r "${CGAL_SRC}\demo\resources\*.*"
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${CGAL_SRC}\AUTHORS"
|
||||
File "${CGAL_SRC}\CHANGES"
|
||||
File "${CGAL_SRC}\CMakeLists.txt"
|
||||
File "${CGAL_SRC}\INSTALL"
|
||||
File "${CGAL_SRC}\LICENSE"
|
||||
File "${CGAL_SRC}\LICENSE.FREE_USE"
|
||||
File "${CGAL_SRC}\LICENSE.LGPL"
|
||||
File "${CGAL_SRC}\LICENSE.QPL"
|
||||
File "${CGAL_SRC}\VERSION"
|
||||
File ".\cgal.ico"
|
||||
!endif
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
;Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
|
||||
|
||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
;Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
;--------------------------------
|
||||
Section "CGAL Examples and Demos" SAMPLES_Idx
|
||||
|
||||
!ifndef SkipFiles
|
||||
SetOutPath "$INSTDIR\examples"
|
||||
File /r "${CGAL_SRC}\examples\*.*"
|
||||
SetOutPath "$INSTDIR\demo"
|
||||
File /r "${CGAL_SRC}\demo\*.*"
|
||||
!endif
|
||||
SectionEnd
|
||||
;--------------------------------
|
||||
|
||||
;--------------------------------
|
||||
; Multi Variant Sections
|
||||
; Each of the sections below is a group enclosing all the variants for a given set of precomp libraries
|
||||
; NOTE: The variant selection code uses the trailing "libs" in the group name to identify components.
|
||||
; DO NOT change the trailing "libs" in the section name.
|
||||
;
|
||||
${MultiVariantSection} "GMP and MPFR precompiled libs" Install_GMP_MPFR_bin "$Platform" GMP_LIB_Idx
|
||||
|
||||
;--------------------------------
|
||||
|
||||
${MultiVariantSection} "LAPACK and TAUCS precompiled libs" Install_LAPACK_TAUCS_libs "$Platform" TAUCS_LIB_Idx
|
||||
|
||||
|
||||
Section /o "HTML Manuals" DOC_Idx
|
||||
!ifndef FetchLocal
|
||||
!insertmacro DownloadFileFrom "https://cgal.geometryfactory.com/" "CGAL/3.5/Manual/" "cgal_manual.zip" "$INSTDIR\doc_html"
|
||||
!endif
|
||||
SectionEnd
|
||||
|
||||
Section "-Unzip"
|
||||
|
||||
${locate::Open} "$INSTDIR" "/D=0 /X=zip" $0
|
||||
${If} $0 <> 0
|
||||
${Do}
|
||||
${locate::Find} $0 $1 $2 $3 $4 $5 $6
|
||||
${If} "$1" != ""
|
||||
ZipDLL::extractall $1 $2
|
||||
Pop $7
|
||||
${If} "$7" == "success"
|
||||
Delete $1
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
${LoopUntil} "$1" == ""
|
||||
${EndIf}
|
||||
${locate::Close} $0
|
||||
${locate::Unload}
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Section
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
;ADD YOUR OWN FILES HERE...
|
||||
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
|
||||
|
||||
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
|
||||
|
||||
;Delete empty start menu parent diretories
|
||||
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
||||
|
||||
startMenuDeleteLoop:
|
||||
ClearErrors
|
||||
RMDir $MUI_TEMP
|
||||
GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
|
||||
|
||||
IfErrors startMenuDeleteLoopDone
|
||||
|
||||
StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
|
||||
startMenuDeleteLoopDone:
|
||||
|
||||
DeleteRegKey /ifempty HKCU "Software\CGAL-3.5"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
|
||||
|
||||
;--------------------------------
|
||||
;Descriptions
|
||||
|
||||
;Language strings
|
||||
LangString DESC_MAIN ${LANG_ENGLISH} "The main components of the CGAL Library."
|
||||
LangString DESC_SAMPLES ${LANG_ENGLISH} "The CGAL demos and examples, for which you need Qt 4 in order to build them (and Qt 3 for some)."
|
||||
LangString DESC_GMP_LIB ${LANG_ENGLISH} "The precompiled GMP and MPFR libraries (needed for exact constructions)."
|
||||
LangString DESC_TAUCS_LIB ${LANG_ENGLISH} "The precompiled LAPACK and TAUCS libraries."
|
||||
LangString DESC_DOC ${LANG_ENGLISH} "The HTML manuals."
|
||||
LangString DESC_ENVSET ${LANG_ENGLISH} "already set"
|
||||
|
||||
;Assign language strings to sections
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${MAIN_Idx} $(DESC_MAIN)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SAMPLES_Idx} $(DESC_SAMPLES)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${GMP_LIB_Idx} $(DESC_GMP_LIB)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${TAUCS_LIB_Idx} $(DESC_TAUCS_LIB)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${DOC_Idx} $(DESC_DOC)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
|
||||
;--------------------------------
|
||||
; Functions
|
||||
;--------------------------------
|
||||
|
||||
Function .onInit
|
||||
|
||||
!ifdef DebugLog
|
||||
${LogSetFileName} "CGAL-3.5_install_log.txt"
|
||||
${LogSetOn}
|
||||
!endif
|
||||
|
||||
StrCpy $Platform "win32"
|
||||
|
||||
# the plugins dir is automatically deleted when the installer exits
|
||||
InitPluginsDir
|
||||
File /oname=$PLUGINSDIR\splash.bmp ".\CGAL.bmp"
|
||||
advsplash::show 1000 600 400 -1 $PLUGINSDIR\splash
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "variants.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "environment_variables.ini"
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function .onInstSuccess
|
||||
|
||||
${If} $SetCGAL_DIR != ""
|
||||
${WriteEnvStr} "CGAL_DIR" $SetCGAL_DIR $RegLoc
|
||||
${EndIf}
|
||||
|
||||
${If} $Add_GMP_LIB_DIR_to_PATH = 1
|
||||
${EnvVarUpdate} $0 "PATH" "A" $RegLoc "$INSTDIR\auxiliary\gmp\lib"
|
||||
${EndIf}
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function VariantsPage
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT "Select Default Variants" "Choose the default variants to autoselect in the next page."
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "variants.ini"
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "variants.ini" "Field 5" "State"
|
||||
${If} $0 = 0
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "variants.ini" "Field 6" "State"
|
||||
${EndIf}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $0 "variants.ini" "Field 11" "State"
|
||||
${If} $0 = 1
|
||||
StrCpy $Platform "win32"
|
||||
${Else}
|
||||
StrCpy $Platform "x64"
|
||||
${Endif}
|
||||
|
||||
;
|
||||
; These lines are TIGHTLY bound to the exact text in the Variants page
|
||||
; (from variants.ini) and the section numbers of the GMP/MPFR and TAUCS components
|
||||
;
|
||||
${MaybeSelectVariant} "VC8.0" "Multithread Debug" 4 18
|
||||
${MaybeSelectVariant} "VC8.0" "Multithread" 5 19
|
||||
${MaybeSelectVariant} "VC8.0" "Multithread, static runtime" 6 20
|
||||
${MaybeSelectVariant} "VC8.0" "Multithread Debug, static runtime" 7 21
|
||||
${MaybeSelectVariant} "VC9.0" "Multithread Debug" 10 24
|
||||
${MaybeSelectVariant} "VC9.0" "Multithread" 11 25
|
||||
${MaybeSelectVariant} "VC9.0" "Multithread, static runtime" 12 26
|
||||
${MaybeSelectVariant} "VC9.0" "Multithread Debug, static runtime" 13 27
|
||||
|
||||
FunctionEnd
|
||||
|
||||
# Disables the env var checkbox # FN and textbox # FN+1
|
||||
!macro UncheckEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "State" "0"
|
||||
!macroend
|
||||
|
||||
!macro CheckEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "State" "1"
|
||||
!macroend
|
||||
|
||||
!macro DisableEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "Flags" "DISABLED"
|
||||
!macroend
|
||||
|
||||
!macro EnableEnvStrCheckbox FN
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "Flags" ""
|
||||
!macroend
|
||||
|
||||
# Disables the env var checkbox # FN
|
||||
!macro SetEnvStrValueSlot FN VAL
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "State" "${VAL}"
|
||||
!macroend
|
||||
|
||||
!macro SetEnvStrLabel FN VAL
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "environment_variables.ini" "Field ${FN}" "Text" "${VAL}"
|
||||
!macroend
|
||||
|
||||
|
||||
Function envarsPage
|
||||
|
||||
Push $0
|
||||
Push $1
|
||||
Push $2
|
||||
Push $3
|
||||
Push $4
|
||||
Push $5
|
||||
|
||||
|
||||
!insertmacro MUI_HEADER_TEXT "Setting Environment Variables" "Choose whether to set or not the following environment variables"
|
||||
|
||||
ReadEnvStr $1 "CGAL_DIR" # $1 = existing value for CGAL_DIR
|
||||
|
||||
!insertmacro SetEnvStrValueSlot 7 $INSTDIR
|
||||
!insertmacro SetEnvStrValueSlot 7 $INSTDIR
|
||||
|
||||
${If} $1 != ""
|
||||
StrCpy $3 "($(DESC_ENVSET): $1 )"
|
||||
!insertmacro UncheckEnvStrCheckbox 6
|
||||
!insertmacro SetEnvStrLabel 8 $3
|
||||
${Endif}
|
||||
|
||||
SectionGetText ${GMP_LIB_Idx} $2
|
||||
|
||||
SectionGetFlags ${GMP_LIB_Idx} $1
|
||||
IntOp $2 $1 & ${SF_PSELECTED}
|
||||
|
||||
${If} $2 == 0
|
||||
!insertmacro UncheckEnvStrCheckbox 9
|
||||
!insertmacro DisableEnvStrCheckbox 9
|
||||
${Else}
|
||||
!insertmacro CheckEnvStrCheckbox 9
|
||||
!insertmacro EnableEnvStrCheckbox 9
|
||||
${Endif}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "environment_variables.ini"
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW_RETURN
|
||||
Pop $0
|
||||
${If} "$0" = "success"
|
||||
# PROCESSING - Installs selected environment variables
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "environment_variables.ini" "Field 2" "State" # $3=Is ALL USERS selected
|
||||
|
||||
${If} $3 == 1
|
||||
StrCpy $RegLoc "HKLM"
|
||||
${Else}
|
||||
StrCpy $RegLoc "HKCU"
|
||||
${EndIf}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $3 "environment_variables.ini" "Field 6" "State" # CGAL_DIR checkbox
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $4 "environment_variables.ini" "Field 7" "State" # CGAL_DIR value
|
||||
${If} $3 == 1
|
||||
StrCpy $SetCGAL_DIR $4
|
||||
${EndIF}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_READ $5 "environment_variables.ini" "Field 9" "State" # Add to PATH checkbox
|
||||
${If} $5 == 1
|
||||
StrCpy $Add_GMP_LIB_DIR_to_PATH 1
|
||||
${EndIF}
|
||||
|
||||
${EndIf}
|
||||
|
||||
Pop $5
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
|
||||
FunctionEnd
|
||||
Loading…
Reference in New Issue