diff options
Diffstat (limited to 'utils/themeeditor')
-rw-r--r-- | utils/themeeditor/themeeditor.nsi | 264 |
1 files changed, 132 insertions, 132 deletions
diff --git a/utils/themeeditor/themeeditor.nsi b/utils/themeeditor/themeeditor.nsi index 2ca75d6b93..4acc01381b 100644 --- a/utils/themeeditor/themeeditor.nsi +++ b/utils/themeeditor/themeeditor.nsi | |||
@@ -1,132 +1,132 @@ | |||
1 | ; __________ __ ___. | 1 | ; __________ __ ___. |
2 | ; Open \______ \ ____ ____ | | _\_ |__ _______ ___ | 2 | ; Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
3 | ; Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | 3 | ; Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
4 | ; Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | 4 | ; Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
5 | ; Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | 5 | ; Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
6 | ; \/ \/ \/ \/ \/ | 6 | ; \/ \/ \/ \/ \/ |
7 | ; $Id$ | 7 | ; $Id$ |
8 | ; | 8 | ; |
9 | ; Copyright (c) 2010 Dominik Riebeling | 9 | ; Copyright (c) 2010 Dominik Riebeling |
10 | ; | 10 | ; |
11 | ; All files in this archive are subject to the GNU General Public License. | 11 | ; All files in this archive are subject to the GNU General Public License. |
12 | ; See the file COPYING in the source tree root for full license agreement. | 12 | ; See the file COPYING in the source tree root for full license agreement. |
13 | ; | 13 | ; |
14 | ; This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | 14 | ; This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
15 | ; KIND, either express or implied. | 15 | ; KIND, either express or implied. |
16 | ; | 16 | ; |
17 | 17 | ||
18 | ; NSIS installer using Modern UI | 18 | ; NSIS installer using Modern UI |
19 | ; Expects a static build of the Theme Editor (Qt DLLs are not packaged) and to | 19 | ; Expects a static build of the Theme Editor (Qt DLLs are not packaged) and to |
20 | ; find the input files in the source tree (in-tree build). | 20 | ; find the input files in the source tree (in-tree build). |
21 | ; This installer uses the ZipDll plugin for font pack extraction | 21 | ; This installer uses the ZipDll plugin for font pack extraction |
22 | ; (http://nsis.sourceforge.net/ZipDLL_plug-in) | 22 | ; (http://nsis.sourceforge.net/ZipDLL_plug-in) |
23 | 23 | ||
24 | !include "MUI2.nsh" | 24 | !include "MUI2.nsh" |
25 | 25 | ||
26 | ;Name and file | 26 | ;Name and file |
27 | Name "Rockbox Theme Editor" | 27 | Name "Rockbox Theme Editor" |
28 | OutFile "rbthemeeditor-setup.exe" | 28 | OutFile "rbthemeeditor-setup.exe" |
29 | 29 | ||
30 | ;Default installation folder | 30 | ;Default installation folder |
31 | InstallDir "$PROGRAMFILES\Rockbox Theme Editor" | 31 | InstallDir "$PROGRAMFILES\Rockbox Theme Editor" |
32 | 32 | ||
33 | ; global registry shortcuts | 33 | ; global registry shortcuts |
34 | !define UNINSTALL_HIVE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Rockbox Theme Editor" | 34 | !define UNINSTALL_HIVE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Rockbox Theme Editor" |
35 | !define SETTINGS_HIVE "Software\rockbox.org\Rockbox Theme Editor" | 35 | !define SETTINGS_HIVE "Software\rockbox.org\Rockbox Theme Editor" |
36 | 36 | ||
37 | ;Get installation folder from registry if available | 37 | ;Get installation folder from registry if available |
38 | InstallDirRegKey HKCU "${SETTINGS_HIVE}" "" | 38 | InstallDirRegKey HKCU "${SETTINGS_HIVE}" "" |
39 | 39 | ||
40 | SetCompressor /solid lzma | 40 | SetCompressor /solid lzma |
41 | VIAddVersionKey "ProductName" "Rockbox Theme Editor" | 41 | VIAddVersionKey "ProductName" "Rockbox Theme Editor" |
42 | VIAddVersionKey "FileVersion" "0.0.0" | 42 | VIAddVersionKey "FileVersion" "0.0.0" |
43 | VIAddVersionKey "FileDescription" "Editor for the Rockbox Firmware Theme files" | 43 | VIAddVersionKey "FileDescription" "Editor for the Rockbox Firmware Theme files" |
44 | VIAddVersionKey "LegalCopyright" "Contributing Developers" | 44 | VIAddVersionKey "LegalCopyright" "Contributing Developers" |
45 | VIProductVersion "0.0.0.0" | 45 | VIProductVersion "0.0.0.0" |
46 | !define MUI_ICON resources\windowicon.ico | 46 | !define MUI_ICON resources\windowicon.ico |
47 | ; embed XP manifest | 47 | ; embed XP manifest |
48 | XPStyle on | 48 | XPStyle on |
49 | 49 | ||
50 | ;Interface Configuration. Use Rockbox blue for header. | 50 | ;Interface Configuration. Use Rockbox blue for header. |
51 | !define MUI_BGCOLOR b6c6e5 | 51 | !define MUI_BGCOLOR b6c6e5 |
52 | !define MUI_HEADERIMAGE | 52 | !define MUI_HEADERIMAGE |
53 | !define MUI_HEADERIMAGE_BITMAP "themeeditor-setup.bmp" | 53 | !define MUI_HEADERIMAGE_BITMAP "themeeditor-setup.bmp" |
54 | !define MUI_HEADERIMAGE_RIGHT | 54 | !define MUI_HEADERIMAGE_RIGHT |
55 | !define MUI_ABORTWARNING | 55 | !define MUI_ABORTWARNING |
56 | 56 | ||
57 | ;Pages | 57 | ;Pages |
58 | !insertmacro MUI_PAGE_LICENSE "..\..\docs\COPYING" | 58 | !insertmacro MUI_PAGE_LICENSE "..\..\docs\COPYING" |
59 | !insertmacro MUI_PAGE_COMPONENTS | 59 | !insertmacro MUI_PAGE_COMPONENTS |
60 | !insertmacro MUI_PAGE_DIRECTORY | 60 | !insertmacro MUI_PAGE_DIRECTORY |
61 | !insertmacro MUI_PAGE_INSTFILES | 61 | !insertmacro MUI_PAGE_INSTFILES |
62 | 62 | ||
63 | !insertmacro MUI_UNPAGE_CONFIRM | 63 | !insertmacro MUI_UNPAGE_CONFIRM |
64 | !insertmacro MUI_UNPAGE_INSTFILES | 64 | !insertmacro MUI_UNPAGE_INSTFILES |
65 | 65 | ||
66 | ;Languages | 66 | ;Languages |
67 | !insertmacro MUI_LANGUAGE "English" | 67 | !insertmacro MUI_LANGUAGE "English" |
68 | 68 | ||
69 | ;Installer Sections | 69 | ;Installer Sections |
70 | Section "Theme Editor" SecThemeEditor | 70 | Section "Theme Editor" SecThemeEditor |
71 | SectionSetFlags ${SecThemeEditor} ${SF_RO} | 71 | SectionSetFlags ${SecThemeEditor} ${SF_RO} |
72 | SectionIn RO | 72 | SectionIn RO |
73 | SetOutPath "$INSTDIR" | 73 | SetOutPath "$INSTDIR" |
74 | ; Store installation folder | 74 | ; Store installation folder |
75 | WriteRegStr HKCU "${SETTINGS_HIVE}" "" $INSTDIR | 75 | WriteRegStr HKCU "${SETTINGS_HIVE}" "" $INSTDIR |
76 | ; files | 76 | ; files |
77 | CreateDirectory "$INSTDIR" | 77 | CreateDirectory "$INSTDIR" |
78 | File /oname=$INSTDIR\rbthemeeditor.exe release\rbthemeeditor.exe | 78 | File /oname=$INSTDIR\rbthemeeditor.exe release\rbthemeeditor.exe |
79 | 79 | ||
80 | ; Create uninstaller and uninstall information | 80 | ; Create uninstaller and uninstall information |
81 | WriteUninstaller "$INSTDIR\Uninstall.exe" | 81 | WriteUninstaller "$INSTDIR\Uninstall.exe" |
82 | WriteRegStr HKLM "${UNINSTALL_HIVE}" "DisplayName" "Rockbox Theme Editor" | 82 | WriteRegStr HKLM "${UNINSTALL_HIVE}" "DisplayName" "Rockbox Theme Editor" |
83 | WriteRegStr HKLM "${UNINSTALL_HIVE}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" | 83 | WriteRegStr HKLM "${UNINSTALL_HIVE}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" |
84 | WriteRegStr HKLM "${UNINSTALL_HIVE}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S" | 84 | WriteRegStr HKLM "${UNINSTALL_HIVE}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S" |
85 | WriteRegStr HKLM "${UNINSTALL_HIVE}" "URLInfoAbout" "http://www.rockbox.org/wiki/ThemeEditor" | 85 | WriteRegStr HKLM "${UNINSTALL_HIVE}" "URLInfoAbout" "http://www.rockbox.org/wiki/ThemeEditor" |
86 | SectionEnd | 86 | SectionEnd |
87 | 87 | ||
88 | Section "Download Fonts Package" SecFontsPackage | 88 | Section "Download Fonts Package" SecFontsPackage |
89 | SetOutPath "$INSTDIR" | 89 | SetOutPath "$INSTDIR" |
90 | NSISdl::download http://download.rockbox.org/daily/fonts/rockbox-fonts.zip "$INSTDIR\rockbox-fonts.zip" | 90 | NSISdl::download http://download.rockbox.org/daily/fonts/rockbox-fonts.zip "$INSTDIR\rockbox-fonts.zip" |
91 | ZipDLL::extractall "$INSTDIR\rockbox-fonts.zip" "$INSTDIR" <ALL> | 91 | ZipDLL::extractall "$INSTDIR\rockbox-fonts.zip" "$INSTDIR" <ALL> |
92 | ; the fonts package uses the Rockbox folder structure. Move all fonts into a | 92 | ; the fonts package uses the Rockbox folder structure. Move all fonts into a |
93 | ; flat directory instead. | 93 | ; flat directory instead. |
94 | Rename "$INSTDIR\.rockbox\fonts" "$INSTDIR\fonts" | 94 | Rename "$INSTDIR\.rockbox\fonts" "$INSTDIR\fonts" |
95 | RMDir /r "$INSTDIR\.rockbox" | 95 | RMDir /r "$INSTDIR\.rockbox" |
96 | WriteRegStr HKCU "${SETTINGS_HIVE}\RBFont" "fontDir" "$INSTDIR\fonts\" | 96 | WriteRegStr HKCU "${SETTINGS_HIVE}\RBFont" "fontDir" "$INSTDIR\fonts\" |
97 | SectionEnd | 97 | SectionEnd |
98 | 98 | ||
99 | Section "Start Menu Shortcut" SecShortCuts | 99 | Section "Start Menu Shortcut" SecShortCuts |
100 | CreateDirectory "$SMPROGRAMS\Rockbox" | 100 | CreateDirectory "$SMPROGRAMS\Rockbox" |
101 | CreateShortCut "$SMPROGRAMS\Rockbox\Theme Editor.lnk" "$INSTDIR\rbthemeeditor.exe" | 101 | CreateShortCut "$SMPROGRAMS\Rockbox\Theme Editor.lnk" "$INSTDIR\rbthemeeditor.exe" |
102 | CreateShortCut "$SMPROGRAMS\Rockbox\Uninstall Theme Editor.lnk" "$INSTDIR\Uninstall.exe" | 102 | CreateShortCut "$SMPROGRAMS\Rockbox\Uninstall Theme Editor.lnk" "$INSTDIR\Uninstall.exe" |
103 | SectionEnd | 103 | SectionEnd |
104 | 104 | ||
105 | ; Assign language strings to sections | 105 | ; Assign language strings to sections |
106 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN | 106 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN |
107 | !insertmacro MUI_DESCRIPTION_TEXT ${SecThemeEditor} \ | 107 | !insertmacro MUI_DESCRIPTION_TEXT ${SecThemeEditor} \ |
108 | "Rockbox Theme Editor. Required." | 108 | "Rockbox Theme Editor. Required." |
109 | !insertmacro MUI_DESCRIPTION_TEXT ${SecFontsPackage} \ | 109 | !insertmacro MUI_DESCRIPTION_TEXT ${SecFontsPackage} \ |
110 | "Download and install the Rockbox Fonts package into program folder. \ | 110 | "Download and install the Rockbox Fonts package into program folder. \ |
111 | This will set the correct path in the program configuration for the current user only." | 111 | This will set the correct path in the program configuration for the current user only." |
112 | !insertmacro MUI_DESCRIPTION_TEXT ${SecShortCuts} \ | 112 | !insertmacro MUI_DESCRIPTION_TEXT ${SecShortCuts} \ |
113 | "Create Shortcut in Start Menu." | 113 | "Create Shortcut in Start Menu." |
114 | !insertmacro MUI_FUNCTION_DESCRIPTION_END | 114 | !insertmacro MUI_FUNCTION_DESCRIPTION_END |
115 | 115 | ||
116 | ; Uninstaller Section | 116 | ; Uninstaller Section |
117 | Section "Uninstall" | 117 | Section "Uninstall" |
118 | ; files | 118 | ; files |
119 | Delete "$INSTDIR\Uninstall.exe" | 119 | Delete "$INSTDIR\Uninstall.exe" |
120 | Delete "$INSTDIR\rbthemeeditor.exe" | 120 | Delete "$INSTDIR\rbthemeeditor.exe" |
121 | Delete "$INSTDIR\rockbox-fonts.zip" | 121 | Delete "$INSTDIR\rockbox-fonts.zip" |
122 | ; folders | 122 | ; folders |
123 | RMDir /r "$INSTDIR\fonts" | 123 | RMDir /r "$INSTDIR\fonts" |
124 | RMDir "$INSTDIR" | 124 | RMDir "$INSTDIR" |
125 | ; start menu folder | 125 | ; start menu folder |
126 | RMDir /r "$SMPROGRAMS\Rockbox" | 126 | RMDir /r "$SMPROGRAMS\Rockbox" |
127 | 127 | ||
128 | ; remove registry information | 128 | ; remove registry information |
129 | DeleteRegKey HKLM "${UNINSTALL_HIVE}" | 129 | DeleteRegKey HKLM "${UNINSTALL_HIVE}" |
130 | DeleteRegKey HKCU "Software\rockbox.org\Rockbox Theme Editor" | 130 | DeleteRegKey HKCU "Software\rockbox.org\Rockbox Theme Editor" |
131 | SectionEnd | 131 | SectionEnd |
132 | 132 | ||