nsis: Make icon theme switchable

This commit is contained in:
Paweł Forysiuk 2012-08-19 15:00:21 +02:00 committed by Christian Dywan
parent 57777d402f
commit 06341b8ecf
1 changed files with 134 additions and 133 deletions

View File

@ -32,6 +32,7 @@ RequestExecutionLevel user ; set execution level for Windows Vista
!define PRODUCT_EXE "$INSTDIR\bin\midori.exe" !define PRODUCT_EXE "$INSTDIR\bin\midori.exe"
!define UNINSTALL_EXE "$INSTDIR\uninst.exe" !define UNINSTALL_EXE "$INSTDIR\uninst.exe"
!define RESOURCEDIR "midori-${PRODUCT_VERSION}" !define RESOURCEDIR "midori-${PRODUCT_VERSION}"
!define ICON_THEME "Faenza"
;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;
; Version resource ; ; Version resource ;
@ -122,10 +123,10 @@ Section "!Program Files" SEC01
File /r /x "midori" "${RESOURCEDIR}\lib\*" File /r /x "midori" "${RESOURCEDIR}\lib\*"
SetOutPath "$INSTDIR\share" SetOutPath "$INSTDIR\share"
File /r /x "locale" /x "user" /x "Tango" "${RESOURCEDIR}\share\*" File /r /x "locale" /x "user" /x "${ICON_THEME}" "${RESOURCEDIR}\share\*"
SetOutPath "$INSTDIR\share\icons\Tango" SetOutPath "$INSTDIR\share\icons\${ICON_THEME}"
File "${RESOURCEDIR}\share\icons\Tango\index.theme" File "${RESOURCEDIR}\share\icons\${ICON_THEME}\index.theme"
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
CreateShortCut "$INSTDIR\Midori.lnk" "${PRODUCT_EXE}" CreateShortCut "$INSTDIR\Midori.lnk" "${PRODUCT_EXE}"
@ -156,150 +157,150 @@ Section "FAQ" SEC06
File "${RESOURCEDIR}\share\doc\midori\faq.html" File "${RESOURCEDIR}\share\doc\midori\faq.html"
SectionEnd SectionEnd
!macro InstallTangoIconRenameSmall OPath IPath !macro InstallIconThemeRenameSmall OPath IPath
File "/oname=16x16\${OPath}.png" "${RESOURCEDIR}\share\icons\Tango\16x16\${IPath}.png" File "/oname=16x16\${OPath}.png" "${RESOURCEDIR}\share\icons\${ICON_THEME}\16x16\${IPath}.png"
File "/oname=22x22\${OPath}.png" "${RESOURCEDIR}\share\icons\Tango\22x22\${IPath}.png" File "/oname=22x22\${OPath}.png" "${RESOURCEDIR}\share\icons\${ICON_THEME}\22x22\${IPath}.png"
File "/oname=32x32\${OPath}.png" "${RESOURCEDIR}\share\icons\Tango\32x32\${IPath}.png" File "/oname=32x32\${OPath}.png" "${RESOURCEDIR}\share\icons\${ICON_THEME}\32x32\${IPath}.png"
!macroend !macroend
!macro InstallTangoIconRename OPath IPath !macro InstallIconThemeRename OPath IPath
!insertmacro InstallTangoIconRenameSmall ${OPath} ${IPath} !insertmacro InstallIconThemeRenameSmall ${OPath} ${IPath}
File "/oname=48x48\${OPath}.png" "${RESOURCEDIR}\share\icons\Tango\48x48\${IPath}.png" File "/oname=48x48\${OPath}.png" "${RESOURCEDIR}\share\icons\${ICON_THEME}\48x48\${IPath}.png"
File "/oname=scalable\${OPath}.svg" "${RESOURCEDIR}\share\icons\Tango\scalable\${IPath}.svg" File "/oname=scalable\${OPath}.svg" "${RESOURCEDIR}\share\icons\${ICON_THEME}\scalable\${IPath}.svg"
File /nonfatal "/oname=scalable\${OPath}.icon" "${RESOURCEDIR}\share\icons\Tango\scalable\${IPath}.icon" File /nonfatal "/oname=scalable\${OPath}.icon" "${RESOURCEDIR}\share\icons\${ICON_THEME}\scalable\${IPath}.icon"
!macroend !macroend
!macro InstallTangoIconSmall IconPath !macro InstallIconThemeSmall IconPath
!insertmacro InstallTangoIconRenameSmall ${IconPath} ${IconPath} !insertmacro InstallIconThemeRenameSmall ${IconPath} ${IconPath}
!macroend !macroend
!macro InstallTangoIcon IconPath !macro InstallIconTheme IconPath
!insertmacro InstallTangoIconRename ${IconPath} ${IconPath} !insertmacro InstallIconThemeRename ${IconPath} ${IconPath}
!macroend !macroend
!macro CreateTangoSectionsSmall SectionPath !macro CreateIconThemeSectionsSmall SectionPath
CreateDirectory "$INSTDIR\share\icons\Tango\16x16\${SectionPath}" CreateDirectory "$INSTDIR\share\icons\${ICON_THEME}\16x16\${SectionPath}"
CreateDirectory "$INSTDIR\share\icons\Tango\22x22\${SectionPath}" CreateDirectory "$INSTDIR\share\icons\${ICON_THEME}\22x22\${SectionPath}"
CreateDirectory "$INSTDIR\share\icons\Tango\32x32\${SectionPath}" CreateDirectory "$INSTDIR\share\icons\${ICON_THEME}\32x32\${SectionPath}"
!macroend !macroend
!macro CreateTangoSections SectionPath !macro CreateIconThemeSections SectionPath
!insertmacro CreateTangoSectionsSmall ${SectionPath} !insertmacro CreateIconThemeSectionsSmall ${SectionPath}
CreateDirectory "$INSTDIR\share\icons\Tango\48x48\${SectionPath}" CreateDirectory "$INSTDIR\share\icons\${ICON_THEME}\48x48\${SectionPath}"
CreateDirectory "$INSTDIR\share\icons\Tango\scalable\${SectionPath}" CreateDirectory "$INSTDIR\share\icons\${ICON_THEME}\scalable\${SectionPath}"
!macroend !macroend
Section "Tango icons" SEC07 Section "${ICON_THEME} icons" SEC07
SectionIn 1 SectionIn 1
SetOutPath "$INSTDIR\share\icons\Tango" SetOutPath "$INSTDIR\share\icons\${ICON_THEME}"
!insertmacro CreateTangoSections "actions" !insertmacro CreateIconThemeSections "actions"
!insertmacro CreateTangoSectionsSmall "animations" !insertmacro CreateIconThemeSectionsSmall "animations"
!insertmacro CreateTangoSections "apps" !insertmacro CreateIconThemeSections "apps"
!insertmacro CreateTangoSections "categories" !insertmacro CreateIconThemeSections "categories"
!insertmacro CreateTangoSections "devices" !insertmacro CreateIconThemeSections "devices"
!insertmacro CreateTangoSections "emblems" !insertmacro CreateIconThemeSections "emblems"
!insertmacro CreateTangoSections "emotes" !insertmacro CreateIconThemeSections "emotes"
!insertmacro CreateTangoSections "mimetypes" !insertmacro CreateIconThemeSections "mimetypes"
!insertmacro CreateTangoSections "places" !insertmacro CreateIconThemeSections "places"
!insertmacro CreateTangoSections "status" !insertmacro CreateIconThemeSections "status"
!insertmacro InstallTangoIcon "actions\gtk-add" !insertmacro InstallIconTheme "actions\gtk-add"
!insertmacro InstallTangoIcon "actions\gtk-bold" !insertmacro InstallIconTheme "actions\gtk-bold"
!insertmacro InstallTangoIcon "actions\gtk-cancel" !insertmacro InstallIconTheme "actions\gtk-cancel"
!insertmacro InstallTangoIcon "actions\gtk-cancel" !insertmacro InstallIconTheme "actions\gtk-cancel"
!insertmacro InstallTangoIcon "actions\gtk-clear" !insertmacro InstallIconTheme "actions\gtk-clear"
!insertmacro InstallTangoIcon "actions\gtk-copy" !insertmacro InstallIconTheme "actions\gtk-copy"
!insertmacro InstallTangoIcon "actions\gtk-cut" !insertmacro InstallIconTheme "actions\gtk-cut"
!insertmacro InstallTangoIcon "actions\gtk-delete" !insertmacro InstallIconTheme "actions\gtk-delete"
!insertmacro InstallTangoIcon "actions\gtk-find" !insertmacro InstallIconTheme "actions\gtk-find"
!insertmacro InstallTangoIcon "actions\gtk-fullscreen" !insertmacro InstallIconTheme "actions\gtk-fullscreen"
!insertmacro InstallTangoIcon "actions\gtk-go-back-ltr" !insertmacro InstallIconTheme "actions\gtk-go-back-ltr"
!insertmacro InstallTangoIcon "actions\gtk-go-back-ltr" !insertmacro InstallIconTheme "actions\gtk-go-back-ltr"
!insertmacro InstallTangoIcon "actions\gtk-go-down" !insertmacro InstallIconTheme "actions\gtk-go-down"
!insertmacro InstallTangoIcon "actions\gtk-go-forward-ltr" !insertmacro InstallIconTheme "actions\gtk-go-forward-ltr"
!insertmacro InstallTangoIcon "actions\gtk-go-forward-ltr" !insertmacro InstallIconTheme "actions\gtk-go-forward-ltr"
!insertmacro InstallTangoIcon "actions\gtk-go-up" !insertmacro InstallIconTheme "actions\gtk-go-up"
!insertmacro InstallTangoIcon "actions\gtk-goto-first-ltr" !insertmacro InstallIconTheme "actions\gtk-goto-first-ltr"
!insertmacro InstallTangoIcon "actions\gtk-goto-first-ltr" !insertmacro InstallIconTheme "actions\gtk-goto-first-ltr"
!insertmacro InstallTangoIcon "actions\gtk-goto-last-ltr" !insertmacro InstallIconTheme "actions\gtk-goto-last-ltr"
!insertmacro InstallTangoIcon "actions\gtk-goto-last-ltr" !insertmacro InstallIconTheme "actions\gtk-goto-last-ltr"
!insertmacro InstallTangoIcon "actions\gtk-home" !insertmacro InstallIconTheme "actions\gtk-home"
!insertmacro InstallTangoIcon "actions\gtk-indent-ltr" !insertmacro InstallIconTheme "actions\gtk-indent-ltr"
!insertmacro InstallTangoIcon "actions\gtk-indent-rtl" !insertmacro InstallIconTheme "actions\gtk-indent-rtl"
!insertmacro InstallTangoIcon "actions\gtk-italic" !insertmacro InstallIconTheme "actions\gtk-italic"
!insertmacro InstallTangoIcon "actions\gtk-jump-to-ltr" !insertmacro InstallIconTheme "actions\gtk-jump-to-ltr"
!insertmacro InstallTangoIcon "actions\gtk-jump-to-ltr" !insertmacro InstallIconTheme "actions\gtk-jump-to-ltr"
!insertmacro InstallTangoIcon "actions\gtk-media-next-ltr" !insertmacro InstallIconTheme "actions\gtk-media-next-ltr"
!insertmacro InstallTangoIcon "actions\gtk-media-next-rtl" !insertmacro InstallIconTheme "actions\gtk-media-next-rtl"
!insertmacro InstallTangoIcon "actions\gtk-media-previous-ltr" !insertmacro InstallIconTheme "actions\gtk-media-previous-ltr"
!insertmacro InstallTangoIcon "actions\gtk-media-previous-rtl" !insertmacro InstallIconTheme "actions\gtk-media-previous-rtl"
!insertmacro InstallTangoIcon "actions\gtk-open" !insertmacro InstallIconTheme "actions\gtk-open"
!insertmacro InstallTangoIcon "actions\gtk-paste" !insertmacro InstallIconTheme "actions\gtk-paste"
!insertmacro InstallTangoIcon "actions\gtk-print" !insertmacro InstallIconTheme "actions\gtk-print"
!insertmacro InstallTangoIcon "actions\gtk-properties" !insertmacro InstallIconTheme "actions\gtk-properties"
!insertmacro InstallTangoIcon "actions\gtk-redo-ltr" !insertmacro InstallIconTheme "actions\gtk-redo-ltr"
!insertmacro InstallTangoIcon "actions\gtk-refresh" !insertmacro InstallIconTheme "actions\gtk-refresh"
!insertmacro InstallTangoIcon "actions\gtk-remove" !insertmacro InstallIconTheme "actions\gtk-remove"
!insertmacro InstallTangoIcon "actions\gtk-save" !insertmacro InstallIconTheme "actions\gtk-save"
!insertmacro InstallTangoIcon "actions\gtk-save-as" !insertmacro InstallIconTheme "actions\gtk-save-as"
!insertmacro InstallTangoIcon "actions\gtk-select-all" !insertmacro InstallIconTheme "actions\gtk-select-all"
!insertmacro InstallTangoIcon "actions\gtk-stop" !insertmacro InstallIconTheme "actions\gtk-stop"
!insertmacro InstallTangoIcon "actions\gtk-underline" !insertmacro InstallIconTheme "actions\gtk-underline"
!insertmacro InstallTangoIcon "actions\gtk-undo-ltr" !insertmacro InstallIconTheme "actions\gtk-undo-ltr"
!insertmacro InstallTangoIcon "actions\stock_add-bookmark" !insertmacro InstallIconTheme "actions\stock_add-bookmark"
!insertmacro InstallTangoIcon "actions\stock_new-tab" !insertmacro InstallIconTheme "actions\stock_new-tab"
!insertmacro InstallTangoIcon "actions\stock_new-window" !insertmacro InstallIconTheme "actions\stock_new-window"
!insertmacro InstallTangoIconSmall "animations\process-working" !insertmacro InstallIconThemeSmall "animations\process-working"
!insertmacro InstallTangoIcon "apps\gnome-settings-theme" !insertmacro InstallIconTheme "apps\gnome-settings-theme"
!insertmacro InstallTangoIcon "apps\gtk-help" !insertmacro InstallIconTheme "apps\gtk-help"
!insertmacro InstallTangoIcon "apps\terminal" !insertmacro InstallIconTheme "apps\terminal"
!insertmacro InstallTangoIcon "apps\web-browser" !insertmacro InstallIconTheme "apps\web-browser"
!insertmacro InstallTangoIcon "categories\gtk-preferences" !insertmacro InstallIconTheme "categories\gtk-preferences"
#!insertmacro InstallTangoIcon "cookie-manager" #!insertmacro InstallIconTheme "cookie-manager"
#!insertmacro InstallTangoIcon "document-open-recent" #!insertmacro InstallIconTheme "document-open-recent"
#!insertmacro InstallTangoIcon "extention" #!insertmacro InstallIconTheme "extention"
#!insertmacro InstallTangoIcon "feed-panel" #!insertmacro InstallIconTheme "feed-panel"
#!insertmacro InstallTangoIcon "gtk-about" #!insertmacro InstallIconTheme "gtk-about"
#!insertmacro InstallTangoIcon "gtk-close" #!insertmacro InstallIconTheme "gtk-close"
#!insertmacro InstallTangoIcon "gtk-convert" #!insertmacro InstallIconTheme "gtk-convert"
#!insertmacro InstallTangoIcon "gtk-dialog-authentication" #!insertmacro InstallIconTheme "gtk-dialog-authentication"
#!insertmacro InstallTangoIcon "gtk-dnd-multiple" #!insertmacro InstallIconTheme "gtk-dnd-multiple"
#!insertmacro InstallTangoIcon "gtk-edit" #!insertmacro InstallIconTheme "gtk-edit"
#!insertmacro InstallTangoIcon "gtk-execute" #!insertmacro InstallIconTheme "gtk-execute"
#!insertmacro InstallTangoIcon "gtk-file" #!insertmacro InstallIconTheme "gtk-file"
#!insertmacro InstallTangoIcon "gtk-index" #!insertmacro InstallIconTheme "gtk-index"
#!insertmacro InstallTangoIcon "gtk-info" #!insertmacro InstallIconTheme "gtk-info"
#!insertmacro InstallTangoIcon "gtk-ok" #!insertmacro InstallIconTheme "gtk-ok"
#!insertmacro InstallTangoIcon "gtk-orientation-portait" #!insertmacro InstallIconTheme "gtk-orientation-portait"
#!insertmacro InstallTangoIcon "gtk-quit" #!insertmacro InstallIconTheme "gtk-quit"
#!insertmacro InstallTangoIcon "gtk-select-color" #!insertmacro InstallIconTheme "gtk-select-color"
#!insertmacro InstallTangoIcon "gtk-select-font" #!insertmacro InstallIconTheme "gtk-select-font"
#!insertmacro InstallTangoIcon "gtk-sort-ascending" #!insertmacro InstallIconTheme "gtk-sort-ascending"
#!insertmacro InstallTangoIcon "gtk-spell-check" #!insertmacro InstallIconTheme "gtk-spell-check"
#!insertmacro InstallTangoIcon "gtk-undelete" #!insertmacro InstallIconTheme "gtk-undelete"
#!insertmacro InstallTangoIcon "gtk-yes" #!insertmacro InstallIconTheme "gtk-yes"
#!insertmacro InstallTangoIcon "gtk-zoom-100" #!insertmacro InstallIconTheme "gtk-zoom-100"
#!insertmacro InstallTangoIcon "gtk-zoom-in" #!insertmacro InstallIconTheme "gtk-zoom-in"
#!insertmacro InstallTangoIcon "gtk-zoom-out" #!insertmacro InstallIconTheme "gtk-zoom-out"
!insertmacro InstallTangoIcon "mimetypes\gnome-mime-application-x-shockwave-flash" !insertmacro InstallIconTheme "mimetypes\gnome-mime-application-x-shockwave-flash"
!insertmacro InstallTangoIcon "mimetypes\gnome-mime-image" !insertmacro InstallIconTheme "mimetypes\gnome-mime-image"
!insertmacro InstallTangoIcon "mimetypes\package" !insertmacro InstallIconTheme "mimetypes\package"
!insertmacro InstallTangoIcon "mimetypes\stock_script" !insertmacro InstallIconTheme "mimetypes\stock_script"
!insertmacro InstallTangoIcon "mimetypes\vcard" !insertmacro InstallIconTheme "mimetypes\vcard"
#!insertmacro InstallTangoIcon "internet-news-reader" #!insertmacro InstallIconTheme "internet-news-reader"
#!insertmacro InstallTangoIcon "place-holder" #!insertmacro InstallIconTheme "place-holder"
!insertmacro InstallTangoIcon "places\gnome-stock-trash" !insertmacro InstallIconTheme "places\gnome-stock-trash"
!insertmacro InstallTangoIcon "places\gtk-directory" !insertmacro InstallIconTheme "places\gtk-directory"
!insertmacro InstallTangoIcon "places\gtk-network" !insertmacro InstallIconTheme "places\gtk-network"
!insertmacro InstallTangoIcon "status\gtk-dialog-error" !insertmacro InstallIconTheme "status\gtk-dialog-error"
!insertmacro InstallTangoIcon "status\gtk-dialog-info" !insertmacro InstallIconTheme "status\gtk-dialog-info"
!insertmacro InstallTangoIcon "status\gtk-dialog-warning" !insertmacro InstallIconTheme "status\gtk-dialog-warning"
!insertmacro InstallTangoIcon "status\gtk-missing-image" !insertmacro InstallIconTheme "status\gtk-missing-image"
!insertmacro InstallTangoIcon "status\network-offline" !insertmacro InstallIconTheme "status\network-offline"
#!insertmacro InstallTangoIcon "stock_bookmark" #!insertmacro InstallIconTheme "stock_bookmark"
#!insertmacro InstallTangoIcon "stock_mail-send" #!insertmacro InstallIconTheme "stock_mail-send"
#!insertmacro InstallTangoIcon "tab-panel" #!insertmacro InstallIconTheme "tab-panel"
SectionEnd SectionEnd
Section "Desktop Shortcuts" SEC03 Section "Desktop Shortcuts" SEC03
@ -400,7 +401,7 @@ SectionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Available plugins like 'Advertisement Blocker', 'Form history filler' and 'Mouse Gestures'." !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Available plugins like 'Advertisement Blocker', 'Form history filler' and 'Mouse Gestures'."
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Make Midori the default browser." !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} "Make Midori the default browser."
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "User manual of the Midori application." !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} "User manual of the Midori application."
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Better looking icons from the Tango icon theme." !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} "Better looking icons from the ${ICON_THEME} icon theme."
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;