From: Thomas Debesse Date: Mon, 22 Feb 2021 18:17:00 +0000 (+0100) Subject: macos: rework the plist and rename apple to macos in repository X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f80fb44b67d748419a38cb864eeb615ed83f6963;p=xonotic%2Fnetradiant.git macos: rework the plist and rename apple to macos in repository --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 94136b8c..b01730e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -530,7 +530,7 @@ endif () if (APPLE) install(DIRECTORY - setup/apple/Contents + setup/macos/Contents DESTINATION ${APPLE_INSTALL_PREFIX} ) install(DIRECTORY @@ -538,7 +538,7 @@ if (APPLE) DESTINATION ${APPLE_INSTALL_PREFIX}/Contents/Prefix/share ) install(PROGRAMS - setup/apple/netradiant + setup/macos/NetRadiant DESTINATION ${APPLE_INSTALL_PREFIX}/Contents/MacOS ) endif () diff --git a/setup/apple/.gitignore b/setup/apple/.gitignore deleted file mode 100644 index e420ee4b..00000000 --- a/setup/apple/.gitignore +++ /dev/null @@ -1 +0,0 @@ -target/* diff --git a/setup/apple/Contents/Info.plist b/setup/apple/Contents/Info.plist deleted file mode 100644 index 3a8348e1..00000000 --- a/setup/apple/Contents/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - NetRadiant - CFBundleExecutable - netradiant - CFBundleIconFile - netradiant.icns - CFBundleIdentifier - org.xonotic.netradiant - CFBundleName - NetRadiant - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.5.0 - CFBundleVersion - 1.5.0 - LSMinimumSystemVersion - 10.7 - NSHighResolutionCapable - - - diff --git a/setup/apple/Contents/Resources/netradiant.icns b/setup/apple/Contents/Resources/netradiant.icns deleted file mode 100644 index 339e718d..00000000 Binary files a/setup/apple/Contents/Resources/netradiant.icns and /dev/null differ diff --git a/setup/apple/netradiant b/setup/apple/netradiant deleted file mode 100755 index 68a151e1..00000000 --- a/setup/apple/netradiant +++ /dev/null @@ -1,50 +0,0 @@ -#! /usr/bin/env bash - -set -o physical - -script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" - -bundle_dir="$(cd "${script_dir}/../Prefix"; pwd)" - -echo "Starting NetRadiant in ${bundle_dir}" - -cd "${bundle_dir}" - -export FC_DEBUG=1024 - -# if bundled -if [ -d "${bundle_dir}/share/icons/hicolor" ] -then - export FONTCONFIG_PATH="${bundle_dir}/etc/fonts" - - # export GDK_GL_LIBGL_PATH="${bundle_dir}/lib/libGL.1.dylib" - # export GDK_GL_LIBGLU_PATH="${bundle_dir}/lib/libGLU.1.dylib" - - export GDK_PATH="${bundle_dir}" - - export GDK_PIXBUF_MODULE_FILE="${bundle_dir}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" - - export GTK_IM_MODULE_FILE="${bundle_dir}/lib/gtk-2.0/2.10.0/immodules.cache" - - export GOBJECT_PATH="${bundle_dir}" - - export GTK_DATA_PREFIX="${bundle_dir}" - export GTK_EXE_PREFIX="${bundle_dir}" - export GTK_PATH="${bundle_dir}" -fi - -if [ "$(defaults read -g AppleInterfaceStyle 2>/dev/null)" = 'Dark' ] -then - color='dark' -else - color='light' -fi - -gtkrc_file="${bundle_dir}/share/themes/Mojave-${color}/gtk-2.0/gtkrc" - -if [ -f "${gtkrc_file}" ] -then - export GTK2_RC_FILES="${gtkrc_file}" -fi - -exec ./netradiant "${@}" diff --git a/setup/macos/.gitignore b/setup/macos/.gitignore new file mode 100644 index 00000000..e420ee4b --- /dev/null +++ b/setup/macos/.gitignore @@ -0,0 +1 @@ +target/* diff --git a/setup/macos/Contents/Info.plist b/setup/macos/Contents/Info.plist new file mode 100644 index 00000000..1cc3d745 --- /dev/null +++ b/setup/macos/Contents/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleName + NetRadiant + CFBundleDisplayName + NetRadiant + CFBundleIdentifier + org.xonotic.netradiant + CFBundleExecutable + NetRadiant + CFBundleIconFile + netradiant.icns + CFBundleShortVersionString + 1.5.0 + CFBundleVersion + 1.5.0 + CFBundleDevelopmentRegion + English + CFBundleSignature + ???? + CFBundleTypeExtensions + + map + + NSHighResolutionCapable + + LSMinimumSystemVersion + 10.7 + + diff --git a/setup/macos/Contents/Resources/netradiant.icns b/setup/macos/Contents/Resources/netradiant.icns new file mode 100644 index 00000000..339e718d Binary files /dev/null and b/setup/macos/Contents/Resources/netradiant.icns differ diff --git a/setup/macos/NetRadiant b/setup/macos/NetRadiant new file mode 100755 index 00000000..68a151e1 --- /dev/null +++ b/setup/macos/NetRadiant @@ -0,0 +1,50 @@ +#! /usr/bin/env bash + +set -o physical + +script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" + +bundle_dir="$(cd "${script_dir}/../Prefix"; pwd)" + +echo "Starting NetRadiant in ${bundle_dir}" + +cd "${bundle_dir}" + +export FC_DEBUG=1024 + +# if bundled +if [ -d "${bundle_dir}/share/icons/hicolor" ] +then + export FONTCONFIG_PATH="${bundle_dir}/etc/fonts" + + # export GDK_GL_LIBGL_PATH="${bundle_dir}/lib/libGL.1.dylib" + # export GDK_GL_LIBGLU_PATH="${bundle_dir}/lib/libGLU.1.dylib" + + export GDK_PATH="${bundle_dir}" + + export GDK_PIXBUF_MODULE_FILE="${bundle_dir}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" + + export GTK_IM_MODULE_FILE="${bundle_dir}/lib/gtk-2.0/2.10.0/immodules.cache" + + export GOBJECT_PATH="${bundle_dir}" + + export GTK_DATA_PREFIX="${bundle_dir}" + export GTK_EXE_PREFIX="${bundle_dir}" + export GTK_PATH="${bundle_dir}" +fi + +if [ "$(defaults read -g AppleInterfaceStyle 2>/dev/null)" = 'Dark' ] +then + color='dark' +else + color='light' +fi + +gtkrc_file="${bundle_dir}/share/themes/Mojave-${color}/gtk-2.0/gtkrc" + +if [ -f "${gtkrc_file}" ] +then + export GTK2_RC_FILES="${gtkrc_file}" +fi + +exec ./netradiant "${@}"