From: Joshua Pettus Date: Sat, 13 Sep 2014 19:35:12 +0000 (-0700) Subject: Add build script to configure for a XBoard.app for OS X X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e6fd287ffbf67a41aff2e615c6cb62555a29f5c2;p=xboard.git Add build script to configure for a XBoard.app for OS X This relies on the the gtk build and adds some special code in gtk/xboard.c so that XBoard can be installed inside the app directory independ on where the app file is located. --- diff --git a/Makefile.am b/Makefile.am index 5316962..e6ef188 100644 --- a/Makefile.am +++ b/Makefile.am @@ -241,3 +241,89 @@ if ENABLE_UPDATE_MIMEDB $(XDG_ICON_RESOURCE) uninstall --context mimetypes --size 48 ini48.png application-x-xboard-opt;\ fi endif + +#if OSX_APP +osxapp: all-recursive install install-recursive + $(MKDIR_P) $(datarootdir)/bin + $(MKDIR_P) $(datarootdir)/lib + $(MKDIR_P) $(sysconfdir)/gtk-2.0 + $(MKDIR_P) $(sysconfdir)/pango + $(MKDIR_P) $(datadir)/gtk-engines + $(MKDIR_P) $(datadir)/themes + $(MKDIR_P) $(gamedatadir)/themes + $(INSTALL) ./osxapp/Info.plist $(prefix) + $(INSTALL) ./osxapp/PkgInfo $(prefix) + $(INSTALL) ./osxapp/XBoard.gtklauncher $(bindir)/XBoard + $(INSTALL) ./xboard $(bindir)/xboard-bin + cp -R ./osxapp/icons/. $(datarootdir) + $(INSTALL) ./osxapp/man.command $(datarootdir)/bin/man.command + $(INSTALL) ./osxapp/info.command $(datarootdir)/bin/info.command + sed -e 's?-soundProgram "aplay -q"?-soundProgram "afplay"?'\ + -e 's?-firstChessProgram fairymax?-firstChessProgram "./fairymax"?'\ + -e 's?-firstChessProgramNames {fairymax?-firstChessProgramNames {"fairymax" -fcp "./fairymax" -fd "~~/../../bin/fairymax"?'\ + -e 's?"Fruit 2.1" -fcp fruit -fUCI?"fruit" -fcp "./fruit" -fd "~~/../../bin/fruit" -fUCI?'\ + -e '/"Crafty" -fcp crafty/d'\ + -e '/"GNU Chess" -fcp gnuchess/d'\ + -e 's?-polyglotDir ""?-polyglotDir "~~/../../bin"?'\ + -e 's?polyglot ?./polyglot ?'\ + -e 's?-icsNames {"fics" -icshost freechess.org -icshelper timeseal?-icsNames {"fics" -icshost 69.36.243.188 -icshelper ~~/../../bin/timeseal?'\ + -e 's?"icc" -icshost chessclub.com -icshelper timestamp?"icc" -icshost 207.99.83.228 -icshelper ~~/../../bin/timestamp?'\ + -e 's?"kc" -icshost alanimus.com -icshelper timeseal?"vics" -icshost winboard.nl -icshelper ~~/../../bin/timeseal?'\ + -e '/; Save user settings./d'\ + -e '/; Must be last in file to make user options prevail over system-wide settings!/d'\ + -e '/-saveSettingsOnExit true/d'\ + -e '/-saveSettingsFile "~\/.xboardrc"/d'\ + -e '/-settingsFile "~\/.xboardrc"/d'<./xboard.conf >$(sysconfdir)/xboard.conf + echo '; OSX' >>$(sysconfdir)/xboard.conf + echo ';'>>$(sysconfdir)/xboard.conf + echo '-clockFont "Sans Bold 26" '>>$(sysconfdir)/xboard.conf + echo '-pieceImageDirectory "~~/themes/default"' >>$(sysconfdir)/xboard.conf + echo '-autoLogo true' >>$(sysconfdir)/xboard.conf + echo '-logoDir "~~/logos"' >>$(sysconfdir)/xboard.conf + echo '-logoSize 100' >>$(sysconfdir)/xboard.conf + echo '-openCommand "cd %s/../../bin; open"' >>$(sysconfdir)/xboard.conf + echo '-firstDirectory "~~/../../bin/fairymax"' >>$(sysconfdir)/xboard.conf + echo '-secondDirectory "~~/../../bin/fairymax"' >>$(sysconfdir)/xboard.conf + echo '-secondChessProgram "./fairymax"' >>$(sysconfdir)/xboard.conf + echo ';' >>$(sysconfdir)/xboard.conf + echo '; Save user settings.' >>$(sysconfdir)/xboard.conf + echo '; Must be last in file to make user options prevail over system-wide settings!' >>$(sysconfdir)/xboard.conf + echo ';' >>$(sysconfdir)/xboard.conf + echo '-saveSettingsOnExit true' >>$(sysconfdir)/xboard.conf + echo '-saveSettingsFile "~/Library/Preferences/XBoardOSX.conf"' >>$(sysconfdir)/xboard.conf + echo '-settingsFile "~/Library/Preferences/XBoardOSX.conf"' >>$(sysconfdir)/xboard.conf + + sed 's?/opt/local/lib?/tmp/skl/XBoard.app/Contents/Resources/lib?' $(sysconfdir)/gtk-2.0/gdk-pixbuf.loaders + sed -e 's?/opt/local/lib?/tmp/skl/XBoard.app/Contents/Resources/lib?' -e 's?/opt/local/share/locale?/tmp/skl/XBoard.app/Contents/Resources/share/locale?' $(sysconfdir)/gtk-2.0/gtk.immodules + $(INSTALL) ./osxapp/launcher_rc $(datarootdir)/ + $(INSTALL) /opt/local/etc/gtk-2.0/im-multipress.conf $(sysconfdir)/gtk-2.0 + $(INSTALL) ./osxapp/gtkrc $(sysconfdir)/gtk-2.0/gtkrc + $(INSTALL) ./osxapp/pango.modules $(sysconfdir)/pango/pangorc + cp -R /opt/local/lib/gtk-2.0 $(datarootdir)/lib + cp -R /opt/local/lib/gdk-pixbuf-2.0 $(datarootdir)/lib + $(INSTALL) /opt/local/share/gtk-engines/murrine.xml $(datadir)/gtk-engines + cp -R ./osxapp/OSX-theme $(datadir)/themes + cp -R /opt/local/share/themes/Mac $(datadir)/themes + cp -R ./osxapp/default/. $(gamedatadir)/themes/default + $(INSTALL) ./png/marble_d.png $(gamedatadir)/themes/textures + $(INSTALL) ./png/marble_l.png $(gamedatadir)/themes/textures + $(INSTALL) ./png/xqwood.png $(gamedatadir)/themes/textures + cp -R ./osxapp/logos $(gamedatadir)/ + cp -R ./osxapp/osx-localization/. $(datarootdir)/ + for i in po/*gmo; do lang=`basename $$i .gmo`; $(INSTALL) /opt/local/share/locale/$$lang/LC_MESSAGES/gtk20.mo $(localedir)/$$lang/LC_MESSAGES/; done + dylibbundler -of -b -x $(bindir)/xboard-bin -d $(datarootdir)/lib -p @executable_path/../Resources/lib + dylibbundler -of -b -x $(datarootdir)/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib + dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/immodules/im-quartz.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib + dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/engines/libpixmap.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib + dylibbundler -of -b -x $(datarootdir)/lib/gtk-2.0/2.10.0/engines/libmurrine.so -d $(datarootdir)/lib -p @executable_path/../Resources/lib + find ./XBoard.app -name '*.a' -print0 | xargs -0 rm + rm -r $(datarootdir)/lib/gtk-2.0/include + rm -r $(datarootdir)/share/applications + rm $(datarootdir)/share/info/dir + rm -r $(datarootdir)/share/icons + rm -r $(datarootdir)/share/mime + mv $(datarootdir)/share/games/xboard/themes/conf $(datarootdir)/share/xboard/conf + rm -r $(datarootdir)/share/xboard/pixmaps + rm -r $(datarootdir)/share/games +#endif + diff --git a/configure.ac b/configure.ac index 56a1dce..1531706 100644 --- a/configure.ac +++ b/configure.ac @@ -180,6 +180,42 @@ AC_ARG_WITH([gamedatadir], [GAMEDATADIR="$withval"], [GAMEDATADIR='$(datadir)/games/xboard']) +AC_ARG_ENABLE( [update-mimedb], + [AS_HELP_STRING([--disable-update-mimedb],[disable the update-mime-database after install [default=no]])], + [enable_mimedb="no"], + [enable_mimedb="yes"]) + +AC_ARG_ENABLE([osxapp], + [AS_HELP_STRING([--enable-osxapp],[build a OSX app])], + [enable_OSXAPP=$withval], + [enable_OSXAPP="no"]) + +AS_IF([test "x$enable_osxapp" = "xyes"], [ + AC_PREFIX_DEFAULT([`pwd`/XBoard.app/Contents]) + with_GTK="yes" + enable_mimedb="no" + datarootdir='$(prefix)/Resources' + datadir='$(datarootdir)/share' + sysconfdir='$(datarootdir)/etc' + infodir='$(datadir)/info' + mandir='$(datadir)/man' + bindir='$(prefix)/MacOS' + localedir='$(datadir)/locale' + GAMEDATADIR='$(datadir)/xboard' +]) + +AM_CONDITIONAL(OSX_APP, test x"$enable_osxapp" = "xyes") + +AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x"$enable_mimedb" = "xyes") +if test x"$enable_mimedb" = "xyes"; then + AC_PATH_PROG([XDG_MIME],[xdg-mime]) + AC_SUBST(XDG_MIME) + AC_PATH_PROG([XDG_DESKTOP_MENU],[xdg-desktop-menu]) + AC_SUBST(XDG_DESKTOP_MENU) + AC_PATH_PROG([XDG_ICON_RESOURCE],[xdg-icon-resource]) + AC_SUBST(XDG_ICON_RESOURCE) +fi + AC_SUBST(ICONSDIR) AC_SUBST(SVGICONSDIR) AC_SUBST(DESKTOPDIR) @@ -429,21 +465,16 @@ dnl| USE_PTYS=1 dnl| add some libs for OS X *-apple-* ) AC_MSG_WARN([Apple support is experimental, please report any problems to bug-xboard@gnu.org]) + AC_MSG_WARN([Building an OS X app currently relies on some programs such as dylib that we don't test for]) + AC_MSG_WARN([patches welcome ;)]) AC_PATH_PROG(SW_VERS, sw_vers) if test "x$SW_VERS" != "x"; then AC_MSG_CHECKING(Mac OS X version) MACOSX_VERSION=`$SW_VERS -productVersion` AC_MSG_RESULT([$MACOSX_VERSION]) fi - case "$MACOSX_VERSION" in - 10.0*|10.1|10.1.*|10.2*|10.3*|10.4*|10.5*|10.6*) - FRONTEND_LIBS="$FRONTEND_LIBS -lgtkmacintegration -headerpad_max_install_names mmacosx-version-min=10.6 -isysroot /Developer/SDKs/MacOSX10.6.sdk" - ;; - *) - FRONTEND_LIBS="$FRONTEND_LIBS -lgtkmacintegration -headerpad_max_install_names" - ;; - esac - + FRONTEND_LIBS="$FRONTEND_LIBS -lgtkmacintegration -headerpad_max_install_names " + FRONTEND_CFLAGS="$FRONTEND_CFLAGS -I/opt/local/include -L/opt/local/lib" ;; esac @@ -511,23 +542,6 @@ AC_SUBST(X_CFLAGS) AC_SUBST(X_LIBS) fi -dnl | should we install desktop icons and mime associations? -AC_ARG_ENABLE( [update-mimedb], - [AS_HELP_STRING([--disable-update-mimedb],[disable the update-mime-database after install [default=no]])], - [enable_mimedb="no"], - [enable_mimedb="yes"]) - -AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x"$enable_mimedb" = "xyes") - -if test x"$enable_mimedb" = "xyes"; then - AC_PATH_PROG([XDG_MIME],[xdg-mime]) - AC_SUBST(XDG_MIME) - AC_PATH_PROG([XDG_DESKTOP_MENU],[xdg-desktop-menu]) - AC_SUBST(XDG_DESKTOP_MENU) - AC_PATH_PROG([XDG_ICON_RESOURCE],[xdg-icon-resource]) - AC_SUBST(XDG_ICON_RESOURCE) -fi - dnl create a string with configure options that can be passed to the dnl program, good for bug reports and version printout, see output below CONFIGURE_OPTIONS="prefix=$prefix; datarootdir=$datarootdir; \ @@ -540,7 +554,7 @@ ptys=$enable_ptys; zippy=$enable_zippy; sigint=$enable_sigint" AC_SUBST(CONFIGURE_OPTIONS) dnl | output Makefile -AC_CONFIG_FILES([Makefile cmail po/Makefile.in]) +AC_CONFIG_FILES([Makefile cmail po/Makefile.in osxapp/Info.plist]) AC_CONFIG_COMMANDS([test-stamp-h],[test -z "$CONFIG_HEADERS" || date > stamp-h]) AC_CONFIG_COMMANDS([chmod-cmail],[chmod 755 cmail]) AC_OUTPUT diff --git a/gtk/xboard.c b/gtk/xboard.c index 81fc8d6..f134d8b 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -882,9 +882,9 @@ main (int argc, char **argv) snprintf(localeDir, MSG_SIZ, "%s/share/locale", res_path); // redefine locale dir for OSX bundle #endif theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL); - strncpy(dataDir, path, MSG_SIZ); snprintf(masterSettings, MSG_SIZ, "%s/Contents/Resources/etc/xboard.conf", path); - snprintf(svgDir, MSG_SIZ, "%s/Contents/Resources/share/xboard/themes/default", path); + snprintf(dataDir, MSG_SIZ, "%s/Contents/Resources/share/xboard", path); + snprintf(svgDir, MSG_SIZ, "%s/themes/default", dataDir); suppress = (argc == 1 || argc > 1 && argv[1][00] != '-'); // OSX sends signal even if name was already argv[1]! g_signal_connect(theApp, "NSApplicationOpenFile", G_CALLBACK(StartNewXBoard), NULL); // we must call application ready before we can get the signal, diff --git a/osxapp/Info.plist.in b/osxapp/Info.plist.in new file mode 100644 index 0000000..1a9e2fa --- /dev/null +++ b/osxapp/Info.plist.in @@ -0,0 +1,188 @@ + + + + + CFBundleDocumentTypes + + + CFBundleTypeName + Portable Game Notation + CFBundleTypeIconFile + pgn.icns + LSHandlerRank + Owner + CFBundleTypeRole + Editor + LSItemContentTypes + + org.fsf.xboard.pgn + com.apple.chess.pgn + + + + CFBundleTypeName + XBoard Option File + CFBundleTypeIconFile + xop.icns + LSHandlerRank + Owner + CFBundleTypeRole + Editor + LSItemContentTypes + + org.fsf.xboard.xop + + + + CFBundleTypeName + XBoard Positions File + CFBundleTypeIconFile + fen.icns + LSHandlerRank + Owner + CFBundleTypeRole + Editor + LSItemContentTypes + + org.fsf.xboard.fen + + + + CFBundleTypeName + XBoard Tournament File + CFBundleTypeIconFile + trn.icns + LSHandlerRank + Owner + CFBundleTypeRole + Editor + LSItemContentTypes + + org.fsf.xboard.trn + + + + UTExportedTypeDeclarations + + + UTTypeIdentifier + org.fsf.xboard.pgn + UTTypeDescription + Portable Game Notation + UTTypeIconFile + pgn.icns + UTTypeTagSpecification + + public.filename-extension + + pgn + + public.mime-type + + application/x-chess-pgn + + + UTTypeConformsTo + + public.utf8-plain-text + + + + UTTypeIdentifier + org.fsf.xboard.xop + UTTypeDescription + XBoard Options File + UTTypeIconFile + xop.icns + UTTypeTagSpecification + + public.filename-extension + + xop + + public.mime-type + + application/x-xboard-opt + + + UTTypeConformsTo + + public.utf8-plain-text + + + + UTTypeIdentifier + org.fsf.xboard.fen + UTTypeDescription + XBoard Positions File + UTTypeIconFile + fen.icns + UTTypeTagSpecification + + public.filename-extension + + fen + + public.mime-type + + application/x-chess-fen + + + UTTypeConformsTo + + public.utf8-plain-text + + + + UTTypeIdentifier + org.fsf.xboard.trn + UTTypeDescription + XBoard Tournament File + UTTypeIconFile + trn.icns + UTTypeTagSpecification + + public.filename-extension + + trn + + public.mime-type + + application/x-xboard-trn + + + UTTypeConformsTo + + public.utf8-plain-text + + + + CFBundleExecutable + XBoard + CFBundleIconFile + XBoard + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + XBoard + CFBundlePackageType + APPL + NSHumanReadableCopyright + ©1992-2014 Free-Software-Foundation + CFBundleSignature + xbrd + CFBundleShortVersionString + @PACKAGE_VERSION@ + CFBundleIdentifier + org.fsf.xboard.www + CFBundleVersion + @PACKAGE_VERSION@ + NSPrincipalClass + NSApplication + LSMinimumSystemVersionByArchitecture + + x86_64 + 10.6 + + + diff --git a/osxapp/OSX-theme/gtk-2.0/assets/handle.png b/osxapp/OSX-theme/gtk-2.0/assets/handle.png new file mode 100755 index 0000000..51978ae Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/handle.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-checked-18.png b/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-checked-18.png new file mode 100755 index 0000000..269e90b Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-checked-18.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-checked-insensitive-18.png b/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-checked-insensitive-18.png new file mode 100644 index 0000000..3a46e46 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-checked-insensitive-18.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-unchecked-18.png b/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-unchecked-18.png new file mode 100755 index 0000000..72c1d48 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-unchecked-18.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-unchecked-insensitive-18.png b/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-unchecked-insensitive-18.png new file mode 100644 index 0000000..4d4f6ab Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/l-checkbox-unchecked-insensitive-18.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/l-radio-selected-18.png b/osxapp/OSX-theme/gtk-2.0/assets/l-radio-selected-18.png new file mode 100755 index 0000000..fd0a398 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/l-radio-selected-18.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/l-radio-selected-insensitive-18.png b/osxapp/OSX-theme/gtk-2.0/assets/l-radio-selected-insensitive-18.png new file mode 100644 index 0000000..bae1909 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/l-radio-selected-insensitive-18.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/l-radio-unselected-18.png b/osxapp/OSX-theme/gtk-2.0/assets/l-radio-unselected-18.png new file mode 100755 index 0000000..c7d8751 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/l-radio-unselected-18.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/l-radio-unselected-insensitive-18.png b/osxapp/OSX-theme/gtk-2.0/assets/l-radio-unselected-insensitive-18.png new file mode 100644 index 0000000..9ba70fc Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/l-radio-unselected-insensitive-18.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-bottom.png b/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-bottom.png new file mode 100755 index 0000000..70fffda Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-bottom.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-left.png b/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-left.png new file mode 100755 index 0000000..747c57b Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-left.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-right.png b/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-right.png new file mode 100755 index 0000000..04fd5dc Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-right.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-top.png b/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-top.png new file mode 100755 index 0000000..138f1cd Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/notebook-gap-top.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/notebook.png b/osxapp/OSX-theme/gtk-2.0/assets/notebook.png new file mode 100755 index 0000000..e8f03f6 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/notebook.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/null.png b/osxapp/OSX-theme/gtk-2.0/assets/null.png new file mode 100755 index 0000000..013d98b Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/null.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/scroll-background.png b/osxapp/OSX-theme/gtk-2.0/assets/scroll-background.png new file mode 100755 index 0000000..dbe3655 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/scroll-background.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/slider-horizontal.png b/osxapp/OSX-theme/gtk-2.0/assets/slider-horizontal.png new file mode 100755 index 0000000..975822c Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/slider-horizontal.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/tab-bottom-active.png b/osxapp/OSX-theme/gtk-2.0/assets/tab-bottom-active.png new file mode 100755 index 0000000..e2c8024 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/tab-bottom-active.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/tab-bottom.png b/osxapp/OSX-theme/gtk-2.0/assets/tab-bottom.png new file mode 100755 index 0000000..4d0d72f Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/tab-bottom.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/tab-left-active.png b/osxapp/OSX-theme/gtk-2.0/assets/tab-left-active.png new file mode 100755 index 0000000..593dc35 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/tab-left-active.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/tab-left.png b/osxapp/OSX-theme/gtk-2.0/assets/tab-left.png new file mode 100755 index 0000000..4841bba Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/tab-left.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/tab-right-active.png b/osxapp/OSX-theme/gtk-2.0/assets/tab-right-active.png new file mode 100755 index 0000000..8394854 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/tab-right-active.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/tab-right.png b/osxapp/OSX-theme/gtk-2.0/assets/tab-right.png new file mode 100755 index 0000000..c82bee8 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/tab-right.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/tab-top-active.png b/osxapp/OSX-theme/gtk-2.0/assets/tab-top-active.png new file mode 100755 index 0000000..b3f6f9b Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/tab-top-active.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/tab-top.png b/osxapp/OSX-theme/gtk-2.0/assets/tab-top.png new file mode 100755 index 0000000..e01f001 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/tab-top.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/assets/toolbar.png b/osxapp/OSX-theme/gtk-2.0/assets/toolbar.png new file mode 100755 index 0000000..364f896 Binary files /dev/null and b/osxapp/OSX-theme/gtk-2.0/assets/toolbar.png differ diff --git a/osxapp/OSX-theme/gtk-2.0/gtkrc b/osxapp/OSX-theme/gtk-2.0/gtkrc new file mode 100755 index 0000000..fceba6e --- /dev/null +++ b/osxapp/OSX-theme/gtk-2.0/gtkrc @@ -0,0 +1,798 @@ + +gtk-color-scheme = "base_color:#ffffff\nfg_color:#202020\ntooltip_fg_color:#ffffff\nselected_bg_color:#3b6eeb\nselected_fg_color:#ffffff\ntext_color:#202020\nbg_color:#ededed\ntooltip_bg_color:#000000\nlink_color:#0033ff" + +gtk_color_scheme = "menu_gradient:#4455F6" + +gtk-auto-mnemonics = 1 + +gtk-button-images = 0 + +style "default" { + xthickness = 1 + ythickness = 1 + + ####################### + # Style Properties + ####################### + GtkButton::child-displacement-x = 0 + GtkButton::child-displacement-y = 0 + GtkButton::default-border = {0, 0, 0, 0} + GtkButton::image-spacing = 4 + GtkToolButton::icon-spacing = 4 + + GtkCheckButton::indicator-size = 18 + GtkRadioButton::indicator-size = 18 + + GtkEntry::honors-transparent-bg-hint = 1 + GtkEntry::invisible-char = 0x2022 + GtkEntry::progress-border = {2, 2, 2, 2} + GtkEntry::state-hint = 0 + + GtkProgressBar::min-vertical-bar-width = 13 + GtkProgressBar::min-horizontal-bar-height = 13 + + GtkExpander::expander-size = 14 + + GtkMenuBar::internal-padding = 0 + GtkMenuBar::window-dragging = 1 + # GtkMenuBar::shadow-type = GTK_SHADOW_NONE # En Unity se habilita esta linea + + GtkMenu::horizontal-padding = 0 + GtkMenu::vertical-padding = 0 + GtkSeparatorMenuItem::horizontal-padding = 7 + + GtkNotebook::tab-overlap = 2 # Default = 2 + GtkNotebook::tab-curvature = 1 # Default = 1 + + GtkPaned::handle-size = 6 + + GtkRange::trough-border = 0 + GtkRange::trough-side-details = 0 + GtkRange::slider-width = 15 + GtkRange::stepper-size = 1 + + GtkScale::slider-length = 14 + GtkScale::slider-width = 14 + GtkScale::trough-side-details = 0 + + GtkScrollbar::has-backward-stepper = 0 + GtkScrollbar::has-forward-stepper = 1 # El maldito rollo de gtk2 y las scrollbars + GtkScrollbar::min-slider-length = 30 + GtkScrollbar::slider-width = 9 + GtkScrollbar::trough-border = 3 + GtkScrollbar::activate-slider = 0 + GtkScrollbar::trough-side-details = 0 + GtkScrollbar::stepper-size = 1 + + GtkScrolledWindow::scrollbar-spacing = 0 + GtkScrolledWindow::scrollbars-within-bevel = 1 + + GtkToolbar::internal-padding = 0 + GtkToolbar::window-dragging = 1 + + GtkTreeView::expander-size = 7 + GtkTreeView::odd_row_color = "#F4F6FA" + # en eclipse afecta backcolor de "Quick Type Hierarchy (CTRL+T)" + # GtkTreeView::even_row_color = "#FFF" + + GtkWidget::link-color = @link_color + GtkWidget::focus-padding = 0 + WnckTasklist::fade-overlay-rect = 0 + + GtkWindow::resize-grip-height = 0 # Ocultar resize-grip + GtkWindow::resize-grip-width = 0 + + #################### + # Color Definitions + #################### + bg[NORMAL] = @bg_color + bg[PRELIGHT] = shade (1.02, @bg_color) + bg[SELECTED] = @selected_bg_color + bg[INSENSITIVE] = @bg_color + bg[ACTIVE] = shade (0.9, @bg_color) + + fg[NORMAL] = @text_color + fg[PRELIGHT] = @fg_color + fg[SELECTED] = @selected_fg_color + fg[INSENSITIVE] = darker (@bg_color) + fg[ACTIVE] = @fg_color + + text[NORMAL] = @text_color + text[PRELIGHT] = @text_color + text[SELECTED] = @selected_fg_color + text[INSENSITIVE] = darker (@bg_color) + text[ACTIVE] = @selected_fg_color + + base[NORMAL] = @base_color + base[PRELIGHT] = shade (0.95, @bg_color) + base[SELECTED] = @selected_bg_color + base[INSENSITIVE] = @bg_color + base[ACTIVE] = shade (0.9, @selected_bg_color) + + engine "murrine" { + animation = FALSE + arrowstyle = 1 # Estilo flechas menu (triangulos) + colorize_scrollbar = TRUE + contrast = 1.0 + default_button_color = shade (1.05, "#66a3e3") + expanderstyle = 0 # Treview expander (triangulo) + cellstyle = 0 + focusstyle = 0 + glazestyle = 0 # 0 = flat highlight, 1 = curved highlight, 2 = concave style, 3 = top curved highlight, 4 = beryl highlight + glowstyle = 4 # 0 = top, 1 = bottom, 2 = top and bottom, 3 = horizontal, 4 = centered glow + gradient_shades = {1.00, 0.91, 0.92, 0.81} + highlight_shade = 1.0 + lightborder_shade = 1.0 + lightborderstyle = 1 # 0 = top side, 1 = all sides + listviewstyle = 0 # 0 = nothing, 1 = dotted, 2 = line + menubaritemstyle = 0 # 0 = menuitem look, 1 = button look + menubarstyle = 1 # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped + menuitemstyle = 1 # 0 = flat, 1 = glassy, 2 = striped + menustyle = 3 # 0 = no vertical menu stripe, 1 = display vertical menu stripe, 2 = faint? 3 = borderless + progressbarstyle = 1 + reliefstyle = 3 # 0 = flat, 1 = inset, 2 = shadow, 3 = shadow with gradient, 4 = stronger shadow with gradient + rgba = FALSE # alpha transparency + roundness = 3 # 0 = square + scrollbarstyle = 0 # 0 = nothing + separatorstyle = 0 + shadow_shades = {2.0, 1.0} + sliderstyle = 0 # 0 = nothing added + stepperstyle = 1 # 0 = standard, 1 = integrated stepper handles, 2 = unknown + toolbarstyle = 1 # 0 = flat, 1 = glassy, 2 = gradient + trough_shades = {0.85, 1.0} + } +} + +style "wide" { + xthickness = 2 + ythickness = 2 +} + +style "wider" { + xthickness = 3 + ythickness = 3 +} + +style "button" { + xthickness = 3 + ythickness = 3 + + bg[ACTIVE] = shade (1.15, "#5c8fe9") # Pulsado #80B8EA + bg[NORMAL] = shade (0.93, "#FFF") + bg[PRELIGHT] = shade (0.95, "#FFF") + bg[SELECTED] = shade (1.25, "#5c8fe9") # Default + bg[INSENSITIVE] = shade (0.88, "#FFF") + + engine "murrine" { + border_shades = {1.0, 0.90} + contrast = 0.90 + gradient_shades = {1.25,1.02,1.01,1.05} + lightborderstyle = 1 + lightborder_shade = 1.1 + textstyle = 1 + } +} + +style "checkradio_label" { + fg[ACTIVE] = @text_color # Forzar color texto en radiobutton-eclipse +} + +style "checkbutton" { + engine "pixmap" { + image { + function = CHECK + recolorable = TRUE + state = NORMAL + shadow = OUT + overlay_file = "assets/l-checkbox-unchecked-18.png" + overlay_stretch = FALSE + } + + image { + function = CHECK + recolorable = TRUE + state = PRELIGHT + shadow = OUT + overlay_file = "assets/l-checkbox-unchecked-18.png" + overlay_stretch = FALSE + } + + image { + function = CHECK + recolorable = TRUE + state = ACTIVE + shadow = OUT + overlay_file = "assets/l-checkbox-unchecked-18.png" + overlay_stretch = FALSE + } + + image { + function = CHECK + recolorable = TRUE + state = INSENSITIVE + shadow = OUT + overlay_file = "assets/l-checkbox-unchecked-insensitive-18.png" + overlay_stretch = FALSE + } + + image { + function = CHECK + recolorable = TRUE + state = NORMAL + shadow = IN + overlay_file = "assets/l-checkbox-checked-18.png" + overlay_stretch = FALSE + } + + image { + function = CHECK + recolorable = TRUE + state = PRELIGHT + shadow = IN + overlay_file = "assets/l-checkbox-checked-18.png" + overlay_stretch = FALSE + } + + image { + function = CHECK + recolorable = TRUE + state = ACTIVE + shadow = IN + overlay_file = "assets/l-checkbox-checked-18.png" + overlay_stretch = FALSE + } + + + image { + function = CHECK + recolorable = TRUE + state = INSENSITIVE + shadow = IN + overlay_file = "assets/l-checkbox-checked-insensitive-18.png" + overlay_stretch = FALSE + } + + image { + function = FLAT_BOX + recolorable = TRUE + stretch = TRUE + file = "assets/null.png" + border = {2, 2, 2, 2} + } + } +} + +style "entry" { # text + xthickness = 3 + ythickness = 3 + + bg[SELECTED] = mix (0.5, @selected_bg_color, @base_color) + fg[SELECTED] = @text_color + + engine "murrine" { + contrast = 1.0 + roundness = 3 + border_shades = {1.45, 1.35} + focusstyle = 3 + + } +} + +style "expander" { + bg[NORMAL] = "#FFF" + fg[NORMAL] = shade (2.0, @text_color) + fg[PRELIGHT] = shade (2.0, @text_color) + + engine "murrine" { + contrast = 1.2 + gradient_shades = {1.0, 1.0, 1.0, 1.0} + } +} + +style "frame_title" { + fg[NORMAL] = lighter (@fg_color) +} + +style "handle" { + engine "pixmap" { + image { + function = HANDLE + overlay_file = "assets/handle.png" + overlay_border = {0, 0, 0, 0} + overlay_stretch = FALSE + orientation = HORIZONTAL + file = "assets/null.png" + border = {0, 0, 0, 0} + stretch = TRUE + } + + image { + function = HANDLE + overlay_file = "assets/handle.png" + overlay_border = {0, 0, 0, 0} + overlay_stretch = FALSE + orientation = VERTICAL + file = "assets/null.png" + border = {0, 0, 0, 0} + stretch = TRUE + } + } +} +class "GtkPaned" style "handle" + +style "menubar" { + # Modificado + xthickness = 3 + ythickness = 3 + + fg[NORMAL] = shade (1.99, @fg_color) + bg[NORMAL] = shade (0.90, @bg_color) + + engine "murrine" { + gradient_shades = {1.00,0.96,0.96,0.89} + border_shades = {1.1, 0.9} + contrast = 1.10 + lightborderstyle = 1 + } +} + +style "menu" { + xthickness = 0 + ythickness = 0 + + bg[NORMAL] = shade (1.05, "#ededed") + + GtkMenuItem::arrow-scaling = 0.5 + + engine "murrine" { + gradient_shades = {1.0, 1.0, 1.0, 1.0} + border_shades = {1.1, 0.9} + roundness = 0 # 0 = squared + contrast = 0.8 + } +} + +style "menu_item_white" { + xthickness = 2 + ythickness = 3 + + fg[PRELIGHT] = @selected_fg_color + bg[PRELIGHT] = @menu_gradient + bg[SELECTED] = @menu_gradient + + engine "murrine" { + gradient_shades = {1.20, 1.10, 1.10, 1.00} + roundness = 1 + border_shades = {1.60, 1.0} + roundness = 1 + contrast = 0.9 + } +} + +style "menu_item_black" { + xthickness = 2 + ythickness = 3 + + fg[PRELIGHT] = @selected_fg_color + bg[PRELIGHT] = shade (0.94, "#3C3CF0") + bg[SELECTED] = shade (0.94, "#3C3CF0") + + engine "murrine" { + gradient_shades = {1.30, 1.15, 1.15, 1.00} + roundness = 1 + #contrast = 0.0 + } +} + +style "notebook" { + xthickness = 2 + ythickness = 2 + + bg[NORMAL] = shade (0.96, @bg_color) # selected tab entire + bg[ACTIVE] = shade (1.12, @bg_color) # unselected tab + + engine "murrine" { + gradient_shades = {1.20,0.98,0.92,0.65} + contrast = 0.75 + roundness = 3 + } + +} + +style "progressbar" { + xthickness = 0 + ythickness = 0 + + fg[PRELIGHT] = @selected_fg_color + #bg[SELECTED] = "#7088CA" + bg[SELECTED] =shade (0.90, "#80B8EA") + + engine "murrine" { + gradient_shades = {1.30, 1.15, 1.15, 1.0} + roundness = 4 + } +} + +style "radiobutton" { + engine "pixmap" { + image { + function = OPTION + recolorable = TRUE + state = NORMAL + shadow = OUT + overlay_file = "assets/l-radio-unselected-18.png" + overlay_stretch = FALSE + } + + image { + function = OPTION + recolorable = TRUE + state = PRELIGHT + shadow = OUT + overlay_file = "assets/l-radio-unselected-18.png" + overlay_stretch = FALSE + } + + image { + function = OPTION + recolorable = TRUE + state = ACTIVE + shadow = OUT + overlay_file = "assets/l-radio-unselected-18.png" + overlay_stretch = FALSE + } + + image { + function = OPTION + recolorable = TRUE + state = INSENSITIVE + shadow = OUT + overlay_file = "assets/l-radio-unselected-insensitive-18.png" + overlay_stretch = FALSE + } + + image { + function = OPTION + recolorable = TRUE + state = NORMAL + shadow = IN + overlay_file = "assets/l-radio-selected-18.png" + overlay_stretch = FALSE + } + + image { + function = OPTION + recolorable = TRUE + state = PRELIGHT + shadow = IN + overlay_file = "assets/l-radio-selected-18.png" + overlay_stretch = FALSE + } + + image { + function = OPTION + recolorable = TRUE + state = ACTIVE + shadow = IN + overlay_file = "assets/l-radio-selected-18.png" + overlay_stretch = FALSE + } + + + image { + function = OPTION + recolorable = TRUE + state = INSENSITIVE + shadow = IN + overlay_file = "assets/l-radio-selected-insensitive-18.png" + overlay_stretch = FALSE + } + + image { + function = FLAT_BOX + recolorable = TRUE + stretch = TRUE + file = "assets/null.png" + border = {2, 2, 2, 2} + } + } +} + +style "scale" { # slider + # Modificado + xthickness = 2 + ythickness = 2 + + bg[NORMAL] = shade (0.90, "#8EBDDB") + bg[SELECTED] = shade (0.90, "#8EBDDB") + bg[PRELIGHT] = shade (0.90, "#8EBDDB") + bg[INSENSITIVE] = shade (0.90, @bg_color) + + bg[ACTIVE] = shade (0.95, @bg_color) + + engine "murrine" { + #gradient_shades = {0.65,1.00,1.00,1.35} + gradient_shades = {0.95,1.05,1.10,1.30} + glowstyle = 2 # 0 = top, 1 = bottom, 2 = top and bottom, 3 = horizontal, 4 = centered glow + glow_shade = 1.99 + roundness = 18 + border_shades = {0.7, 1.2} + contrast = 0.6 + lightborderstyle = 1 + trough_shades = {0.9, 1.1} + } +} + +style "scrollbar" { + bg[SELECTED] = shade (0.74, @base_color) + bg[ACTIVE] = shade (0.96, @base_color) + + # color flechas (stepper) + fg[NORMAL] = shade (1.00, @base_color) + fg[PRELIGHT] = shade (1.00, @base_color) + fg[ACTIVE] = shade (1.00, @base_color) + fg[SELECTED] = shade (1.00, @base_color) + fg[INSENSITIVE] = shade (1.00, @base_color) + + engine "murrine" { + roundness = 8 + gradient_shades = {1.0,1.0,1.0,1.0} + highlight_shade = 1.0 + glow_shade = 1.0 + #reliefstyle = 0 + prelight_shade = .75 + gradient_colors = FALSE + lightborder_shade = 1.0 + lightborderstyle = 0 + trough_shades = {1.06, 1.11} + border_shades = {1.24, 1.24} + contrast = 0.00 + } +} + +style "overlay_scrollbar" +{ + bg[SELECTED] = shade (1.0, @selected_bg_color) + bg[INSENSITIVE] = shade (0.85, @bg_color) + bg[ACTIVE] = shade (0.6, @bg_color) +} + +style "spinbutton" = "button" { # input/stepper + #bg[NORMAL] = "#FFF" + engine "murrine" { + contrast = 0.90 + lightborderstyle = 0 + border_shades = {1.1, 0.9} + lightborder_shade = 1.30 + } +} + +style "toolbar" { + + engine "murrine" { + contrast = 0.80 + lightborder_shade = 1.00 + gradient_shades = {0.98,1.00,1.00,1.02} + # gradient_shades = {1.00,0.98,0.98,0.96} # En Unity + } +} + +style "toolbar_button" { + xthickness = 3 + ythickness = 3 + + bg[PRELIGHT] = shade (1.05, "#BBCCEE") + bg[ACTIVE] = shade (1.00, "#BBCCEE") # Pulsado + bg[SELECTED] = shade (0.95, "#BBCCEE") # Default enter + bg[INSENSITIVE] = shade (0.95, "#FFF") + + engine "murrine" { + border_shades = {1.00, 1.00} + contrast = 0.8 + gradient_shades = {1.00,0.96,0.96,0.92} + lightborderstyle = 1 + textstyle = 1 + } + +} + +style "tooltips" { + xthickness = 8 + ythickness = 4 + + bg[NORMAL] = @tooltip_bg_color + fg[NORMAL] = @tooltip_fg_color + + GtkWidget::new-tooltip-style = 0 + + engine "murrine" { + border_colors = { "#343434", "#343434" } + } +} + +style "treeview" { + + engine "murrine" { + gradient_shades = {1.0, 1.0, 1.0, 1.0} + separatorstyle = 0 + } +} + +style "treeview_header" = "button" { + ythickness = 1 + GtkWidget ::focus-padding = 0 + + bg[ACTIVE] = shade (1.00, "#80B8EA") # Pulsado + bg[NORMAL] = shade (0.96, "#FFF") + bg[PRELIGHT] = shade (1.05, "#80B8EA") + bg[SELECTED] = shade (0.95, "#80B8EA") # Default enter + bg[INSENSITIVE] = shade (1.00, "#FFF") + + engine "murrine" { + border_shades = {1.2, 1.05} + contrast = 1.22 + gradient_shades = {1.25,1.02,0.99,1.15} + + lightborderstyle = 1 + textstyle = 1 + } +} + +style "checkradio" = "button" { + xthickness = 3 + ythickness = 3 + GtkRadioButton::indicator-size = 16 + GtkCheckButton::indicator-size = 16 + + base[NORMAL] = shade (0.95, @base_color) # radiocheck normal + bg[SELECTED] = shade (1.25, "#5c8fe9") # radiocheck color checked + + text[NORMAL] = shade (0.50, @selected_bg_color) # indicador normal + text[PRELIGHT] = shade (0.35, @selected_bg_color) # indicador hover + text[ACTIVE] = shade (0.15, @selected_bg_color) # indicador click + + bg[ACTIVE] = shade (0.80, @bg_color) # button option "#80B8EA" + + engine "murrine" { + reliefstyle = 3 + } +} + +############################################################################### +# The following part of the gtkrc applies the different styles to the widgets. +############################################################################### + +# The default style is applied to every widget +class "GtkWidget" style "default" +class "GtkSeparator" style "wide" +class "GtkFrame" style "wide" +class "GtkCalendar" style "wide" +class "GtkEntry" style "entry" + + +class "GtkSpinButton" style "spinbutton" +class "GtkScale" style "scale" +class "GtkVScale" style "scale" +class "GtkHScale" style "scale" + +class "GtkScrollbar" style "scrollbar" +#widget "*ToggleSwitch*" style "toolbar_button" +widget_class "*" style "toolbar" +widget_class "*" style "toolbar" + +# Overlay scrollbar +widget_class "*" style "overlay_scrollbar" +widget_class "*" style "overlay_scrollbar" +# General matching follows. The order is choosen so that the right styles override +# each other. EG. progressbar needs to be more important than the menu match. +widget_class "*" style "button" +widget_class "*" style "notebook" + +widget_class "*.*." style "entry" +widget_class "**" style "menubar" +widget_class "**" style "menu" +widget_class "**" style "menu_item_white" +#widget_class "*.*" style "menu_item_white" +#widget_class "*.*" style "menu_item_black" + +widget_class "*.*.*" style:highest "toolbar_button" + + +widget_class "*.." style "frame_title" +widget_class "*.*" style "treeview" + +class "*GtkExpander*" style "expander" + +widget_class "*" style "progressbar" + +# Treeview headers (and similar stock GTK+ widgets) +widget_class "*.." style "treeview_header" +widget_class "*.." style "treeview_header" +widget_class "*.." style "treeview_header" +widget_class "*.." style "treeview_header" + +# The window of the tooltip is called "gtk-tooltip" +widget "gtk-tooltip*" style "tooltips" + +widget_class "**" style "checkbutton" +widget_class "***" style:highest "checkbutton" +widget_class "***" style:highest "checkbutton" +widget_class "***" style:highest "checkbutton" +widget_class "**" style:highest "checkradio_label" + +widget_class "**" style "checkradio" +widget_class "***" style:highest "radiobutton" +widget_class "***" style:highest "radiobutton" +widget_class "***" style:highest "radiobutton" +widget_class "**" style:highest "checkradio_label" + +widget "MozillaGtkWidget*GtkCheck*" style:highest "checkbutton" +widget "MozillaGtkWidget*GtkRadio*" style:highest "radiobutton" + +########################################################################## +# Following are special cases and workarounds for issues in applications. +########################################################################## +# For Google Chrome/Chromium integration. +style "chrome-gtk-frame" { + ChromeGtkFrame::frame-gradient-size = 120 + ChromeGtkFrame::frame-color = shade (0.46, @bg_color) + ChromeGtkFrame::inactive-frame-color = shade (0.46, @bg_color) + ChromeGtkFrame::frame-gradient-color = shade (0.96, @bg_color) + ChromeGtkFrame::inactive-frame-gradient-color = shade (0.96, @bg_color) + ChromeGtkFrame::scrollbar-trough-color = shade (1.00, @bg_color) + ChromeGtkFrame::scrollbar-slider-prelight-color = shade (0.85, @bg_color) + ChromeGtkFrame::scrollbar-slider-normal-color = shade (0.78, @bg_color) +} +class "ChromeGtkFrame" style "chrome-gtk-frame" + +# For places where the text color is used instead of the fg color. +style "text_is_fg_color_workaround" { + text[NORMAL] = @fg_color + text[PRELIGHT] = @fg_color + text[SELECTED] = @selected_fg_color + text[ACTIVE] = @fg_color + text[INSENSITIVE] = darker (@bg_color) +} +widget_class "*.." style "text_is_fg_color_workaround" + +# For menus where the text color is used instead of the fg color. +style "menuitem_text_is_fg_color_workaround" { + text[NORMAL] = @fg_color + text[PRELIGHT] = @selected_fg_color + text[SELECTED] = @selected_fg_color + text[ACTIVE] = @fg_color + text[INSENSITIVE] = darker (@bg_color) +} +widget "*.gtk-combobox-popup-menu.*" style "menuitem_text_is_fg_color_workaround" + +# For places where the fg color is used instead of the text color. +style "fg_is_text_color_workaround" { + fg[NORMAL] = @text_color + fg[PRELIGHT] = @text_color + fg[SELECTED] = @selected_fg_color + fg[ACTIVE] = @selected_fg_color + fg[INSENSITIVE] = darker (@bg_color) +} +widget_class "**" style "fg_is_text_color_workaround" +widget_class "*" style "fg_is_text_color_workaround" +widget_class "*" style "fg_is_text_color_workaround" + +# For gvim scrollbars. +style "vim-scrollbar" = "scrollbar" { + GtkScrollbar ::slider_width = 16 + GtkScrollbar ::stepper_size = 16 + + engine "pixmap" { + image { + function = BOX + orientation = VERTICAL + file = "assets/scroll-background.png" + } + } +} +widget "vim-main-window.*Scrollbar*" style "vim-scrollbar" + +# For Eclipse (swt) toolbars. +widget "*swt*toolbar*" style "default" + + diff --git a/osxapp/PkgInfo b/osxapp/PkgInfo new file mode 100644 index 0000000..fce933d --- /dev/null +++ b/osxapp/PkgInfo @@ -0,0 +1 @@ +APPLxbrd \ No newline at end of file diff --git a/osxapp/XBoard.gtklauncher b/osxapp/XBoard.gtklauncher new file mode 100755 index 0000000..d448c4e --- /dev/null +++ b/osxapp/XBoard.gtklauncher @@ -0,0 +1,74 @@ +#!/bin/bash + +# Inherited from gtk-mac-bundler example launcher script +# Where we get the paths from +name=$(basename "$0") +echo $name + +dirn=$(dirname "$0") +echo $dirn + +bundle=$(cd "$dirn/../../" && pwd) +bundle_contents="$bundle"/Contents +bundle_res="$bundle_contents"/Resources +bundle_lib="$bundle_res"/lib +bundle_bin="$bundle_res"/bin +bundle_data="$bundle_res"/share +bundle_etc="$bundle_res"/etc + +export PATH="$bundle_bin:$PATH" + +export PATH="$bundle_contents/MacOS/:$PATH" + +chmod -R +x $bundle_bin + +# Use fallback instead of normal dlyd path, may not be required +export DYLD_FALLBACK_LIBRARY_PATH="$bundle_lib:$DYLD_FALLBACK_LIBRARY_PATH" + +# Help fontconfig find its configuration file +export FONTCONFIG_FILE="$bundle_etc/fonts/fonts.conf" + +# Help gdk find its loader modules +export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders" + +# Fix for the theme engine paths +export GTK_PATH="$bundle_lib/gtk-2.0/2.10.0" + +# GTK path no longer required + export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules" + +# Pango path no longer required + export PANGO_RC_FILE="$bundle_etc/pango/pangorc" + +# Fix the gegl path issue +export GEGL_PATH="$bundle_lib/gegl-0.2" + +# Define gtkrc file +export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc" + +# set as absolute directory to find GTK resources internally, thanks GIMP. +LNDIR=/tmp/skl/XBoard.app +if [ ! -e "$LNDIR/Contents/Resources/launcher_rc" ]; then +rm -f "$LNDIR" +mkdir -p /tmp/skl +chmod a+w /tmp/skl +ln -s "$bundle" "$LNDIR" +fi + +# set the working directory to users home +cd ~/ > /dev/null + + +# Strip out arguments added by the OS +if [ x`echo "x$1" | sed -e "s/^x-psn_.*//"` == x ]; then + shift 1 +fi + +if [ "x$GTK_DEBUG_SHELL" != "x" ]; then + exec bash + +else + $EXEC "$bundle_contents/MacOS/$name-bin" "$@" +fi + + diff --git a/osxapp/default/eo_Analyzing.png b/osxapp/default/eo_Analyzing.png new file mode 100644 index 0000000..997b741 Binary files /dev/null and b/osxapp/default/eo_Analyzing.png differ diff --git a/osxapp/default/eo_Black.png b/osxapp/default/eo_Black.png new file mode 100644 index 0000000..13ec5a8 Binary files /dev/null and b/osxapp/default/eo_Black.png differ diff --git a/osxapp/default/eo_Clear.png b/osxapp/default/eo_Clear.png new file mode 100644 index 0000000..3cea7c4 Binary files /dev/null and b/osxapp/default/eo_Clear.png differ diff --git a/osxapp/default/eo_Ponder.png b/osxapp/default/eo_Ponder.png new file mode 100644 index 0000000..3a96f86 Binary files /dev/null and b/osxapp/default/eo_Ponder.png differ diff --git a/osxapp/default/eo_Thinking.png b/osxapp/default/eo_Thinking.png new file mode 100644 index 0000000..54e6188 Binary files /dev/null and b/osxapp/default/eo_Thinking.png differ diff --git a/osxapp/default/eo_Unknown.png b/osxapp/default/eo_Unknown.png new file mode 100644 index 0000000..10f795d Binary files /dev/null and b/osxapp/default/eo_Unknown.png differ diff --git a/osxapp/default/eo_White.png b/osxapp/default/eo_White.png new file mode 100644 index 0000000..3d7ba7d Binary files /dev/null and b/osxapp/default/eo_White.png differ diff --git a/osxapp/default/icon_black.png b/osxapp/default/icon_black.png new file mode 100644 index 0000000..07de156 Binary files /dev/null and b/osxapp/default/icon_black.png differ diff --git a/osxapp/default/icon_white.png b/osxapp/default/icon_white.png new file mode 100644 index 0000000..9f98df2 Binary files /dev/null and b/osxapp/default/icon_white.png differ diff --git a/osxapp/gtkrc b/osxapp/gtkrc new file mode 100644 index 0000000..72d8a1f --- /dev/null +++ b/osxapp/gtkrc @@ -0,0 +1,9 @@ +# Include OSX-theme path to fix plugins not applying theme' +include "../../share/themes/OSX-theme/gtk-2.0/gtkrc" +# Set default theme to OSX-theme +gtk-theme-name = "OSX-theme" + +# Include Mac path to fix plugins not applying key-bindings +include "../../share/themes/Mac/gtk-2.0-key/gtkrc" +# Set default key-bindings to Mac +gtk-key-theme-name = "Mac" diff --git a/osxapp/icons/XBoard.icns b/osxapp/icons/XBoard.icns new file mode 100644 index 0000000..31d3008 Binary files /dev/null and b/osxapp/icons/XBoard.icns differ diff --git a/osxapp/icons/fen.icns b/osxapp/icons/fen.icns new file mode 100644 index 0000000..ca282d6 Binary files /dev/null and b/osxapp/icons/fen.icns differ diff --git a/osxapp/icons/pgn.icns b/osxapp/icons/pgn.icns new file mode 100644 index 0000000..c5f9cb1 Binary files /dev/null and b/osxapp/icons/pgn.icns differ diff --git a/osxapp/icons/trn.icns b/osxapp/icons/trn.icns new file mode 100644 index 0000000..90a1304 Binary files /dev/null and b/osxapp/icons/trn.icns differ diff --git a/osxapp/icons/xop.icns b/osxapp/icons/xop.icns new file mode 100644 index 0000000..184b2d0 Binary files /dev/null and b/osxapp/icons/xop.icns differ diff --git a/osxapp/info.command b/osxapp/info.command new file mode 100755 index 0000000..6457ae7 --- /dev/null +++ b/osxapp/info.command @@ -0,0 +1,2 @@ +cd "${0%/*}" +info -d ../share/info -f xboard.info diff --git a/osxapp/launcher_rc b/osxapp/launcher_rc new file mode 100644 index 0000000..23f9e1e --- /dev/null +++ b/osxapp/launcher_rc @@ -0,0 +1 @@ +*** Please do _NOT_ delete this file. The file MacOS/XBoard depends on it. *** diff --git a/osxapp/logos/207.99.83.228.png b/osxapp/logos/207.99.83.228.png new file mode 100644 index 0000000..80afc61 Binary files /dev/null and b/osxapp/logos/207.99.83.228.png differ diff --git a/osxapp/logos/69.36.243.188.png b/osxapp/logos/69.36.243.188.png new file mode 100644 index 0000000..d3942eb Binary files /dev/null and b/osxapp/logos/69.36.243.188.png differ diff --git a/osxapp/logos/dummy.png b/osxapp/logos/dummy.png new file mode 100644 index 0000000..8fff278 Binary files /dev/null and b/osxapp/logos/dummy.png differ diff --git a/osxapp/logos/winboard.nl.png b/osxapp/logos/winboard.nl.png new file mode 100644 index 0000000..32ca0d8 Binary files /dev/null and b/osxapp/logos/winboard.nl.png differ diff --git a/osxapp/man.command b/osxapp/man.command new file mode 100755 index 0000000..096773b --- /dev/null +++ b/osxapp/man.command @@ -0,0 +1,2 @@ +cd "${0%/*}" +man ../share/man/man6/xboard.6 diff --git a/osxapp/osx-localization/.DS_Store b/osxapp/osx-localization/.DS_Store new file mode 100644 index 0000000..840c80c Binary files /dev/null and b/osxapp/osx-localization/.DS_Store differ diff --git a/osxapp/osx-localization/da.lproj/GtkosxApplication.strings b/osxapp/osx-localization/da.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..5597a30 Binary files /dev/null and b/osxapp/osx-localization/da.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/de.lproj/GtkosxApplication.strings b/osxapp/osx-localization/de.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..dd1225f Binary files /dev/null and b/osxapp/osx-localization/de.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/en.lproj/GtkosxApplication.strings b/osxapp/osx-localization/en.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..957b917 Binary files /dev/null and b/osxapp/osx-localization/en.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/es.lproj/GtkosxApplication.strings b/osxapp/osx-localization/es.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..8c34e82 Binary files /dev/null and b/osxapp/osx-localization/es.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/it.lproj/GtkosxApplication.strings b/osxapp/osx-localization/it.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..d4e73d9 Binary files /dev/null and b/osxapp/osx-localization/it.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/nl.lproj/GtkosxApplication.strings b/osxapp/osx-localization/nl.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..9772560 Binary files /dev/null and b/osxapp/osx-localization/nl.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/pl.lproj/GtkosxApplication.strings b/osxapp/osx-localization/pl.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..f7e6adf Binary files /dev/null and b/osxapp/osx-localization/pl.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/ru.lproj/GtkosxApplication.strings b/osxapp/osx-localization/ru.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..c695c72 Binary files /dev/null and b/osxapp/osx-localization/ru.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/tr.lproj/GtkosxApplication.strings b/osxapp/osx-localization/tr.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..efc31a7 Binary files /dev/null and b/osxapp/osx-localization/tr.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/uk.lproj/GtkosxApplication.strings b/osxapp/osx-localization/uk.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..769b2cf Binary files /dev/null and b/osxapp/osx-localization/uk.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/vi.lproj/GtkosxApplication.strings b/osxapp/osx-localization/vi.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..1f7961b Binary files /dev/null and b/osxapp/osx-localization/vi.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/zh_CN.lproj/GtkosxApplication.strings b/osxapp/osx-localization/zh_CN.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..69958ce Binary files /dev/null and b/osxapp/osx-localization/zh_CN.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/zh_HK.lproj/GtkosxApplication.strings b/osxapp/osx-localization/zh_HK.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..3b39fac Binary files /dev/null and b/osxapp/osx-localization/zh_HK.lproj/GtkosxApplication.strings differ diff --git a/osxapp/osx-localization/zh_TW.lproj/GtkosxApplication.strings b/osxapp/osx-localization/zh_TW.lproj/GtkosxApplication.strings new file mode 100755 index 0000000..8f82804 Binary files /dev/null and b/osxapp/osx-localization/zh_TW.lproj/GtkosxApplication.strings differ diff --git a/osxapp/pango.modules b/osxapp/pango.modules new file mode 100644 index 0000000..fcf6a1e --- /dev/null +++ b/osxapp/pango.modules @@ -0,0 +1,5 @@ +# Pango Modules file +# Automatically generated file, do not edit +# +# +[pango]