diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2015-08-21 09:58:30 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2015-08-21 09:58:30 +0100 |
commit | d96633f3f7b8510eca51cd41d0a8611bb6f2f3dc (patch) | |
tree | db0938c92b116340c885b1a3554887d5bcb03b48 /packaging | |
parent | 05acddcc64628eea6cca147d422d1cb03d9e74f7 (diff) | |
download | deluge-d96633f3f7b8510eca51cd41d0a8611bb6f2f3dc.tar.gz deluge-d96633f3f7b8510eca51cd41d0a8611bb6f2f3dc.tar.bz2 deluge-d96633f3f7b8510eca51cd41d0a8611bb6f2f3dc.zip |
Create a packaging directory
Diffstat (limited to 'packaging')
50 files changed, 2199 insertions, 0 deletions
diff --git a/packaging/osx/Info.plist b/packaging/osx/Info.plist new file mode 100644 index 000000000..d681a663b --- /dev/null +++ b/packaging/osx/Info.plist @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleIdentifier</key> + <string>org.deluge</string> + <key>CFBundleName</key> + <string>Deluge</string> + <key>CFBundleIconFile</key> + <string>deluge.icns</string> + <key>CFBundleExecutable</key> + <string>Deluge</string> + <key>CFBundleShortVersionString</key> + <string>1.3.900-dev</string> + <key>CFBundleVersion</key> + <string>1.3.900-dev</string> + <key>CFBundleGetInfoString</key> + <string>1.3.900-dev (c) 2008-2013 Deluge Team http://deluge-torrent.org/</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright 2008-2013 Deluge Team</string> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>DL##</string> + <key>LSMinimumSystemVersion</key> + <string>10.6</string> + <key>LSUIElement</key> + <string>0</string> + <key>NSHighResolutionCapable</key> + <true/> + <key>CFBundleDisplayName</key> + <string>Deluge</string> + <key>CFBundleDocumentTypes</key> + <array> + <dict> + <key>CFBundleTypeExtensions</key> + <array> + <string>torrent</string> + </array> + <key>CFBundleTypeIconFile</key> + <string>torrent</string> + <key>CFBundleTypeName</key> + <string>BitTorrent Document</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSHandlerRank</key> + <string>Owner</string> + <key>LSItemContentTypes</key> + <array> + <string>org.bittorrent.torrent</string> + </array> + </dict> + </array> +</dict> +</plist> diff --git a/packaging/osx/README.rst b/packaging/osx/README.rst new file mode 100644 index 000000000..781b14b58 --- /dev/null +++ b/packaging/osx/README.rst @@ -0,0 +1,127 @@ +==================================== +Instructions for building Deluge.app +==================================== + +1. Compiler +----------- + +- To build deluge and the gtk osx modules, you must use `gcc` +- This has been successfully working with : + - gcc 4.2.1 - Xcode 4.1 - Mac OSX Lion (10.7.2) + - llvm-gcc 4.2.1 - Xcode 4.3.1 (With Command line utilities) - Mac OSX Lion (10.7.3) +- Check your version of gcc using `gcc -v` + +2. GTK-OSX jhbuild environment +------------------------------ + +Quick how-to *(from the full GTK-OSX building instructions)* [1]_, [2]_ + +a. Create a dedicated user account and use it for all the next steps:: + + sudo su - gtk + cat << EOF > ~/.profile + export PATH=~/.local/bin:~/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/git/bin + EOF + . ~/.profile + + *Note*: I'm using `gtk` login with `/opt/gtk` as home an jhbuild prefix. + +b. Download and run the gtk-osx-build-setup [3]_ script to install jhbuild:: + + curl -O https://raw.github.com/jralls/gtk-osx-build/master/gtk-osx-build-setup.sh + sh gtk-osx-build-setup.sh + +c. Link or copy deluge osx jhbuildrc-custom:: + + ln -sf deluge/osx/jhbuildrc-custom ~/.jhbuildrc-custom + + *Note*: This setup builds only for `x86_64` arch to `/opt/gtk` prefix, feel free to edit. + +d. Build jhbuild and its modulesets: *(takes a while...)*:: + + jhbuild bootstrap && jhbuild + + *Note*: If you encounter an error while building `glib` like:: + + gconvert.c:65:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv + + Start a shell from jhbuild, edit the file `vim glib/gconvert.c +65` to delete the + section raising error, which is irrelevant. *(Lion iconv.h looks like gnu one, but it is not)* + Then exit the shell and resume build. + +5. Build the deluge moduleset: *(takes a while...)*:: + + jhbuild -m deluge/osx/deluge.modules build deluge + + *Note*: This jhbuild moduleset *should* build and install all deluge dependencies not available in gtk-osx. + +3. Build Deluge.app +------------------- + +a. Always do your custom build operations under a jhbuild shell:: + + jhbuild shell + +b. Cleanup:: + + python setup.py clean -a + +c. Build and install:: + + python setup.py py2app + python setup.py install + +d. Build app to `deluge/osx/app/Deluge.app`:: + + cd osx + ./make-app + +You *should* now have a working Deluge.app + +i386 Notes +---------- + +- Uncomment the relevant sections of : + - jhbuildrc-custom + - deluge.modules + - setup.cfg +- deluge egg has to be named without the -macosx-10.6-intel suffix +- To build for i386 under a x64 arch libtorrent python bindings have to be + patched manually to set correct arch see macports package patch + +Issues +------ + +If Deluge.app doesn't work or crash the first thing to do is to check OSX +Console for logs and/or crash reports. + +You can enable logging by passing the usual log command switches via console:: + + /Applications/Deluge.app/Contents/MacOS/Deluge -L debug -l debug.log + +Recent jhbuild issues: + +- Some jhbuild modules fails to build, freetype and gtk-mac-integration, + strangely configure is not called before build/install. +- If that happens, just force rebuild with something like: + + jhbuild build -cf gtk-mac-integration-python + +- Interrupt while building with Ctrl+C and wipe to start over if configure missing + +Known issues +------------ + +- **i386**: libtorrent crash +- **i18n**: English only for now +- **Magnet URLs**: Not currently supported by GTK-OSX + +Reference +--------- + +.. [1] http://live.gnome.org/Jhbuild +.. [2] http://live.gnome.org/GTK%2B/OSX/Building +.. [3] http://github.com/jralls/gtk-osx-build +.. [4] http://winswitch.org/dev/macosx.html +.. [5] http://mail.python.org/pipermail/pythonmac-sig/ +.. [6] https://github.com/jralls/gtk-mac-integration diff --git a/packaging/osx/deluge b/packaging/osx/deluge new file mode 100755 index 000000000..adac78f75 --- /dev/null +++ b/packaging/osx/deluge @@ -0,0 +1,77 @@ +#!/bin/bash + +EXEC="exec" + +name="`basename $0`" +if [[ "$0" == `pwd`* ]] || [[ "$0" == "/"* ]]; then + full_path="$0" +else + full_path="`pwd`/$0" +fi +tmp=`dirname "$full_path"` +tmp=`dirname "$tmp"` +bundle=`dirname "$tmp"` +bundle_contents="$bundle"/Contents +bundle_macos="$bundle_contents"/MacOS +bundle_res="$bundle_contents"/Resources +bundle_lib="$bundle_res"/lib +bundle_data="$bundle_res"/share +bundle_etc="$bundle_res"/etc + +export DYLD_LIBRARY_PATH="$bundle_lib" +export XDG_CONFIG_DIRS="$bundle_etc"/xdg +export XDG_DATA_DIRS="$bundle_data" +export GTK_DATA_PREFIX="$bundle_res" +export GTK_EXE_PREFIX="$bundle_res" +export GTK_PATH="$bundle_res" + +export GTK2_RC_FILES="$bundle_etc/gtk-2.0/gtkrc" +export GTK_IM_MODULE_FILE="$bundle_etc/gtk-2.0/gtk.immodules" +export GDK_PIXBUF_MODULE_FILE="$bundle_etc/gtk-2.0/gdk-pixbuf.loaders" +export PANGO_RC_FILE="$bundle_etc/pango/pangorc" +export PANGO_LIBDIR="$bundle_lib" +export PANGO_SYSCONFDIR="$bundle_etc" + +#Set $PYTHON to point inside the bundle +export PYTHON="$bundle_macos/Deluge-python" +export PYTHONHOME="$bundle_res" +#Add the bundle's python modules +PYTHONPATH="$bundle_lib:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python/lib-dynload/:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python/:$PYTHONPATH" +PYTHONPATH="$bundle_lib/pygtk/2.0:$PYTHONPATH" +export PYTHONPATH + +# We need a UTF-8 locale. +lang=`defaults read .GlobalPreferences AppleLocale 2>/dev/null` +if test "$?" != "0"; then + lang=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null | sed 's/_.*//'` +fi +LANG="" +if test "$lang" != ""; then + LANG="`grep \"\`echo $lang\`_\" /usr/share/locale/locale.alias | \ + tail -n1 | sed 's/\./ /' | awk '{print $2}'`" +fi +if test "$LANG" == ""; then + export LANG="C" +else + export LANG="$LANG.utf8" +fi + +if test -f "$bundle_lib/charset.alias"; then + export CHARSETALIASDIR="$bundle_lib" +fi + +# Extra arguments can be added in environment.sh. +EXTRA_ARGS= +if test -f "$bundle_res/environment.sh"; then + source "$bundle_res/environment.sh" +fi + +# Strip out the argument added by the OS. +if [ "x`echo "x$1" | sed -e "s/^x-psn_.*//"`" == "x" ]; then + shift 1 +fi + +# Note that we're calling $PYTHON here to override the version used. +$EXEC "$PYTHON" "$bundle_contents/MacOS/Deluge-bin" "$@" diff --git a/packaging/osx/deluge-console b/packaging/osx/deluge-console new file mode 100755 index 000000000..05d020f09 --- /dev/null +++ b/packaging/osx/deluge-console @@ -0,0 +1,66 @@ +#!/bin/bash + +EXEC="exec" + +name="`basename $0`" +if [[ "$0" == `pwd`* ]] || [[ "$0" == "/"* ]]; then + full_path="$0" +else + full_path="`pwd`/$0" +fi +tmp=`dirname "$full_path"` +tmp=`dirname "$tmp"` +bundle=`dirname "$tmp"` +bundle_contents="$bundle"/Contents +bundle_macos="$bundle_contents"/MacOS +bundle_res="$bundle_contents"/Resources +bundle_lib="$bundle_res"/lib +bundle_data="$bundle_res"/share +bundle_etc="$bundle_res"/etc + +export DYLD_LIBRARY_PATH="$bundle_lib" +export XDG_CONFIG_DIRS="$bundle_etc"/xdg +export XDG_DATA_DIRS="$bundle_data" + +#Set $PYTHON to point inside the bundle +export PYTHON="$bundle_macos/Deluge-python" +export PYTHONHOME="$bundle_res" +#Add the bundle's python modules +PYTHONPATH="$bundle_lib:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python/lib-dynload/:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python/:$PYTHONPATH" +export PYTHONPATH + +# We need a UTF-8 locale. +lang=`defaults read .GlobalPreferences AppleLocale 2>/dev/null` +if test "$?" != "0"; then + lang=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null | sed 's/_.*//'` +fi +LANG="" +if test "$lang" != ""; then + LANG="`grep \"\`echo $lang\`_\" /usr/share/locale/locale.alias | \ + tail -n1 | sed 's/\./ /' | awk '{print $2}'`" +fi +if test "$LANG" == ""; then + export LANG="C" +else + export LANG="$LANG.utf8" +fi + +if test -f "$bundle_lib/charset.alias"; then + export CHARSETALIASDIR="$bundle_lib" +fi + +# Extra arguments can be added in environment.sh. +EXTRA_ARGS= +if test -f "$bundle_res/environment.sh"; then + source "$bundle_res/environment.sh" +fi + +# Strip out the argument added by the OS. +if [ "x`echo "x$1" | sed -e "s/^x-psn_.*//"`" == "x" ]; then + shift 1 +fi + +# Note that we're calling $PYTHON here to override the version used. +$EXEC "$PYTHON" "$bundle_contents/MacOS/deluge-console-bin" "$@" diff --git a/packaging/osx/deluge-web b/packaging/osx/deluge-web new file mode 100755 index 000000000..510069ca2 --- /dev/null +++ b/packaging/osx/deluge-web @@ -0,0 +1,66 @@ +#!/bin/bash + +EXEC="exec" + +name="`basename $0`" +if [[ "$0" == `pwd`* ]] || [[ "$0" == "/"* ]]; then + full_path="$0" +else + full_path="`pwd`/$0" +fi +tmp=`dirname "$full_path"` +tmp=`dirname "$tmp"` +bundle=`dirname "$tmp"` +bundle_contents="$bundle"/Contents +bundle_macos="$bundle_contents"/MacOS +bundle_res="$bundle_contents"/Resources +bundle_lib="$bundle_res"/lib +bundle_data="$bundle_res"/share +bundle_etc="$bundle_res"/etc + +export DYLD_LIBRARY_PATH="$bundle_lib" +export XDG_CONFIG_DIRS="$bundle_etc"/xdg +export XDG_DATA_DIRS="$bundle_data" + +#Set $PYTHON to point inside the bundle +export PYTHON="$bundle_macos/Deluge-python" +export PYTHONHOME="$bundle_res" +#Add the bundle's python modules +PYTHONPATH="$bundle_lib:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python/lib-dynload/:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python/:$PYTHONPATH" +export PYTHONPATH + +# We need a UTF-8 locale. +lang=`defaults read .GlobalPreferences AppleLocale 2>/dev/null` +if test "$?" != "0"; then + lang=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null | sed 's/_.*//'` +fi +LANG="" +if test "$lang" != ""; then + LANG="`grep \"\`echo $lang\`_\" /usr/share/locale/locale.alias | \ + tail -n1 | sed 's/\./ /' | awk '{print $2}'`" +fi +if test "$LANG" == ""; then + export LANG="C" +else + export LANG="$LANG.utf8" +fi + +if test -f "$bundle_lib/charset.alias"; then + export CHARSETALIASDIR="$bundle_lib" +fi + +# Extra arguments can be added in environment.sh. +EXTRA_ARGS= +if test -f "$bundle_res/environment.sh"; then + source "$bundle_res/environment.sh" +fi + +# Strip out the argument added by the OS. +if [ "x`echo "x$1" | sed -e "s/^x-psn_.*//"`" == "x" ]; then + shift 1 +fi + +# Note that we're calling $PYTHON here to override the version used. +$EXEC "$PYTHON" "$bundle_contents/MacOS/deluge-web-bin" "$@" diff --git a/packaging/osx/deluge.bundle b/packaging/osx/deluge.bundle new file mode 100644 index 000000000..e13d8c8b0 --- /dev/null +++ b/packaging/osx/deluge.bundle @@ -0,0 +1,44 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<app-bundle> + <meta> + <prefix name="default">${env:JHBUILD_PREFIX}</prefix> + <destination overwrite="yes">app</destination> + <run-install-name-tool/> + <launcher-script>${project}/deluge</launcher-script> + </meta> + <plist>${project}/Info.plist</plist> + <main-binary>${prefix}/bin/deluge-gtk</main-binary> + <binary dest="${bundle}/Contents/MacOS/deluged-bin">${prefix}/bin/deluged</binary> + <binary dest="${bundle}/Contents/MacOS/deluge-web-bin">${prefix}/bin/deluge-web</binary> + <binary dest="${bundle}/Contents/MacOS/deluge-console-bin">${prefix}/bin/deluge-console</binary> + <binary dest="${bundle}/Contents/MacOS/Deluge-python">${prefix}/bin/python</binary> + + <!-- not used: binary>${prefix}/lib/${gtkdir}/modules/*.so</binary--> + <binary>${prefix}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.so</binary> + <binary>${prefix}/lib/libpyglib-2.0-python.0.dylib</binary> + <binary>${prefix}/lib/libgtk-quartz-2.0.0.dylib</binary> + <binary>${prefix}/lib/libglade-2.0.0.0.7.dylib</binary> + <binary>${prefix}/lib/libgtkmacintegration.2.dylib</binary> + <binary>${prefix}/lib/librsvg-2.2.dylib</binary> + <binary>${prefix}/lib/pango/1.8.0/modules/pango*.so</binary> + <binary>${prefix}/lib/libboost_system.dylib</binary> + <binary>${prefix}/lib/libboost_python.dylib</binary> + <binary>${prefix}/lib/libtorrent-rasterbar.7.dylib</binary> + <binary>${prefix}/lib/libssl.1.0.1.dylib</binary> + <data dest="${bundle}/Contents/Resources/"> + ${project}/../dist/deluge.app/Contents/Resources/ + </data> + <data>${prefix}/lib/pygtk/2.0/</data> + <!-- gtk theme --> + <binary>${prefix}/lib/${gtkdir}/${pkg:${gtk}:gtk_binary_version}/engines/libclearlooks.so</binary> + <data>${prefix}/share/themes/Clearlooks</data> + <data>${prefix}/share/themes/Mac</data><!-- required for stock accelerators cmd-X etc... --> + <!-- Emacs shortcuts doesn't work: data>${prefix}/share/themes/Emacs</data--> + <data dest="${bundle}/Contents/Resources/etc/gtk-2.0/gtkrc">${project}/gtkrc</data> + <data dest="${bundle}/Contents/Resources">${project}/deluge.icns</data> + <data dest="${bundle}/Contents/Resources">${project}/torrent.icns</data> + + <data dest="${bundle}/Contents/MacOS/deluged">${project}/deluged</data> + <data dest="${bundle}/Contents/MacOS/deluge-web">${project}/deluge-web</data> + <data dest="${bundle}/Contents/MacOS/deluge-console">${project}/deluge-console</data> +</app-bundle> diff --git a/packaging/osx/deluge.icns b/packaging/osx/deluge.icns Binary files differnew file mode 100644 index 000000000..125a23db3 --- /dev/null +++ b/packaging/osx/deluge.icns diff --git a/packaging/osx/deluge.modules b/packaging/osx/deluge.modules new file mode 100644 index 000000000..937f02433 --- /dev/null +++ b/packaging/osx/deluge.modules @@ -0,0 +1,114 @@ +<?xml version="1.0"?> +<!DOCTYPE moduleset SYSTEM "moduleset.dtd"> +<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?> +<moduleset> + <repository type="tarball" name="sourceforge" + href="http://downloads.sourceforge.net/sourceforge/"/> + <repository type="git" name="git.gnome" + href="git://git.gnome.org"/> + <repository type="svn" name="svn.libtorrent" + href="https://libtorrent.svn.sourceforge.net/svnroot/"/> + <repository type="tarball" name="pypi" + href="http://pypi.python.org/packages/source/"/> + <repository type="tarball" name="libtorrent" + href="http://libtorrent.googlecode.com/files/"/> + + <metamodule id="deluge"> + <dependencies> + <dep package="libtorrent"/> + <dep package="gtk-mac-bundler"/> + <dep package="deluge-python-deps"/> + </dependencies> + </metamodule> + + <autotools id="libtorrent" autogen-sh="configure" + autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --with-boost-libdir=%(libdir)s --with-openssl=%(prefix)s %(autogenargs)s" + autogenargs="--enable-python-binding"> + <branch repo="libtorrent" version="0.16.8" + module="libtorrent-rasterbar-0.16.8.tar.gz" + hash="sha1:483689787cb64e7cf4abefda4058b912ec406709"/> + <dependencies> + <dep package="openssl"/> + <dep package="boost"/> + </dependencies> + </autotools> + + <!-- This will use the latest 0.16 code but will require manually running ./configure in jhbuild process --> + <autotools id="libtorrent_RC16" autogen-sh="autotools.sh" + autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --with-boost-libdir=%(libdir)s --with-openssl=%(prefix)s %(autogenargs)s" + autogenargs="--enable-python-binding"> + <branch repo="svn.libtorrent" revision="RC_0_16" checkoutdir="libtorrent_RC_0_16"/> + <dependencies> + <dep package="openssl"/> + <dep package="boost"/> + </dependencies> + </autotools> + + <repository type="tarball" name="openssl" + href="http://www.openssl.org/source/"/> + <autotools id="openssl" autogen-sh="Configure" + autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --libdir=%(libdir)s -L%(libdir)s %(autogenargs)s" + autogenargs="darwin-i386-cc zlib no-krb5 shared"> + <!--autogenargs="darwin64-x86_64-cc zlib no-krb5 shared">--> + <branch repo="openssl" version="1.0.1e" + module="openssl-1.0.1e.tar.gz" + hash="md5:66bf6f10f060d561929de96f9dfe5b8c"/> + </autotools> + + + <autotools id="boost" autogen-sh="bootstrap.sh" + autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s --libdir=%(libdir)s --with-python=%(prefix)s/bin/python --with-icu=%(prefix)s --with-libraries=system,python" + supports-non-srcdir-builds="false" + makeargs="|| ./b2 architecture=x86 address-model=32 link=shared threading=multi variant=release" + makeinstallargs="|| ./b2 install"> + <branch repo="sourceforge" version="1.53" + module="boost/boost_1_53_0.tar.bz2" + hash="md5:a00d22605d5dbcfb4c9936a9b35bc4c2"/> + </autotools> + + <autotools id="gtk-mac-bundler" autogen-template="echo no configure"> + <branch repo="git.gnome" module="gtk-mac-bundler"/> + </autotools> + + <metamodule id="deluge-python-deps"> + <dependencies> + <dep package="setuptools"/> + <dep package="chardet"/> + <dep package="pyopenssl"/> + <dep package="pyxdg"/> + <dep package="py2app"/> + <dep package="mako"/> + <dep package="twisted"/> + </dependencies> + </metamodule> + + <distutils id="setuptools"> + <branch repo="pypi" version="0.6c11" + module="s/setuptools/setuptools-0.6c11.tar.gz"/> + </distutils> + <distutils id="chardet"> + <branch repo="pypi" version="2.1.1" + module="c/chardet/chardet-2.1.1.tar.gz"/> + </distutils> + <distutils id="pyopenssl"> + <branch repo="pypi" version="0.13" + module="p/pyOpenSSL/pyOpenSSL-0.13.tar.gz"/> + </distutils> + <distutils id="pyxdg"> + <branch repo="pypi" version="0.25" + module="p/pyxdg/pyxdg-0.25.tar.gz"/> + </distutils> + <distutils id="py2app"> + <branch repo="pypi" version="0.7.3" + module="p/py2app/py2app-0.7.3.tar.gz"/> + </distutils> + <distutils id="mako"> + <branch repo="pypi" version="0.7.3" + module="M/Mako/Mako-0.7.3.tar.gz"/> + </distutils> + <distutils id="twisted"> + <branch repo="pypi" version="12.3.0" + module="T/Twisted/Twisted-12.3.0.tar.bz2"/> + </distutils> +</moduleset> + diff --git a/packaging/osx/deluged b/packaging/osx/deluged new file mode 100755 index 000000000..011dbb745 --- /dev/null +++ b/packaging/osx/deluged @@ -0,0 +1,66 @@ +#!/bin/bash + +EXEC="exec" + +name="`basename $0`" +if [[ "$0" == `pwd`* ]] || [[ "$0" == "/"* ]]; then + full_path="$0" +else + full_path="`pwd`/$0" +fi +tmp=`dirname "$full_path"` +tmp=`dirname "$tmp"` +bundle=`dirname "$tmp"` +bundle_contents="$bundle"/Contents +bundle_macos="$bundle_contents"/MacOS +bundle_res="$bundle_contents"/Resources +bundle_lib="$bundle_res"/lib +bundle_data="$bundle_res"/share +bundle_etc="$bundle_res"/etc + +export DYLD_LIBRARY_PATH="$bundle_lib" +export XDG_CONFIG_DIRS="$bundle_etc"/xdg +export XDG_DATA_DIRS="$bundle_data" + +#Set $PYTHON to point inside the bundle +export PYTHON="$bundle_macos/Deluge-python" +export PYTHONHOME="$bundle_res" +#Add the bundle's python modules +PYTHONPATH="$bundle_lib:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python/lib-dynload/:$PYTHONPATH" +PYTHONPATH="$bundle_lib/python/:$PYTHONPATH" +export PYTHONPATH + +# We need a UTF-8 locale. +lang=`defaults read .GlobalPreferences AppleLocale 2>/dev/null` +if test "$?" != "0"; then + lang=`defaults read .GlobalPreferences AppleCollationOrder 2>/dev/null | sed 's/_.*//'` +fi +LANG="" +if test "$lang" != ""; then + LANG="`grep \"\`echo $lang\`_\" /usr/share/locale/locale.alias | \ + tail -n1 | sed 's/\./ /' | awk '{print $2}'`" +fi +if test "$LANG" == ""; then + export LANG="C" +else + export LANG="$LANG.utf8" +fi + +if test -f "$bundle_lib/charset.alias"; then + export CHARSETALIASDIR="$bundle_lib" +fi + +# Extra arguments can be added in environment.sh. +EXTRA_ARGS= +if test -f "$bundle_res/environment.sh"; then + source "$bundle_res/environment.sh" +fi + +# Strip out the argument added by the OS. +if [ "x`echo "x$1" | sed -e "s/^x-psn_.*//"`" == "x" ]; then + shift 1 +fi + +# Note that we're calling $PYTHON here to override the version used. +$EXEC "$PYTHON" "$bundle_contents/MacOS/deluged-bin" "$@" diff --git a/packaging/osx/gtkrc b/packaging/osx/gtkrc new file mode 100644 index 000000000..c9b0a50b3 --- /dev/null +++ b/packaging/osx/gtkrc @@ -0,0 +1,10 @@ +gtk-theme-name = "Clearlooks" +gtk-enable-mnemonics = 0 + +# Workaround for non-ascii display issue details +# here: http://bugs.gramps-project.org/view.php?id=5474 +style "user-font" +{ + font_name="Arial Unicode MS" +} +widget_class "*" style "user-font" diff --git a/packaging/osx/jhbuildrc-custom b/packaging/osx/jhbuildrc-custom new file mode 100644 index 000000000..2c9bcc9db --- /dev/null +++ b/packaging/osx/jhbuildrc-custom @@ -0,0 +1,24 @@ +# -*- mode: python -*- + +prefix = "/opt/gtk" +checkoutroot = os.path.expanduser("~/Source/gtk") + +#setup_sdk(target="10.6", sdk_version="10.6", architectures=["x86_64"]) +setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386"]) + +_gtk_osx_use_jhbuild_python = True + +skip.append("libiconv") # Lion issues +modules = [ + "python", + "meta-gtk-osx-bootstrap", + "meta-gtk-osx-core", + "librsvg", "libglade", + "meta-gtk-osx-python", + "meta-gtk-osx-themes", + "gtk-quartz-engine", +] + +# Can be usefull when tweaking modulesets to avoid jhbuild overwriting: +#nonetwork=True + diff --git a/packaging/osx/make-app b/packaging/osx/make-app new file mode 100755 index 000000000..19062ce45 --- /dev/null +++ b/packaging/osx/make-app @@ -0,0 +1,44 @@ +#!/bin/bash + +APPDIR="./app/Deluge.app" +RSCDIR="${APPDIR}/Contents/Resources" +LIBDIR="${RSCDIR}/lib" + +function msg() { echo "==> $1"; } + +echo "*** Packaging Deluge.app to $APPDIR..." + +msg "Clearing app dir" +rm -fr $APPDIR + +msg "Fixing permissions on file we will need to relocate" +if [ ! -z "${JHBUILD_PREFIX}" ]; then + chmod 755 "${JHBUILD_PREFIX}/lib/"libpython*.dylib + chmod 755 "${JHBUILD_PREFIX}/lib/"libssl*.dylib + chmod 755 "${JHBUILD_PREFIX}/lib/"libcrypto*.dylib +fi + +chmod 755 deluge deluge-web deluge-console deluged + +msg "Calling gtk-mac-bundler" +gtk-mac-bundler deluge.bundle + +msg "Unzip site-packages and make python softlink without version number" +pushd ${LIBDIR} || exit 1 +ln -sf python* python +cd python +unzip -nq site-packages.zip +rm site-packages.zip +popd + +msg "Replacing deluge by its egg..." +rm -fr ${LIBDIR}/python/deluge +rsync -rpl $JHBUILD_PREFIX/lib/python2.7/site-packages/deluge-*.egg "${LIBDIR}/python/" + +msg "Clean unnecessary files" +find $APPDIR -name "*.la" -exec rm -f {} \; # Should not be packaged +find $APPDIR -name "*.pyo" -exec rm -f {} \; # Just duplicates +rm -fr $LIBDIR/pygtk/2.0/*demo* + +echo "*** Packaging done:`du -hs $APPDIR | cut -f 1`" + diff --git a/packaging/osx/torrent.icns b/packaging/osx/torrent.icns Binary files differnew file mode 100644 index 000000000..a6f9040f2 --- /dev/null +++ b/packaging/osx/torrent.icns diff --git a/packaging/win32/DelugeStart Theme/etc/gtk-2.0/gtkrc b/packaging/win32/DelugeStart Theme/etc/gtk-2.0/gtkrc new file mode 100644 index 000000000..7e414b469 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/etc/gtk-2.0/gtkrc @@ -0,0 +1,25 @@ +gtk-theme-name = "DelugeStart" +gtk-icon-theme-name = "Tango" +gtk-fallback-icon-theme = "hicolor" +gtk-alternative-button-order = 1 +gtk-alternative-sort-arrows = 1 +gtk-auto-mnemonics = 1 +gtk-show-input-method-menu = 0 +gtk-show-unicode-menu = 0 + +#gtk-toolbar-icon-size = small-toolbar +gtk-button-images = 0 +gtk-menu-images = 1 + +style "notebook" +{ + xthickness = 1 + ythickness = 1 +} +widget_class "*<GtkNotebook>" style "notebook" + +style "user-font" +{ + font_name="9" +} +widget_class "*" style "user-font"
\ No newline at end of file diff --git a/packaging/win32/DelugeStart Theme/lib/gtk-2.0/2.10.0/engines/libmurrine.dll b/packaging/win32/DelugeStart Theme/lib/gtk-2.0/2.10.0/engines/libmurrine.dll Binary files differnew file mode 100644 index 000000000..12134fc0a --- /dev/null +++ b/packaging/win32/DelugeStart Theme/lib/gtk-2.0/2.10.0/engines/libmurrine.dll diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check1.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check1.png Binary files differnew file mode 100644 index 000000000..c7181d2e0 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check1.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check2.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check2.png Binary files differnew file mode 100644 index 000000000..f89cba9b6 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check2.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check3.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check3.png Binary files differnew file mode 100644 index 000000000..042e8bdf1 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check3.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check4.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check4.png Binary files differnew file mode 100644 index 000000000..3f30f845b --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check4.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check5.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check5.png Binary files differnew file mode 100644 index 000000000..24bb8e712 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/check5.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/checklight.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/checklight.png Binary files differnew file mode 100644 index 000000000..ec24e4f5a --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/checklight.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option1.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option1.png Binary files differnew file mode 100644 index 000000000..50fba9aec --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option1.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option2.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option2.png Binary files differnew file mode 100644 index 000000000..cf3d0883c --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option2.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option3.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option3.png Binary files differnew file mode 100644 index 000000000..36db74cde --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option3.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option4.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option4.png Binary files differnew file mode 100644 index 000000000..3ca63fb74 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Check-Radio/option4.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Icons/close.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Icons/close.png Binary files differnew file mode 100644 index 000000000..5782752cf --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Icons/close.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/scroll-thumb-horiz.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/scroll-thumb-horiz.png Binary files differnew file mode 100644 index 000000000..7e84fdb08 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/scroll-thumb-horiz.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/scroll-thumb-vert.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/scroll-thumb-vert.png Binary files differnew file mode 100644 index 000000000..60c47fbb0 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/scroll-thumb-vert.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz-insens.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz-insens.png Binary files differnew file mode 100644 index 000000000..57aaf6e66 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz-insens.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz-prelight.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz-prelight.png Binary files differnew file mode 100644 index 000000000..4380dbffc --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz-prelight.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz.png Binary files differnew file mode 100644 index 000000000..c500b8346 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-horiz.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert-insens.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert-insens.png Binary files differnew file mode 100644 index 000000000..3f50df1d8 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert-insens.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert-prelight.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert-prelight.png Binary files differnew file mode 100644 index 000000000..1a050dfd2 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert-prelight.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert.png Binary files differnew file mode 100644 index 000000000..51f2606b9 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/slider-vert.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/trough-scrollbar-horiz.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/trough-scrollbar-horiz.png Binary files differnew file mode 100644 index 000000000..adbd56eba --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/trough-scrollbar-horiz.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/trough-scrollbar-vert.png b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/trough-scrollbar-vert.png Binary files differnew file mode 100644 index 000000000..ef3a2b447 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/Scrollbars/trough-scrollbar-vert.png diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/gtkrc b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/gtkrc new file mode 100644 index 000000000..de4001742 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/gtkrc @@ -0,0 +1,519 @@ +# DelugeStart ( based upon ANewStart by alecive ) +# Licensed under the GPL. +# Requires Murrine v0.91.0 + +gtk_color_scheme = "bg_color:#F5F5F5\nselected_bg_color:#8DCCF0\nbase_color:#FFFFFF" # Background, base +gtk_color_scheme = "fg_color:#3C4343\nselected_fg_color:#1E2222\ntext_color:#3C4343" # Foreground, text +#gtk_color_scheme = "sidebar_color:#DEDEDE" # Custom colors +gtk_color_scheme = "tooltip_bg_color:#B7DB67\ntooltip_fg_color:#F5F5F5" # Tooltips +gtk_color_scheme = "theme_color_04:#a9a49c\ntheme_color_26:#292421\ntheme_color_27:#C7C7C7" # Other colors +#gtk_color_scheme = "link_color:#08C" # Hyperlinks + +gtk-icon-sizes = "panel-menu=23,23:panel=21,21:gtk-button=17,17:gtk-large-toolbar=22,22" + +gtk-button-images = 0 # Disables icons for buttons with text +gtk-toolbar-style = 0 # Disables text in toolbar +gtk-auto-mnemonics = 1 # Disables lines under menu items + +style "default" +{ + xthickness = 1 + ythickness = 1 + + GtkArrow::arrow-scaling = 0.6 + GtkComboBox::arrow-scaling = 0.2 + + GtkScrolledWindow ::scrollbar-spacing = 0 + GtkScrolledWindow ::scrollbar-within-bevel = 0 + + GtkScrollbar::slider_width = 11 + GtkScrollbar::has-backward-stepper = 0 + GtkScrollbar::has-forward-stepper = 0 + GtkScrollbar::min-slider-length = 30 + + GtkButton::child-displacement-x = 1 + GtkButton::child-displacement-y = 1 + GtkButton::default-border = { 0, 0, 0, 0 } + + GtkCheckButton::indicator-size = 12 + + GtkPaned::handle-size = 6 + + GtkRange::trough-border = 1 + GtkRange::stepper-size = 12 + GtkRange::trough-under-steppers = 1 + GtkRange::slider-width = 14 + + GtkScale::slider-length = 14 + GtkScale::slider-width = 14 + GtkScale::trough-side-details = 1 + GtkScale::trough-border = 1 + + GtkExpander::expander-size = 14 + GtkTreeView::expander-size = 14 + GtkTreeView::indent-expanders = 0 + + GtkMenu::horizontal-offset = 2 + GtkMenu::vertical-offset = 2 + GtkMenu::horizontal-padding = 2 + GtkMenu::vertical-padding = 2 + + GtkMenuItem::arrow-spacing = 0 + + GtkMenuBar::internal-padding = 2 + GtkMenuBar::shadow_type = GTK_SHADOW_NONE + + #set to the same as roundness, used for better hotspot selection of tabs + GtkNotebook::tab-curvature = 3 + GtkNotebook::tab-overlap = -1 + + GtkToolbar::internal-padding = 2 + GtkToolbar::horizontal-padding = 0 + GtkToolbar::vertical-padding = 0 + GtkToolbar::shadow_type = GTK_SHADOW_NONE #gtk.SHADOW_IN, gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN or gtk.SHADOW_ETCHED_OUT + + WnckTasklist::fade-overlay-rect = 0 + # The following line hints to gecko (and possibly other appliations) + # that the entry should be drawn transparently on the canvas. + # Without this, gecko will fill in the background of the entry. + # GtkEntry::honors-transparent-bg-hint = 1 + + GtkEntry::progress-border = { 2, 2, 2, 2 } + + fg[NORMAL] = @fg_color + fg[PRELIGHT] = @fg_color + fg[SELECTED] = @selected_fg_color + fg[ACTIVE] = @fg_color + fg[INSENSITIVE] = darker (@bg_color) + + bg[NORMAL] = @bg_color + bg[PRELIGHT] = shade (1.04, @bg_color) + bg[SELECTED] = @selected_bg_color + bg[INSENSITIVE] = @bg_color + bg[ACTIVE] = shade (0.9, @bg_color) + + base[NORMAL] = @base_color + base[PRELIGHT] = shade (0.95, @bg_color) + base[ACTIVE] = mix (0.7, @selected_bg_color, @bg_color) + base[SELECTED] = @selected_bg_color + base[INSENSITIVE] = @bg_color + + text[NORMAL] = @text_color + text[PRELIGHT] = @text_color + text[ACTIVE] = @selected_fg_color + text[SELECTED] = @selected_fg_color + text[INSENSITIVE] = darker (@bg_color) + + engine "murrine" + { + animation = TRUE # FALSE = disabled, TRUE = enabled + arrowstyle = 1 +# border_shades = { 1.0, 1.0} # draw a gradient on the border. +# border_colors = { "#E6DDD5", "#E6DDD5" } + colorize_scrollbar = FALSE # FALSE = disabled, TRUE = enabled + comboboxstyle = 0 # colorize the GtkComboBox below the arrow. + contrast = .85 # 0.8 for less contrast, more than 1.0 for more contrast on borders +# focus_color = @selected_bg_color +# glazestyle = 5 # 0 = flat, 1 = curved, 2 = concave, 3 = top-curved, 4 = beryl + glazestyle = 4 # 0 = flat, 1 = curved, 2 = concave, 3 = top-curved, 4 = beryl + glow_shade = 1.15 # sets glow amount for buttons or widgets + glowstyle = 0 # 0 = top, 1 = bottom, 2 = top and bottom, 3 = center (vertical), 4 = center (horizontal) + gradient_shades = { 1.13, 1.02, 1.00, 1.02 } # default: {1.1,1.0,1.0,1.1} + highlight_shade = 1.0 # set highlight amount for buttons or widgets + lightborder_shade = 1.2 # sets lightborder amount for buttons or widgets + lightborderstyle = 1 # 0 = lightborder on top side, 1 = lightborder on all sides + listviewheaderstyle = 1 # 0 = flat, 1 = glassy, 2 = raised + listviewstyle = 0 # 0 = nothing, 1 = dotted + menubaritemstyle = 0 # 0 = menuitem look, 1 = button look + menubarstyle = 0 # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped + menuitemstyle = 1 # 0 = flat, 1 = glassy, 2 = striped + menustyle = 0 # 0 = no vertical menu stripe, 1 = display vertical menu stripe + prelight_shade = 1.20 #to select the shade level used in the scrollbar's slider, GtkComboBox with comboboxstyle = 1 and in the prelight state with gradient_colors. + progressbarstyle = 0 # 0 = no stripes, 1 = diagonal stripes, 2 = vertical stripes + reliefstyle = 4 # 0 = flat, 1 = inset, 2 = shadow, = 3 for a gradient on shadow, = 4 for a stronger shadow. + rgba = FALSE # FALSE = disabled, TRUE = enabled + roundness = 2 # 0 = squared, 1 = old default, more will increase roundness + scrollbarstyle = 0 # 0 = nothing, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles + shadow_shades = { 0.8, 2.2 } + sliderstyle = 0 # 0 = nothing added, 1 = handles + spinbuttonstyle = 1 + stepperstyle = 1 # 0 = standard, 1 = integrated stepper handles, 2 = squared steppers with a rounded slider +# textstyle = 1 + trough_shades = {1.1,0.87} + toolbarstyle = 0 # 0 = flat, 1 = glassy, 2 = gradient + separatorstyle = 1 # 0 = solid line, 1 = smooth separator + } +} + +style "wide" +{ + xthickness = 2 + ythickness = 2 +} + +style "wider" +{ + xthickness = 3 + ythickness = 3 +} + +style "dark" +{ + #bg[NORMAL] = @bg_color + #bg[SELECTED] = @selected_bg_color + #bg[PRELIGHT] = @selected_bg_color + #bg[ACTIVE] = @selected_bg_color + #bg[INSENSITIVE] = @bg_color + + + #fg[NORMAL] = @bg_color + #fg[PRELIGHT] = @selected_fg_color + #fg[SELECTED] = @selected_fg_color + #fg[ACTIVE] = @selected_fg_color + #fg[INSENSITIVE] = @selected_fg_color + +} + +style "button" = "wide" +{ + engine "murrine" + { + roundness = 3 + gradient_shades = { 1.06, 0.95, 1.06, 0.95} + border_shades = { .7, .6} + border_colors = { @bg_color, @bg_color } + + lightborderstyle = 1 + lightborder_shade = 1.26 + + shadow_shades = {2.5,2.2} + reliefstyle = 4 + } +} + +style "entry" { + xthickness = 3 + ythickness = 3 + + bg[SELECTED] = mix (0.4, @selected_bg_color, @base_color) + fg[SELECTED] = @text_color + + engine "murrine" + { + focus_color = @selected_bg_color + lightborder_shade = 1.06 + glow_shade = 1.9 + } +} + +style "terminal" +{ + text[NORMAL] = darker(@selected_bg_color) + base[NORMAL] = @bg_color + + TerminalScreen::background-darkness = 0.99 +} + +style "toolbar" +{ + ythickness = 0 + engine "murrine" + { + gradient_shades = {1.00,0.95,0.95,0.90} + toolbarstyle = 1 + } +} + +style "toolbar-toggle" = "toolbar" +{ + text[NORMAL] = @text_color + text[PRELIGHT] = @text_color + text[ACTIVE] = @selected_fg_color + text[SELECTED] = @selected_fg_color + text[INSENSITIVE] = darker (@bg_color) + + engine "murrine" + { + toolbarstyle = 0 + } +} + +style "dark-toolbar" = "dark" +{ + xthickness = 0 + ythickness = 2 + + engine "murrine" + { + border_shades = {1.2, 1.0} # draw a gradient on the border. + border_colors = { "#62635E", "#62635E" } + glowstyle = 0 + gradient_shades = {1.1,1.0,1.0,0.7} + highlight_shade = 1.0 + lightborder_shade = 1.0 + reliefstyle = 1 # 0 = flat, 1 = inset, 2 = shadow, = 3 for a gradient on shadow, = 4 for a stronger shadow. + } +} + +style "dark-toolbar-sep" = "dark-toolbar" +{ + xthickness = 2 +} + +style "panel" +{ + xthickness = 0 + ythickness = 0 + + bg[NORMAL] = "#E3E3E3" # # Default top/bottom panel background + bg[PRELIGHT] = "#E3E3E3" # @bg_color # panel prelight + + engine "murrine" + { + #border_shades = {1.2, 1.0} # draw a gradient on the border. + #border_colors = { "#2D2416", "#2D2416" } + roundness = 1 + } +} + +style "panel-button" = "panel" +{ + engine "murrine" { + roundness = 1 + border_colors = {"#7C7C7C", "#7C7C7C"} + border_shades = {1.0, 1.0} # draw a gradient on the border. + gradient_shades = {1.0,1.0,1.0,1.0} + } +} + +# Based on the default style so that the colors from the button +# style are overriden again. +style "treeview-header" = "default" +{ + xthickness = 1 + ythickness = 1 + + bg[NORMAL] = "#F2F1F0" + bg[PRELIGHT] = shade (1.04, "#F2F1F0") + bg[ACTIVE] = shade (0.96, "#F2F1F0") + bg[INSENSITIVE] = "#F2F1F0" + + engine "murrine" { + textstyle = 1 + border_shades = {0.90, 0.78} + glowstyle = 5 + glazestyle = 1 + contrast = 0.8 + lightborder_shade = 1.16 + textstyle = 1 + glow_shade = 1.0 + } +} + +style "progressbar" +{ + xthickness = 0 + ythickness = 0 + + + bg[ACTIVE] = @bg_color + fg[PRELIGHT] = @selected_fg_color + + engine "murrine" { + trough_shades = {0.9, 0.98} + roundness = 2 + lightborderstyle = 1 + lightborder_shade = 1.26 + border_shades = {0.8, 0.8} + gradient_shades = {0.95, 1.1, 0.95, 1.1} + #trough_border_shades = {0.9, 0.9} + } +} + +style "statusbar" +{ + ythickness = 0 + xthickness = 0 +} + +style "comboboxentry" +{ + ythickness = 3 + xthickness = 3 + + engine "murrine" + { + contrast = .8 + } +} + +style "spinbutton" +{ +} + +style "scale" +{ + bg[ACTIVE] = @bg_color + bg[PRELIGHT] = shade(1.1, @bg_color) + fg[PRELIGHT] = @selected_fg_color + + engine "murrine" { + trough_shades = {0.9, 0.98} + roundness = 6 + lightborderstyle = 1 + lightborder_shade = 1.26 + border_shades = {0.8, 0.8} + gradient_shades = {0.95, 1.1, 0.95, 1.1} + #trough_border_shades = {0.9, 0.9} + highlight_shade = 1.02 + contrast = 1.1 + reliefstyle = 1 + } +} + +style "frame" +{ +} + +style "frame-title" = "frame" +{ + fg[NORMAL] = lighter (@fg_color) +} + +style "font" +{ + font_name="9" +} +widget_class "*" style "font" + +######################################### +# Matches +######################################### + +# default style is applied to every widget +class "GtkWidget" style "default" + +# Increase the x/ythickness in some widgets +class "GtkRange" style "default" +class "GtkFrame" style "frame" +class "GtkSeparator" style "wide" +class "GtkEntry" style "entry" +class "GtkStatusbar" style "statusbar" + +widget_class "*<GtkComboBoxEntry>*" style "comboboxentry" +widget_class "*<GtkCombo>*" style "comboboxentry" + +# Toolbar default: light +class "*HandleBox" style "toolbar" +class "GtkToolbar" style "toolbar" +widget_class "*HandleBox" style "toolbar" +widget_class "*<GtkToolbar>.*" style "toolbar" + +# +# Toolbar exceptions: +# Browser-type and viewer-type applications get a dark toolbar. +# Everything below the toolbar for these apps are the content. This will make +# a separation on function (toolbar) and content (client area) + +# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646 +style "text-is-fg-color-workaround" +{ + text[NORMAL] = @fg_color + text[PRELIGHT] = mix (0.8, @fg_color, '#ffffff') + text[SELECTED] = @selected_fg_color + text[ACTIVE] = @fg_color + text[INSENSITIVE] = darker (@bg_color) +} + +style "text-is-fg-color-workaround-dark" +{ + #Make it work with this theme! + text[NORMAL] = @bg_color + text[PRELIGHT] = mix (1.0, @bg_color, '#ffffff') +} + +# Workaround style 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] = @fg_color + text[SELECTED] = @selected_fg_color + text[ACTIVE] = @fg_color + text[INSENSITIVE] = darker (@bg_color) +} + +# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646 +# Note that this work around assumes that the combobox is _not_ in appears-as-list mode. +widget_class "*.<GtkComboBox>.<GtkCellView>"style "text-is-fg-color-workaround" +# This is the part of the workaround that fixes the menus +widget "*.gtk-combobox-popup-menu.*" style "menuitem-text-is-fg-color-workaround" + +widget "*fullscreen-toolbar" style "dark-toolbar" +widget "*fullscreen-toolbar.*" style "dark-toolbar" +widget "*fullscreen-toolbar*.GtkComboBox.GtkCellView" style "text-is-fg-color-workaround-dark" + +class "GtkSpinButton" style "spinbutton" +class "GtkScale" style "scale" +class "GtkVScale" style "scale" +class "GtkHScale" style "scale" +class "GtkButton" style "button" + +# General matching following, the order is choosen so that the right styles override each other +# eg. progressbar needs to be more important then the menu match. + +widget_class "*<GtkFrame>" style "frame" +widget_class "*.<GtkFrame>.<GtkLabel>" style "frame-title" + +widget_class "*<GtkStatusbar>*" style "wider" +widget_class "*<GtkProgressBar>" style "progressbar" + +# Treeview header +widget_class "*.<GtkTreeView>.<GtkButton>" style "treeview-header" +widget_class "*.<GtkCTree>.<GtkButton>" style "treeview-header" +widget_class "*.<GtkList>.<GtkButton>" style "treeview-header" +widget_class "*.<GtkCList>.<GtkButton>" style "treeview-header" + +################################################### +# Special cases and work arounds +################################################### + +# Work around the usage of GtkLabel inside GtkListItems to display text. +# This breaks because the label is shown on a background that is based on the +# base color set. +style "fg-is-text-color-workaround" +{ + fg[NORMAL] = @text_color + fg[PRELIGHT] = @text_color + fg[ACTIVE] = @selected_fg_color + fg[SELECTED] = @selected_fg_color + fg[INSENSITIVE] = darker (@bg_color) +} +widget_class "*<GtkListItem>*" style "fg-is-text-color-workaround" +# The same problem also exists for GtkCList and GtkCTree +# Only match GtkCList and not the parent widgets, because that would also change the headers. +widget_class "*<GtkCList>" style "fg-is-text-color-workaround" + +style "dialog" = "dark" +{ + bg[NORMAL] = mix(0.4, @selected_bg_color, shade(0.7, @bg_color)) + fg[NORMAL] = shade(0.5, @fg_color) + text[NORMAL] = shade(0.5, @text_color) +} +style "dialog-button" = "dark" +{ + bg[NORMAL] = shade(0.15, @bg_color) + bg[PRELIGHT] = shade(0.18, @bg_color) +} + +include"styles/checkradiobutton" +include"styles/menu-menubar" +include"styles/notebook" +include"styles/scrollbar" +include"styles/tooltips" + +style "gnome-color-chooser-combobox" +{ + text[NORMAL] = @fg_color + text[PRELIGHT] = mix (0.8, @fg_color, '#ffffff') +} +widget_class "*.<GtkComboBox>.<GtkCellView>" style "gnome-color-chooser-combobox" +class "TerminalScreen" style "terminal" diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/checkradiobutton b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/checkradiobutton new file mode 100644 index 000000000..c62a9a8ab --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/checkradiobutton @@ -0,0 +1,179 @@ +style "checkbutton" = "default" +{ + engine "pixmap" + { + image + { + function = CHECK + recolorable = TRUE + state = NORMAL + shadow = OUT + overlay_file = "Check-Radio/check1.png" + overlay_stretch = FALSE + } + image + { + function = CHECK + recolorable = TRUE + state = PRELIGHT + shadow = OUT + overlay_file = "Check-Radio/check3.png" + overlay_stretch = FALSE + } + image + { + function = CHECK + recolorable = TRUE + state = ACTIVE + shadow = OUT + overlay_file = "Check-Radio/check3.png" + overlay_stretch = FALSE + } + image + { + function = CHECK + recolorable = TRUE + state = INSENSITIVE + shadow = OUT + overlay_file = "Check-Radio/check1.png" + overlay_stretch = FALSE + } + image + { + function = CHECK + recolorable = TRUE + state = NORMAL + shadow = IN + overlay_file = "Check-Radio/check2.png" + overlay_stretch = FALSE + } + image + { + function = CHECK + recolorable = TRUE + state = PRELIGHT + shadow = IN + overlay_file = "Check-Radio/check4.png" + overlay_stretch = FALSE + } + image + { + function = CHECK + recolorable = TRUE + state = ACTIVE + shadow = IN + overlay_file = "Check-Radio/check4.png" + overlay_stretch = FALSE + } + image + { + function = CHECK + recolorable = TRUE + state = INSENSITIVE + shadow = IN + overlay_file = "Check-Radio/check5.png" + overlay_stretch = FALSE + } + image + { + function = FLAT_BOX + recolorable = TRUE + stretch = TRUE + file = "Check-Radio/checklight.png" + border = { 2, 2, 2, 2 } + } + } +} + +style "radiobutton" = "default" +{ + engine "pixmap" + { + image + { + function = OPTION + recolorable = TRUE + state = NORMAL + shadow = OUT + overlay_file = "Check-Radio/option1.png" + overlay_stretch = FALSE + } + image + { + function = OPTION + recolorable = TRUE + state = PRELIGHT + shadow = OUT + overlay_file = "Check-Radio/option3.png" + overlay_stretch = FALSE + } + image + { + function = OPTION + recolorable = TRUE + state = ACTIVE + shadow = OUT + overlay_file = "Check-Radio/option3.png" + overlay_stretch = FALSE + } + image + { + function = OPTION + recolorable = TRUE + state = INSENSITIVE + shadow = OUT + overlay_file = "Check-Radio/option1.png" + overlay_stretch = FALSE + } + image + { + function = OPTION + recolorable = TRUE + state = NORMAL + shadow = IN + overlay_file = "Check-Radio/option2.png" + overlay_stretch = FALSE + } + image + { + function = OPTION + recolorable = TRUE + state = PRELIGHT + shadow = IN + overlay_file = "Check-Radio/option4.png" + overlay_stretch = FALSE + } + image + { + function = OPTION + recolorable = TRUE + state = ACTIVE + shadow = IN + overlay_file = "Check-Radio/option4.png" + overlay_stretch = FALSE + } + image + { + function = OPTION + recolorable = TRUE + state = INSENSITIVE + shadow = IN + overlay_file = "Check-Radio/option1.png" + overlay_stretch = FALSE + } + image + { + function = FLAT_BOX + recolorable = TRUE + stretch = TRUE + file = "Check-Radio/checklight.png" + border = { 2, 2, 2, 2 } + } + } +} + + +class "GtkRadioButton" style "radiobutton" +class "GtkRadioMenuItem" style "radiobutton" +class "GtkCheckButton" style "checkbutton" +class "GtkCheckMenuItem" style "checkbutton" diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/menu-menubar b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/menu-menubar new file mode 100644 index 000000000..a15363a9b --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/menu-menubar @@ -0,0 +1,50 @@ +style "menu" = "default" +{ + xthickness = 2 + ythickness = 2 + + bg[PRELIGHT] = shade (1.04, @selected_bg_color) +} + +style "menuitem" +{ + xthickness = 0 + ythickness = 0 + + engine "murrine" { + roundness = 1 + border_colors = {"#7C7C7C", "#7C7C7C"} + border_shades = {1.0, 1.0} # draw a gradient on the border. + gradient_shades = {1.0,1.0,1.0,1.0} + } +} + +style "menubar" = "dark-toolbar" +{ + ythickness = 0 + xthickness = 0 + + bg[PRELIGHT] = shade (1.04, @selected_bg_color) + + engine "murrine" { + roundness = 1 + border_shades = {1.0, 1.0} # draw a gradient on the border. + border_colors = {"#7C7C7C", "#7C7C7C"} + glowstyle = 0 + gradient_shades = {1.0,1.0,1.0,1.0} + highlight_shade = 1.0 + lightborder_shade = 1.0 + reliefstyle = 0 # 0 = flat, 1 = inset, 2 = shadow, = 3 for a gradient on shadow, = 4 for a stronger shadow. + } +} + +class "GtkMenu" style "menu" +class "GtkMenuBar*" style "menubar" +class "GtkMenuItem" style "menuitem" +class "GtkTearoffMenuItem" style "menuitem" + +widget_class "*GtkMenu.*" style "menu" +widget_class "*MenuBar.*" style "menubar" +widget_class "*.<MenuItem>." style "menuitem" +# The panel menubar +widget_class "*Panel*<GtkMenuBar>*" style "menubar" diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/notebook b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/notebook new file mode 100644 index 000000000..4c52077ed --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/notebook @@ -0,0 +1,29 @@ +style "notebook-close" { + stock["gtk-close"] = { + { "Icons/close.png", *, *, * } + } +} + +style "notebook" = "wider" { + + bg[NORMAL] = shade (1.0615, @bg_color) + bg[ACTIVE] = shade (0.85, @bg_color) + + engine "murrine" { + + lightborder_shade = 1.1 + highlight_shade = 1.01 + } +} + +style "notebookthin" = "notebook" { + + xthickness = 2 + ythickness = 2 +} + +widget_class "*<GtkNotebook>*<GtkEventBox>" style "notebook" +widget_class "*<GtkNotebook>*<GtkDrawingArea>" style "notebook" +widget_class "*<GtkNotebook>*<GtkLayout>" style "notebook" +widget_class "*<GtkNotebook>" style "notebook" +widget_class "*<GtkNotebook>*" style "notebook-close" diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/scrollbar b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/scrollbar new file mode 100644 index 000000000..aa39423f5 --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/scrollbar @@ -0,0 +1,125 @@ +style "scrollbar" = "default" +{ + engine "pixmap" + { + image + { + function = BOX + recolorable = TRUE + detail = "trough" + file = "Scrollbars/trough-scrollbar-horiz.png" + border = { 20, 20, 0, 0 } + stretch = TRUE + orientation = HORIZONTAL + } + image + { + function = BOX + recolorable = TRUE + detail = "trough" + file = "Scrollbars/trough-scrollbar-vert.png" + border = { 0, 0, 20, 20 } + stretch = TRUE + orientation = VERTICAL + } +###########x SLIDERS ##################x + + image + { + function = SLIDER + recolorable = TRUE + state = NORMAL + file = "Scrollbars/slider-horiz.png" + border = { 10, 10, 0, 0 } + stretch = TRUE + orientation = HORIZONTAL + } + image + { + function = SLIDER + recolorable = TRUE + state = ACTIVE + shadow = IN + file = "Scrollbars/slider-horiz.png" + border = { 10, 10, 0, 0 } + stretch = TRUE + orientation = HORIZONTAL + + } + image + { + function = SLIDER + recolorable = TRUE + state = PRELIGHT + file = "Scrollbars/slider-horiz-prelight.png" + border = { 10, 10, 0, 0 } + stretch = TRUE + orientation = HORIZONTAL + + } + image + { + function = SLIDER + recolorable = TRUE + state = INSENSITIVE + file = "Scrollbars/slider-horiz-insens.png" + border = { 10, 10, 0, 0 } + stretch = TRUE + orientation = HORIZONTAL + + } +#############x verticals################xx + + image + { + function = SLIDER + recolorable = TRUE + state = NORMAL + file = "Scrollbars/slider-vert.png" + border = { 0, 0, 10, 10 } + stretch = TRUE + orientation = VERTICAL + + } + image + { + function = SLIDER + recolorable = TRUE + state = ACTIVE + shadow = IN + file = "Scrollbars/slider-vert.png" + border = { 0, 0, 10, 10 } + stretch = TRUE + orientation = VERTICAL + + } + image + { + function = SLIDER + recolorable = TRUE + state = PRELIGHT + file = "Scrollbars/slider-vert-prelight.png" + border = { 0, 0, 10, 10 } + stretch = TRUE + orientation = VERTICAL + + } + image + { + function = SLIDER + recolorable = TRUE + state = INSENSITIVE + file = "Scrollbars/slider-vert-insens.png" + border = { 0, 0, 10, 10 } + stretch = TRUE + orientation = VERTICAL + + } + +########### END SLIDERS ################## + } +} + +class "GtkScrollbar" style "scrollbar" +class "GtkVScrollbar" style "scrollbar" +class "GtkHScrollbar" style "scrollbar" diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/tooltips b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/tooltips new file mode 100644 index 000000000..6658f062f --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/gtk-2.0/styles/tooltips @@ -0,0 +1,21 @@ +style "tooltips" +{ + xthickness = 4 + ythickness = 4 + + GtkWidget::new-tooltip-style = 1 + + bg[NORMAL] = @tooltip_bg_color + fg[NORMAL] = @tooltip_fg_color +} + + +widget "gtk-tooltips" style "tooltips" +class "*GtkTooltips*" style "tooltips" +widget_class "*Tooltips*" style "tooltips" +widget "*.nautilus-extra-view-widget" style:highest "tooltips" +style "nautilusrename" { +# fg[NORMAL] = "#e1e1e1" +} + +widget_class "*.EelEditableLabel" style "nautilusrename" diff --git a/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/index.theme b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/index.theme new file mode 100644 index 000000000..d5d631b0f --- /dev/null +++ b/packaging/win32/DelugeStart Theme/share/themes/DelugeStart/index.theme @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.2 +Encoding=UTF-8 +Name=DelugeStart +Type=X-GNOME-Metatheme +Comment=DelugeStart theme by alecive + +[X-GNOME-Metatheme] +GtkTheme=DelugeStart +IconTheme=AwOken-303030 +CursorTheme=DMZ-White +ButtonLayout=menu:minimize,maximize,close diff --git a/packaging/win32/Win32 README.txt b/packaging/win32/Win32 README.txt new file mode 100644 index 000000000..d74e02278 --- /dev/null +++ b/packaging/win32/Win32 README.txt @@ -0,0 +1,22 @@ += Deluge Installer for Windows = + +Instructions for building the Deluge NSIS Installer for Windows XP/Vista/7. + +== Dependencies == + * Deluge build: http://dev.deluge-torrent.org/wiki/Installing/Source#WindowsDependencies + * Bbfreeze: http://pypi.python.org/pypi/bbfreeze + * NSIS: http://nsis.sourceforge.net/Download + +== Build Steps == + + 1. Build and Install Deluge on Windows. + + 2. Run the bbfreeze script from the win32 directory: + + python deluge-bbfreeze.py + + The result is a bbfreeze'd version of Deluge in `build-win32/deluge-bbfreeze-build_version`. + + 3. Run the NSIS script (right-click and choose `Compile with NSIS`) + + The result is a standalone installer in the `build-win32` directory. diff --git a/packaging/win32/deluge-bbfreeze.py b/packaging/win32/deluge-bbfreeze.py new file mode 100644 index 000000000..4cc01987f --- /dev/null +++ b/packaging/win32/deluge-bbfreeze.py @@ -0,0 +1,107 @@ +import glob +import os +import shutil +import sys + +import bbfreeze.recipes +import gtk +import icon +from bbfreeze import Freezer + +import deluge.common + +# Get build_version from installed deluge +build_version = deluge.common.get_version() +print "Deluge Version: %s" % build_version +python_path = os.path.dirname(sys.executable) +if python_path.endswith("Scripts"): + python_path = python_path[:-8] +python_path += os.path.sep + +print "Python Path: %s" % python_path +gtk_root = os.path.join(gtk.__path__[0], "..\\runtime\\") + +# Include python modules not picked up automatically by bbfreeze +includes = ("libtorrent", "cairo", "pangocairo", "atk", "pango", "twisted.internet.utils", + "gio", "gzip", "email.mime.multipart", "email.mime.text") +excludes = ("numpy", "OpenGL", "psyco", "win32ui") + +dst = "..\\build-win32\\deluge-bbfreeze-" + build_version + "\\" + + +# Need to override bbfreeze function so that it includes all gtk libraries +# in the installer so users don't require a separate GTK+ installation. +def recipe_gtk_override(mf): + return True +bbfreeze.recipes.recipe_gtk_and_friends = recipe_gtk_override + +f = Freezer(dst, includes=includes, excludes=excludes) +f.include_py = False +# Can/should we grab this from setup.py entry_points somehow +gui_scripts = ["deluge", "deluged", "deluge-web", "deluge-gtk"] +console_scripts = ["deluge-debug", "deluged-debug", "deluge-web-debug", "deluge-console"] + +# Copy the scripts to get rid of the '-script' suffix before adding to freezer +for script in gui_scripts: + shutil.copy(python_path + "Scripts/%s-script.pyw" % script, python_path + "Scripts/%s.pyw" % script) + f.addScript(python_path + "Scripts/%s.pyw" % script, gui_only=True) +for script in console_scripts: + shutil.copy(python_path + "Scripts/%s-script.py" % script, python_path + "Scripts/%s.py" % script) + f.addScript(python_path + "Scripts/%s.py" % script, gui_only=False) +f() # starts the freezing process + +# Clean up the duplicated scripts +for script in gui_scripts: + os.remove(python_path + "Scripts/%s.pyw" % script) +for script in console_scripts: + os.remove(python_path + "Scripts/%s.py" % script) + +# add icons to the exe files +icon_path = os.path.join(os.path.dirname(__file__), "deluge.ico") +for script in console_scripts + gui_scripts: + icon.CopyIcons(dst + script + ".exe", icon_path) + +# exclude files which are already included in GTK or Windows +excludeDlls = ("MSIMG32.dll", "MSVCR90.dll", "MSVCP90.dll", "POWRPROF.dll", "DNSAPI.dll", "USP10.dll") +for file in excludeDlls: + for filename in glob.glob(dst + file): + print "removing file:", filename + os.remove(filename) + +# copy gtk locale files +gtk_locale = os.path.join(gtk_root, 'share/locale') +locale_include_list = ['gtk20.mo', 'locale.alias'] + + +def ignored_files(adir, filenames): + return [ + filename for filename in filenames + if not os.path.isdir(os.path.join(adir, filename)) + and filename not in locale_include_list + ] +shutil.copytree(gtk_locale, os.path.join(dst, 'share/locale'), ignore=ignored_files) + +# copy gtk theme files +theme_include_list = [ + [gtk_root, "share/icons/hicolor/index.theme"], + [gtk_root, "lib/gtk-2.0/2.10.0/engines"], + [gtk_root, "share/themes/MS-Windows"], + ["DelugeStart Theme", "lib/gtk-2.0/2.10.0/engines/libmurrine.dll"], + ["DelugeStart Theme", "share/themes/DelugeStart"], + ["DelugeStart Theme", "etc/gtk-2.0/gtkrc"] +] +for path_root, path in theme_include_list: + full_path = os.path.join(path_root, path) + if os.path.isdir(full_path): + shutil.copytree(full_path, os.path.join(dst, path)) + else: + dst_dir = os.path.join(dst, os.path.dirname(path)) + try: + os.makedirs(dst_dir) + except: + pass + shutil.copy(full_path, dst_dir) + +file = open('VERSION.tmp', 'w') +file.write("build_version = \"%s\"" % build_version) +file.close() diff --git a/packaging/win32/deluge-win32-installer.nsi b/packaging/win32/deluge-win32-installer.nsi new file mode 100644 index 000000000..82f9e66c8 --- /dev/null +++ b/packaging/win32/deluge-win32-installer.nsi @@ -0,0 +1,208 @@ +# Deluge Windows installer script +# +# Copyright (C) 2009 Jesper Lund <mail@jesperlund.com> +# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> +# Copyright (C) 2009 John Garland <johnnybg@gmail.com> +# +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later. +# See LICENSE for more details. +# + +# Set default compressor +SetCompressor /FINAL /SOLID lzma +SetCompressorDictSize 64 + +# Script version; displayed when running the installer +!define DELUGE_INSTALLER_VERSION "0.6" + +# Deluge program information +!define PROGRAM_NAME "Deluge" +# Deluge program information +!searchparse /file VERSION.tmp `build_version = "` PROGRAM_VERSION `"` +!ifndef PROGRAM_VERSION + !error "Program Version Undefined" +!endif +!define PROGRAM_WEB_SITE "http://deluge-torrent.org" + +# Python files generated with bbfreeze +!define DELUGE_PYTHON_BBFREEZE_OUTPUT_DIR "..\build-win32\deluge-bbfreeze-${PROGRAM_VERSION}" + +# --- Interface settings --- + +# Modern User Interface 2 +!include MUI2.nsh + +# Installer +!define MUI_ICON "deluge.ico" +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_RIGHT +!define MUI_HEADERIMAGE_BITMAP "installer-top.bmp" +!define MUI_WELCOMEFINISHPAGE_BITMAP "installer-side.bmp" +!define MUI_COMPONENTSPAGE_SMALLDESC +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_ABORTWARNING + +# Uninstaller +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" +!define MUI_HEADERIMAGE_UNBITMAP "installer-top.bmp" +!define MUI_WELCOMEFINISHPAGE_UNBITMAP "installer-side.bmp" +!define MUI_UNFINISHPAGE_NOAUTOCLOSE + +# --- Start of Modern User Interface --- + +# Welcome page +!insertmacro MUI_PAGE_WELCOME + +# License page +!insertmacro MUI_PAGE_LICENSE "..\LICENSE" + +# Components page +!insertmacro MUI_PAGE_COMPONENTS + +# Let the user select the installation directory +!insertmacro MUI_PAGE_DIRECTORY + +# Run installation +!insertmacro MUI_PAGE_INSTFILES + +# Display 'finished' page +!insertmacro MUI_PAGE_FINISH + +# Uninstaller pages +!insertmacro MUI_UNPAGE_INSTFILES + +# Language files +!insertmacro MUI_LANGUAGE "English" + + +# --- Functions --- + +Function .onInit + System::Call 'kernel32::OpenMutex(i 0x100000, b 0, t "deluge") i .R0' + IntCmp $R0 0 notRunning + System::Call 'kernel32::CloseHandle(i $R0)' + MessageBox MB_OK|MB_ICONEXCLAMATION "Deluge is running. Please close it first" /SD IDOK + Abort + notRunning: +FunctionEnd + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Do you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2 + Abort +FunctionEnd + +# --- Installation sections --- + +# Compare versions +!include "WordFunc.nsh" + +!define PROGRAM_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PROGRAM_NAME}" +!define PROGRAM_UNINST_ROOT_KEY "HKLM" + +# Branding text +BrandingText "Deluge Windows Installer v${DELUGE_INSTALLER_VERSION}" + +Name "${PROGRAM_NAME} ${PROGRAM_VERSION}" +OutFile "..\build-win32\deluge-${PROGRAM_VERSION}-win32-setup.exe" + +InstallDir "$PROGRAMFILES\Deluge" + +ShowInstDetails show +ShowUnInstDetails show + +# Install main application +Section "Deluge Bittorrent Client" Section1 + SectionIn RO + + SetOutPath $INSTDIR + File /r "${DELUGE_PYTHON_BBFREEZE_OUTPUT_DIR}\*.*" + + SetOverwrite ifnewer + File "..\LICENSE" +SectionEnd + +Section -StartMenu_Desktop_Links + WriteIniStr "$INSTDIR\homepage.url" "InternetShortcut" "URL" "${PROGRAM_WEB_SITE}" + # create shortcuts for all users + SetShellVarContext all + CreateDirectory "$SMPROGRAMS\Deluge" + CreateShortCut "$SMPROGRAMS\Deluge\Deluge.lnk" "$INSTDIR\deluge.exe" + CreateShortCut "$SMPROGRAMS\Deluge\Project homepage.lnk" "$INSTDIR\Homepage.url" + CreateShortCut "$SMPROGRAMS\Deluge\Uninstall Deluge.lnk" "$INSTDIR\Deluge-uninst.exe" + CreateShortCut "$DESKTOP\Deluge.lnk" "$INSTDIR\deluge.exe" +SectionEnd + +Section -Uninstaller + WriteUninstaller "$INSTDIR\Deluge-uninst.exe" + WriteRegStr ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}" "UninstallString" "$INSTDIR\Deluge-uninst.exe" +SectionEnd + +# Create file association for .torrent +Section "Create .torrent file association for Deluge" Section2 + # Set up file association for .torrent files + DeleteRegKey HKCR ".torrent" + WriteRegStr HKCR ".torrent" "" "Deluge" + WriteRegStr HKCR ".torrent" "Content Type" "application/x-bittorrent" + + DeleteRegKey HKCR "Deluge" + WriteRegStr HKCR "Deluge" "" "Deluge" + WriteRegStr HKCR "Deluge\Content Type" "" "application/x-bittorrent" + WriteRegStr HKCR "Deluge\DefaultIcon" "" "$INSTDIR\deluge.exe,0" + WriteRegStr HKCR "Deluge\shell" "" "open" + WriteRegStr HKCR "Deluge\shell\open\command" "" '"$INSTDIR\deluge.exe" "%1"' +SectionEnd + + +# Create magnet uri association +Section "Create magnet uri link association for Deluge" Section3 + DeleteRegKey HKCR "Magnet" + WriteRegStr HKCR "Magnet" "" "URL:Magnet Protocol" + WriteRegStr HKCR "Magnet" "URL Protocol" "" + + WriteRegStr HKCR "Magnet\shell\open\command" "" '"$INSTDIR\deluge.exe" "%1"' +SectionEnd + + +LangString DESC_Section1 ${LANG_ENGLISH} "Install Deluge Bittorrent client." +LangString DESC_Section2 ${LANG_ENGLISH} "Select this option unless you have another torrent client which you want to use for opening .torrent files." +LangString DESC_Section3 ${LANG_ENGLISH} "Select this option to have Deluge handle magnet links." + +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1) + !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2) + !insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3) +!insertmacro MUI_FUNCTION_DESCRIPTION_END + + +# --- Uninstallation section(s) --- + +Section Uninstall + RmDir /r "$INSTDIR" + + SetShellVarContext all + Delete "$SMPROGRAMS\Deluge\Deluge.lnk" + Delete "$SMPROGRAMS\Deluge\Uninstall Deluge.lnk" + Delete "$SMPROGRAMS\Deluge\Project homepage.lnk" + Delete "$DESKTOP\Deluge.lnk" + + RmDir "$SMPROGRAMS\Deluge" + + DeleteRegKey ${PROGRAM_UNINST_ROOT_KEY} "${PROGRAM_UNINST_KEY}" + + # Only delete the .torrent association if Deluge owns it + ReadRegStr $1 HKCR ".torrent" "" + StrCmp $1 "Deluge" 0 DELUGE_skip_delete + + # Delete the key since it is owned by Deluge; afterwards there is no .torrent association + DeleteRegKey HKCR ".torrent" + + DELUGE_skip_delete: + # This key is only used by Deluge, so we should always delete it + DeleteRegKey HKCR "Deluge" +SectionEnd diff --git a/packaging/win32/deluge.ico b/packaging/win32/deluge.ico Binary files differnew file mode 100644 index 000000000..ef5c3dd34 --- /dev/null +++ b/packaging/win32/deluge.ico diff --git a/packaging/win32/icon.py b/packaging/win32/icon.py new file mode 100644 index 000000000..7563a22f5 --- /dev/null +++ b/packaging/win32/icon.py @@ -0,0 +1,205 @@ +#! /usr/bin/env python +# Copyright (C) 2005, Giovanni Bajo +# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +# This code is courtesy of Thomas Heller, who +# has kindly donated it to this project. +RT_ICON = 3 +RT_GROUP_ICON = 14 +LOAD_LIBRARY_AS_DATAFILE = 2 + +import struct +import types + +try: + StringTypes = types.StringTypes +except AttributeError: + StringTypes = [type("")] + + +class Structure: + def __init__(self): + size = self._sizeInBytes = struct.calcsize(self._format_) + self._fields_ = list(struct.unpack(self._format_, '\000' * size)) + indexes = self._indexes_ = {} + for i in range(len(self._names_)): + indexes[self._names_[i]] = i + + def dump(self): + # print "I: DUMP of", self + for name in self._names_: + if name[0] != '_': + # print "I: %20s = %s" % (name, getattr(self, name)) + pass + + def __getattr__(self, name): + if name in self._names_: + index = self._indexes_[name] + return self._fields_[index] + try: + return self.__dict__[name] + except KeyError: + raise AttributeError(name) + + def __setattr__(self, name, value): + if name in self._names_: + index = self._indexes_[name] + self._fields_[index] = value + else: + self.__dict__[name] = value + + def tostring(self): + return apply(struct.pack, [self._format_, ] + self._fields_) + + def fromfile(self, file): + data = file.read(self._sizeInBytes) + self._fields_ = list(struct.unpack(self._format_, data)) + + +class ICONDIRHEADER(Structure): + _names_ = "idReserved", "idType", "idCount" + _format_ = "hhh" + + +class ICONDIRENTRY(Structure): + _names_ = "bWidth", "bHeight", "bColorCount", "bReserved", "wPlanes", "wBitCount", "dwBytesInRes", "dwImageOffset" + _format_ = "bbbbhhii" + + +class GRPICONDIR(Structure): + _names_ = "idReserved", "idType", "idCount" + _format_ = "hhh" + + +class GRPICONDIRENTRY(Structure): + _names_ = "bWidth", "bHeight", "bColorCount", "bReserved", "wPlanes", "wBitCount", "dwBytesInRes", "nID" + _format_ = "bbbbhhih" + + +class IconFile: + def __init__(self, path): + self.path = path + file = open(path, "rb") + self.entries = [] + self.images = [] + header = self.header = ICONDIRHEADER() + header.fromfile(file) + for i in range(header.idCount): + entry = ICONDIRENTRY() + entry.fromfile(file) + self.entries.append(entry) + for e in self.entries: + file.seek(e.dwImageOffset, 0) + self.images.append(file.read(e.dwBytesInRes)) + + def grp_icon_dir(self): + return self.header.tostring() + + def grp_icondir_entries(self, id=1): + data = "" + for entry in self.entries: + e = GRPICONDIRENTRY() + for n in e._names_[:-1]: + setattr(e, n, getattr(entry, n)) + e.nID = id + id = id + 1 + data = data + e.tostring() + return data + + +def CopyIcons_FromIco(dstpath, srcpath, id=1): # NOQA + import win32api + icons = map(IconFile, srcpath) + print "I: Updating icons from", srcpath, "to", dstpath + + hdst = win32api.BeginUpdateResource(dstpath, 0) + + iconid = 1 + for i in range(len(icons)): + f = icons[i] + data = f.grp_icon_dir() + data = data + f.grp_icondir_entries(iconid) + win32api.UpdateResource(hdst, RT_GROUP_ICON, i, data) + # print "I: Writing RT_GROUP_ICON %d resource with %d bytes" % (i, len(data)) + for data in f.images: + win32api.UpdateResource(hdst, RT_ICON, iconid, data) + # print "I: Writing RT_ICON %d resource with %d bytes" % (iconid, len(data)) + iconid = iconid + 1 + + win32api.EndUpdateResource(hdst, 0) + + +def CopyIcons(dstpath, srcpath): # NOQA + import os.path + import string + + if type(srcpath) in StringTypes: + srcpath = [srcpath] + + def splitter(s): + try: + srcpath, index = map(string.strip, string.split(s, ',')) + return srcpath, int(index) + except ValueError: + return s, None + + srcpath = map(splitter, srcpath) + # print "I: SRCPATH", srcpath + + if len(srcpath) > 1: + # At the moment, we support multiple icons only from .ico files + srcs = [] + for s in srcpath: + e = os.path.splitext(s[0])[1] + if string.lower(e) != '.ico': + raise ValueError("multiple icons supported only from .ico files") + if s[1] is not None: + raise ValueError("index not allowed for .ico files") + srcs.append(s[0]) + return CopyIcons_FromIco(dstpath, srcs) + + srcpath, index = srcpath[0] + srcext = os.path.splitext(srcpath)[1] + if string.lower(srcext) == '.ico': + return CopyIcons_FromIco(dstpath, [srcpath]) + if index is not None: + print "I: Updating icons from", srcpath, ", %d to" % index, dstpath + else: + print "I: Updating icons from", srcpath, "to", dstpath + import win32api + hdst = win32api.BeginUpdateResource(dstpath, 0) + hsrc = win32api.LoadLibraryEx(srcpath, 0, LOAD_LIBRARY_AS_DATAFILE) + if index is None: + grpname = win32api.EnumResourceNames(hsrc, RT_GROUP_ICON)[0] + elif index >= 0: + grpname = win32api.EnumResourceNames(hsrc, RT_GROUP_ICON)[index] + else: + grpname = -index + data = win32api.LoadResource(hsrc, RT_GROUP_ICON, grpname) + win32api.UpdateResource(hdst, RT_GROUP_ICON, grpname, data) + for iconname in win32api.EnumResourceNames(hsrc, RT_ICON): + data = win32api.LoadResource(hsrc, RT_ICON, iconname) + win32api.UpdateResource(hdst, RT_ICON, iconname, data) + win32api.FreeLibrary(hsrc) + win32api.EndUpdateResource(hdst, 0) + +if __name__ == "__main__": + import sys + + dstpath = sys.argv[1] + srcpath = sys.argv[2:] + CopyIcons(dstpath, srcpath) diff --git a/packaging/win32/installer-side.bmp b/packaging/win32/installer-side.bmp Binary files differnew file mode 100644 index 000000000..58c2bed5b --- /dev/null +++ b/packaging/win32/installer-side.bmp diff --git a/packaging/win32/installer-top.bmp b/packaging/win32/installer-top.bmp Binary files differnew file mode 100644 index 000000000..1e1a94cd7 --- /dev/null +++ b/packaging/win32/installer-top.bmp |