Skip to content

Commit 694cf0f

Browse files
committed
adapt quodlibet's release scripts to gPodder
1 parent 394e415 commit 694cf0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3432
-993
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
*~
22
.DS_Store
3+
/_build
4+
/_bundler
5+
/_home
6+
/_jhbuild

README

+56-35
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,64 @@
1+
OS X Bundle Build Scripts
2+
=========================
3+
4+
15
This is a collection of files required to build gPodder.app :
26
gPodder as a native GTK+ Quartz application for Mac OS X 10.6 and 10.7
37

48
I used them to build on a 10.6 X86_64 machine.
59

6-
# Instructions
10+
**Note:**
11+
In case you want just want to run gPodder from source you can ignore
12+
all this and use the released bundle as a development environment.
13+
Download the official bundle, git clone the gPodder repo and do
14+
`./gPodder.app/Contents/MacOS/run gpodder.py`.
15+
716

8-
place into ~/mymodules
17+
Uses jhbuild [3] and the stable module set provided by gtk-osx [2] with a
18+
gPodder specific module set overlay to build all needed dependencies for gPodder.
19+
Everything will be downloaded/installed into this directory and your
20+
user directory will not be touched.
921

10-
copy dot_jhbuildrc-custom to ~/.jhbuildrc-custom or better, merge my modifications to your config file
22+
Builds upon the great scripts by Christoph Reiter to automate my previously
23+
tedious description.
1124

12-
If you have MacPorts installed, you must ensure to remove it from the path,
13-
to only build against system libraries.
14-
It might also be a good idea to move it to some non standard location
15-
during the build: some configure scripts are a bit too clever and will use it even if it's not in the path.
25+
# Creating a Bundle
1626

17-
Follow instructions in http://live.gnome.org/GTK%2B/OSX/Building
18-
- bootstrap
19-
Be sure to skip building libiconv (see https://mail.gnome.org/archives/gtk-osx-users-list/2011-July/msg00001.html)
20-
otherwise the resulting application will not run under 10.7.
21-
edit gtk-osx.modules to comment out gtk-osx-javascript.modules (would give an error as soon as one tries to build meta-gtk-osx-bootstrap)
22-
- meta-gtk-osx-bootstrap
23-
- meta-gtk-osx-freetype (this is the key to getting pangoft2 and also fontconfig for librsvg)
24-
- meta-gtk-osx-core
25-
- python
26-
- meta-gtk-osx-python
27+
Prerequisites: `OS X` 10.6+ and a working `Xcode` [0] and `git` [1]
2728

28-
chmod u+w ~/gtk/inst/lib/libpython2.7.dylib
29-
chmod u+w ~/gtk/inst/lib/libreadline.6.2.dylib
29+
Verify that Xcode and git is installed and in your `$PATH` by invoking `git
30+
--version` and `gcc --version`. Also make sure that other package managers
31+
like homebrew or macports aren't in your `$PATH`. To be extra sure, move
32+
`/opt/local` away, because some configure scripts are clever enough to look
33+
for it by themselves.
3034

31-
# Installing gPodder
32-
Latest version of gPodder is used, with a few custom patches (see postproc.sh)
35+
(Tested on OS X 10.6.8)
3336

34-
jhbuild build gpodder (error checkout libproxy: missing patch 404, ignore and move on)
35-
jhbuild build meta-gtk-osx-themes
37+
1) Call `bootstrap.sh` to install jhbuild and set up dummy `$HOME` as base.
38+
2) Call `build.sh` to download and build all the dependencies.
39+
I get an error with openssl, but it still installs correctly.
40+
Simply choose `[2] ignore error` and move forward.
41+
3) Call `bundle.sh` to create the finished bundles for gPodder in
42+
`_build`.
3643

3744

45+
# Development
3846

39-
# Bundling gPodder
40-
install gtk-mac-bundler, following http://live.gnome.org/GTK%2B/OSX/Bundling
41-
cd mymodules/gpodder-bundle
42-
jhbuild shell
43-
~/.local/bin/gtk-mac-bundler gpodder.bundle && ./postproc.sh
47+
* After `bootstrap.sh` has finished executing `source env.sh` will put you
48+
in the build environment. After that jhbuild can be used directly.
49+
* `fetch_modules()` downloads the git master of the gtk-osx module set
50+
and replaces the modules under "modulessets" and the
51+
`misc/gtk-osx-jhbuildrc` file. Doing so so should ideally be followed by a
52+
review of the gPodder module to reduce duplication and a rebuilt to verify
53+
that everything still works.
4454

45-
produces gPodder.app in Desktop
46-
test by double-clicking on gPodder.app
47-
test by moving ~/gtk/inst away and re-launching
4855

4956
# Releasing
5057

5158
Releasing on OS X
52-
1. see *Bundling gPodder*
53-
2. ./release.sh ~/gPodder.app version_buildnumber
54-
3. ./release_deps.sh ~/gPodder.app version_buildnumber
59+
1. see *Creating a Bundle*
60+
2. `./release.sh _build/gPodder.app version_buildnumber`
61+
3. `./release_deps.sh _build/gPodder.app version_buildnumber`
5562

5663
Releasing on Linux by patching deps:
5764
4. ./release_on_linux.sh ~/Downloads/gPodder-3.8.4_0.deps.zip /tmp/gpodder master f699341
@@ -63,4 +70,18 @@ See https://github.com/elelay/gpodder-osx-bundle
6370
# Using gPodder:
6471

6572
See https://github.com/elelay/gpoder-osx-bundle/wiki/Using for instructions...
66-
And the official help guide http://gpodder.org/documentation
73+
And the official help guide http://gpodder.org/documentation
74+
75+
76+
77+
# Content Description
78+
79+
* `modulesets` contains the gtk-osx stable module set and a gpodder module
80+
which adds new packages replaces existing ones.
81+
* `misc`: see each file or directory README for a description.
82+
83+
84+
| [0] https://developer.apple.com/xcode/downloads/
85+
| [1] https://git-scm.com/download/mac
86+
| [2] https://git.gnome.org/browse/gtk-osx/
87+
| [3] https://git.gnome.org/browse/jhbuild/

bootstrap.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
source env.sh
4+
5+
mkdir -p "$HOME"
6+
git clone git://git.gnome.org/jhbuild _jhbuild
7+
(cd _jhbuild && ./autogen.sh && make -f Makefile.plain DISABLE_GETTEXT=1 install >/dev/null)
8+
cp misc/gtk-osx-jhbuildrc "$HOME/.jhbuildrc"
9+
cp misc/jhbuildrc-custom "$HOME/.jhbuildrc-custom"
10+
git clone git://git.gnome.org/gtk-mac-bundler _bundler
11+
(cd _bundler && make install)

build.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
source env.sh
4+
5+
jhbuild build autoconf --nodeps
6+
jhbuild bootstrap
7+
jhbuild build python
8+
jhbuild build meta-gtk-osx-bootstrap
9+
jhbuild build gpodder

bundle.sh

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
source env.sh
6+
7+
jhbuild run gtk-mac-bundler misc/bundle/gpodder.bundle
8+
9+
APP="$QL_OSXBUNDLE_BUNDLE_DEST/gPodder.app"
10+
APP_PREFIX="$APP"/Contents/Resources
11+
JHBUILD_PREFIX="$HOME/jhbuild_prefix"
12+
mydir=`pwd`
13+
14+
# change case of gPodder.app
15+
mv "$QL_OSXBUNDLE_BUNDLE_DEST/gpodder.app" "$QL_OSXBUNDLE_BUNDLE_DEST/app.app"
16+
mv "$QL_OSXBUNDLE_BUNDLE_DEST/app.app" "$APP"
17+
18+
# launcher scripts
19+
mv "$APP"/Contents/MacOS/{gPodder,_launcher}
20+
(cd "$APP"/Contents/MacOS/ && ln -s _launcher gpodder)
21+
(cd "$APP"/Contents/MacOS/ && ln -s _launcher gpodder-migrate2tres)
22+
(cd "$APP"/Contents/MacOS/ && ln -s _launcher run)
23+
24+
# Set the version and copyright automatically (before removing *.pyc)
25+
"$APP"/Contents/MacOS/run "$mydir/misc/fixup_info.py" "$APP"/Contents/Info.plist
26+
27+
# kill some useless files
28+
rm -Rf "$APP_PREFIX"/lib/python2.7/test
29+
rm -Rf "$APP_PREFIX"/lib/python2.7/unittest
30+
rm -Rvf "$APP_PREFIX"/lib/python2.7/*/test
31+
rm -f "$APP_PREFIX"/lib/python2.7/config/libpython2.7.a
32+
find "$APP_PREFIX"/lib/python2.7 -name '*.pyc' -delete
33+
find "$APP_PREFIX"/lib/python2.7 -name '*.pyo' -delete
34+
rm -f "$APP"/Contents/MacOS/gPodder-bin
35+
rm -Rf "$APP_PREFIX"/share/gpodder/ui/qml
36+
rm -Rf "$APP_PREFIX"/lib/python2.7/site-packages/gpodder/{qmlui,webui}
37+
38+
# replace copy with symlink
39+
rm "$APP_PREFIX"/lib/libicudata.55.dylib
40+
ln -s libicudata.55.1.dylib "$APP_PREFIX"/lib/libicudata.55.dylib
41+
42+
# remove the check for DISPLAY variable since it's not used AND it's not
43+
# available on Mavericks (see bug #1855)
44+
(cd "$APP_PREFIX" && patch -p0 < "$mydir/modulesets/patches/dont_check_display.patch")
45+
46+
# Command-XX shortcuts in gPodder menus
47+
/usr/bin/xsltproc -o gpodder.ui.tmp $mydir/misc/adjust-modifiers.xsl "$APP_PREFIX"/share/gpodder/ui/gtk/gpodder.ui
48+
mv gpodder.ui.tmp "$APP_PREFIX"/share/gpodder/ui/gtk/gpodder.ui
49+
50+
# localization of Quit and other menu items controlled by gtk-mac-integration
51+
cp -R "$JHBUILD_PREFIX"/share/strings/*.lproj "$APP_PREFIX"
52+
53+
# check for dynamic linking consistency : nothing should reference gtk/inst
54+
find "$APP_PREFIX" -name '*.so' -and -print -and -exec sh -c 'otool -L $1 | grep /gtk/inst' '{}' '{}' ';'
55+
56+
# list the provenance of every file in the bundle
57+
$mydir/misc/provenance.pl "$JHBUILD_PREFIX" "$APP" > "$QL_OSXBUNDLE_BUNDLE_DEST"/gPodder.contents
58+

dot_jhbuildrc-custom

-172
This file was deleted.

env.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
4+
cd "$DIR"
5+
6+
export HOME="$DIR/_home"
7+
export PATH="$PATH:$HOME/.local/bin:$HOME/jhbuild_prefix/bin"
8+
export QL_OSXBUNDLE_MODULESETS_DIR="$DIR/modulesets"
9+
export QL_OSXBUNDLE_BUNDLE_DEST="$DIR/_build"
10+
alias jhbuild="python2.7 `which jhbuild`"

0 commit comments

Comments
 (0)