aboutsummaryrefslogtreecommitdiff
path: root/etc/win-installer.nsi
blob: b90dd6b92278b3c61f936811904e0380654d7610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
SetCompressor lzma

; VERSION and BITS should be passed as an argument at compile time using:
;      makensis -DVERSION=1.6 -DBITS=32 win-installer.nsi

!define MY_PRODUCT "Coq" ;Define your own software name here
!define SRC "C:\coq${BITS}\lib\user-contrib\mathcomp\"
!define OUTFILE "ssreflect-mathcomp-installer-${VERSION}-win${BITS}.exe"

!include "MUI2.nsh"

;--------------------------------
;Configuration

  Name "Ssreflect and the Mathematical Components library"

  ;General
  OutFile "${OUTFILE}"

  ;Folder selection page
  InstallDir "C:\Coq"
  
  ;Remember install folder
  InstallDirRegKey HKCU "Software\Coq" ""

;--------------------------------
;Modern UI Configuration

  !insertmacro MUI_PAGE_WELCOME
  !insertmacro MUI_PAGE_LICENSE ".\CeCILL-B"
  !insertmacro MUI_PAGE_COMPONENTS
  !define MUI_DIRECTORYPAGE_TEXT_TOP "Select where Coq is installed."
  !insertmacro MUI_PAGE_DIRECTORY
  !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"
  
;--------------------------------
;Language Strings

  ;Description
  LangString DESC ${LANG_ENGLISH} "The Ssreflect proof language and the Mathematical Components library."

;--------------------------------
;Installer Sections


Section "Ssreflect and MathComp" Sec

  SetOutPath "$INSTDIR\lib\user-contrib\mathcomp\"

  File /r ${SRC}\*.vo
  File /r ${SRC}\*.v
  File /r ${SRC}\*.glob

  CreateDirectory "$SMPROGRAMS\Coq"

  WriteINIStr "$SMPROGRAMS\Coq\The Mathematical Components Library.url" "InternetShortcut" "URL" "http://math-comp.github.io/math-comp/"

  WriteINIStr "$SMPROGRAMS\Coq\The Ssreflect User Manaul.url" "InternetShortcut" "URL" "http://hal.inria.fr/inria-00258384/en"
        
  SetOutPath "$INSTDIR"
  writeUninstaller "Uninstall Ssreflect and MathComp.exe"

SectionEnd

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  !insertmacro MUI_DESCRIPTION_TEXT ${Sec} $(DESC)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
 
Section "Uninstall"

  RMDir /r "$INSTDIR\lib\user-contrib\mathcomp\"

  Delete "$SMPROGRAMS\Coq\The Mathematical Components Library.url"
  Delete "$SMPROGRAMS\Coq\The Ssreflect User Manaul.url"

  Delete "$INSTDIR\Uninstall Ssreflect and MathComp.exe"
  
SectionEnd