logo
down
shadow

Shipping GTK+ apps for macOS with Xcode


Shipping GTK+ apps for macOS with Xcode

By : user3100453
Date : January 12 2021, 07:00 PM
it fixes the issue So after messing around with GTK+ and Xcode 10 toolchain for a whole day, I finally got more confidence in the idea of shipping macOS app built with GTK+. The hardest part for me was to figure out how to make a self-contained app bundle, especially how to deal with the .dylib hell on macOS (Mojave) with Xcode toolchain (10.3). The online resources are incredibly inconsistent on this topic. I was tipped by many tutorials to fix things here and there. However, each of them has a slightly skewed portion that's just enough to throw me off track one minute later. But I'm glad that things are a lot easier than the GNOME WIKI described, with Xcode handling a lot of heavy-lifting.
Here are the things I did to make a hello-world GNOME app based on their getting-started example and make it run on another Mac without any pre-installed dependency, with brief remarks:
code :
//
//  main.mm
//  hello_gtk
//
//  Created by Me on 2019-08-11.
//  Copyright © 2019 Me. All rights reserved.
//

#include <iostream>
#import <Cocoa/Cocoa.h>
#include <gtk/gtk.h>


// callback function which is called when button is clicked
static void on_button_clicked(GtkButton *btn, gpointer data) {
    // change button label when it's clicked
    gtk_button_set_label(btn, "Hello World");
}


// callback function which is called when application is first started
static void on_app_activate(GApplication *app, gpointer data) {
    // create a new application window for the application
    // GtkApplication is sub-class of GApplication
    // downcast GApplication* to GtkApplication* with GTK_APPLICATION() macro
    GtkWidget *window = gtk_application_window_new(GTK_APPLICATION(app));
    // a simple push button
    GtkWidget *btn = gtk_button_new_with_label("Click Me!");
    // connect the event-handler for "clicked" signal of button
    g_signal_connect(btn, "clicked", G_CALLBACK(on_button_clicked), NULL);
    // add the button to the window
    gtk_container_add(GTK_CONTAINER(window), btn);
    // display the window
    gtk_widget_show_all(GTK_WIDGET(window));
}


int main(int argc, char *argv[]) {
    // create new GtkApplication with an unique application ID
    GtkApplication *app = gtk_application_new(
                                              "org.gtkmm.example.HelloApp",
                                              G_APPLICATION_FLAGS_NONE
                                              );
    // connect the event-handler for "activate" signal of GApplication
    // G_CALLBACK() macro is used to cast the callback function pointer
    // to generic void pointer
    g_signal_connect(app, "activate", G_CALLBACK(on_app_activate), NULL);
    // start the application, terminate by closing the window
    // GtkApplication* is upcast to GApplication* with G_APPLICATION() macro
    int status = g_application_run(G_APPLICATION(app), argc, argv);
    // deallocate the application object
    g_object_unref(app);
//    return status;
    return status;
}


#! /bin/sh

LibTargetDir="${BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/lib"
Exec=${BUILD_DIR}/${EXECUTABLE_PATH}
RelLibDir="@executable_path/../Frameworks/lib"
pwd
mkdir -p "${LibTargetDir}" 2>&1 > /dev/null

#
# Copy Homebrew libs to hello_world.app/Contents/Frameworks/lib/
#

# Direct dependencies of the executable found out about by otool.

cp /usr/local/opt/gtk+3/lib/libgtk-3.0.dylib "${LibTargetDir}"
cp /usr/local/opt/gtk+3/lib/libgdk-3.0.dylib "${LibTargetDir}"
cp /usr/local/opt/pango/lib/libpangocairo-1.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/pango/lib/libpango-1.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib "${LibTargetDir}"
cp /usr/local/opt/atk/lib/libatk-1.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/cairo/lib/libcairo-gobject.2.dylib "${LibTargetDir}"
cp /usr/local/opt/cairo/lib/libcairo.2.dylib "${LibTargetDir}"
cp /usr/local/opt/gdk-pixbuf/lib/libgdk_pixbuf-2.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/glib/lib/libgio-2.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/glib/lib/libgobject-2.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/glib/lib/libglib-2.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/gettext/lib/libintl.8.dylib "${LibTargetDir}"

# 2nd-order dependencies by the above libs.

cp /usr/local/opt/libepoxy/lib/libepoxy.0.dylib "${LibTargetDir}"
cp /usr/local/opt/fontconfig/lib/libfontconfig.1.dylib "${LibTargetDir}"
cp /usr/local/opt/freetype/lib/libfreetype.6.dylib "${LibTargetDir}"
cp /usr/local//Cellar/libffi/3.2.1/lib/libffi.6.dylib "${LibTargetDir}"
cp /usr/local/opt/fribidi/lib/libfribidi.0.dylib "${LibTargetDir}"
cp /usr/local/opt/glib/lib/libgmodule-2.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/graphite2/lib/libgraphite2.3.dylib "${LibTargetDir}"
cp /usr/local/Cellar/pango/1.44.5/lib/libpangoft2-1.0.0.dylib "${LibTargetDir}"
cp /usr/local/opt/pixman/lib/libpixman-1.0.dylib "${LibTargetDir}"
cp /usr/local/opt/libpng/lib/libpng16.16.dylib "${LibTargetDir}"


#
# Make them writable for the fixes. The libs are read-only fresh out of Homebrew .
#

chmod -R +w "${LibTargetDir}"/*


#
# Fix .dylib execution paths for the well-known reason: Paths are hardcoded.
#

# Fix executable dependencies.

install_name_tool -change "/usr/local/opt/gtk+3/lib/libgtk-3.0.dylib" "${RelLibDir}/libgtk-3.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/gtk+3/lib/libgdk-3.0.dylib" "${RelLibDir}/libgdk-3.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/pango/lib/libpangocairo-1.0.0.dylib" "${RelLibDir}/libpangocairo-1.0.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/pango/lib/libpango-1.0.0.dylib" "${RelLibDir}/libpango-1.0.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib" "${RelLibDir}/libharfbuzz.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/atk/lib/libatk-1.0.0.dylib" "${RelLibDir}/libatk-1.0.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/cairo/lib/libcairo-gobject.2.dylib" "${RelLibDir}/libcairo-gobject.2.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/cairo/lib/libcairo.2.dylib" "${RelLibDir}/libcairo.2.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/gdk-pixbuf/lib/libgdk_pixbuf-2.0.0.dylib" "${RelLibDir}/libgdk_pixbuf-2.0.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/glib/lib/libgio-2.0.0.dylib" "${RelLibDir}/libgio-2.0.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/glib/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${Exec}"
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${Exec}"

# Fix dependencies of dependencies

install_name_tool -change "/usr/local/Cellar/gtk+3/3.24.10/lib/libgdk-3.0.dylib" "${RelLibDir}/libgdk-3.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgmodule-2.0.0.dylib" "${RelLibDir}/libgmodule-2.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgio-2.0.0.dylib" "${RelLibDir}/libgio-2.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/pango/lib/libpangocairo-1.0.0.dylib" "${RelLibDir}/libpangocairo-1.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/pango/lib/libpango-1.0.0.dylib" "${RelLibDir}/libpango-1.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib" "${RelLibDir}/libharfbuzz.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/cairo/lib/libcairo.2.dylib" "${RelLibDir}/libcairo.2.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/pango/lib/libpangoft2-1.0.0.dylib" "${RelLibDir}/libpangoft2-1.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/freetype/lib/libfreetype.6.dylib" "${RelLibDir}/libfreetype.6.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/fribidi/lib/libfribidi.0.dylib" "${RelLibDir}/libfribidi.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/cairo/lib/libcairo-gobject.2.dylib" "${RelLibDir}/libcairo-gobject.2.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/gdk-pixbuf/lib/libgdk_pixbuf-2.0.0.dylib" "${RelLibDir}/libgdk_pixbuf-2.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/atk/lib/libatk-1.0.0.dylib" "${RelLibDir}/libatk-1.0.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib
install_name_tool -change "/usr/local/opt/libepoxy/lib/libepoxy.0.dylib" "${RelLibDir}/libepoxy.0.dylib" "${LibTargetDir}"/libgtk-3.0.dylib


install_name_tool -change "/usr/local/opt/gdk-pixbuf/lib/libgdk_pixbuf-2.0.0.dylib" "${RelLibDir}/libgdk_pixbuf-2.0.0.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/cairo/lib/libcairo-gobject.2.dylib" "${RelLibDir}/libcairo-gobject.2.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/pango/lib/libpango-1.0.0.dylib" "${RelLibDir}/libpango-1.0.0.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/fribidi/lib/libfribidi.0.dylib" "${RelLibDir}/libfribidi.0.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/cairo/lib/libcairo-gobject.2.dylib" "${RelLibDir}/libcairo-gobject.2.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/libepoxy/lib/libepoxy.0.dylib" "${RelLibDir}/libepoxy.0.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/pango/lib/libpangocairo-1.0.0.dylib" "${RelLibDir}/libpangocairo-1.0.0.dylib" "${LibTargetDir}"/libgdk-3.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgio-2.0.0.dylib" "${RelLibDir}/libgio-2.0.0.dylib" "${LibTargetDir}"/libgdk-3.0.dylib


install_name_tool -change "/usr/local/Cellar/pango/1.44.5/lib/libpango-1.0.0.dylib" "${RelLibDir}/libpango-1.0.0.dylib" "${LibTargetDir}"/libpangocairo-1.0.0.dylib
install_name_tool -change "/usr/local/Cellar/pango/1.44.5/lib/libpangoft2-1.0.0.dylib" "${RelLibDir}/libpangoft2-1.0.0.dylib" "${LibTargetDir}"/libpangocairo-1.0.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libpangocairo-1.0.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${LibTargetDir}"/libpangocairo-1.0.0.dylib
install_name_tool -change "/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib" "${RelLibDir}/libharfbuzz.0.dylib" "${LibTargetDir}"/libpangocairo-1.0.0.dylib
install_name_tool -change "/usr/local/opt/fontconfig/lib/libfontconfig.1.dylib" "${RelLibDir}/libfontconfig.1.dylib" "${LibTargetDir}"/libpangocairo-1.0.0.dylib
install_name_tool -change "/usr/local/opt/cairo/lib/libcairo.2.dylib" "${RelLibDir}/libcairo.2.dylib" "${LibTargetDir}"/libpangocairo-1.0.0.dylib


install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libpango-1.0.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${LibTargetDir}"/libpango-1.0.0.dylib
install_name_tool -change "/usr/local/opt/fribidi/lib/libfribidi.0.dylib" "${RelLibDir}/libfribidi.0.dylib" "${LibTargetDir}"/libpango-1.0.0.dylib
install_name_tool -change "/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib" "${RelLibDir}/libharfbuzz.0.dylib" "${LibTargetDir}"/libpango-1.0.0.dylib


install_name_tool -change "/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib" "${RelLibDir}/libharfbuzz.0.dylib" "${LibTargetDir}"/libharfbuzz.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libharfbuzz.0.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${LibTargetDir}"/libharfbuzz.0.dylib
install_name_tool -change "/usr/local/opt/freetype/lib/libfreetype.6.dylib" "${RelLibDir}/libfreetype.6.dylib" "${LibTargetDir}"/libharfbuzz.0.dylib
install_name_tool -change "/usr/local/opt/graphite2/lib/libgraphite2.3.dylib" "${RelLibDir}/libgraphite2.3.dylib" "${LibTargetDir}"/libharfbuzz.0.dylib


install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libatk-1.0.0.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib"${LibTargetDir}/libatk-1.0.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${LibTargetDir}"/libatk-1.0.0.dylib


install_name_tool -change "/usr/local/opt/cairo/lib/libcairo.2.dylib" "${RelLibDir}/libcairo.2.dylib" "${LibTargetDir}"/libcairo-gobject.2.dylib
install_name_tool -change "/usr/local/opt/pixman/lib/libpixman-1.0.dylib" "${RelLibDir}/libpixman-1.0.dylib" "${LibTargetDir}"/libcairo-gobject.2.dylib
install_name_tool -change "/usr/local/opt/fontconfig/lib/libfontconfig.1.dylib" "${RelLibDir}/libfontconfig.1.dylib" "${LibTargetDir}"/libcairo-gobject.2.dylib
install_name_tool -change "/usr/local/opt/freetype/lib/libfreetype.6.dylib" "${RelLibDir}/libfreetype.6.dylib" "${LibTargetDir}"/libcairo-gobject.2.dylib
install_name_tool -change "/usr/local/opt/libpng/lib/libpng16.16.dylib" "${RelLibDir}/libpng16.16.dylib" "${LibTargetDir}"/libcairo-gobject.2.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${LibTargetDir}"/libcairo-gobject.2.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libcairo-gobject.2.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${LibTargetDir}"/libcairo-gobject.2.dylib


install_name_tool -change "/usr/local/opt/pixman/lib/libpixman-1.0.dylib" "${RelLibDir}/libpixman-1.0.dylib" "${LibTargetDir}"/libcairo.2.dylib
install_name_tool -change "/usr/local/opt/fontconfig/lib/libfontconfig.1.dylib" "${RelLibDir}/libfontconfig.1.dylib" "${LibTargetDir}"/libcairo.2.dylib
install_name_tool -change "/usr/local/opt/freetype/lib/libfreetype.6.dylib" "${RelLibDir}/libfreetype.6.dylib" "${LibTargetDir}"/libcairo.2.dylib
install_name_tool -change "/usr/local/opt/libpng/lib/libpng16.16.dylib" "${RelLibDir}/libpng16.16.dylib" "${LibTargetDir}"/libcairo.2.dylib


install_name_tool -change "/usr/local/opt/glib/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${LibTargetDir}"/libgdk_pixbuf-2.0.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libgdk_pixbuf-2.0.0.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${LibTargetDir}"/libgdk_pixbuf-2.0.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgmodule-2.0.0.dylib" "${RelLibDir}/libgmodule-2.0.0.dylib" "${LibTargetDir}"/libgdk_pixbuf-2.0.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libgio-2.0.0.dylib" "${RelLibDir}/libgio-2.0.0.dylib" "${LibTargetDir}"/libgdk_pixbuf-2.0.0.dylib


install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libgobject-2.0.0.dylib
install_name_tool -change "/usr/local/opt/libffi/lib/libffi.6.dylib" "${RelLibDir}/libffi.6.dylib" "${LibTargetDir}"/libgobject-2.0.0.dylib


install_name_tool -change "/usr/local/opt/pcre/lib/libpcre.1.dylib" "${RelLibDir}/libpcre.1.dylib" "${LibTargetDir}"/libglib-2.0.0.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${LibTargetDir}"/libglib-2.0.0.dylib


install_name_tool -change "/usr/local/Cellar/glib/2.60.6/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libgmodule-2.0.0.dylib


install_name_tool -change "/usr/local/Cellar/glib/2.60.6/lib/libgobject-2.0.0.dylib" "${RelLibDir}/libgobject-2.0.0.dylib" "${LibTargetDir}"/libgio-2.0.0.dylib
install_name_tool -change "/usr/local/Cellar/glib/2.60.6/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libgio-2.0.0.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${LibTargetDir}"/libgio-2.0.0.dylib
install_name_tool -change "/usr/local/Cellar/glib/2.60.6/lib/libgmodule-2.0.0.dylib" "${RelLibDir}/libgmodule-2.0.0.dylib" "${LibTargetDir}"/libgio-2.0.0.dylib


install_name_tool -change "/usr/local/opt/harfbuzz/lib/libharfbuzz.0.dylib" "${RelLibDir}/libharfbuzz.0.dylib" "${LibTargetDir}"/libpangoft2-1.0.0.dylib
install_name_tool -change "/usr/local/Cellar/pango/1.44.5/lib/libpango-1.0.0.dylib" "${RelLibDir}/libpango-1.0.0.dylib" "${LibTargetDir}"/libpangoft2-1.0.0.dylib
install_name_tool -change "/usr/local/opt/glib/lib/libglib-2.0.0.dylib" "${RelLibDir}/libglib-2.0.0.dylib" "${LibTargetDir}"/libpangoft2-1.0.0.dylib
install_name_tool -change "/usr/local/opt/gettext/lib/libintl.8.dylib" "${RelLibDir}/libintl.8.dylib" "${LibTargetDir}"/libpangoft2-1.0.0.dylib
install_name_tool -change "/usr/local/opt/freetype/lib/libfreetype.6.dylib" "${RelLibDir}/libfreetype.6.dylib" "${LibTargetDir}"/libpangoft2-1.0.0.dylib
install_name_tool -change "/usr/local/opt/fontconfig/lib/libfontconfig.1.dylib" "${RelLibDir}/libfontconfig.1.dylib" "${LibTargetDir}"/libpangoft2-1.0.0.dylib


install_name_tool -change "/usr/local/opt/libpng/lib/libpng16.16.dylib" "${RelLibDir}/libpng16.16.dylib" "${LibTargetDir}"/libfreetype.6.dylib


install_name_tool -change "/usr/local/opt/freetype/lib/libfreetype.6.dylib" "${RelLibDir}/libfreetype.6.dylib" "${LibTargetDir}"/libfontconfig.1.dylib


echo "DONE"



Share : facebook icon twitter icon
Checking state of NSButton Checkbox on Xcode for macOS apps swift 3

Checking state of NSButton Checkbox on Xcode for macOS apps swift 3


By : ankit singh
Date : March 29 2020, 07:55 AM
like below fixes the issue Xcode 9 Swift 4 I found this post which solved the problem for me. "'NSOffState' is unavailable in Swift"
(In short, the NSOnState is replaced with .on)
Can a macOS app built with Xcode 9 work on macOS versions earlier than 10.13?

Can a macOS app built with Xcode 9 work on macOS versions earlier than 10.13?


By : Robin Farley
Date : March 29 2020, 07:55 AM
To fix this issue Set the "Deployment Target" for your "Project" settings (not your target settings) and it will build an app that supports that version and later. E.g. if you set the deployment target to 10.11, it will support 10.11 at later (e.g. 10.11, 10.12, 10.13, etc.).
Note, when you first discover this drop down box, you may be tempted to set it to the earliest possible OS version, but realize that the more versions that you want to retroactively support, the more work that entails. You'll have to write conditional code wherever you want to use newer OS features and likewise wherever older targets need to use now-deprecated APIs.
Xcode 10 Archives to 'Other Items' instead of 'MacOS Apps'

Xcode 10 Archives to 'Other Items' instead of 'MacOS Apps'


By : Mihai Tica
Date : March 29 2020, 07:55 AM
hop of those help? You're getting generic Xcode build. This may happen, if you're using nested applications, static libraries, frameworks or headers.
You should set Skip install toYES in build settings for your plugins.
Minimum Versions of Xcode and MacOS Needed to Submit Apps in November 2018

Minimum Versions of Xcode and MacOS Needed to Submit Apps in November 2018


By : user2015892
Date : March 29 2020, 07:55 AM
will be helpful for those in need A higher level CSR at Apple pointed me to where this appears in Itunes Connect. In November 2018, the minimum version for uploading to the App Store is Xcode 9 which works with High Sierra Sierra 10.12.4 and above.
Interestingly, you can upload to the App Store with XCode 6 but the project must have been built in XCode 9. You can also use Application Loader 3 and above.
How to figure out that two apps are on the same device on macOS(Alternative of identifierForVendor in macOS)

How to figure out that two apps are on the same device on macOS(Alternative of identifierForVendor in macOS)


By : Sayidah Alfu ZamRoti
Date : January 02 2021, 06:48 AM
should help you out In our app we access the system serial number. We use it to try prevent multiple users using the same account + for debug purposes (so not for ads or anything, our app has none).
We also have code to access the hardware uuid but that code isn't actually used at the moment, but it is in there, so not sure how deep Apple checks. So you might be able to use this one too. As an additional step you could hash either of these (or hash them appended or something).
Related Posts Related Posts :
  • Is notarization necessary for Mac App store release?
  • macos with vscode ctrl+f2 does not work on macos as expected
  • Are Swift's embedded dylibs still required in macOS apps?
  • Tell iPadOS from macOS on the web
  • Perl Syntax Error on Compilation - "use" not allowed in expression
  • Where does "npm install -g <package>" install the package?
  • Is Pinch Zoom(zooming like we do on image) available in Firefox Developer Edition for macOS? If yes, how to enable it?
  • Homebrew installation in mac is giving error
  • Install CLSQL on Mac OS X
  • TextMate - must-have Bundles and Plugins for web dev
  • Where is ~/.config/MonoDevelop/ for MonoDevelop
  • OS X Dock API? Retrieve OS X active application's icon with badges and other modifications
  • Trying to build the LEVMAR math library on a mac using the Accelerate Framework
  • Do GLSL geometry shaders work on the GMA X3100 under OSX
  • clear command in my mac os terminal gives the following error
  • how to get the path of a localized plist under mac os x
  • Is there a way to trigger gesture events on Mac OS X?
  • XAMPP default folder on OSX
  • Qt4: QMenuBar/QMenu doesn't show up on Mac OS X
  • How do you dynamically allocate memory in Mac OS X assembly?
  • Bluetooth proximity hooks on OS X. How? (i.e., automatically lock screen if I move away)
  • How can I create a temp file with a specific extension in bash?
  • How to fix intellij keymap to old keymap after 2019 update Mac OS?
  • VSCode monospace fonts are not monospaced, how to fix this?
  • Unable to install React Native cli on Mac using npm
  • Does go-get run builds forked from current shell process with different environment variables?
  • Is there a way to set the output of an AppleScript to a certain color, and change depending on conditions?
  • Why is this functionKey selected when I press F1, F2, etc?
  • Is there a way to replace the native maximize button on the main window with fullscreen button?
  • Resizing Docker disk image to a non-standard size
  • How to batch "touch" files in subfolder with data from parent folder
  • How can I bypass an index error or have the script run again?
  • What is the first variables of my stack program?
  • Jenkins through docker: How to configure own host as agent for jenkins?
  • Is there a way to determine the size of a docker volume on my macOS machine?
  • How do I return the output of my Apple Script to the Status Bar in macOS?
  • Gitlab Client in Login Redirect Loop
  • launchd: Confusion on the sematics of bootstrap/bootout for controlling services on macOS
  • How to unminimize a minimized window (apple script not working with upgrade from Capitan to Mojave)
  • How to add LoginItems since macOS 10.11 when LSSharedFileListInsertItemURL is deprecated?
  • Cannot mount a volume without using sudo
  • Trouble displaying stl file in SceneKit with macOS
  • Using Unicast RTSP URIs via ffmpeg
  • How to copy intl.so to /usr/lib/php/extensions
  • Macbook crontab: "Service cannot load in requested session"
  • Is it possible to build Electron Apps on Mac Pro? Doesn't seem like it due to Bizarre GPU issue
  • IntelliJ IDEA can't open projects or add SDK on macOS Catalina
  • OpenMPI on MacOS: Unexpected IP
  • The requested version of macOS is not available. HOW TO FIX IT TUTORIAL. macOS Catalina public beta
  • Mac Terminal: Looping & ImageMagick
  • SwiftUI scroll view partially displays last item in Mac app
  • AFP and Time Machine stopped working on QNAP HS-251+
  • How to add an application shortcut in dock on mac machine?
  • macOS: What's the correct place to install a dylib on a user's system?
  • How to reconnect to lost VNC server on mac
  • Command line tool running slowly from NSTask but fast from Terminal
  • AppleScript for gathering all windows error: Expected end of line but found unknown token
  • How to replace a string in a file selected by a multi-line regex search pattern on Unix/MacOS with command line tools
  • `gdb` unable to unwind a stack
  • Completely taking over the screen in OS X and hiding any kind of popup window?
  • shadow
    Privacy Policy - Terms - Contact Us © festivalmusicasacra.org