From 8972971571d60c22556a9ae684382e1d1206fed5 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Mon, 23 Jan 2023 11:05:28 +0000 Subject: [PATCH 01/43] build_env: Automatically get the jhbuild Python site_packages path. So that it doesn't need to be manually updated in the shell script. If the Python version or path changes this should still provide the right site_packages path. --- .github/workflows/main.yml | 2 +- osx/build_env.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e68b9015..038fac349 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Check System run: | diff --git a/osx/build_env.sh b/osx/build_env.sh index 261c5a1a9..f4029760e 100755 --- a/osx/build_env.sh +++ b/osx/build_env.sh @@ -44,10 +44,12 @@ export PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:$HOME/gtk/inst/share/pkgconf export XDG_DATA_DIRS=$HOME/gtk/inst/share jhbuild buildone libffi python3 libxml2 (cd $HOME/gtk/inst/bin && touch itstool && chmod +x itstool) -/usr/local/bin/pip3 install six pygments --target ~/gtk/inst/lib/python3.9/site-packages + +PY_SITE_PACKAGES=$(~/gtk/inst/bin/python3 -c 'import site; print(site.getsitepackages()[0], end="")') +/usr/local/bin/pip3 install six pygments --target $PY_SITE_PACKAGES PYTHON=$HOME/gtk/inst/bin/python3 jhbuild build --nodeps --ignore-suggests #-s freetype-no-harfbuzz -/usr/local/bin/pip3 install pyobjc-core pyobjc-framework-Cocoa py2app --target ~/gtk/inst/lib/python3.9/site-packages +/usr/local/bin/pip3 install pyobjc-core pyobjc-framework-Cocoa py2app --target $PY_SITE_PACKAGES # (cd $HOME/gtk/inst/lib && ln -s libpython3.6m.dylib libpython3.6.dylib) # (cd $HOME/Source/ && ([ -d Mojave-gtk-theme ] || git clone https://github.com/vinceliuice/Mojave-gtk-theme.git)) From fcdf8fb5efd3a2459d8ac24296a6289383c39a5b Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sat, 21 Oct 2023 10:41:21 -0700 Subject: [PATCH 02/43] Update jhbuildrc-custom --- osx/jhbuildrc-custom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osx/jhbuildrc-custom b/osx/jhbuildrc-custom index c606e1485..104c40eb2 100644 --- a/osx/jhbuildrc-custom +++ b/osx/jhbuildrc-custom @@ -95,7 +95,7 @@ module_autogenargs['gtk+-3.0'] = '--enable-quartz-backend --enable-quartz-reloca module_autogenargs['harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs module_autogenargs['root-harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts ' + autogenargs -module_autogenargs['python3'] = '--enable-optimizations --with-system-expat --without-gcc --disable-ipv6 --with-ensurepip=yes --without-tests --disable-tests --with-threads --with-system-expat ' + autogenargs +module_autogenargs['python3'] = 'CC= CXX= --enable-optimizations --with-system-expat --disable-ipv6 --with-ensurepip=yes --without-tests --disable-tests --with-threads --with-system-expat ' + autogenargs module_mesonargs['atk'] = '--buildtype release --optimization 3 -Ddocs=false -Dintrospection=true' module_mesonargs['gdk-pixbuf'] = '--buildtype release --optimization 3 -Dbuiltin_loaders=all -Drelocatable=true -Ddocs=false' @@ -122,4 +122,4 @@ module_mesonargs['gtk+-3.0'] = '--buildtype release --optimization 3 -Dx11_bac # nobuild=True # Download only # quiet_mode=True # Don't respect suggests -ignore_suggests = True \ No newline at end of file +ignore_suggests = True From 8d57171f920d8b656de82e51e327559f919289ba Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sat, 21 Oct 2023 10:54:31 -0700 Subject: [PATCH 03/43] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 038fac349..6c732cd34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Homebrew & Various Tools run: | #/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex + brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake - name: Setup JHbuild run: | From fa7d7382ba3d8dd332e7726365b877325a1e84fe Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 21 Oct 2023 12:59:16 -0700 Subject: [PATCH 04/43] Build environment --- .github/workflows/main.yml | 2 +- osx/build_env.sh | 11 +++++++---- osx/jhbuildrc-custom | 32 ++++++++++++++++++++++---------- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c732cd34..e704de15f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Homebrew & Various Tools run: | #/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake + brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool - name: Setup JHbuild run: | diff --git a/osx/build_env.sh b/osx/build_env.sh index f4029760e..bbfee5847 100755 --- a/osx/build_env.sh +++ b/osx/build_env.sh @@ -12,12 +12,11 @@ failure() { } trap 'failure ${LINENO} "$BASH_COMMAND"' ERR -export MACOSX_DEPLOYMENT_TARGET=10.15 export PATH=$HOME/.new_local/bin:$HOME/gtk/inst/bin:$PATH mkdir -p $HOME/gtk/inst/bin -#brew install autoconf libtool automake pkg-config sassc optipng python bison flex +#brew install autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool xz ln -sf /usr/local/bin/autoconf ~/gtk/inst/bin ln -sf /usr/local/bin/autoreconf ~/gtk/inst/bin ln -sf /usr/local/bin/automake ~/gtk/inst/bin @@ -28,6 +27,8 @@ ln -sf /usr/local/bin/glibtoolize ~/gtk/inst/bin/libtoolize ln -sf /usr/local/bin/glibtool ~/gtk/inst/bin/libtool ln -sf /usr/local/bin/cmake ~/gtk/inst/bin ln -sf /usr/local/opt/bison/bin/bison ~/gtk/inst/bin +ln -sf /usr/local/bin/itstool ~/gtk/inst/bin +ln -sf /usr/local/bin/xz ~/gtk/inst/bin #brew install python3 ccache #brew tap homebrew/cask @@ -42,8 +43,10 @@ pushd . > /dev/null export PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:$HOME/gtk/inst/share/pkgconfig export XDG_DATA_DIRS=$HOME/gtk/inst/share -jhbuild buildone libffi python3 libxml2 -(cd $HOME/gtk/inst/bin && touch itstool && chmod +x itstool) +jhbuild buildone libffi +jhbuild buildone python3 +jhbuild buildone libxml2 +#(cd $HOME/gtk/inst/bin && touch itstool && chmod +x itstool) PY_SITE_PACKAGES=$(~/gtk/inst/bin/python3 -c 'import site; print(site.getsitepackages()[0], end="")') /usr/local/bin/pip3 install six pygments --target $PY_SITE_PACKAGES diff --git a/osx/jhbuildrc-custom b/osx/jhbuildrc-custom index 104c40eb2..56e1fd386 100644 --- a/osx/jhbuildrc-custom +++ b/osx/jhbuildrc-custom @@ -8,23 +8,34 @@ from os import path #prefix = "/tmp/meldroot" checkoutroot = os.path.expanduser("~/Source/gtk") -setup_sdk(target="10.15", sdk_version="native", architectures=["x86_64"]) +#setup_sdk(target='native', sdk_version=None, architectures=["x86_64"]) _gtk_osx_use_jhbuild_python = True if path.exists("/usr/local/bin/ccache"): - print("Using ccache") - os.environ["CC"] = "/usr/local/bin/ccache /usr/bin/clang" - os.environ["CXX"] = "/usr/local/bin/ccache /usr/bin/clang++" + print("Using ccache") + os.environ["CC"] = "/usr/local/bin/ccache /usr/bin/clang" + os.environ["CXX"] = "/usr/local/bin/ccache /usr/bin/clang++" else: - print("Not using ccache") - os.environ["CC"] = "/usr/bin/clang" - os.environ["CXX"] = "/usr/bin/clang++" + print("Not using ccache") + os.environ["CC"] = "/usr/bin/clang" + os.environ["CXX"] = "/usr/bin/clang++" -os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "@executable_path/../Frameworks/:@executable_path/../Resources/lib" +#os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "@executable_path/../Frameworks/:@executable_path/../Resources/lib" #environ_prepend('CFLAGS', "-O3") environ_prepend('CXXFLAGS', "-std=c++11 -stdlib=libc++") #environ_prepend('OBJCFLAGS', "-O2") -os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.15" + +# Bootstrap phase - we get those from brew +skip.append("m4") +skip.append("m4-common") +skip.append("autoconf") +skip.append("automake") +skip.append("libtool") +skip.append("xz") +skip.append("gettext") # Should we? +skip.append("bison") +skip.append("pkg-config") +skip.append("intltool") #skip.append("libiconv") # Lion issues skip.append("icu") @@ -95,7 +106,8 @@ module_autogenargs['gtk+-3.0'] = '--enable-quartz-backend --enable-quartz-reloca module_autogenargs['harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs module_autogenargs['root-harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts ' + autogenargs -module_autogenargs['python3'] = 'CC= CXX= --enable-optimizations --with-system-expat --disable-ipv6 --with-ensurepip=yes --without-tests --disable-tests --with-threads --with-system-expat ' + autogenargs +module_autogenargs['python3'] = '--enable-optimizations --with-system-expat --disable-ipv6 --with-ensurepip=yes --with-system-expat ' +#+ autogenargs module_mesonargs['atk'] = '--buildtype release --optimization 3 -Ddocs=false -Dintrospection=true' module_mesonargs['gdk-pixbuf'] = '--buildtype release --optimization 3 -Dbuiltin_loaders=all -Drelocatable=true -Ddocs=false' From 7f8ef8f01ab1f25f747685703ef8a9846cbaa447 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 21 Oct 2023 18:09:14 -0700 Subject: [PATCH 05/43] Fix building environment - we should now be able to run on latest jhbuild --- osx/build_env.sh | 27 ++++++++++++------ osx/fix_gir.sh | 1 - osx/jhbuildrc-custom | 66 +++++++++++++++----------------------------- 3 files changed, 42 insertions(+), 52 deletions(-) diff --git a/osx/build_env.sh b/osx/build_env.sh index bbfee5847..5a7b003dc 100755 --- a/osx/build_env.sh +++ b/osx/build_env.sh @@ -42,9 +42,12 @@ pushd . > /dev/null #jhbuild bootstrap export PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:$HOME/gtk/inst/share/pkgconfig +#export PKG_CONFIG_SYSROOT_DIR=$HOME/gtk/inst export XDG_DATA_DIRS=$HOME/gtk/inst/share -jhbuild buildone libffi + +jhbuild buildone libffi zlib jhbuild buildone python3 +#PYTHON=$HOME/gtk/inst/bin/python3 PYTHON_CFLAGS=-I$HOME/gtk/inst/include/python3.11 jhbuild buildone libxml2 #(cd $HOME/gtk/inst/bin && touch itstool && chmod +x itstool) @@ -54,19 +57,27 @@ PY_SITE_PACKAGES=$(~/gtk/inst/bin/python3 -c 'import site; print(site.getsitepac PYTHON=$HOME/gtk/inst/bin/python3 jhbuild build --nodeps --ignore-suggests #-s freetype-no-harfbuzz /usr/local/bin/pip3 install pyobjc-core pyobjc-framework-Cocoa py2app --target $PY_SITE_PACKAGES +cat /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc | grep -v x11 > /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc.1 +mv /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc.orig +mv /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc.1 /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc + +jhbuild buildone gtksourceview3 gtk-mac-integration gtk-mac-integration-python + # (cd $HOME/gtk/inst/lib && ln -s libpython3.6m.dylib libpython3.6.dylib) # (cd $HOME/Source/ && ([ -d Mojave-gtk-theme ] || git clone https://github.com/vinceliuice/Mojave-gtk-theme.git)) # (cd $HOME/Source/Mojave-gtk-theme && sed -i.bak 's/cp -ur/cp -r/' install.sh && ./install.sh --dest $HOME/gtk/inst/share/themes) # (cd $HOME/gtk/inst/share/themes && ln -sf Mojave-dark-solid-alt Meld-Mojave-dark) # (cd $HOME/gtk/inst/share/themes && ln -sf Mojave-light-solid-alt Meld-Mojave-light) -pushd . -cd $HOME/Source -curl -OL https://download.gnome.org/sources/gtksourceview/3.24/gtksourceview-3.24.7.tar.xz -tar xvf gtksourceview-3.24.7.tar.xz && cd gtksourceview-3.24.7 -jhbuild run ./configure --prefix $HOME/gtk/inst --enable-introspection=yes --enable-gtk-doc-html=no --with-sysroot=$HOME/gtk/inst -jhbuild run make install -j -popd +# pushd . +# cd $HOME/Source +# GTKSRCVIEW=gtksourceview-4.8.4 +# curl -OL https://download.gnome.org/sources/gtksourceview/4.8/gtksourceview-4.8.4.tar.xz +# tar xvf ${GTKSRCVIEW}.tar.xz +# mkdir -p ${GTKSRCVIEW}/build && cd ${GTKSRCVIEW}/build +# jhbuild run meson setup --prefix=$HOME/gtk/inst --buildtype=release --optimization 3 -Dvapi=false $HOME/Source/${GTKSRCVIEW} # --Denable-introspection=yes --Denable-gtk-doc-html=no --with-sysroot=$HOME/gtk/inst +# jhbuild run ninja install +# popd cp settings.ini $HOME/gtk/inst/etc/gtk-3.0/ popd diff --git a/osx/fix_gir.sh b/osx/fix_gir.sh index 7eaa1210f..163e8cb3d 100755 --- a/osx/fix_gir.sh +++ b/osx/fix_gir.sh @@ -12,7 +12,6 @@ failure() { } trap 'failure ${LINENO} "$BASH_COMMAND"' ERR -export MACOSX_DEPLOYMENT_TARGET=10.9 export PATH=$HOME/.new_local/bin:$HOME/gtk/inst/bin:$PATH # Seems like the build system changed for introspection. We now get many diff --git a/osx/jhbuildrc-custom b/osx/jhbuildrc-custom index 56e1fd386..4a47e2cc9 100644 --- a/osx/jhbuildrc-custom +++ b/osx/jhbuildrc-custom @@ -9,7 +9,7 @@ from os import path #prefix = "/tmp/meldroot" checkoutroot = os.path.expanduser("~/Source/gtk") #setup_sdk(target='native', sdk_version=None, architectures=["x86_64"]) -_gtk_osx_use_jhbuild_python = True +_gtk_osx_use_jhbuild_python = False if path.exists("/usr/local/bin/ccache"): print("Using ccache") @@ -20,24 +20,9 @@ else: os.environ["CC"] = "/usr/bin/clang" os.environ["CXX"] = "/usr/bin/clang++" -#os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "@executable_path/../Frameworks/:@executable_path/../Resources/lib" -#environ_prepend('CFLAGS', "-O3") environ_prepend('CXXFLAGS', "-std=c++11 -stdlib=libc++") -#environ_prepend('OBJCFLAGS', "-O2") - -# Bootstrap phase - we get those from brew -skip.append("m4") -skip.append("m4-common") -skip.append("autoconf") -skip.append("automake") -skip.append("libtool") -skip.append("xz") -skip.append("gettext") # Should we? -skip.append("bison") -skip.append("pkg-config") -skip.append("intltool") - -#skip.append("libiconv") # Lion issues + +skip.append("libiconv") skip.append("icu") skip.append("cups") skip.append("gnome-themes-standard") @@ -48,17 +33,24 @@ skip.append("cmake") skip.append("openssl") # We'll install it manually skip.append("python") skip.append("python3") # We'll install it manually -#skip.append("libxml2") # We'll install it manually -#skip.append("gtk-doc") skip.append("itstool") skip.append("libxslt") skip.append("yelp-xsl") skip.append("yelp-tools") -#skip.append("gobject-introspection") skip.append("pygobject") skip.append("xorg-util-macros") skip.append('mozilla') skip.append('pulseaudio') +skip.append('gtk-mac-integration') +skip.append('gtk-mac-integration-python') +#skip.append('adwaita-icon-theme') +skip.append('gtk-4') # gtksourceview4 attempts to grab gtk-4 + +#sourceview4 +# graphene +# sass +# gtk-4 + # moduleset="https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/modulesets-unstable/gtk-osx.modules" @@ -70,23 +62,22 @@ skip.append('pulseaudio') # yelp-tools modules = [ - "zlib", "libjpeg", "libtiff", "libpng", + "zlib", + "libjpeg", + "libtiff", + "libpng", "glib", "fribidi", "gtk-doc", - "pango", "gdk-pixbuf", "librsvg", + "pango", + "gdk-pixbuf", + "librsvg", "meta-gtk-osx-gtk3", "meta-gtk-osx-python3-gtk3", "gsettings-desktop-schemas", "adwaita-icon-theme" ] -#"gtksourceview3", - -#moduleset="http://git.gnome.org/browse/gtk-osx/plain/modulesets/gtk-osx.modules" - -#prefix = os.path.join(os.environ["HOME"], "meld") - global autogenargs autogenargs = autogenargs + ' --disable-documentation --disable-docs --enable-introspection --enable-gtk-doc=no --enable-gtk-doc-html=no --enable-gtk-doc-pdf=no' # autogenargs += ' --cache-file=' + checkoutroot + '/autoconf-cache ' @@ -102,12 +93,12 @@ module_autogenargs['librsvg'] = '--disable-Bsymbolic --enable-pixbuf-loader --en module_autogenargs['cairo'] = '--disable-full-testing --disable-trace --enable-ft --enable-fc --enable-quartz-image --enable-quartz-font --enable-quartz --enable-png --enable-svg --enable-tee --enable-xml --enable-gobject --enable-pthread --disable-valgrind --disable-gtk-doc --disable-gtk-doc-html --disable-dependency-tracking ' + autogenargs module_autogenargs['gobject-introspection']= '--with-cairo=yes ' + autogenargs module_autogenargs['tango-icon-theme']='--disable-nls --disable-icon-framing ' + autogenargs -module_autogenargs['gtk+-3.0'] = '--enable-quartz-backend --enable-quartz-relocation --disable-Bsymbolic --disable-cloudprint --with-included-immodules=am-et,cedilla,cyrillic-translit,inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr --disable-modules --disable-rpath --disable-cups --disable-papi --disable-cloudprint --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --enable-debug=no ' + autogenargs #--disable-schemas-compile ? +#module_autogenargs['gtk+-3.0'] = '--enable-quartz-backend --enable-quartz-relocation --disable-Bsymbolic --disable-cloudprint --with-included-immodules=am-et,cedilla,cyrillic-translit,inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr --disable-modules --disable-rpath --disable-cups --disable-papi --disable-cloudprint --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --enable-debug=no ' + autogenargs #--disable-schemas-compile ? module_autogenargs['harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs module_autogenargs['root-harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts ' + autogenargs module_autogenargs['python3'] = '--enable-optimizations --with-system-expat --disable-ipv6 --with-ensurepip=yes --with-system-expat ' -#+ autogenargs +module_autogenargs['libxml2'] = '--with-zlib --enable-ipv6=no ' module_mesonargs['atk'] = '--buildtype release --optimization 3 -Ddocs=false -Dintrospection=true' module_mesonargs['gdk-pixbuf'] = '--buildtype release --optimization 3 -Dbuiltin_loaders=all -Drelocatable=true -Ddocs=false' @@ -115,19 +106,8 @@ module_mesonargs['glib'] = '--buildtype release --optimization 3 -Dbsymbol module_mesonargs['pango'] = '--buildtype release --optimization 3 -Dintrospection=enabled' module_mesonargs['pygobject3'] = '--buildtype release --optimization 3 -Dtests=false -Dpycairo=enabled' module_mesonargs['gtk+-3.0'] = '--buildtype release --optimization 3 -Dx11_backend=false -Dwayland_backend=false -Dbroadway_backend=false -Dwin32_backend=false -Dquartz_backend=true -Dxinerama=no -Dcloudproviders=false -Dprofiler=false -Dtracker3=false -Dcolord=no -Dgtk_doc=false -Dman=false -Dintrospection=true -Ddemos=false -Dexamples=false -Dtests=false -Dinstalled_tests=false -Dbuiltin_immodules=yes' +module_mesonargs['gtksourceview4'] = '--buildtype release --optimization 3 -Dvapi=false' -# module_autogenargs['gtk-quartz-engine'] = 'CFLAGS=-Wuninitialized ' + autogenargs -# module_autogenargs['gtksourceview3'] = '' + autogenargs -#module_autogenargs['gtk-mac-integration']='--enable-python=all --without-gtk2 --with-gtk3 --enable-introspection=yes ' + autogenargs - - - -#os.environ['CFLAGS'] += ' -I' + '/usr/include/' -#os.environ['CPPFLAGS'] += ' -I' + '/usr/include/' -#os.environ['LDFLAGS'] += ' -L' + '/usr/lib/' -#os.environ['LDFLAGS'] += ' -Wl,--rpath -Wl,' + '/usr/lib/' -#os.environ['LDFLAGS'] += ' -Wl,--rpath -Wl,' + '../lib/' -#os.environ['LDFLAGS'] += ' -Wl,--rpath -Wl,' + '../lib_pypy/' # Can be usefull when tweaking modulesets to avoid jhbuild overwriting: # nonetwork=True From 8a8ff2088debc708dba7f302a49207e45094c322 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 21 Oct 2023 18:54:40 -0700 Subject: [PATCH 06/43] More fixes for CI --- osx/build_env.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osx/build_env.sh b/osx/build_env.sh index 5a7b003dc..3a73a80a6 100755 --- a/osx/build_env.sh +++ b/osx/build_env.sh @@ -57,9 +57,9 @@ PY_SITE_PACKAGES=$(~/gtk/inst/bin/python3 -c 'import site; print(site.getsitepac PYTHON=$HOME/gtk/inst/bin/python3 jhbuild build --nodeps --ignore-suggests #-s freetype-no-harfbuzz /usr/local/bin/pip3 install pyobjc-core pyobjc-framework-Cocoa py2app --target $PY_SITE_PACKAGES -cat /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc | grep -v x11 > /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc.1 -mv /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc.orig -mv /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc.1 /Users/yousseb/gtk/inst/lib/pkgconfig/epoxy.pc +cat $HOME/gtk/inst/lib/pkgconfig/epoxy.pc | grep -v x11 > $HOME/gtk/inst/lib/pkgconfig/epoxy.pc.1 +mv $HOME/gtk/inst/lib/pkgconfig/epoxy.pc $HOME/gtk/inst/lib/pkgconfig/epoxy.pc.orig +mv $HOME/gtk/inst/lib/pkgconfig/epoxy.pc.1 $HOME/gtk/inst/lib/pkgconfig/epoxy.pc jhbuild buildone gtksourceview3 gtk-mac-integration gtk-mac-integration-python From 54029e10debdab6514bc3324d490feba11711216 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 21 Oct 2023 19:32:57 -0700 Subject: [PATCH 07/43] Upload env artifact + cache it --- .github/workflows/main.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e704de15f..d63b4fbf3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,8 +32,23 @@ jobs: ln -sf $PWD/osx/jhbuildrc-custom $HOME/.jhbuildrc-custom /bin/bash -c "$(curl -fsSL https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/gtk-osx-setup.sh)" + - uses: actions/cache@v3 + with: + path: | + /Users/runner/gtk + key: ${{ runner.os }}-${{ hashFiles('osx/jhbuildrc-custom') }}-${{ hashFiles('osx/build_env.sh') }} + - name: Build Environment run: | - cd osx && /bin/bash ./build_env.sh + echo Building in $HOME/gtk/inst + cd osx && /bin/bash ./build_env.sh + + - name: FIX gir + run: | + cd osx && /bin/bash ./fix_gir.sh - + - name: Upload Environment + uses: actions/upload-artifact@v3.1.3 + with: + name: Environment + path: /Users/runner/gtk From 142af272964aeb3a2f41ba89c75351a9c6b619f8 Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sat, 21 Oct 2023 20:27:59 -0700 Subject: [PATCH 08/43] Update main.yml --- .github/workflows/main.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d63b4fbf3..55897d1c2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,10 +43,6 @@ jobs: echo Building in $HOME/gtk/inst cd osx && /bin/bash ./build_env.sh - - name: FIX gir - run: | - cd osx && /bin/bash ./fix_gir.sh - - name: Upload Environment uses: actions/upload-artifact@v3.1.3 with: From 0603ff84a65d7ef052021c5473d919f549f8ec9b Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sat, 21 Oct 2023 20:30:57 -0700 Subject: [PATCH 09/43] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55897d1c2..82e7e5b87 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,9 +10,9 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - build: + build-environment: + name: Build Docker Images runs-on: macos-latest - steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 From f49da7854bb0f5f13cf9e0130cd8ad0782785e19 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 21 Oct 2023 21:44:01 -0700 Subject: [PATCH 10/43] Split github workflow into separate jobs --- .github/workflows/main.yml | 11 ++++++++++- osx/build_env.sh | 33 +++++++++++++++++---------------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 82e7e5b87..bae7e4f02 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: build-environment: - name: Build Docker Images + name: Build Environment runs-on: macos-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it @@ -48,3 +48,12 @@ jobs: with: name: Environment path: /Users/runner/gtk + + build-app: + name: Build Application + runs-on: build-environment + needs: deploy-code + steps: + - name: FIX gir + run: | + cd osx && /bin/bash ./fix_gir.sh \ No newline at end of file diff --git a/osx/build_env.sh b/osx/build_env.sh index 3a73a80a6..e970f62f5 100755 --- a/osx/build_env.sh +++ b/osx/build_env.sh @@ -69,7 +69,7 @@ jhbuild buildone gtksourceview3 gtk-mac-integration gtk-mac-integration-python # (cd $HOME/gtk/inst/share/themes && ln -sf Mojave-dark-solid-alt Meld-Mojave-dark) # (cd $HOME/gtk/inst/share/themes && ln -sf Mojave-light-solid-alt Meld-Mojave-light) -# pushd . +pushd . # cd $HOME/Source # GTKSRCVIEW=gtksourceview-4.8.4 # curl -OL https://download.gnome.org/sources/gtksourceview/4.8/gtksourceview-4.8.4.tar.xz @@ -87,21 +87,22 @@ popd # gir files without the prefix/full path to the library. # We want the prefixes. We'll edit them manually later in build_app to point # to the ones we include. -WORKDIR=$(mktemp -d) -for i in $(find $HOME/gtk/inst/share/gir-1.0 -name *.gir); do - if [ `grep shared-library=\"lib* ${i}` ]; then - gir=$(echo $(basename $i)) - - typelib=${gir%.*}.typelib - echo Processing $gir to ${WORKDIR}/$typelib - - cat $i | sed s_"shared-library=\""_"shared-library=\"$HOME/gtk/inst/lib/"_g > ${WORKDIR}/$gir - cp ${WORKDIR}/$gir $HOME/gtk/inst/share/gir-1.0 - $HOME/gtk/inst/bin/g-ir-compiler ${WORKDIR}/$gir -o ${WORKDIR}/$typelib - fi -done -cp ${WORKDIR}/*.typelib $HOME/gtk/inst/lib/girepository-1.0 -rm -fr ${WORKDIR} +# Moving to fix-gir script.. +# WORKDIR=$(mktemp -d) +# for i in $(find $HOME/gtk/inst/share/gir-1.0 -name *.gir); do +# if [ `grep shared-library=\"lib* ${i}` ]; then +# gir=$(echo $(basename $i)) + +# typelib=${gir%.*}.typelib +# echo Processing $gir to ${WORKDIR}/$typelib + +# cat $i | sed s_"shared-library=\""_"shared-library=\"$HOME/gtk/inst/lib/"_g > ${WORKDIR}/$gir +# cp ${WORKDIR}/$gir $HOME/gtk/inst/share/gir-1.0 +# $HOME/gtk/inst/bin/g-ir-compiler ${WORKDIR}/$gir -o ${WORKDIR}/$typelib +# fi +# done +# cp ${WORKDIR}/*.typelib $HOME/gtk/inst/lib/girepository-1.0 +# rm -fr ${WORKDIR} exit From d7ebe85082a0332418c696dd02d27e40cc847ae0 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 21 Oct 2023 21:44:37 -0700 Subject: [PATCH 11/43] Split github workflow into separate jobs --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bae7e4f02..2f9334a4f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,7 @@ jobs: build-app: name: Build Application runs-on: build-environment - needs: deploy-code + needs: build-environment steps: - name: FIX gir run: | From f50eb1a1cbcd7bc36c877a6647aadac29c543c7d Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 21 Oct 2023 22:13:16 -0700 Subject: [PATCH 12/43] fix-gir: Don't exit with error if no changes are done. --- osx/fix_gir.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osx/fix_gir.sh b/osx/fix_gir.sh index 163e8cb3d..067481c5c 100755 --- a/osx/fix_gir.sh +++ b/osx/fix_gir.sh @@ -18,11 +18,14 @@ export PATH=$HOME/.new_local/bin:$HOME/gtk/inst/bin:$PATH # gir files without the prefix/full path to the library. # We want the prefixes. We'll edit them manually later in build_app to point # to the ones we include. +# TEMP=$(openssl rand -hex 12) WORKDIR=$(mktemp -d) for i in $(find $HOME/gtk/inst/share/gir-1.0 -name *.gir); do + echo Checking: ${i} + cat ${i} | grep "shared-library" || true if [ `grep shared-library=\"lib* ${i}` ]; then gir=$(echo $(basename $i)) - + echo Fixing: ${gir} typelib=${gir%.*}.typelib echo Processing $gir to ${WORKDIR}/$typelib @@ -31,6 +34,6 @@ for i in $(find $HOME/gtk/inst/share/gir-1.0 -name *.gir); do $HOME/gtk/inst/bin/g-ir-compiler ${WORKDIR}/$gir -o ${WORKDIR}/$typelib fi done -cp ${WORKDIR}/*.typelib $HOME/gtk/inst/lib/girepository-1.0 +cp ${WORKDIR}/*.typelib $HOME/gtk/inst/lib/girepository-1.0 2>/dev/null || : rm -fr ${WORKDIR} From 13493ce3a4df47f0dfd158a004a4360d2fb8cc2a Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 22 Oct 2023 09:07:03 -0700 Subject: [PATCH 13/43] Fix typo --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f9334a4f..0a4511ba2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: build-app: name: Build Application - runs-on: build-environment + runs-on: macos-latest needs: build-environment steps: - name: FIX gir From 7635b181c7ea7f1810cc83ab2f33caba9861aea3 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 22 Oct 2023 13:02:49 -0700 Subject: [PATCH 14/43] Fetch artifacts for app building --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a4511ba2..0b9e4d6aa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,13 +47,18 @@ jobs: uses: actions/upload-artifact@v3.1.3 with: name: Environment - path: /Users/runner/gtk + path: | + /Users/runner/gtk + /Users/runner/.new_local build-app: name: Build Application runs-on: macos-latest needs: build-environment steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 - name: FIX gir run: | cd osx && /bin/bash ./fix_gir.sh \ No newline at end of file From 5a32a7374b08bb4f3a5e1cfdb67875df1d572af1 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 22 Oct 2023 17:23:54 -0700 Subject: [PATCH 15/43] Theme update/build --- .github/workflows/main.yml | 10 +++- bin/meld | 4 +- osx/build_gtk_theme.sh | 29 +++++++++ osx/build_icon_theme.sh | 120 +++++++++++++++++++++++++++++++++++++ osx/settings.ini | 2 +- 5 files changed, 161 insertions(+), 4 deletions(-) create mode 100755 osx/build_gtk_theme.sh create mode 100755 osx/build_icon_theme.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b9e4d6aa..7d08b11e9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,4 +61,12 @@ jobs: - uses: actions/download-artifact@v3 - name: FIX gir run: | - cd osx && /bin/bash ./fix_gir.sh \ No newline at end of file + cd osx && /bin/bash ./fix_gir.sh + + - name: Install Icon Theme + run: | + cd osx && /bin/bash ./build_icon_theme.sh + + - name: Install GTK Theme + run: | + cd osx && /bin/bash ./build_gtk_theme.sh \ No newline at end of file diff --git a/bin/meld b/bin/meld index a413aace2..93e451ab8 100755 --- a/bin/meld +++ b/bin/meld @@ -47,9 +47,9 @@ if gtk_theme is None: from Foundation import NSUserDefaults standardUserDefaults = NSUserDefaults.standardUserDefaults() if standardUserDefaults.stringForKey_("AppleInterfaceStyle") == 'Dark': - os.environ['GTK_THEME'] = "Meld-Os-Catalina-gtk:dark" + os.environ['GTK_THEME'] = "WhiteSur-Dark-solid" else: - os.environ['GTK_THEME'] = "Meld-Os-Catalina-gtk:light" + os.environ['GTK_THEME'] = "WhiteSur-Light-solid" except: pass else: diff --git a/osx/build_gtk_theme.sh b/osx/build_gtk_theme.sh new file mode 100755 index 000000000..40c6af1ba --- /dev/null +++ b/osx/build_gtk_theme.sh @@ -0,0 +1,29 @@ +#!/bin/bash -x + +set -o nounset +set -o errexit +set -o functrace + +trap "exit" INT +failure() { + local lineno=$1 + local msg=$2 + echo "Failed at $lineno: $msg" +} +trap 'failure ${LINENO} "$BASH_COMMAND"' ERR + +export PATH=$HOME/.new_local/bin:$HOME/gtk/inst/bin:$PATH + +#FIXME: This theme is pretty big and can be significantly reduced in size for our need. Perhaps ask for volunteers. + +curl -LSs https://raw.githubusercontent.com/vinceliuice/WhiteSur-gtk-theme/master/release/WhiteSur-Light-solid.tar.xz -o $HOME/Source/WhiteSur-Light-solid.tar.xz +curl -LSs https://raw.githubusercontent.com/vinceliuice/WhiteSur-gtk-theme/master/release/WhiteSur-Dark-solid.tar.xz -o $HOME/Source/WhiteSur-Dark-solid.tar.xz + +(cd $HOME/Source && tar xf WhiteSur-Light-solid.tar.xz) +(cd $HOME/Source && tar xf WhiteSur-Dark-solid.tar.xz) + +cp -RP $HOME/Source/WhiteSur-Light-solid $HOME/gtk/inst/share/themes +cp -RP $HOME/Source/WhiteSur-Dark-solid $HOME/gtk/inst/share/themes + +cp $HOME/gtk/inst/share/themes/Mac/gtk-3.0/gtk-keys.css $HOME/Source/WhiteSur-Dark-solid/gtk-3.0/ +cp $HOME/gtk/inst/share/themes/Mac/gtk-3.0/gtk-keys.css $HOME/Source/WhiteSur-Light-solid/gtk-3.0/ \ No newline at end of file diff --git a/osx/build_icon_theme.sh b/osx/build_icon_theme.sh new file mode 100755 index 000000000..324db809f --- /dev/null +++ b/osx/build_icon_theme.sh @@ -0,0 +1,120 @@ +#!/bin/bash -x + +set -o nounset +set -o errexit +set -o functrace + +trap "exit" INT +failure() { + local lineno=$1 + local msg=$2 + echo "Failed at $lineno: $msg" +} +trap 'failure ${LINENO} "$BASH_COMMAND"' ERR + +export PATH=$HOME/.new_local/bin:$HOME/gtk/inst/bin:$PATH + +#FIXME: This theme is pretty big and can be significantly reduced in size for our need. Perhaps ask for volunteers. + +curl -LSs https://codeload.github.com/vinceliuice/WhiteSur-icon-theme/tar.gz/refs/tags/2023-07-03 -o $HOME/Source/WhiteSur-icon-theme-2023-07-03.tar.gz +(cd $HOME/Source && tar xf WhiteSur-icon-theme-2023-07-03.tar.gz) + +# Ths installer was never meant to install for macOS, so we have to craft our own version +# based on what's inside the installer shell script. +# This: +# ./install -d $HOME/gtk/inst/share/icons -n Meld-WhiteSur-Icons +# won't work for us.. + +# So the following is mostly based on install.sh that comes with the theme. + +SRC_DIR=$HOME/Source/WhiteSur-icon-theme-2023-07-03 +theme="" +color="-dark" + +THEME_NAME=Meld-WhiteSur-Icons +name=$THEME_NAME +THEME_DIR=$HOME/gtk/inst/share/icons/${THEME_NAME} +dest=$HOME/gtk/inst/share/icons +[[ -d ${THEME_DIR} ]] && rm -rf ${THEME_DIR} + +echo "Installing to '${THEME_DIR}'..." + +mkdir -p ${THEME_DIR} +cp -RP "${SRC_DIR}"/{COPYING,AUTHORS} ${THEME_DIR} +cp -RP "${SRC_DIR}"/src/index.theme ${THEME_DIR} + +#sed -i "s/WhiteSur/Meld-Icons/g" ${THEME_DIR}/index.theme + +mkdir -p ${THEME_DIR}/status +cp -RP "${SRC_DIR}"/src/{actions,animations,apps,categories,devices,emblems,mimes,places} ${THEME_DIR} +cp -RP "${SRC_DIR}"/src/status/{16,22,24,32,symbolic} ${THEME_DIR}/status + +cp -RP "${SRC_DIR}"/links/{actions,apps,categories,devices,emblems,mimes,places,status} ${THEME_DIR} + +if [[ ${theme} != '' ]]; then + cp -RP "${SRC_DIR}"/colors/color${theme}/*.svg ${THEME_DIR}/places/scalable +fi + +if [[ ${color} == '-dark' ]]; then + mkdir -p ${THEME_DIR}/{apps,categories,emblems,devices,mimes,places,status} + + cp -RP "${SRC_DIR}"/src/actions ${THEME_DIR} + cp -RP "${SRC_DIR}"/src/apps/symbolic ${THEME_DIR}/apps + cp -RP "${SRC_DIR}"/src/categories/symbolic ${THEME_DIR}/categories + cp -RP "${SRC_DIR}"/src/emblems/symbolic ${THEME_DIR}/emblems + cp -RP "${SRC_DIR}"/src/mimes/symbolic ${THEME_DIR}/mimes + cp -RP "${SRC_DIR}"/src/devices/{16,22,24,symbolic} ${THEME_DIR}/devices + cp -RP "${SRC_DIR}"/src/places/{16,22,24,symbolic} ${THEME_DIR}/places + cp -RP "${SRC_DIR}"/src/status/{16,22,24,symbolic} ${THEME_DIR}/status + + if [[ ${bold:-} == 'true' ]]; then + cp -RP "${SRC_DIR}"/bold/* ${THEME_DIR} + fi + + # if [[ $DESKTOP_SESSION == '/usr/share/xsessions/budgie-desktop' ]]; then + # cp -RP "${SRC_DIR}"/src/status/symbolic-budgie/*.svg ${THEME_DIR}/status/symbolic + # fi + + # Change icon color for dark theme + sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,devices,places,status}/{16,22,24}/* || true + sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/actions/32/* || true + sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,apps,categories,emblems,devices,mimes,places,status}/symbolic/* "" || true + + cp -RP "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} ${THEME_DIR}/actions + cp -RP "${SRC_DIR}"/links/devices/{16,22,24,symbolic} ${THEME_DIR}/devices + cp -RP "${SRC_DIR}"/links/places/{16,22,24,symbolic} ${THEME_DIR}/places + cp -RP "${SRC_DIR}"/links/status/{16,22,24,symbolic} ${THEME_DIR}/status + cp -RP "${SRC_DIR}"/links/apps/symbolic ${THEME_DIR}/apps + cp -RP "${SRC_DIR}"/links/categories/symbolic ${THEME_DIR}/categories + cp -RP "${SRC_DIR}"/links/mimes/symbolic ${THEME_DIR}/mimes + + #TODO: Those are breaking.. Later though when we have some time.. + # cd ${dest} + # ln -s ../${name}${theme}/animations ${name}${theme}-dark/animations + # ln -s ../../${name}${theme}/categories/32 ${name}${theme}-dark/categories/32 + # ln -s ../../${name}${theme}/emblems/16 ${name}${theme}-dark/emblems/16 + # ln -s ../../${name}${theme}/emblems/22 ${name}${theme}-dark/emblems/22 + # ln -s ../../${name}${theme}/emblems/24 ${name}${theme}-dark/emblems/24 + # ln -s ../../${name}${theme}/mimes/16 ${name}${theme}-dark/mimes/16 + # ln -s ../../${name}${theme}/mimes/22 ${name}${theme}-dark/mimes/22 + # ln -s ../../${name}${theme}/mimes/scalable ${name}${theme}-dark/mimes/scalable + # ln -s ../../${name}${theme}/apps/scalable ${name}${theme}-dark/apps/scalable + # ln -s ../../${name}${theme}/devices/scalable ${name}${theme}-dark/devices/scalable + # ln -s ../../${name}${theme}/places/scalable ${name}${theme}-dark/places/scalable + # ln -s ../../${name}${theme}/status/32 ${name}${theme}-dark/status/32 +fi + +( + cd ${THEME_DIR} + ln -sf actions actions@2x + ln -sf animations animations@2x + ln -sf apps apps@2x + ln -sf categories categories@2x + ln -sf devices devices@2x + ln -sf emblems emblems@2x + ln -sf mimes mimes@2x + ln -sf places places@2x + ln -sf status status@2x +) + +gtk-update-icon-cache ${THEME_DIR} diff --git a/osx/settings.ini b/osx/settings.ini index bd14fc2b8..1cf8b24b0 100644 --- a/osx/settings.ini +++ b/osx/settings.ini @@ -1,5 +1,5 @@ [Settings] -gtk-icon-theme-name=MeldIcons +gtk-icon-theme-name=Meld-WhiteSur-Icons #gtk-font-name=System Font Regular10 #gtk-cursor-theme-name=Breeze_Amber #gtk-cursor-theme-size=0 From 0e5a9e9288deab22294800838647b904ae9fc61d Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sun, 22 Oct 2023 19:47:48 -0700 Subject: [PATCH 16/43] Speed up artifact handling between jobs --- .github/workflows/main.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d08b11e9..d7c6b7e12 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,13 +43,18 @@ jobs: echo Building in $HOME/gtk/inst cd osx && /bin/bash ./build_env.sh + - name: Compress Environment + working-directory: / + shell: 'bash' + run: | + tar -czf $GITHUB_WORKSPACE/environment.tar.gz $HOME/gtk $HOME/.new_local + - name: Upload Environment uses: actions/upload-artifact@v3.1.3 with: name: Environment path: | - /Users/runner/gtk - /Users/runner/.new_local + $GITHUB_WORKSPACE/environment.tar.gz build-app: name: Build Application @@ -58,7 +63,15 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v2.1.1 + + - name: Extract Environment + working-directory: / + shell: 'bash' + run: | + tar -xzf $GITHUB_WORKSPACE/environment.tar.gz + rm -f $GITHUB_WORKSPACE/environment.tar.gz + - name: FIX gir run: | cd osx && /bin/bash ./fix_gir.sh @@ -69,4 +82,4 @@ jobs: - name: Install GTK Theme run: | - cd osx && /bin/bash ./build_gtk_theme.sh \ No newline at end of file + cd osx && /bin/bash ./build_gtk_theme.sh From f078d0c0d2d26a6f95179d47a54f5c2e94491c4d Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sun, 22 Oct 2023 19:59:26 -0700 Subject: [PATCH 17/43] Fix artifact paths - there's probably a cleaner way.. --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d7c6b7e12..98a3a6b71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,14 +47,14 @@ jobs: working-directory: / shell: 'bash' run: | - tar -czf $GITHUB_WORKSPACE/environment.tar.gz $HOME/gtk $HOME/.new_local + tar -czf /Users/runner/work/environment.tar.gz $HOME/gtk $HOME/.new_local - name: Upload Environment uses: actions/upload-artifact@v3.1.3 with: name: Environment path: | - $GITHUB_WORKSPACE/environment.tar.gz + /Users/runner/work/environment.tar.gz build-app: name: Build Application @@ -69,8 +69,8 @@ jobs: working-directory: / shell: 'bash' run: | - tar -xzf $GITHUB_WORKSPACE/environment.tar.gz - rm -f $GITHUB_WORKSPACE/environment.tar.gz + tar -xzf /Users/runner/work/environment.tar.gz + rm -f /Users/runner/work/environment.tar.gz - name: FIX gir run: | From 18d3f659eef16a0f793492eb0cd7308734381cdd Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sun, 22 Oct 2023 20:10:51 -0700 Subject: [PATCH 18/43] Where did it go?! --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98a3a6b71..e0dbd49ab 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,6 +69,7 @@ jobs: working-directory: / shell: 'bash' run: | + find /Users/runner | grep environment tar -xzf /Users/runner/work/environment.tar.gz rm -f /Users/runner/work/environment.tar.gz From 9e965f31df88436f49235c46041072e03e622967 Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sun, 22 Oct 2023 20:23:43 -0700 Subject: [PATCH 19/43] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0dbd49ab..4ea9dc127 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,10 +66,10 @@ jobs: - uses: actions/download-artifact@v2.1.1 - name: Extract Environment - working-directory: / shell: 'bash' run: | - find /Users/runner | grep environment + pwd + ls /Users/runner/work/meld/meld/Environment tar -xzf /Users/runner/work/environment.tar.gz rm -f /Users/runner/work/environment.tar.gz From 501c1f5b0466098e9a68ca33bf264c7c7fe07378 Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sun, 22 Oct 2023 20:48:23 -0700 Subject: [PATCH 20/43] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ea9dc127..8b15d1c34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,12 +66,12 @@ jobs: - uses: actions/download-artifact@v2.1.1 - name: Extract Environment + working-directory: / shell: 'bash' run: | pwd - ls /Users/runner/work/meld/meld/Environment - tar -xzf /Users/runner/work/environment.tar.gz - rm -f /Users/runner/work/environment.tar.gz + tar -xzf /Users/runner/work/meld/meld/Environment/environment.tar.gz + rm -f /Users/runner/work/meld/meld/Environment/environment.tar.gz - name: FIX gir run: | From b196867ace5346ee1763f25ae960cb9ff8040af6 Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Sun, 22 Oct 2023 21:01:04 -0700 Subject: [PATCH 21/43] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b15d1c34..3e0b260c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -70,8 +70,10 @@ jobs: shell: 'bash' run: | pwd + mkdir -p $HOME/Source tar -xzf /Users/runner/work/meld/meld/Environment/environment.tar.gz rm -f /Users/runner/work/meld/meld/Environment/environment.tar.gz + ls $HOME/gtk - name: FIX gir run: | From f91785aa1a5afaf1174c971527d165940cb91309 Mon Sep 17 00:00:00 2001 From: "Youssef A. Abukwaik" Date: Mon, 23 Oct 2023 07:34:59 -0700 Subject: [PATCH 22/43] Update main.yml --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3e0b260c9..9fa7a72ad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Homebrew & Various Tools run: | #/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool + brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool gnu-sed - name: Setup JHbuild run: | @@ -63,12 +63,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 - - uses: actions/download-artifact@v2.1.1 + - uses: actions/download-artifact@v3 - name: Extract Environment working-directory: / shell: 'bash' run: | + brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool gnu-sed pwd mkdir -p $HOME/Source tar -xzf /Users/runner/work/meld/meld/Environment/environment.tar.gz @@ -81,6 +82,7 @@ jobs: - name: Install Icon Theme run: | + alias sed=gsed cd osx && /bin/bash ./build_icon_theme.sh - name: Install GTK Theme From 2a246fe33e0977d2cf10bcbcfe19ba6737291e1e Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Mon, 23 Oct 2023 12:10:35 -0700 Subject: [PATCH 23/43] Use gsed instead of sed. Use find to ensure we're not passing gsed symlinks --- osx/build_icon_theme.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/osx/build_icon_theme.sh b/osx/build_icon_theme.sh index 324db809f..86b6e3820 100755 --- a/osx/build_icon_theme.sh +++ b/osx/build_icon_theme.sh @@ -43,7 +43,7 @@ mkdir -p cp -RP "${SRC_DIR}"/{COPYING,AUTHORS} ${THEME_DIR} cp -RP "${SRC_DIR}"/src/index.theme ${THEME_DIR} -#sed -i "s/WhiteSur/Meld-Icons/g" ${THEME_DIR}/index.theme +gsed -i "s/WhiteSur/Meld-Icons/g" ${THEME_DIR}/index.theme mkdir -p ${THEME_DIR}/status cp -RP "${SRC_DIR}"/src/{actions,animations,apps,categories,devices,emblems,mimes,places} ${THEME_DIR} @@ -76,17 +76,17 @@ if [[ ${color} == '-dark' ]]; then # fi # Change icon color for dark theme - sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,devices,places,status}/{16,22,24}/* || true - sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/actions/32/* || true - sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,apps,categories,emblems,devices,mimes,places,status}/symbolic/* "" || true - - cp -RP "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} ${THEME_DIR}/actions - cp -RP "${SRC_DIR}"/links/devices/{16,22,24,symbolic} ${THEME_DIR}/devices - cp -RP "${SRC_DIR}"/links/places/{16,22,24,symbolic} ${THEME_DIR}/places - cp -RP "${SRC_DIR}"/links/status/{16,22,24,symbolic} ${THEME_DIR}/status - cp -RP "${SRC_DIR}"/links/apps/symbolic ${THEME_DIR}/apps - cp -RP "${SRC_DIR}"/links/categories/symbolic ${THEME_DIR}/categories - cp -RP "${SRC_DIR}"/links/mimes/symbolic ${THEME_DIR}/mimes + find "${THEME_DIR}"/{actions,devices,places,status}/{16,22,24}/ -type f -exec gsed -i "s/#363636/#dedede/g" {} \; + find "${THEME_DIR}"/actions/32/ -type f -exec gsed -i "s/#363636/#dedede/g" {} \; + find "${THEME_DIR}"/{actions,apps,categories,emblems,devices,mimes,places,status}/symbolic -type f -exec gsed -i "s/#363636/#dedede/g" {} \; + + cp -RPf "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} ${THEME_DIR}/actions + cp -RPf "${SRC_DIR}"/links/devices/{16,22,24,symbolic} ${THEME_DIR}/devices + cp -RPf "${SRC_DIR}"/links/places/{16,22,24,symbolic} ${THEME_DIR}/places + cp -RPf "${SRC_DIR}"/links/status/{16,22,24,symbolic} ${THEME_DIR}/status + cp -RPf "${SRC_DIR}"/links/apps/symbolic ${THEME_DIR}/apps + cp -RPf "${SRC_DIR}"/links/categories/symbolic ${THEME_DIR}/categories + cp -RPf "${SRC_DIR}"/links/mimes/symbolic ${THEME_DIR}/mimes #TODO: Those are breaking.. Later though when we have some time.. # cd ${dest} From 69aa3396d5a110b3be2430ce8c6e35f756ee80d5 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Mon, 23 Oct 2023 12:37:15 -0700 Subject: [PATCH 24/43] One more try for gha symlinks --- osx/build_icon_theme.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/osx/build_icon_theme.sh b/osx/build_icon_theme.sh index 86b6e3820..788a65ae8 100755 --- a/osx/build_icon_theme.sh +++ b/osx/build_icon_theme.sh @@ -58,14 +58,14 @@ fi if [[ ${color} == '-dark' ]]; then mkdir -p ${THEME_DIR}/{apps,categories,emblems,devices,mimes,places,status} - cp -RP "${SRC_DIR}"/src/actions ${THEME_DIR} - cp -RP "${SRC_DIR}"/src/apps/symbolic ${THEME_DIR}/apps - cp -RP "${SRC_DIR}"/src/categories/symbolic ${THEME_DIR}/categories - cp -RP "${SRC_DIR}"/src/emblems/symbolic ${THEME_DIR}/emblems - cp -RP "${SRC_DIR}"/src/mimes/symbolic ${THEME_DIR}/mimes - cp -RP "${SRC_DIR}"/src/devices/{16,22,24,symbolic} ${THEME_DIR}/devices - cp -RP "${SRC_DIR}"/src/places/{16,22,24,symbolic} ${THEME_DIR}/places - cp -RP "${SRC_DIR}"/src/status/{16,22,24,symbolic} ${THEME_DIR}/status + cp -cRP "${SRC_DIR}"/src/actions ${THEME_DIR} + cp -cRP "${SRC_DIR}"/src/apps/symbolic ${THEME_DIR}/apps + cp -cRP "${SRC_DIR}"/src/categories/symbolic ${THEME_DIR}/categories + cp -cRP "${SRC_DIR}"/src/emblems/symbolic ${THEME_DIR}/emblems + cp -cRP "${SRC_DIR}"/src/mimes/symbolic ${THEME_DIR}/mimes + cp -cRP "${SRC_DIR}"/src/devices/{16,22,24,symbolic} ${THEME_DIR}/devices + cp -cRP "${SRC_DIR}"/src/places/{16,22,24,symbolic} ${THEME_DIR}/places + cp -cRP "${SRC_DIR}"/src/status/{16,22,24,symbolic} ${THEME_DIR}/status if [[ ${bold:-} == 'true' ]]; then cp -RP "${SRC_DIR}"/bold/* ${THEME_DIR} @@ -80,13 +80,13 @@ if [[ ${color} == '-dark' ]]; then find "${THEME_DIR}"/actions/32/ -type f -exec gsed -i "s/#363636/#dedede/g" {} \; find "${THEME_DIR}"/{actions,apps,categories,emblems,devices,mimes,places,status}/symbolic -type f -exec gsed -i "s/#363636/#dedede/g" {} \; - cp -RPf "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} ${THEME_DIR}/actions - cp -RPf "${SRC_DIR}"/links/devices/{16,22,24,symbolic} ${THEME_DIR}/devices - cp -RPf "${SRC_DIR}"/links/places/{16,22,24,symbolic} ${THEME_DIR}/places - cp -RPf "${SRC_DIR}"/links/status/{16,22,24,symbolic} ${THEME_DIR}/status - cp -RPf "${SRC_DIR}"/links/apps/symbolic ${THEME_DIR}/apps - cp -RPf "${SRC_DIR}"/links/categories/symbolic ${THEME_DIR}/categories - cp -RPf "${SRC_DIR}"/links/mimes/symbolic ${THEME_DIR}/mimes + cp -cRPf "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} ${THEME_DIR}/actions + cp -cRPf "${SRC_DIR}"/links/devices/{16,22,24,symbolic} ${THEME_DIR}/devices + cp -cRPf "${SRC_DIR}"/links/places/{16,22,24,symbolic} ${THEME_DIR}/places + cp -cRPf "${SRC_DIR}"/links/status/{16,22,24,symbolic} ${THEME_DIR}/status + cp -cRPf "${SRC_DIR}"/links/apps/symbolic ${THEME_DIR}/apps + cp -cRPf "${SRC_DIR}"/links/categories/symbolic ${THEME_DIR}/categories + cp -cRPf "${SRC_DIR}"/links/mimes/symbolic ${THEME_DIR}/mimes #TODO: Those are breaking.. Later though when we have some time.. # cd ${dest} From 82945f294e285c83cc6fa7745ee7682d14758a33 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Mon, 23 Oct 2023 13:47:22 -0700 Subject: [PATCH 25/43] One more try for gha symlinks --- osx/build_icon_theme.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/osx/build_icon_theme.sh b/osx/build_icon_theme.sh index 788a65ae8..bdb88c55d 100755 --- a/osx/build_icon_theme.sh +++ b/osx/build_icon_theme.sh @@ -80,13 +80,13 @@ if [[ ${color} == '-dark' ]]; then find "${THEME_DIR}"/actions/32/ -type f -exec gsed -i "s/#363636/#dedede/g" {} \; find "${THEME_DIR}"/{actions,apps,categories,emblems,devices,mimes,places,status}/symbolic -type f -exec gsed -i "s/#363636/#dedede/g" {} \; - cp -cRPf "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} ${THEME_DIR}/actions - cp -cRPf "${SRC_DIR}"/links/devices/{16,22,24,symbolic} ${THEME_DIR}/devices - cp -cRPf "${SRC_DIR}"/links/places/{16,22,24,symbolic} ${THEME_DIR}/places - cp -cRPf "${SRC_DIR}"/links/status/{16,22,24,symbolic} ${THEME_DIR}/status - cp -cRPf "${SRC_DIR}"/links/apps/symbolic ${THEME_DIR}/apps - cp -cRPf "${SRC_DIR}"/links/categories/symbolic ${THEME_DIR}/categories - cp -cRPf "${SRC_DIR}"/links/mimes/symbolic ${THEME_DIR}/mimes + #cp -cRPf "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} ${THEME_DIR}/actions + #cp -cRPf "${SRC_DIR}"/links/devices/{16,22,24,symbolic} ${THEME_DIR}/devices + #cp -cRPf "${SRC_DIR}"/links/places/{16,22,24,symbolic} ${THEME_DIR}/places + #cp -cRPf "${SRC_DIR}"/links/status/{16,22,24,symbolic} ${THEME_DIR}/status + #cp -cRPf "${SRC_DIR}"/links/apps/symbolic ${THEME_DIR}/apps + #cp -cRPf "${SRC_DIR}"/links/categories/symbolic ${THEME_DIR}/categories + #cp -cRPf "${SRC_DIR}"/links/mimes/symbolic ${THEME_DIR}/mimes #TODO: Those are breaking.. Later though when we have some time.. # cd ${dest} From 4427e9b14e6eded2922781dd72ddf7ae0c6ecf14 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 29 Oct 2023 19:07:40 -0700 Subject: [PATCH 26/43] Test building --- .github/workflows/main.yml | 6 ++- osx/build_env.sh | 14 ++---- osx/jhbuildrc-custom | 98 ++++++++++++++++++++++++-------------- 3 files changed, 71 insertions(+), 47 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9fa7a72ad..49794b4d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,7 +69,7 @@ jobs: working-directory: / shell: 'bash' run: | - brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool gnu-sed + brew install git ccache autoconf libtool automake pkg-config sassc optipng python bison flex cmake itstool gnu-sed intltool pwd mkdir -p $HOME/Source tar -xzf /Users/runner/work/meld/meld/Environment/environment.tar.gz @@ -88,3 +88,7 @@ jobs: - name: Install GTK Theme run: | cd osx && /bin/bash ./build_gtk_theme.sh + + - name: Package + run: | + ~/.new_local/bin/jhbuild run osx/build_app.sh diff --git a/osx/build_env.sh b/osx/build_env.sh index e970f62f5..8084e9d2c 100755 --- a/osx/build_env.sh +++ b/osx/build_env.sh @@ -30,22 +30,16 @@ ln -sf /usr/local/opt/bison/bin/bison ~/gtk/inst/bin ln -sf /usr/local/bin/itstool ~/gtk/inst/bin ln -sf /usr/local/bin/xz ~/gtk/inst/bin -#brew install python3 ccache -#brew tap homebrew/cask -#brew cask install inkscape -#brew install sassc -#brew install optipng -#brew install imagemagick -#brew install librsvg - pushd . > /dev/null -#jhbuild bootstrap export PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:$HOME/gtk/inst/share/pkgconfig -#export PKG_CONFIG_SYSROOT_DIR=$HOME/gtk/inst +export PKG_CONFIG_LIBDIR==$HOME/gtk/inst/lib/pkgconfig export XDG_DATA_DIRS=$HOME/gtk/inst/share jhbuild buildone libffi zlib + +#jhbuild bootstrap || true + jhbuild buildone python3 #PYTHON=$HOME/gtk/inst/bin/python3 PYTHON_CFLAGS=-I$HOME/gtk/inst/include/python3.11 jhbuild buildone libxml2 diff --git a/osx/jhbuildrc-custom b/osx/jhbuildrc-custom index 4a47e2cc9..cb671c5cb 100644 --- a/osx/jhbuildrc-custom +++ b/osx/jhbuildrc-custom @@ -6,22 +6,45 @@ print("Using Meld for OSX customization") import os.path from os import path +# Reference: https://gnome.pages.gitlab.gnome.org/jhbuild/config-reference.html + + #prefix = "/tmp/meldroot" checkoutroot = os.path.expanduser("~/Source/gtk") #setup_sdk(target='native', sdk_version=None, architectures=["x86_64"]) +setup_sdk() +setup_release() +os.environ['CONFIG_SHELL'] = '/bin/bash' _gtk_osx_use_jhbuild_python = False if path.exists("/usr/local/bin/ccache"): - print("Using ccache") - os.environ["CC"] = "/usr/local/bin/ccache /usr/bin/clang" - os.environ["CXX"] = "/usr/local/bin/ccache /usr/bin/clang++" + print("Using ccache") + os.environ["CC"] = "/usr/local/bin/ccache /usr/bin/clang" + os.environ["CXX"] = "/usr/local/bin/ccache /usr/bin/clang++" else: - print("Not using ccache") - os.environ["CC"] = "/usr/bin/clang" - os.environ["CXX"] = "/usr/bin/clang++" + print("Not using ccache") + os.environ["CC"] = "/usr/bin/clang" + os.environ["CXX"] = "/usr/bin/clang++" -environ_prepend('CXXFLAGS', "-std=c++11 -stdlib=libc++") +environ_prepend('CXXFLAGS', '-std=c++11 -stdlib=libc++') +# From bootstrap (we only want gettext, xz) +skip.append('m4') +skip.append('m4-common') +skip.append('libxml2') +skip.append("cmake") +skip.append("autoconf-archive") +skip.append("libtool") +skip.append("autoconf") +skip.append("automake") +skip.append("pkg-config") +skip.append("bison") +skip.append("flex") +skip.append("gtk-osx-docbook") +skip.append("gnumake") +skip.append("intltool") + +# From modulesets skip.append("libiconv") skip.append("icu") skip.append("cups") @@ -29,8 +52,7 @@ skip.append("gnome-themes-standard") skip.append("berkeleydb") skip.append("berkeleydb-nonsrctree") skip.append("gnome-user-docs") -skip.append("cmake") -skip.append("openssl") # We'll install it manually +skip.append("openssl") skip.append("python") skip.append("python3") # We'll install it manually skip.append("itstool") @@ -43,8 +65,8 @@ skip.append('mozilla') skip.append('pulseaudio') skip.append('gtk-mac-integration') skip.append('gtk-mac-integration-python') -#skip.append('adwaita-icon-theme') -skip.append('gtk-4') # gtksourceview4 attempts to grab gtk-4 +skip.append('adwaita-icon-theme') +skip.append('gtk-4') # only for gtksourceview4 #sourceview4 # graphene @@ -78,35 +100,36 @@ modules = [ "adwaita-icon-theme" ] -global autogenargs -autogenargs = autogenargs + ' --disable-documentation --disable-docs --enable-introspection --enable-gtk-doc=no --enable-gtk-doc-html=no --enable-gtk-doc-pdf=no' -# autogenargs += ' --cache-file=' + checkoutroot + '/autoconf-cache ' +# global autogenargs +# autogenargs = autogenargs + ' --disable-documentation --disable-docs --enable-introspection --enable-gtk-doc=no --enable-gtk-doc-html=no --enable-gtk-doc-pdf=no' # Temporarily until modulesets are fixed... branches["openssl"] = "https://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1c.tar.gz" -module_autogenargs['gettext-tools'] = 'CFLAGS=-O' -module_autogenargs['gettext'] = '--disable-rpath --disable-option-checking --disable-nls --enable-relocatable --disable-java --disable-native-java --disable-curses --without-emacs --without-bzip2 CFLAGS=-O2' -module_autogenargs['yelp'] = '--disable-Werror' -module_autogenargs['zlib']= ''# + autogenargs -module_autogenargs['librsvg'] = '--disable-Bsymbolic --enable-pixbuf-loader --enable-shared=yes --enable-static=yes ' + autogenargs -module_autogenargs['cairo'] = '--disable-full-testing --disable-trace --enable-ft --enable-fc --enable-quartz-image --enable-quartz-font --enable-quartz --enable-png --enable-svg --enable-tee --enable-xml --enable-gobject --enable-pthread --disable-valgrind --disable-gtk-doc --disable-gtk-doc-html --disable-dependency-tracking ' + autogenargs -module_autogenargs['gobject-introspection']= '--with-cairo=yes ' + autogenargs -module_autogenargs['tango-icon-theme']='--disable-nls --disable-icon-framing ' + autogenargs -#module_autogenargs['gtk+-3.0'] = '--enable-quartz-backend --enable-quartz-relocation --disable-Bsymbolic --disable-cloudprint --with-included-immodules=am-et,cedilla,cyrillic-translit,inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr --disable-modules --disable-rpath --disable-cups --disable-papi --disable-cloudprint --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --enable-debug=no ' + autogenargs #--disable-schemas-compile ? -module_autogenargs['harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs -module_autogenargs['root-harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu ' + autogenargs -module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts ' + autogenargs -module_autogenargs['python3'] = '--enable-optimizations --with-system-expat --disable-ipv6 --with-ensurepip=yes --with-system-expat ' -module_autogenargs['libxml2'] = '--with-zlib --enable-ipv6=no ' - -module_mesonargs['atk'] = '--buildtype release --optimization 3 -Ddocs=false -Dintrospection=true' -module_mesonargs['gdk-pixbuf'] = '--buildtype release --optimization 3 -Dbuiltin_loaders=all -Drelocatable=true -Ddocs=false' -module_mesonargs['glib'] = '--buildtype release --optimization 3 -Dbsymbolic_functions=false -Dgtk_doc=false -Db_bitcode=true -Db_ndebug=true' -module_mesonargs['pango'] = '--buildtype release --optimization 3 -Dintrospection=enabled' -module_mesonargs['pygobject3'] = '--buildtype release --optimization 3 -Dtests=false -Dpycairo=enabled' -module_mesonargs['gtk+-3.0'] = '--buildtype release --optimization 3 -Dx11_backend=false -Dwayland_backend=false -Dbroadway_backend=false -Dwin32_backend=false -Dquartz_backend=true -Dxinerama=no -Dcloudproviders=false -Dprofiler=false -Dtracker3=false -Dcolord=no -Dgtk_doc=false -Dman=false -Dintrospection=true -Ddemos=false -Dexamples=false -Dtests=false -Dinstalled_tests=false -Dbuiltin_immodules=yes' -module_mesonargs['gtksourceview4'] = '--buildtype release --optimization 3 -Dvapi=false' +module_extra_env['gettext-tools'] = 'CC=/usr/bin/clang CFLAGS=-O LDFLAGS=-L/usr/lib' +module_autogenargs['gettext'] = ' --disable-rpath --enable-relocatable --disable-c++ --disable-java --disable-native-java --disable-curses --without-emacs --without-bzip2 --disable-nls ' + +#module_autogenargs['zlib'] = '' +module_autogenargs['yelp'] = '--disable-Werror' +module_autogenargs['librsvg'] = '--disable-Bsymbolic --enable-pixbuf-loader --enable-shared=yes --enable-static=yes '# + autogenargs +module_autogenargs['gobject-introspection'] = '--with-cairo=yes '# + autogenargs +module_autogenargs['tango-icon-theme'] ='--disable-nls --disable-icon-framing '# + autogenargs +module_autogenargs['harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu '# + autogenargs +module_autogenargs['root-harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu '# + autogenargs +module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts '# + autogenargs +module_autogenargs['python3'] = '--enable-optimizations --disable-ipv6 --with-ensurepip=yes --with-system-expat --without-readline --with-pkg-config --disable-test-modules ' +module_extra_env['python3'] = 'LIBS=""' + +module_autogenargs['libxml2'] = '--with-zlib --enable-ipv6=no ' +module_autogenargs['cairo'] = '--disable-full-testing --disable-trace --enable-ft --enable-fc --enable-quartz-image --enable-quartz-font --enable-quartz --enable-png --enable-svg --enable-tee --enable-xml --enable-gobject --enable-pthread --disable-valgrind --disable-gtk-doc --disable-gtk-doc-html --disable-dependency-tracking '# + autogenargs + +module_mesonargs['atk'] = '--buildtype release --optimization 3 -Ddocs=false -Dintrospection=true' +module_mesonargs['gdk-pixbuf'] = '--buildtype release --optimization 3 -Dbuiltin_loaders=all -Drelocatable=true -Ddocs=false' +module_mesonargs['glib'] = '--buildtype release --optimization 3 -Dbsymbolic_functions=false -Dgtk_doc=false -Db_bitcode=true -Db_ndebug=true' +module_mesonargs['pango'] = '--buildtype release --optimization 3 -Dintrospection=enabled' +module_mesonargs['pygobject3'] = '--buildtype release --optimization 3 -Dtests=false -Dpycairo=enabled' +module_mesonargs['gtksourceview4'] = '--buildtype release --optimization 3 -Dvapi=false' +module_mesonargs['gtk+-3.0'] = '--buildtype release --optimization 3 -Dx11_backend=false -Dwayland_backend=false -Dbroadway_backend=false -Dwin32_backend=false -Dquartz_backend=true -Dxinerama=no -Dcloudproviders=false -Dprofiler=false -Dtracker3=false -Dcolord=no -Dgtk_doc=false -Dman=false -Dintrospection=true -Ddemos=false -Dexamples=false -Dtests=false -Dinstalled_tests=false -Dbuiltin_immodules=yes' # Can be usefull when tweaking modulesets to avoid jhbuild overwriting: @@ -115,3 +138,6 @@ module_mesonargs['gtksourceview4'] = '--buildtype release --optimization 3 -Dva # quiet_mode=True # Don't respect suggests ignore_suggests = True +exit_on_error = True # For CI +interact = False # For CI +shallow_clone = True \ No newline at end of file From e6aa49d1898c68239a3cc722e63b8f29052aa093 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 29 Oct 2023 19:22:39 -0700 Subject: [PATCH 27/43] Test building --- osx/jhbuildrc-custom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osx/jhbuildrc-custom b/osx/jhbuildrc-custom index cb671c5cb..8cebf057b 100644 --- a/osx/jhbuildrc-custom +++ b/osx/jhbuildrc-custom @@ -12,7 +12,7 @@ from os import path #prefix = "/tmp/meldroot" checkoutroot = os.path.expanduser("~/Source/gtk") #setup_sdk(target='native', sdk_version=None, architectures=["x86_64"]) -setup_sdk() +#setup_sdk() setup_release() os.environ['CONFIG_SHELL'] = '/bin/bash' _gtk_osx_use_jhbuild_python = False From a112f26b9e249d2fef9ee31332ffc9cbdca612bb Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 4 Nov 2023 15:23:45 -0700 Subject: [PATCH 28/43] Update build environment --- osx/build_env.sh | 71 ++++++++++++++++++++++++++++++++++++++++++-- osx/jhbuildrc-custom | 43 ++++++++------------------- 2 files changed, 81 insertions(+), 33 deletions(-) diff --git a/osx/build_env.sh b/osx/build_env.sh index 8084e9d2c..cd465526e 100755 --- a/osx/build_env.sh +++ b/osx/build_env.sh @@ -36,11 +36,71 @@ export PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:$HOME/gtk/inst/share/pkgconf export PKG_CONFIG_LIBDIR==$HOME/gtk/inst/lib/pkgconfig export XDG_DATA_DIRS=$HOME/gtk/inst/share +[ -d $HOME/gtk/inst/lib/gettext ] || \ +( + cd $HOME/Source + rm -fr libiconv-1.17 libiconv-1.17.tar.gz || true + curl -OL https://ftp.gnu.org/gnu/libiconv/libiconv-1.17.tar.gz + tar xf libiconv-1.17.tar.gz + cd libiconv-1.17 + jhbuild run ./configure --disable-debug \ + --disable-dependency-tracking \ + --enable-extra-encodings \ + --enable-static \ + --disable-shared \ + --prefix=$HOME/gtk/inst + jhbuild run make -j8 + jhbuild run make install + + cd $HOME/Source/ + rm -fr gettext-0.22.3 gettext-0.22.3.tar.xz || true + curl -OL https://ftp.gnu.org/gnu/gettext/gettext-0.22.3.tar.xz + tar xf gettext-0.22.3.tar.xz + cd gettext-0.22.3 + jhbuild run ./configure --without-emacs \ + --disable-silent-rules \ + --disable-java \ + --disable-native-java \ + --disable-libasprintf \ + --disable-csharp \ + --with-included-glib \ + --with-included-libcroco \ + --with-included-gettext \ + --with-included-libunistring \ + --without-git \ + --without-cvs \ + --without-xz \ + --prefix=$HOME/gtk/inst + jhbuild run make -j8 + jhbuild run make install + + cd $HOME/Source/libiconv-1.17 +) + +# jhbuild bootstrap jhbuild buildone libffi zlib - -#jhbuild bootstrap || true +# For later - perhaps make python use this library instead. +# (cd $HOME/Source/ && rm -fr tinygettext || true) +# (cd $HOME/Source/ && git clone https://github.com/tinygettext/tinygettext) +# (cd $HOME/Source/tinygettext/external && rm -fr tinycmmc) +# (cd $HOME/Source/tinygettext/external && git clone https://github.com/Grumbel/tinycmmc) +# (cd $HOME/Source/tinygettext && mkdir -p build && cd build && cmake .. && make -j8 && cmake --install . --prefix $HOME/gtk/inst) + +# For now: stub gettext +# ( +# cd $HOME/Source/ +# rm -fr gettext-tiny || true +# git clone https://github.com/sabotage-linux/gettext-tiny +# cd $HOME/Source/gettext-tiny +# #gsed -i 's=/usr/local=/=g' Makefile; +# make LIBINTL=NOOP DESTDIR=$HOME/gtk/inst prefix=/ install +# #DESTDIR=$HOME/gtk/inst make install +# ) jhbuild buildone python3 + + + #PYTHON=$HOME/gtk/inst/bin/python3 PYTHON_CFLAGS=-I$HOME/gtk/inst/include/python3.11 jhbuild buildone libxml2 #(cd $HOME/gtk/inst/bin && touch itstool && chmod +x itstool) @@ -48,7 +108,12 @@ jhbuild buildone libxml2 PY_SITE_PACKAGES=$(~/gtk/inst/bin/python3 -c 'import site; print(site.getsitepackages()[0], end="")') /usr/local/bin/pip3 install six pygments --target $PY_SITE_PACKAGES -PYTHON=$HOME/gtk/inst/bin/python3 jhbuild build --nodeps --ignore-suggests #-s freetype-no-harfbuzz +# Build all the way up to freetype, then fix its pkg-config +PYTHON=$HOME/gtk/inst/bin/python3 jhbuild build freetype +gsed -i '/^Requires.private.*/d' $HOME/gtk/inst/lib/pkgconfig/freetype2.pc + +# Continue +PYTHON=$HOME/gtk/inst/bin/python3 jhbuild build #-s freetype-no-harfbuzz /usr/local/bin/pip3 install pyobjc-core pyobjc-framework-Cocoa py2app --target $PY_SITE_PACKAGES cat $HOME/gtk/inst/lib/pkgconfig/epoxy.pc | grep -v x11 > $HOME/gtk/inst/lib/pkgconfig/epoxy.pc.1 diff --git a/osx/jhbuildrc-custom b/osx/jhbuildrc-custom index 8cebf057b..4120ce413 100644 --- a/osx/jhbuildrc-custom +++ b/osx/jhbuildrc-custom @@ -11,11 +11,10 @@ from os import path #prefix = "/tmp/meldroot" checkoutroot = os.path.expanduser("~/Source/gtk") -#setup_sdk(target='native', sdk_version=None, architectures=["x86_64"]) -#setup_sdk() +setup_sdk() setup_release() os.environ['CONFIG_SHELL'] = '/bin/bash' -_gtk_osx_use_jhbuild_python = False +_gtk_osx_use_jhbuild_python = True if path.exists("/usr/local/bin/ccache"): print("Using ccache") @@ -28,24 +27,8 @@ else: environ_prepend('CXXFLAGS', '-std=c++11 -stdlib=libc++') -# From bootstrap (we only want gettext, xz) -skip.append('m4') -skip.append('m4-common') -skip.append('libxml2') -skip.append("cmake") -skip.append("autoconf-archive") -skip.append("libtool") -skip.append("autoconf") -skip.append("automake") -skip.append("pkg-config") -skip.append("bison") -skip.append("flex") -skip.append("gtk-osx-docbook") -skip.append("gnumake") -skip.append("intltool") # From modulesets -skip.append("libiconv") skip.append("icu") skip.append("cups") skip.append("gnome-themes-standard") @@ -56,6 +39,7 @@ skip.append("openssl") skip.append("python") skip.append("python3") # We'll install it manually skip.append("itstool") +skip.append("libtiff") skip.append("libxslt") skip.append("yelp-xsl") skip.append("yelp-tools") @@ -63,8 +47,8 @@ skip.append("pygobject") skip.append("xorg-util-macros") skip.append('mozilla') skip.append('pulseaudio') -skip.append('gtk-mac-integration') -skip.append('gtk-mac-integration-python') +#skip.append('gtk-mac-integration') +#skip.append('gtk-mac-integration-python') skip.append('adwaita-icon-theme') skip.append('gtk-4') # only for gtksourceview4 @@ -86,7 +70,7 @@ skip.append('gtk-4') # only for gtksourceview4 modules = [ "zlib", "libjpeg", - "libtiff", + #"libtiff", "libpng", "glib", "fribidi", @@ -106,8 +90,8 @@ modules = [ # Temporarily until modulesets are fixed... branches["openssl"] = "https://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1c.tar.gz" -module_extra_env['gettext-tools'] = 'CC=/usr/bin/clang CFLAGS=-O LDFLAGS=-L/usr/lib' -module_autogenargs['gettext'] = ' --disable-rpath --enable-relocatable --disable-c++ --disable-java --disable-native-java --disable-curses --without-emacs --without-bzip2 --disable-nls ' +#module_extra_env['gettext-tools'] = 'CC=/usr/bin/clang CFLAGS=-O LDFLAGS=-L/usr/lib' +#module_autogenargs['gettext'] = ' --disable-rpath --enable-relocatable --disable-c++ --disable-java --disable-native-java --disable-curses --without-emacs --without-bzip2' #module_autogenargs['zlib'] = '' module_autogenargs['yelp'] = '--disable-Werror' @@ -116,9 +100,8 @@ module_autogenargs['gobject-introspection'] = '--with-cairo=yes '# + autogenargs module_autogenargs['tango-icon-theme'] ='--disable-nls --disable-icon-framing '# + autogenargs module_autogenargs['harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu '# + autogenargs module_autogenargs['root-harfbuzz'] = '--disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --with-coretext --without-icu '# + autogenargs -module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts '# + autogenargs -module_autogenargs['python3'] = '--enable-optimizations --disable-ipv6 --with-ensurepip=yes --with-system-expat --without-readline --with-pkg-config --disable-test-modules ' -module_extra_env['python3'] = 'LIBS=""' +module_autogenargs['fontconfig'] = '--with-cache-dir="~/Library/Caches/org.gnome.meld.fontconfig" --with-default-fonts=/System/Library/Fonts --with-add-fonts=/Library/Fonts,/Network/Library/Fonts,/System/Library/Fonts --disable-cache-build --disable-docs --disable-dependency-tracking' +#module_autogenargs['python3'] = '--enable-optimizations --disable-ipv6 --with-ensurepip=yes --with-system-expat --without-readline --with-pkg-config --disable-test-modules ' module_autogenargs['libxml2'] = '--with-zlib --enable-ipv6=no ' module_autogenargs['cairo'] = '--disable-full-testing --disable-trace --enable-ft --enable-fc --enable-quartz-image --enable-quartz-font --enable-quartz --enable-png --enable-svg --enable-tee --enable-xml --enable-gobject --enable-pthread --disable-valgrind --disable-gtk-doc --disable-gtk-doc-html --disable-dependency-tracking '# + autogenargs @@ -137,7 +120,7 @@ module_mesonargs['gtk+-3.0'] = '--buildtype release --optimization 3 -Dx11 # nobuild=True # Download only # quiet_mode=True # Don't respect suggests -ignore_suggests = True -exit_on_error = True # For CI -interact = False # For CI +#ignore_suggests = True +#exit_on_error = True # For CI +#interact = False # For CI shallow_clone = True \ No newline at end of file From 7ba46ea55f505e01b067e34c26ed366aa72291ef Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 4 Nov 2023 16:45:44 -0700 Subject: [PATCH 29/43] Stop on error --- osx/jhbuildrc-custom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osx/jhbuildrc-custom b/osx/jhbuildrc-custom index 4120ce413..509f4f292 100644 --- a/osx/jhbuildrc-custom +++ b/osx/jhbuildrc-custom @@ -121,6 +121,6 @@ module_mesonargs['gtk+-3.0'] = '--buildtype release --optimization 3 -Dx11 # quiet_mode=True # Don't respect suggests #ignore_suggests = True -#exit_on_error = True # For CI -#interact = False # For CI +exit_on_error = True # For CI +interact = False # For CI shallow_clone = True \ No newline at end of file From 75bae823b75a49e719996309ae4301a83fab3ab7 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 4 Nov 2023 19:59:37 -0700 Subject: [PATCH 30/43] Build should complete on GH - still broken, though --- .github/workflows/main.yml | 12 +++++++++++ osx/build_app.sh | 31 ++++++++++++--------------- setup.cfg | 4 ++-- setup_py2app.py | 44 ++++++++++++++++++++------------------ 4 files changed, 51 insertions(+), 40 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 49794b4d6..0a73015ba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,6 +65,11 @@ jobs: - uses: actions/checkout@v3 - uses: actions/download-artifact@v3 + - name: Setup JHbuild + run: | + ln -sf $PWD/osx/jhbuildrc-custom $HOME/.jhbuildrc-custom + /bin/bash -c "$(curl -fsSL https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/gtk-osx-setup.sh)" + - name: Extract Environment working-directory: / shell: 'bash' @@ -92,3 +97,10 @@ jobs: - name: Package run: | ~/.new_local/bin/jhbuild run osx/build_app.sh + + - name: Upload Artifact + uses: actions/upload-artifact@v3.1.3 + with: + name: Environment + path: | + *.dmg diff --git a/osx/build_app.sh b/osx/build_app.sh index a140cbf54..3c64cb98a 100755 --- a/osx/build_app.sh +++ b/osx/build_app.sh @@ -22,6 +22,7 @@ INSTROOT="$HOME/gtk/inst/" CODE_SIGN_ID="" INSTALLER_CODE_SIGN_ID="" + # TODO: Move this to build_env.sh #icon_sizes=( "16" "22" "24" "32" "48" "64" "72" "96" "128" "256" "512" ) #for icon_size in ${icon_sizes[@]}; do @@ -30,29 +31,24 @@ INSTALLER_CODE_SIGN_ID="" # -o ${INSTROOT}/share/icons/hicolor/${icon_size}x${icon_size}/apps/org.gnome.Meld.png #done; #(cd ${INSTROOT}/share/icons/hicolor/ && gtk-update-icon-cache -fqt .) +# intltool cp meld/conf.py.in meld/conf.py.in.orig cp osx/conf.py meld/conf.py -python3 -c "import sys; print('\n'.join(sys.path))" +${INSTROOT}/bin/python3 -c "import sys; print('\n'.join(sys.path))" glib-compile-schemas data -python3 setup_py2app.py build -python3 setup_py2app.py py2app --use-faulthandler +${INSTROOT}/bin/python3 setup_py2app.py build +${INSTROOT}/bin/python3 setup_py2app.py py2app --use-faulthandler mv meld/conf.py.in.orig meld/conf.py.in rm meld/conf.py -# py2app copies all Python framework to target.. -# too busy to figure out how to solve this at the moment. Let's just -# delete the files after they've been copied. -# rm -fr $FRAMEWORKS/Python.framework - # icon themes -rsync -r -t --ignore-existing ${INSTROOT}/share/icons/Adwaita ${RES}/share/icons +rsync -r -t --ignore-existing ${INSTROOT}/share/icons/Meld-WhiteSur-Icons ${RES}/share/icons rsync -r -t --ignore-existing ${INSTROOT}/share/icons/hicolor ${RES}/share/icons -rsync -r -t --ignore-existing ${INSTROOT}/share/icons/Os-Catalina-icons ${RES}/share/icons -(cd ${RES}/share/icons && ln -sf Os-Catalina-icons MeldIcons) +(cd ${RES}/share/icons && ln -sf Meld-WhiteSur-Icons MeldIcons) # glib schemas rsync -r -t $INSTROOT/share/glib-2.0/schemas $RES/share/glib-2.0 @@ -74,10 +70,11 @@ gdk-pixbuf-query-loaders | sed s=\".*/lib/gdk-pixbuf-2.0=\"@executable_path/\.\ mkdir -p $RES/share/themes rsync -r -t $INSTROOT/share/themes/Default/ $RES/share/themes/Default rsync -r -t $INSTROOT/share/themes/Mac/ $RES/share/themes/Mac +rsync -r -t $INSTROOT/share/themes/WhiteSur-Dark-solid/ $RES/share/themes/WhiteSur-Dark-solid +rsync -r -t $INSTROOT/share/themes/WhiteSur-Light-solid/ $RES/share/themes/WhiteSur-Light-solid rsync -r -t $INSTROOT/share/gtksourceview-4 $RES/share -mkdir -p $RES/share/themes/Meld-Os-Catalina-gtk/gtk-3.0 -rsync -r -t --ignore-existing $INSTROOT/share/themes/Meld-Os-Catalina-gtk/gtk-3.0 $RES/share/themes/Meld-Os-Catalina-gtk -cp $INSTROOT/share/themes/Mac/gtk-3.0/gtk-keys.css $RES/share/themes/Meld-Os-Catalina-gtk/gtk-3.0/gtk-keys.css +cp $INSTROOT/share/themes/Mac/gtk-3.0/gtk-keys.css $RES/share/themes/WhiteSur-Light-solid/gtk-3.0/gtk-keys.css +cp $INSTROOT/share/themes/Mac/gtk-3.0/gtk-keys.css $RES/share/themes/WhiteSur-Dark-solid/gtk-3.0/gtk-keys.css # meld specific resources mkdir -p $RES/share/meld @@ -99,7 +96,7 @@ rsync -r -t data/icons/* $RES/share/icons # rm -fr ${RES}/share/icons/Adwaita/${icon_size}x${icon_size}/categories/ || true # rm -fr ${RES}/share/icons/Adwaita/${icon_size}x${icon_size}/status/ || true # done; -(cd $RES/share/icons/Adwaita && gtk-update-icon-cache -fqt .) +# (cd $RES/share/icons/Adwaita && gtk-update-icon-cache -fqt .) # update icon cache for hicolor (cd $RES/share/icons/hicolor && gtk-update-icon-cache -fqt .) @@ -123,7 +120,6 @@ rsync -r -t $INSTROOT/lib/gobject-introspection $RES/lib 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-script-interpreter.2.dylib $FRAMEWORKS/libcairo-script-interpreter.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 @@ -133,7 +129,7 @@ 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.2.dylib $FRAMEWORKS/libgtkmacintegration-gtk3.2.dylib +rsync -t $INSTROOT/lib/libgtkmacintegration-gtk3.4.dylib $FRAMEWORKS/libgtkmacintegration-gtk3.4.dylib # rename script, use wrapper #mv $MAIN/Contents/MacOS/Meld $MAIN/Contents/MacOS/Meld-bin @@ -246,6 +242,7 @@ else #spctl -a -t exec -vv "meldmerge.dmg" && dmg_signed=1 fi +exit # Cleanup mkdir -p osx/Archives diff --git a/setup.cfg b/setup.cfg index b403a4ab6..53274e55c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,12 +1,12 @@ [py2app] app = ['bin/meld'] -#arch = i386 +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 +#frameworks = CoreFoundation, Foundation, Python argv_emulation = True #resources = share/themes/Mac diff --git a/setup_py2app.py b/setup_py2app.py index b029914c0..49fb00c72 100644 --- a/setup_py2app.py +++ b/setup_py2app.py @@ -38,7 +38,7 @@ 'CFBundleVersion': VERSION_STRING, 'LSPrefersPPC': False, 'LSArchitecturePriority': 'x86_64', - 'NSHumanReadableCopyright': u'Copyright © 2020', + 'NSHumanReadableCopyright': u'Copyright © 2023', 'CFBundleDisplayName': 'Meld', 'CFBundleName': 'Meld', 'NSHighResolutionCapable': True, @@ -113,28 +113,30 @@ setup_requires=["py2app"], options={'py2app': { 'includes': [ 'cairo', 'gi', 'weakref', 'encodings' ], - 'excludes': [ 'ctypes' ], + 'excludes': [ 'ctypes', 'tkinter' ], 'dylib_excludes': [ 'Python' ], 'frameworks': - [ 'libpython3.6m.dylib', - 'libatk-1.0.0.dylib', - 'libcairo-gobject.2.dylib', - 'libcairo-script-interpreter.2.dylib', - 'libcairo.2.dylib', - 'libgio-2.0.0.dylib', - 'libgirepository-1.0.1.dylib', - 'libglib-2.0.0.dylib', - 'libgmodule-2.0.0.dylib', - 'libgobject-2.0.0.dylib', - 'libgtk-3.0.dylib', - 'libgtkmacintegration-gtk3.2.dylib', - 'libgtksourceview-4.dylib', - 'libgtksourceview-4.0.dylib', - 'libharfbuzz.0.dylib', - 'libpango-1.0.0.dylib', - 'libpangocairo-1.0.0.dylib', - 'libpangoft2-1.0.0.dylib', - 'librsvg-2.2.dylib' ], + [ + # 'libpython3.11.dylib', + # 'libatk-1.0.0.dylib', + # 'libcairo-gobject.2.dylib', + # 'libcairo-script-interpreter.2.dylib', + # 'libcairo.2.dylib', + # 'libgio-2.0.0.dylib', + # 'libgirepository-1.0.1.dylib', + # 'libglib-2.0.0.dylib', + # 'libgmodule-2.0.0.dylib', + # 'libgobject-2.0.0.dylib', + # 'libgtk-3.0.dylib', + # 'libgtkmacintegration-gtk3.4.dylib', + # 'libgtksourceview-4.dylib', + # 'libgtksourceview-4.0.dylib', + # 'libharfbuzz.0.dylib', + # 'libpango-1.0.dylib', + # 'libpangocairo-1.0.0.dylib', + # 'libpangoft2-1.0.0.dylib', + # 'librsvg-2.2.dylib' + ], 'argv_emulation': True, 'no_chdir': True, 'iconfile': 'osx/meld.icns', From fe1a7493d9d22a61083fe9eed791915a137b60f3 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sat, 4 Nov 2023 22:39:05 -0700 Subject: [PATCH 31/43] We can build locally - GH? --- osx/build_app.sh | 17 ++++------------- setup.cfg | 16 ++++++++-------- setup_py2app.py | 4 ++-- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/osx/build_app.sh b/osx/build_app.sh index 3c64cb98a..f9900a5cb 100755 --- a/osx/build_app.sh +++ b/osx/build_app.sh @@ -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 @@ -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 @@ -242,7 +234,6 @@ else #spctl -a -t exec -vv "meldmerge.dmg" && dmg_signed=1 fi -exit # Cleanup mkdir -p osx/Archives diff --git a/setup.cfg b/setup.cfg index 53274e55c..14923872a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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] diff --git a/setup_py2app.py b/setup_py2app.py index 49fb00c72..489b6b279 100644 --- a/setup_py2app.py +++ b/setup_py2app.py @@ -113,7 +113,7 @@ setup_requires=["py2app"], options={'py2app': { 'includes': [ 'cairo', 'gi', 'weakref', 'encodings' ], - 'excludes': [ 'ctypes', 'tkinter' ], + 'excludes': [ 'tkinter' ], 'dylib_excludes': [ 'Python' ], 'frameworks': [ @@ -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, From b1433992728ecc6660d414995b48f1ebce1a8cb9 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 5 Nov 2023 07:22:52 -0800 Subject: [PATCH 32/43] Attempting to fix GH build --- osx/build_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osx/build_app.sh b/osx/build_app.sh index f9900a5cb..4e2cb8a1f 100755 --- a/osx/build_app.sh +++ b/osx/build_app.sh @@ -39,7 +39,7 @@ 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 +/usr/local/bin/pip3 install distro pyobjc-core pyobjc-framework-Cocoa py2app --target $PY_SITE_PACKAGES glib-compile-schemas data ${INSTROOT}/bin/python3 setup_py2app.py build From 0ee010bbb43c230fce6b6b8e95d2575f78fb778f Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 5 Nov 2023 10:00:02 -0800 Subject: [PATCH 33/43] Attempt to fix build on GH --- setup.cfg | 10 +--------- setup_py2app.py | 25 ++----------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/setup.cfg b/setup.cfg index 14923872a..23aa2ce9d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,14 +1,6 @@ [py2app] app = ['bin/meld'] 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] @@ -43,4 +35,4 @@ order_by_type = True use_parentheses = True indent = 4 include_trailing_comma = True -skip = bin/meld, setup_win32.py, README.md +skip = bin/meld, setup_win32.py, setup_py2app.py, README.md diff --git a/setup_py2app.py b/setup_py2app.py index 489b6b279..7c840c8ba 100644 --- a/setup_py2app.py +++ b/setup_py2app.py @@ -112,31 +112,10 @@ app=['bin/meld'], setup_requires=["py2app"], options={'py2app': { - 'includes': [ 'cairo', 'gi', 'weakref', 'encodings' ], + 'includes': [ 'gi', 'weakref', 'encodings', 'pycairo', 'PyGObject', 'pyobjc-core', 'pyobjc-framework-Cocoa' ], 'excludes': [ 'tkinter' ], 'dylib_excludes': [ 'Python' ], - 'frameworks': - [ - # 'libpython3.11.dylib', - # 'libatk-1.0.0.dylib', - # 'libcairo-gobject.2.dylib', - # 'libcairo-script-interpreter.2.dylib', - # 'libcairo.2.dylib', - # 'libgio-2.0.0.dylib', - # 'libgirepository-1.0.1.dylib', - # 'libglib-2.0.0.dylib', - # 'libgmodule-2.0.0.dylib', - # 'libgobject-2.0.0.dylib', - # 'libgtk-3.0.dylib', - # 'libgtkmacintegration-gtk3.4.dylib', - # 'libgtksourceview-4.dylib', - # 'libgtksourceview-4.0.dylib', - # 'libharfbuzz.0.dylib', - # 'libpango-1.0.dylib', - # 'libpangocairo-1.0.0.dylib', - # 'libpangoft2-1.0.0.dylib', - # 'librsvg-2.2.dylib' - ], + 'frameworks': [ ], 'argv_emulation': False, 'no_chdir': True, 'iconfile': 'osx/meld.icns', From f2bbae68b2758633828e46653c6cd4ecc3261b52 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 5 Nov 2023 10:07:17 -0800 Subject: [PATCH 34/43] Cache sources to speed up build --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0a73015ba..37b455822 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,14 @@ jobs: ln -sf $PWD/osx/jhbuildrc-custom $HOME/.jhbuildrc-custom /bin/bash -c "$(curl -fsSL https://gitlab.gnome.org/GNOME/gtk-osx/raw/master/gtk-osx-setup.sh)" + # Cache downloaded sources. This shouldn't really depend on the jhbuildrc-custom + # TODO: Figure out a better cache key for sources. + - uses: actions/cache@v3 + with: + path: | + /Users/runner/Sources + key: ${{ hashFiles('osx/jhbuildrc-custom') }} + - uses: actions/cache@v3 with: path: | From 37016b5210bd7602ccd9370638c45ae85831f70f Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 5 Nov 2023 10:20:15 -0800 Subject: [PATCH 35/43] Attempt to fix GH build --- osx/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osx/conf.py b/osx/conf.py index 193b30b93..e2174b08a 100644 --- a/osx/conf.py +++ b/osx/conf.py @@ -2,7 +2,10 @@ import os import sys from pathlib import Path -from Foundation import NSBundle +try: + from Foundation import NSBundle +except: + pass __package__ = "meld" __version__ = "3.21.0.osx3" From 40005b9b9df17ca1ae1d03b8111b2b898217d6fa Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 5 Nov 2023 11:03:32 -0800 Subject: [PATCH 36/43] Attempt to fix GH build --- osx/build_app.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/osx/build_app.sh b/osx/build_app.sh index 4e2cb8a1f..7b7c0ee4c 100755 --- a/osx/build_app.sh +++ b/osx/build_app.sh @@ -222,6 +222,7 @@ popd # Compress the dmg file.. cp osx/DS_Store /Volumes/Meld\ Merge/.DS_Store +sync hdiutil detach $DEV hdiutil convert myimg.dmg -format UDZO -o meldmerge.dmg From 1495405f802079ea87fd1ec3d4362099bf5c3dc4 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 5 Nov 2023 11:22:27 -0800 Subject: [PATCH 37/43] Attempt to fix GH build --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37b455822..facce2d20 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -109,6 +109,6 @@ jobs: - name: Upload Artifact uses: actions/upload-artifact@v3.1.3 with: - name: Environment + name: Package path: | - *.dmg + /Users/runner/work/meld/meld/meldmerge.dmg From 3fbb82e81ab35b93f1713e9055addf75841da59d Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 5 Nov 2023 12:24:29 -0800 Subject: [PATCH 38/43] Attempt to fix GH build --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index facce2d20..bea120775 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -111,4 +111,4 @@ jobs: with: name: Package path: | - /Users/runner/work/meld/meld/meldmerge.dmg + osx/Archives/meldmerge.dmg From a86737e7b1d6797f3584f787de60a535951a6231 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Sun, 5 Nov 2023 16:35:42 -0800 Subject: [PATCH 39/43] GH: Include Foundation --- setup_py2app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup_py2app.py b/setup_py2app.py index 7c840c8ba..5ba34fafc 100644 --- a/setup_py2app.py +++ b/setup_py2app.py @@ -5,6 +5,8 @@ import sys import os import site +import Foundation +import CoreFoundation import meld.build_helpers import meld.conf from setuptools import setup From 40dd6864290648b22b8276b337d0601b4cc80365 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Mon, 6 Nov 2023 05:39:37 -0800 Subject: [PATCH 40/43] GH: Try fix py2app/foundation --- setup_py2app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup_py2app.py b/setup_py2app.py index 5ba34fafc..966d7df50 100644 --- a/setup_py2app.py +++ b/setup_py2app.py @@ -5,8 +5,6 @@ import sys import os import site -import Foundation -import CoreFoundation import meld.build_helpers import meld.conf from setuptools import setup @@ -114,7 +112,9 @@ app=['bin/meld'], setup_requires=["py2app"], options={'py2app': { - 'includes': [ 'gi', 'weakref', 'encodings', 'pycairo', 'PyGObject', 'pyobjc-core', 'pyobjc-framework-Cocoa' ], + 'includes': [ 'gi', 'weakref', 'encodings', 'pycairo', 'PyGObject', + 'pyobjc-core', 'pyobjc-framework-Cocoa', + 'CoreFoundation', 'Foundation' ], 'excludes': [ 'tkinter' ], 'dylib_excludes': [ 'Python' ], 'frameworks': [ ], From cdc0de23970a72a240b09ad1cb567cbd8dc99176 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Mon, 6 Nov 2023 07:10:33 -0800 Subject: [PATCH 41/43] GH: Another attempt --- osx/build_app.sh | 2 +- setup_py2app.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/osx/build_app.sh b/osx/build_app.sh index 7b7c0ee4c..3e413efbc 100755 --- a/osx/build_app.sh +++ b/osx/build_app.sh @@ -39,7 +39,7 @@ 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 pyobjc-core pyobjc-framework-Cocoa py2app --target $PY_SITE_PACKAGES +/usr/local/bin/pip3 install --upgrade --force-reinstall distro pyobjc-core pyobjc-framework-Cocoa py2app six pygments --target $PY_SITE_PACKAGES glib-compile-schemas data ${INSTROOT}/bin/python3 setup_py2app.py build diff --git a/setup_py2app.py b/setup_py2app.py index 966d7df50..731f7116f 100644 --- a/setup_py2app.py +++ b/setup_py2app.py @@ -7,6 +7,7 @@ import site import meld.build_helpers import meld.conf +import Foundation from setuptools import setup if sys.version_info[:2] < meld.conf.PYTHON_REQUIREMENT_TUPLE: From 3cacbe1489d03e3f74232e0f8b8f507ec001d080 Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Mon, 6 Nov 2023 16:43:07 -0800 Subject: [PATCH 42/43] Bump osx version --- osx/conf.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/osx/conf.py b/osx/conf.py index e2174b08a..e50f3aa16 100644 --- a/osx/conf.py +++ b/osx/conf.py @@ -2,13 +2,10 @@ import os import sys from pathlib import Path -try: - from Foundation import NSBundle -except: - pass +from Foundation import NSBundle __package__ = "meld" -__version__ = "3.21.0.osx3" +__version__ = "3.21.0.osx4" APPLICATION_NAME = 'Meld' APPLICATION_ID = 'org.gnome.Meld' From 4f5cce0cf6a878404307011d8da5b8c9946948af Mon Sep 17 00:00:00 2001 From: Youssef Adnan Date: Mon, 6 Nov 2023 17:06:00 -0800 Subject: [PATCH 43/43] Bump osx version --- osx/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osx/conf.py b/osx/conf.py index e50f3aa16..bcd4ff0df 100644 --- a/osx/conf.py +++ b/osx/conf.py @@ -2,7 +2,10 @@ import os import sys from pathlib import Path -from Foundation import NSBundle +try: + from Foundation import NSBundle +except: + pass __package__ = "meld" __version__ = "3.21.0.osx4"