Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 116 lines (78 sloc) 3.549 kb
1809151 @peircej EOLs again :-(
peircej authored
1 ;NSIS Modern User Interface
2
3 ;--------------------------------
4 ;Include Modern UI
5
6 !include "MUI2.nsh"
7
8 ;--------------------------------
9 ;General
10
11 ;Name and file
12 Name "PsychoPy2"
13 OutFile "StandalonePsychoPy-x.xx.xx-win32.exe"
14 InstallDir "$PROGRAMFILES\PsychoPy"
15 Icon "C:\USERS\jwp\Code\PsychoPy\svn\trunk\PsychoPyIDE\psychopy.ico"
16
17 ;Request application privileges for Windows Vista
18 RequestExecutionLevel admin
19
20 ;--------------------------------
21 ;Variables
22
23 Var StartMenuFolder
24
25 ;--------------------------------
26 ;Interface Settings
27
28 !define MUI_ABORTWARNING
29 !define MUI_HEADERIMAGE
30
31 ;--------------------------------
32 ;Pages
33
34 !insertmacro MUI_PAGE_LICENSE "LICENSE.txt"
35 ;!insertmacro MUI_PAGE_COMPONENTS;we only have component so don't need this
36 !insertmacro MUI_PAGE_DIRECTORY
37
38 ;Start Menu Folder Page Configuration
39 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
40 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\PsychoPy Standalone"
41 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "PsychoPy Standalone"
42 !define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\PsychoPy1"
43
44 !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
45
46 !insertmacro MUI_PAGE_INSTFILES
47
48 !insertmacro MUI_UNPAGE_CONFIRM
49 !insertmacro MUI_UNPAGE_INSTFILES
50
51 ;--------------------------------
52 ;Languages
53
54 !insertmacro MUI_LANGUAGE "English"
55
56 ;--------------------------------
57 ;Installer Sections
58
59 Section "PsychoPy" PsychoPy
60
61 SetOutPath "$INSTDIR"
62
63 ;ADD YOUR OWN FILES HERE...
64 file /r "C:\USERS\jwp\Code\PsychoPy\svn\trunk\PsychoPyIDE\dist\*.*"
65
66 ;Store installation folder
67 WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayName" "PsychoPy2 (Standalone)"
68 WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayVersion" "1.50.00"
69 WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayIcon" "$INSTDIR\app\Resources\psychopy.ico"
70 WriteRegStr HKLM "${REG_UNINSTALL}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
71
72 ;Create uninstaller
73 WriteUninstaller "$INSTDIR\Uninstall.exe"
74
75 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
76
77 ;Create shortcuts
78 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
79 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\PsychoPy.lnk" "$INSTDIR\python.exe $INSTDIR\app\psychopyApp.py"
80 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
81 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\PsychoPy homepage.lnk" "http://www.psychopy.org"
82
83 !insertmacro MUI_STARTMENU_WRITE_END
84
85 ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR"
86 ;associate .psydat files
87 !insertmacro APP_ASSOCIATE "psyexp" "PsychoPy.experiment" "$INSTDIR\app\Resources\psychopy.ico,0" \
88 "Open with PsychoPy" "$INSTDIR\python.exe $INSTDIR\app\psychopyApp.py $\"%1$\""
89
90 SectionEnd
91
92
93 ;--------------------------------
94 ;Uninstaller Section
95
96 Section "Uninstall"
97
98 ;ADD YOUR OWN FILES HERE...
99 RMDir /r "$INSTDIR"
100
101 !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
102
103 Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
104 Delete "$SMPROGRAMS\$StartMenuFolder\PsychoPyIDE.lnk"
105 Delete "$SMPROGRAMS\$StartMenuFolder\PsychoPy homepage.lnk"
106 Delete "$SMPROGRAMS\$StartMenuFolder\PsychoPy reference.lnk"
107 Delete "$SMPROGRAMS\$StartMenuFolder\PsychoPy tutorials.lnk"
108 RMDir "$SMPROGRAMS\$StartMenuFolder"
109
110 DeleteRegKey HKLM "${REG_UNINSTALL}"
111 DeleteRegKey HKCU "Software\PsychoPy Standalone" ;may have been installed by prev version
112
113 ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR"
114
115 SectionEnd
Something went wrong with that request. Please try again.