Skip to content

Commit

Permalink
We can build locally - GH?
Browse files Browse the repository at this point in the history
  • Loading branch information
yousseb committed Nov 5, 2023
1 parent 75bae82 commit fe1a749
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
17 changes: 4 additions & 13 deletions osx/build_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ cp osx/conf.py meld/conf.py

${INSTROOT}/bin/python3 -c "import sys; print('\n'.join(sys.path))"

PY_SITE_PACKAGES=$(~/gtk/inst/bin/python3 -c 'import site; print(site.getsitepackages()[0], end="")')
/usr/local/bin/pip3 install distro py2app --target $PY_SITE_PACKAGES

glib-compile-schemas data
${INSTROOT}/bin/python3 setup_py2app.py build
${INSTROOT}/bin/python3 setup_py2app.py py2app --use-faulthandler
Expand Down Expand Up @@ -118,18 +121,7 @@ rsync -r -t $INSTROOT/lib/gobject-introspection $RES/lib

# copy some libraries that py2app misses
mkdir -p $FRAMEWORKS
rsync -t $INSTROOT/lib/libglib-2.0.0.dylib $FRAMEWORKS/libglib-2.0.0.dylib
rsync -t $INSTROOT/lib/libcairo-gobject.2.dylib $FRAMEWORKS/libcairo-gobject.2.dylib
rsync -t $INSTROOT/lib/libcairo.2.dylib $FRAMEWORKS/libcairo.2.dylib
rsync -t $INSTROOT/lib/libpangocairo-1.0.0.dylib $FRAMEWORKS/libpangocairo-1.0.0.dylib
rsync -t $INSTROOT/lib/libatk-1.0.0.dylib $FRAMEWORKS/libatk-1.0.0.dylib
rsync -t $INSTROOT/lib/libgio-2.0.0.dylib $FRAMEWORKS/libgio-2.0.0.dylib
rsync -t $INSTROOT/lib/libgobject-2.0.0.dylib $FRAMEWORKS/libgobject-2.0.0.dylib
rsync -t $INSTROOT/lib/libpango-1.0.0.dylib $FRAMEWORKS/libpango-1.0.0.dylib
rsync -t $INSTROOT/lib/libpangoft2-1.0.0.dylib $FRAMEWORKS/libpangoft2-1.0.0.dylib
rsync -t $INSTROOT/lib/libgtk-3.0.dylib $FRAMEWORKS/libgtk-3.0.dylib
rsync -t $INSTROOT/lib/libgtksourceview-4.0.dylib $FRAMEWORKS/libgtksourceview-4.0.dylib
rsync -t $INSTROOT/lib/libgtkmacintegration-gtk3.4.dylib $FRAMEWORKS/libgtkmacintegration-gtk3.4.dylib
rsync -t $INSTROOT/lib/*.dylib $FRAMEWORKS/

# rename script, use wrapper
#mv $MAIN/Contents/MacOS/Meld $MAIN/Contents/MacOS/Meld-bin
Expand Down Expand Up @@ -242,7 +234,6 @@ else
#spctl -a -t exec -vv "meldmerge.dmg" && dmg_signed=1
fi

exit

# Cleanup
mkdir -p osx/Archives
Expand Down
16 changes: 8 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[py2app]
app = ['bin/meld']
arch = universal2
iconfile = osx/meld.icns
site-packages = false
packages = gi
includes = glib, gio, cairo, pango, pangocairo, atk, gobject, gtk.keysyms
excludes = gtk-2.0
#frameworks = CoreFoundation, Foundation, Python
argv_emulation = True
arch = x86_64
# iconfile = osx/meld.icns
# site-packages = false
# packages = gi
# includes = glib, gio, cairo, pango, pangocairo, atk, gobject, gtk.keysyms
# excludes = gtk-2.0
# #frameworks = CoreFoundation, Foundation, Python
# argv_emulation = True
#resources = share/themes/Mac

[flake8]
Expand Down
4 changes: 2 additions & 2 deletions setup_py2app.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
setup_requires=["py2app"],
options={'py2app': {
'includes': [ 'cairo', 'gi', 'weakref', 'encodings' ],
'excludes': [ 'ctypes', 'tkinter' ],
'excludes': [ 'tkinter' ],
'dylib_excludes': [ 'Python' ],
'frameworks':
[
Expand All @@ -137,7 +137,7 @@
# 'libpangoft2-1.0.0.dylib',
# 'librsvg-2.2.dylib'
],
'argv_emulation': True,
'argv_emulation': False,
'no_chdir': True,
'iconfile': 'osx/meld.icns',
'plist': PLIST,
Expand Down

0 comments on commit fe1a749

Please sign in to comment.