From f1184f963aea4cb16a5886c71cc662a0503e1cd5 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 7 Aug 2010 21:21:50 +0000 Subject: [PATCH] Add NSIS installer script. Expects to find a static build of the Theme Editor. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27745 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/themeeditor-setup.bmp | Bin 0 -> 4712 bytes utils/themeeditor/themeeditor.nsi | 132 ++++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 utils/themeeditor/themeeditor-setup.bmp create mode 100644 utils/themeeditor/themeeditor.nsi diff --git a/utils/themeeditor/themeeditor-setup.bmp b/utils/themeeditor/themeeditor-setup.bmp new file mode 100644 index 0000000000000000000000000000000000000000..7cde9c2887ad6557ad5088df42e8e807ae67b55f GIT binary patch literal 4712 zcmZ{oe{5UVb;r-;eS9Pz$tPQWk|>Gd50SC?bY+U9EQ$0J<>wz69a;?Sx~jtLHg4jy zmYgw^JrKD2f^AfF#(OKhiconz&8d{Bq{Snd>F)(xeDdxM;f-9ku}(umS~w z7QwRC-uFI{wh*9(@B4AzJ?C@ox#ymHr~{3ae)9g!`iOFPdI+t8#wdtJRN6+gBfQ!E z0`IEPYuAY$|5psYLa#ml7=7(4U!bp^{R(|{{XU{EJxA5Z2krz=;k z&@bP4onCzG%f!mJ(a+zyMAY~s(HFl#^y$ANI{#bx*^e#~J9H<#`HxT2)vH(O{Q2|r z#1l`@TNlp}UA|5ipZ;5AEz!l_(<{$BLRVh=I?+3@{Y|vLJV$R|dY0&g-_VaQeV_jN zfzQx;@4ZKK{C-S!nBMq@r-)wpfY_sN)AQf>D*gD??@(-Li2m!}|BYyDCzwysPhLMy zEBD?_Z(e+sUij`a^zwHeBRYGL-oE%Wee+Rx^3TrFTNj=ry6`?-c;YO*_^rPucH%+$ z(JSZZhBIy4;^?mVC+^^F%BS`dv zKhV|JpCjK7uG8fgpQPXX_pj*HXCI~SKK=;Sy8&w?emMGn5#M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u7qkIUbpLt6+&p}T(Es7CgIc^*~ z8*|}hoO=FnDR&HI?ig9+Z#M7JHG%^ZwgF4M>idsmTprRKZX9M2#6t56p zo_RpcHsBi&xm+wqT7~79K+g`lp7D>5jfMPUgJXw62M&xSI+Wcq~d+LAkVO3Y9&_5=CavJCA)&XI6apT_l%E? zhfW^|h4=x|LLo7|g&Qcw9pThXSl?i_;Fm(EnycnYcZ;Hx zboEfSdL&l`w3OW_e>7PXyZ3>3dTj9Yfx*G?vB42xXKv0^x7}oNsTBe*Eu{nfK^$kS zBNK|1iscizQZ=_+&7Yo`ndmE3sz<7)jvUGEKawr=^_7v<*r$M% zkD+2A5z_Wkf4-`mx=2qhk9uASju8o2=Gyx zQCKnrBa;D}bx`Bkn*=Prl#9V;+qgln%XMf_nN{r!5QN(QjHS@SP2`P0m!WdqiBbvv zX?Wi8bQMKVI5%{4<}Ap1)>@m^nt1Op^dgfY%XM|REP)<nZ=R5KO2U=YJt19c z!d06-yP?A$uhr6@QG^0>;91QymP~aYFye9CL#7##NzpsqF?luCKH81Tt|eO8Fi;1< zC+Z|p6-q+gCtGcws!$dSzMB;a$I>btW>1Im-lVTh5sWmjg)x1t-~^^_)>DvB9yhj1 zEH*s}4Oz{Cq+T~Vl*!zzKOtkPDx6WXYpddPrTma0Rke~{Xi160)T^KTkdrATXMI=> zV=SDwD1Rwv)>Xw^)EUHmwW5kQt<#L)S0VBdOZhaTEAQY*^yC$#fHNRa zW=<5Rvq>~n6L(QiQrKE@rp&@8jaH#W{xVL2G90p`m5DEvQ?z))er3TRXcP|=P?!4) mtcbr5g(UL1y1Kn+(mQN&Plwq?hb0@{FGKZv@k4(dVE+%b<>ssa literal 0 HcmV?d00001 diff --git a/utils/themeeditor/themeeditor.nsi b/utils/themeeditor/themeeditor.nsi new file mode 100644 index 0000000000..2ca75d6b93 --- /dev/null +++ b/utils/themeeditor/themeeditor.nsi @@ -0,0 +1,132 @@ +; __________ __ ___. +; Open \______ \ ____ ____ | | _\_ |__ _______ ___ +; Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / +; Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < +; Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ +; \/ \/ \/ \/ \/ +; $Id$ +; +; Copyright (c) 2010 Dominik Riebeling +; +; All files in this archive are subject to the GNU General Public License. +; See the file COPYING in the source tree root for full license agreement. +; +; This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +; KIND, either express or implied. +; + +; NSIS installer using Modern UI +; Expects a static build of the Theme Editor (Qt DLLs are not packaged) and to +; find the input files in the source tree (in-tree build). +; This installer uses the ZipDll plugin for font pack extraction +; (http://nsis.sourceforge.net/ZipDLL_plug-in) + +!include "MUI2.nsh" + +;Name and file +Name "Rockbox Theme Editor" +OutFile "rbthemeeditor-setup.exe" + +;Default installation folder +InstallDir "$PROGRAMFILES\Rockbox Theme Editor" + +; global registry shortcuts +!define UNINSTALL_HIVE "Software\Microsoft\Windows\CurrentVersion\Uninstall\Rockbox Theme Editor" +!define SETTINGS_HIVE "Software\rockbox.org\Rockbox Theme Editor" + +;Get installation folder from registry if available +InstallDirRegKey HKCU "${SETTINGS_HIVE}" "" + +SetCompressor /solid lzma +VIAddVersionKey "ProductName" "Rockbox Theme Editor" +VIAddVersionKey "FileVersion" "0.0.0" +VIAddVersionKey "FileDescription" "Editor for the Rockbox Firmware Theme files" +VIAddVersionKey "LegalCopyright" "Contributing Developers" +VIProductVersion "0.0.0.0" +!define MUI_ICON resources\windowicon.ico +; embed XP manifest +XPStyle on + +;Interface Configuration. Use Rockbox blue for header. +!define MUI_BGCOLOR b6c6e5 +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "themeeditor-setup.bmp" +!define MUI_HEADERIMAGE_RIGHT +!define MUI_ABORTWARNING + +;Pages +!insertmacro MUI_PAGE_LICENSE "..\..\docs\COPYING" +!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES + +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +;Languages +!insertmacro MUI_LANGUAGE "English" + +;Installer Sections +Section "Theme Editor" SecThemeEditor + SectionSetFlags ${SecThemeEditor} ${SF_RO} + SectionIn RO + SetOutPath "$INSTDIR" + ; Store installation folder + WriteRegStr HKCU "${SETTINGS_HIVE}" "" $INSTDIR + ; files + CreateDirectory "$INSTDIR" + File /oname=$INSTDIR\rbthemeeditor.exe release\rbthemeeditor.exe + + ; Create uninstaller and uninstall information + WriteUninstaller "$INSTDIR\Uninstall.exe" + WriteRegStr HKLM "${UNINSTALL_HIVE}" "DisplayName" "Rockbox Theme Editor" + WriteRegStr HKLM "${UNINSTALL_HIVE}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" + WriteRegStr HKLM "${UNINSTALL_HIVE}" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S" + WriteRegStr HKLM "${UNINSTALL_HIVE}" "URLInfoAbout" "http://www.rockbox.org/wiki/ThemeEditor" +SectionEnd + +Section "Download Fonts Package" SecFontsPackage + SetOutPath "$INSTDIR" + NSISdl::download http://download.rockbox.org/daily/fonts/rockbox-fonts.zip "$INSTDIR\rockbox-fonts.zip" + ZipDLL::extractall "$INSTDIR\rockbox-fonts.zip" "$INSTDIR" + ; the fonts package uses the Rockbox folder structure. Move all fonts into a + ; flat directory instead. + Rename "$INSTDIR\.rockbox\fonts" "$INSTDIR\fonts" + RMDir /r "$INSTDIR\.rockbox" + WriteRegStr HKCU "${SETTINGS_HIVE}\RBFont" "fontDir" "$INSTDIR\fonts\" +SectionEnd + +Section "Start Menu Shortcut" SecShortCuts + CreateDirectory "$SMPROGRAMS\Rockbox" + CreateShortCut "$SMPROGRAMS\Rockbox\Theme Editor.lnk" "$INSTDIR\rbthemeeditor.exe" + CreateShortCut "$SMPROGRAMS\Rockbox\Uninstall Theme Editor.lnk" "$INSTDIR\Uninstall.exe" +SectionEnd + +; Assign language strings to sections +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN +!insertmacro MUI_DESCRIPTION_TEXT ${SecThemeEditor} \ + "Rockbox Theme Editor. Required." +!insertmacro MUI_DESCRIPTION_TEXT ${SecFontsPackage} \ + "Download and install the Rockbox Fonts package into program folder. \ + This will set the correct path in the program configuration for the current user only." +!insertmacro MUI_DESCRIPTION_TEXT ${SecShortCuts} \ + "Create Shortcut in Start Menu." +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +; Uninstaller Section +Section "Uninstall" + ; files + Delete "$INSTDIR\Uninstall.exe" + Delete "$INSTDIR\rbthemeeditor.exe" + Delete "$INSTDIR\rockbox-fonts.zip" + ; folders + RMDir /r "$INSTDIR\fonts" + RMDir "$INSTDIR" + ; start menu folder + RMDir /r "$SMPROGRAMS\Rockbox" + + ; remove registry information + DeleteRegKey HKLM "${UNINSTALL_HIVE}" + DeleteRegKey HKCU "Software\rockbox.org\Rockbox Theme Editor" +SectionEnd +