File: tuxmath.nsi.in

package info (click to toggle)
tuxmath 2.0.3-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,488 kB
  • sloc: ansic: 18,791; sh: 4,416; makefile: 778; xml: 51; sed: 16
file content (125 lines) | stat: -rw-r--r-- 3,925 bytes parent folder | download | duplicates (5)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# vim: noai et ts=4 tw=0
# with a few tiny modifications by Phil Harper(philh@theopencd.org)
# modified for tuxmath by Yves Combe (yves@ycombe.net)
# modified more for tuxmath by David Bruce <davidstuartbruce@gmail.com>

!define PKG_VERSION "@VERSION@"
!define PKG_PREFIX  "tuxmath"

!define APP_PREFIX  "TuxMath"
!define APP_EXE     "${APP_PREFIX}.exe"
!define APP_NAME    "Tux of Math Command"

OutFile     "${PKG_PREFIX}-${PKG_VERSION}-win32-installer.exe"
Name        "${APP_NAME}"
Caption     ""
CRCCheck    on
WindowIcon  off
BGGradient  off

# Default to not silent
SilentInstall   normal
SilentUnInstall normal

# Various default text options
MiscButtonText
InstallButtonText
FileErrorText

# Default installation dir and registry key of install directory
InstallDir  "$PROGRAMFILES\${APP_PREFIX}"
InstallDirRegKey HKLM SOFTWARE\${APP_PREFIX} "Install_Dir"

# Licence text
LicenseText "Please read the terms of the General Public License before installing ${APP_NAME}"
LicenseData "mingw32\doc\COPYING_GPL3.txt"

# Directory browsing
# DirShow           show
ComponentText       "This will install ${APP_NAME} on your computer. Select which optional things you want installed."
DirText             "Choose a directory to install ${APP_NAME} in to:"
AllowRootDirInstall false

# Install page stuff
InstProgressFlags   smooth
AutoCloseWindow     true

Section
  SetOutPath $INSTDIR
  File "mingw32\${APP_EXE}"
#  File "mingw32\*.dll"
  SetOutPath $INSTDIR\data
  File /r "mingw32\data\*.*"
  SetOutPath $INSTDIR\doc
  File /r "mingw32\doc\*.*"
  SetOutPath $INSTDIR\locale
  File /r "mingw32\locale\*.*"
  SetOutPath $INSTDIR\fonts
  File /r "mingw32\fonts\*.*"

  WriteRegStr HKLM SOFTWARE\${APP_PREFIX} \
                   "Install_Dir" \ 
                   "$INSTDIR"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_PREFIX}" \
                   "DisplayName" \
                   "${APP_NAME} (remove only)"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_PREFIX}" \
                   "UninstallString"  \ 
                   '"$INSTDIR\uninstall.exe"'
  WriteUninstaller "uninstall.exe"
SectionEnd


Section "Start Menu Shortcuts"
  SetShellVarContext all
  SetOutPath $INSTDIR
  CreateDirectory "$SMPROGRAMS\${APP_NAME}"
  CreateShortCut  "$SMPROGRAMS\${APP_NAME}\${APP_NAME} (Full Screen).lnk" \
                  "$INSTDIR\${APP_EXE}" \
                  "-f" \
                  "$INSTDIR\data\images\icons\tuxmath.ico" \
                  0 "" ""  \
                  "Start TuxMath in Fullscreen mode"

  CreateShortCut  "$SMPROGRAMS\${APP_NAME}\${APP_NAME} (Windowed).lnk" \
                  "$INSTDIR\${APP_EXE}" \
                  "-w" \
                  "$INSTDIR\data\images\icons\tuxmath.ico"  \ 
                  0 "" "" \
                  "Start TuxMath in a Window"

  CreateShortCut  "$SMPROGRAMS\${APP_NAME}\Uninstall.lnk" \
                  "$INSTDIR\uninstall.exe" ""  \ 
                  "$INSTDIR\uninstall.exe" 0 "" "" \
                  "Remove Tux of Math Command"
SectionEnd

Section "Desktop Shortcut"
  SetShellVarContext all
  SetOutPath $INSTDIR
  CreateShortCut "$DESKTOP\${APP_NAME}.lnk" \
                 "$INSTDIR\${APP_EXE}"  ""  \
                 "$INSTDIR\data\images\icons\tuxmath.ico" \
                 0  "" ""  \ 
                 "Run Tux of Math Command"
SectionEnd

# Uninstall stuff

UninstallText "This will uninstall ${APP_NAME}. Hit 'Uninstall' to continue."

# special uninstall section.
Section "Uninstall"
  SetShellVarContext all
# remove registry keys
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APP_PREFIX}"
  DeleteRegKey HKLM SOFTWARE\${APP_PREFIX}

  RMDir  /r "$INSTDIR\data"
  RMDir  /r "$INSTDIR\doc"
  Delete    "$INSTDIR\*.*"

  Delete "$DESKTOP\${APP_NAME}.lnk"
  Delete "$SMPROGRAMS\${APP_NAME}\*.*"
  RMDir  "$SMPROGRAMS\${APP_NAME}"
SectionEnd