PortableApps.com wins big in the 2009 Community Choice Awards and hits 100 million app downloads!
|
Theming GIMP Portable
Submitted by OliverK on July 10, 2009 - 3:03pm
I'm utilizing a customized GTK theme for the GIMP, called Murrina Night Orange. A copy is available here, if you would like to try or see it. You'll need to replace "MurrinaNightOrange" with whatever the name of the theme is that you're trying to get the GIMP to run in. I've tested these instructions with GIMP version 2.6. These instructions apply exactly to package version 2.6.6.0.
Otherwise, think of it more as guidelines .
Let me give you the usual caveats:
- Your version of the GIMP will not be supported ('cause you hacked the launcher)
- You will need to redo these changes the next time you upgrade
- You need to read all the instructions, AND understand them
- Adjust X:\ to your current drive letter.
- You should make a full backup of your GIMPPortable before you do this, because if you mess up somewhere, you could totally destroy your copy of the GIMP.
That being said, let us hack our GIMP and make it use themes 
- Locate all GTK themes you wish to use, as well as the
engines for the GTK themes
- Rename
GIMPPortable\App\gimp\etc\gtk-2.0\gtkrc to GIMPPortable\App\gimp\etc\gtk-2.0\fail.gtkrc
This will disable the defualt settings being applied by the GIMP to you're GTK theme. Note:Often, apps will have some settings hidden here. If you disable this,then you won't have that problem 
- Copy your theme to
GIMPPortable\App\gtk\share\themes
- If you need a engine, copy it to
GIMPPortable\App\gimp\lib\gtk-2.0\2.10.0\engines. Note that the 2.10.0 may be a different (depending on which version of the gimp you are using.
- Browse to
GIMPPortable\Data\settings. Create a file called
gtkrc. Paste the following into the file:
module_path "X:\\PortableApps\\GIMPPortable\\App\\gimp\\lib\\gtk-2.0\\2.10.0\\engines"
include "X:\\PortableApps\\GIMPPortable\\App\\gimp\\share\\themes\\MurrinaNightOrange\\gtk-2.0\\gtkrc" - Hack the launcher. Starting at line 256 edit this bit of code:
UpdatePluginsRC:
; double up back slashes and store current directory in 2
${StrReplace} '$1' '\' '??' '$EXEDIR'
${StrReplace} '$2' '??' '\\' '$1';get last directory and store in $0
ReadINIStr $0 "$SETTINGSDIRECTORY\${NAME}Settings.ini" "GIMPPortableSettings" LastDirectory"
StrCmp $0 "" StoreLastDirectory
StrCmp $0 $2 CheckForUserProfileFolders ; No change, so just start IfFileExists "$SETTINGSDIRECTORY\pluginrc" "" StoreLastDirectory ${ReplaceInFile} "$SETTINGSDIRECTORY\pluginrc" "$0" "$$OLDDIRECTORY$$" ${ReplaceInFile} "$SETTINGSDIRECTORY\pluginrc" "$$OLDDIRECTORY$$" "$2"to be this bit of code:
UpdatePluginsRC:
; double up back slashes and store current directory in $2
${StrReplace} '$1' '\' '??' '$EXEDIR'
${StrReplace} '$2' '??' '\\' '$1'
;get last directory and store in $0 ReadINIStr $0 "$SETTINGSDIRECTORY\${NAME}Settings.ini" "GIMPPortableSettings" LastDirectory"
StrCmp $0 "" StoreLastDirectory
StrCmp $0 $2 CheckForUserProfileFolders ; No change, so just start
IfFileExists "$SETTINGSDIRECTORY\pluginrc" "" StoreLastDirectory ${ReplaceInFile} "$SETTINGSDIRECTORY\pluginrc" "$0" "$$OLDDIRECTORY$$" ${ReplaceInFile} "$SETTINGSDIRECTORY\pluginrc" "$$OLDDIRECTORY$$" "$2" ${ReplaceInFile} "$SETTINGSDIRECTORY\gtkrc" "$0" "$$OLDDIRECTORY$$";line added to create GTK support
${ReplaceInFile} "$SETTINGSDIRECTORY\gtkrc" "$$OLDDIRECTORY$$" "$2";line added to create GTK support
- Compile the launcher using NSIS.
- Start GIMPPortable.
- Enjoy your GTK theme
|