Browse Source

fix installer and add .app

use_builds_script
Alexandros Theodotou 2 years ago
parent
commit
280aa02727
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 4
      meson.build
  2. 12
      osx-brew/Info.plist.in
  3. 33
      osx-brew/conclusion.html.in
  4. 174
      osx-brew/make_pkg.sh.in
  5. 47
      osx-brew/meson.build
  6. 46
      osx-brew/postinstall.in
  7. 93
      osx-brew/uninstall.sh.in
  8. 4
      osx-brew/zrythm.rb.in
  9. 12
      scripts/make_zplugins.sh.in
  10. 15
      tools/osx/appify.sh

4
meson.build

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
project (
'zrythm-installer', [ 'c' ],
version: '0.1',
version: '0.1.1',
meson_version: '>=0.55.0',
license: 'AGPL-3-or-later',
)
@ -81,6 +81,8 @@ global_conf.set ( @@ -81,6 +81,8 @@ global_conf.set (
'CC', cc.get_id ())
global_conf.set (
'LIBDIR', libdir)
global_conf.set (
'DISTRO', distro)
global_conf.set (
'ZRYTHM_GIT_VERSION', zrythm_git_ver)
global_conf.set (

12
tools/osx/Info.plist.in → osx-brew/Info.plist.in

@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
<key>CFBundleExecutable</key>
<string>zrythm</string>
<key>CFBundleGetInfoString</key>
<string>@PACKAGE_VERSION@, (C) 2018-2020 Alexandros Theodotou https://www.zrythm.org</string>
<string>@ZRYTHM_PKG_VERSION@, (C) 2018-2021 The Zrythm contributors https://www.zrythm.org</string>
<key>CFBundleIconFile</key>
<string>zrythm.icns</string>
<key>CFBundleIdentifier</key>
@ -39,11 +39,11 @@ @@ -39,11 +39,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersions</key>
<string>@PACKAGE_VERSION@</string>
<string>@ZRYTHM_PRODUCT_VERSION@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>@PACKAGE_VERSION@</string>
<string>@ZRYTHM_PRODUCT_VERSION@@</string>
<key>LSUIElement</key>
<string>0</string>
<key>NSMainNibFile</key>
@ -51,14 +51,10 @@ @@ -51,14 +51,10 @@
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2018 - 2020 Alexandros Theodotou, GNU Affero General Public License, version 3 or later.</string>
<string>Copyright (C) 2018 - 2021 The Zrythm contributors, GNU Affero General Public License, version 3 or later.</string>
<key>LSMinimumSystemVersion</key>
<string>10.4</string>
<key>GtkOSXLaunchScriptFile</key>
<string>launcher.sh</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>ATSApplicationFontsPath</key>
<string>share/fonts</string>
</dict>
</plist>

33
osx-brew/conclusion.html.in

@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
</head>
<body>
<div style="font-family: Helvetica; padding-left: 10px;" align="left">
<h3>Zrythm</h3>
<p style="color: #020202; font-size: 11px;">Thank you for installing Zrythm..</p>
<h5>Run Zrythm</h5>
<p style="color: #020202; font-size: 11px;">Open a new terminal and run the following command to run Zrythm:</p>
<code style="color: #c6a72b; font-size: 11px;">&nbsp; $ <span style="color: #abb0b0">Zrythm-@ZRYTHM_PRODUCT_VERSION@</span></code>
</div>
<div style="font-family: Helvetica; padding-left: 10px;" align="left">
<br/>
<h5>Resources</h5>
<p style="color: #020202; font-size: 11px;">Go through following links for additional information.</p>
<ul>
<li><a href="https://manual.zrythm.org/en/" style="font-size: 11px;">Documentation</a></li>
</ul>
</div>
<div style="font-family: Helvetica; padding-left: 10px;" align="left">
<br/>
<h5>Uninstall Zrythm</h5>
<p style="color: #020202; font-size: 11px;">Run the following command to uninstall Zrythm. <br />
<code style="color: #c6a72b; font-size: 11px;"><br />&nbsp; $ <span style="color: #abb0b0">sudo bash /Library/Zrythm/@ZRYTHM_PRODUCT_VERSION@/uninstall.sh</span></code>
</p>
</div>
<div style="font-family: Helvetica; padding-left: 10px;" align="left"><br />
<p style="color: #abb0b0; font-size: 10px;">Copyright © 2021 The Zrythm contributors.<br/>Zrythm and the Zrythm logo are registered trademarks of Alexandros Theodotou in the United Kingdom.</p>
</div>
</body>
</html>

174
osx-brew/make_pkg.sh.in

@ -11,45 +11,193 @@ private_dir=$6 @@ -11,45 +11,193 @@ private_dir=$6
installer_builder_dir="$7"
welcome_html="$8"
postinstall_script="$9"
conclusion_html="${10}"
uninstall_sh="${11}"
info_plist="${12}"
dash_trial="@DASH_TRIAL@"
manuals_zip="@MANUALS_ZIP_FILE@"
breeze_dark="@BREEZE_DARK@"
zrythm_pkg_ver="@ZRYTHM_PKG_VERSION@"
zrythm_product_ver="@ZRYTHM_PRODUCT_VERSION@"
zrythm_bottle_name="zrythm$dash_trial"
carla_bottle_ver="@CARLA_BOTTLE_VER@"
built_zplugins_dir="@BUILT_ZPLUGINS_DIR@"
meson_src_root="@MESON_SOURCE_ROOT@"
inner_dir_name="${out_file%.*}"
inner_dir_name="`basename $inner_dir_name`"
inner_dir=$private_dir/$inner_dir_name
application_dir=$inner_dir/macOS-x64/application
bin_dir=$application_dir/bin
share_dir=$application_dir/share
lib_dir=$application_dir/lib
etc_dir=$application_dir/etc
darwin_dir=$inner_dir/macOS-x64/darwin
darwin_resources_dir=$darwin_dir/Resources
darwin_scripts_dir=$darwin_dir/scripts
installed_prefix=/Library/Zrythm/$zrythm_product_ver
rm -rf $private_dir
mkdir -p $inner_dir
mkdir -p $etc_dir
# copy the template
cp -rfv $installer_builder_dir/* $inner_dir/
# copy the content of each formula (already installed)
cp -rfv /usr/local/Cellar/carla-git/$carla_bottle_ver/* \
$inner_dir/macOS-x64/application/
$application_dir/
cp -rfv /usr/local/Cellar/$zrythm_bottle_name/$zrythm_pkg_ver/* \
$inner_dir/macOS-x64/application/
$application_dir/
# remove some unnecessary binaries
rm -rf $bin_dir/*-e
replace_path() {
local exe=$1
chmod +w $exe
echo "replacing path for $exe"
if [[ "$exe" == *".dylib" ]]; then
local new_id="@executable_path/../lib/`basename $exe`"
if [[ "$exe" == *".lv2"* ]]; then
new_id="/Library/Audio/Plug-Ins/LV2/Zrythm-$zrythm_product_ver-`basename $(dirname $exe)`/`basename $exe`"
fi
install_name_tool -id "$new_id" "$exe"
fi
local changes=""
for lib in `otool -L $exe | egrep "(/opt/|/local/)" | grep -v "/usr/lib" | awk '{print $1}'` ; do
if [ ! -f "$lib_dir/`basename $lib`" ]; then
cp -rfv $lib $lib_dir/
fi
replaced=""
if [[ "$exe" == *".lv2"* ]]; then
replaced="/Library/Zrythm/$zrythm_product_ver/lib"
else
replaced="@executable_path/../lib"
fi
replaced="$replaced/`basename $lib`"
changes="$changes -change $lib $replaced"
replace_path "$lib_dir/`basename $lib`"
done
if test "x$changes" != "x" ; then
install_name_tool $changes $exe
fi
chmod -w $exe
}
# copy librsvg
cp -rfv /usr/local/lib/librsvg-2.2.dylib $lib_dir/
# replace paths
for exe in `ls $bin_dir`; do
replace_path $bin_dir/$exe
done
plugin_libs=`find "$lib_dir/zrythm/lib/lv2" -name "*.dylib" -exec printf '{} ' \;`
for plugin_lib in $plugin_libs; do
replace_path $plugin_lib
done
replace_path $lib_dir/librsvg-2.2.dylib
# copy the pixbuf loaders
cp -rfv /usr/local/lib/gdk-pixbuf-2.0 $lib_dir/
sed -i '' -E "s|/usr/local/lib|$installed_prefix/lib|g" $lib_dir/gdk-pixbuf-2.0/2.10.0/loaders.cache
# copy resources
cp $welcome_html $inner_dir/macOS-x64/darwin/Resources/
cp $postinstall_script $inner_dir/macOS-x64/darwin/scripts/
cp -rvf $welcome_html $darwin_resources_dir/
cp -rvf $conclusion_html $darwin_resources_dir/
cp -rvf $postinstall_script $darwin_scripts_dir/
cp -rvf $uninstall_sh $darwin_resources_dir/
cp -rvf $application_dir/COPYING $darwin_resources_dir/LICENSE.txt
cp -rvf $share_dir/zrythm/themes/icons/zrythm-dark/scalable/apps/zrythm-splash-png.png $darwin_resources_dir/banner.png
cp $readme_file $application_dir/README
cat << EOF > $bin_dir/zrythm_launch
#!/bin/bash
export GSETTINGS_SCHEMA_DIR=$installed_prefix/share/glib-2.0/schemas
export GDK_PIXBUF_MODULEDIR=$installed_prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders
export GDK_PIXBUF_MODULE_FILE=$installed_prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
export DYLD_LIBRARY_PATH="$installed_prefix/lib"
export GTK_DATA_PREFIX="$installed_prefix"
export GTK_EXE_PREFIX="$installed_prefix"
export GTK_PATH="$installed_prefix"
export I18NDIR="$installed_prefix/share/locale"
# set language
lang_schema=/org/zrythm/Zrythm/preferences/ui/general/language
defaults read zrythm \$lang_schema
if [[ \$? == 0 ]]; then
preferences_lang=\`defaults read zrythm \$lang_schema\`
export LANG="\$preferences_lang"
export LC_MESSAGES="\$preferences_lang"
fi
$installed_prefix/bin/zrythm "\$@"
EOF
sed -i '' -E "s|/usr/local/lib|$installed_prefix/lib|g" $lib_dir/gdk-pixbuf-2.0/2.10.0/loaders.cache
chmod +x $bin_dir/zrythm_launch
# copy fonts
cp -rvf /usr/local/etc/fonts $etc_dir/
#cp $readme_file $inner_dir/README
#cp -r "$breeze_dark" $inner_dir/icons/
# copy gtksourceview files
cp -rvf /usr/local/share/gtksourceview-4 $share_dir/
#if [ "$dash_trial" != "-trial" ]; then
#echo "adding user manuals" ;
#unzip -o $manuals_zip -d $inner_dir/ ;
#fi
# copy locales
cp -rvf /usr/local/share/locale $share_dir/
# copy thumbnailers
cp -rvf /usr/local/share/thumbnailers $share_dir/
# copy mime database
cp -rvf /usr/local/share/mime $share_dir/
# copy gtk schemas
for schema in `ls /usr/local/share/glib-2.0/schemas`; do
if [[ "$schema" == *"org.gtk."* ]]; then
cp -rvf /usr/local/share/glib-2.0/schemas/$schema \
$share_dir/glib-2.0/schemas/
fi
done
# recompile schemas
echo "Recompiling schemas..."
/usr/local/bin/glib-compile-schemas $share_dir/glib-2.0/schemas
# Create .app
zrythm_app="$(pwd)/Zrythm.app"
rm -rf $zrythm_app
$meson_src_root/tools/osx/appify.sh $bin_dir/zrythm_launch Zrythm
app_contents=$zrythm_app/Contents
app_resources=$app_contents/Resources
mkdir -p $app_resources
cp -rfv $info_plist $app_contents/Info.plist
cp -rfv $meson_src_root/tools/osx/zrythm.icns \
$app_resources/zrythm.icns
mv $zrythm_app $application_dir/
# run command to build installer
pushd $inner_dir/macOS-x64
./build-macos-x64.sh Zrythm $zrythm_pkg_ver
# skip signing
sed -i.bak -E 's|read -p.*|answer="n"|g' "build-macos-x64.sh"
./build-macos-x64.sh Zrythm $zrythm_product_ver
popd
# --- prepare zip ---
work_dir=`mktemp -d`
mkdir $work_dir/$inner_dir_name
cp $inner_dir/macOS-x64/target/pkg/Zrythm-macos-installer-x64-$zrythm_product_ver.pkg $work_dir/$inner_dir_name
if [ "$dash_trial" != "-trial" ]; then
echo "adding user manuals" ;
if [ -f "$manuals_zip" ]; then
unzip -o $manuals_zip -d $work_dir/$inner_dir_name/ ;
else
echo "no user manuals found, skipping..."
fi
fi
pushd $work_dir
zip -r $inner_dir_name.zip $inner_dir_name
popd
cp $inner_dir/macOS-x64/target/pkg/Zrythm-macos-installer-x64-$zrythm_pkg_ver.pkg $out_file
cp $work_dir/$inner_dir_name.zip $out_file

47
osx-brew/meson.build

@ -50,6 +50,12 @@ osx_brew_conf.set ( @@ -50,6 +50,12 @@ osx_brew_conf.set (
'OSX_INSTALLER_PKG_FILENAME', installer_pkg_filename)
osx_brew_conf.set (
'BREEZE_DARK', breeze_icons.full_path ())
zrythm_product_ver = zrythm_pkg_ver
if zrythm_product_ver.contains('-')
zrythm_product_ver = zrythm_product_ver.split('-')[0]
endif
osx_brew_conf.set (
'ZRYTHM_PRODUCT_VERSION', zrythm_product_ver)
osx_brew_conf.set (
'BUILT_ZPLUGINS_DIR',
zplugins_installation.full_path ())
@ -92,6 +98,21 @@ postinstall_script = configure_file ( @@ -92,6 +98,21 @@ postinstall_script = configure_file (
input: 'postinstall.in',
configuration: osx_brew_conf,
)
conclusion_html = configure_file (
output: 'conclusion.html',
input: 'conclusion.html.in',
configuration: osx_brew_conf,
)
uninstall_sh = configure_file (
output: 'uninstall.sh',
input: 'uninstall.sh.in',
configuration: osx_brew_conf,
)
info_plist = configure_file (
output: 'Info.plist',
input: 'Info.plist.in',
configuration: osx_brew_conf,
)
# prepare formulas
carla_formula = configure_file (
@ -137,29 +158,10 @@ zrythm_bottle = custom_target ( @@ -137,29 +158,10 @@ zrythm_bottle = custom_target (
install: false,
)
# previous zip-based installer
installer_zip = custom_target (
'osx-installer-zip',
output: installer_zip_filename,
input: [
make_zip_sh, zrythm_formula,
carla_bottle, installer_sh,
readme, zrythm_bottle,
],
command: [
make_zip_sh, '@OUTPUT@',
'@INPUT1@', '@INPUT2@', '@INPUT3@', '@INPUT4@',
'@PRIVATE_DIR@',
],
console: true,
install: true,
install_dir: get_option ('prefix'),
)
# .pkg installer
# .pkg installer wrapped in a zip
installer_pkg = custom_target (
'osx-installer-pkg',
output: installer_pkg_filename,
output: installer_zip_filename,
input: [
make_pkg_sh, zrythm_formula,
carla_bottle, installer_sh,
@ -170,7 +172,8 @@ installer_pkg = custom_target ( @@ -170,7 +172,8 @@ installer_pkg = custom_target (
'@INPUT1@', '@INPUT2@', '@INPUT3@', '@INPUT4@',
'@PRIVATE_DIR@',
meson.source_root() / 'ext/macos-installer-builder',
welcome_html, postinstall_script,
welcome_html, postinstall_script, conclusion_html,
uninstall_sh, info_plist
],
console: true,
install: true,

46
osx-brew/postinstall.in

@ -3,20 +3,46 @@ @@ -3,20 +3,46 @@
echo "Post installation process finished"
#Custermize this for your application
#APPLICATION_FILE_PATH=bin/zrythm
APPLICATION_FILE_PATH=bin/zrythm_launch
#Parameters
#PRODUCT_HOME=/Library/__PRODUCT__/__VERSION__
product_version="@ZRYTHM_PRODUCT_VERSION@"
PRODUCT_HOME=/Library/Zrythm/$product_version
#echo "Post installation process started"
echo "Post installation process started"
#Change permissions in home directory
#echo "Change permissions in product home"
#cd ${PRODUCT_HOME}
#chmod -R 755 .
#[ -d /usr/local/bin ] || mkdir /usr/local/bin
echo "Change permissions in product home"
cd ${PRODUCT_HOME}
chmod -R 755 .
[ -d /usr/local/bin ] || mkdir /usr/local/bin
#Add application shortcut to /usr/local/bin
#rm -f /usr/local/bin/__PRODUCT__-__VERSION__
#ln -s ${PRODUCT_HOME}/${APPLICATION_FILE_PATH} /usr/local/bin/__PRODUCT__-__VERSION__
#echo "Post installation process finished"
rm -f /usr/local/bin/Zrythm-@ZRYTHM_PRODUCT_VERSION@
ln -s ${PRODUCT_HOME}/${APPLICATION_FILE_PATH} /usr/local/bin/Zrythm-@ZRYTHM_PRODUCT_VERSION@
echo "Install fonts"
our_fonts_dir=${PRODUCT_HOME}/share/fonts/zrythm
for font in Bold BoldItalic Italic Light LightItalic Regular; do
full_font_name=DSEG14ClassicMini-$font.ttf
echo "installing font $full_font_name"
ln -s ${our_fonts_dir}/DSEG14-Classic-MINI/$full_font_name \
/Library/Fonts/$full_font_name
ln -s ${our_fonts_dir}/DSEG14-Classic-MINI/DSEG-LICENSE.txt \
/Library/Fonts/DSEG-LICENSE.txt
done
echo "Move LV2 plugins"
dest_lv2_dir="/Library/Audio/Plug-Ins/LV2"
dest_lv2_prefix="$dest_lv2_dir/Zrythm-$product_version"
mkdir -p $dest_lv2_dir
for plugin in `ls ${PRODUCT_HOME}/lib/zrythm/lib/lv2`; do
rm -rf $dest_lv2_prefix-$plugin
mv -vf ${PRODUCT_HOME}/lib/zrythm/lib/lv2/$plugin \
$dest_lv2_prefix-$plugin
done
echo "Move Zrythm.app"
mv -vf ${PRODUCT_HOME}/Zrythm.app /Applications/
echo "Post installation process finished"

93
osx-brew/uninstall.sh.in

@ -0,0 +1,93 @@ @@ -0,0 +1,93 @@
#!/bin/bash
#Generate application uninstallers for macOS.
#Parameters
DATE=`date +%Y-%m-%d`
TIME=`date +%H:%M:%S`
LOG_PREFIX="[$DATE $TIME]"
#Functions
log_info() {
echo "${LOG_PREFIX}[INFO]" $1
}
log_warn() {
echo "${LOG_PREFIX}[WARN]" $1
}
log_error() {
echo "${LOG_PREFIX}[ERROR]" $1
}
#Check running user
if (( $EUID != 0 )); then
echo "Please run as root."
exit
fi
echo "Welcome to Application Uninstaller"
echo "The following packages will be REMOVED:"
echo " Zrythm-@ZRYTHM_PRODUCT_VERSION@"
while true; do
read -p "Do you wish to continue [Y/n]?" answer
[[ $answer == "y" || $answer == "Y" || $answer == "" ]] && break
[[ $answer == "n" || $answer == "N" ]] && exit 0
echo "Please answer with 'y' or 'n'"
done
#Need to replace these with install preparation script
VERSION=@ZRYTHM_PRODUCT_VERSION@
PRODUCT=Zrythm
echo "Application uninstalling process started"
# remove link to shorcut file
find "/usr/local/bin/" -name "zrythm-@ZRYTHM_PRODUCT_VERSION@" | xargs rm
if [ $? -eq 0 ]
then
echo "[1/5] [DONE] Successfully deleted shortcut links"
else
echo "[1/5] [ERROR] Could not delete shortcut links" >&2
fi
# remove bundled Lv2 plugins
find "/Library/Audio/Plug-Ins/LV2" -name "Zrythm-$VERSION*" | \
xargs rm -rf
if [ $? -eq 0 ]
then
echo "[2/5] [DONE] Successfully deleted bundled plugins"
else
echo "[2/5] [ERROR] Could not delete bundled plugins" >&2
fi
# remove .app
find "/Applications" -name "Zrythm-$VERSION.app" | \
xargs rm -rf
if [ $? -eq 0 ]
then
echo "[3/5] [DONE] Successfully deleted Zrythm.app"
else
echo "[3/5] [ERROR] Could not delete Zrythm.app" >&2
fi
#forget from pkgutil
pkgutil --forget "org.$PRODUCT.$VERSION" > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo "[4/5] [DONE] Successfully deleted application informations"
else
echo "[4/5] [ERROR] Could not delete application informations" >&2
fi
#remove application source distribution
[ -e "/Library/${PRODUCT}/${VERSION}" ] && rm -rf "/Library/${PRODUCT}/${VERSION}"
if [ $? -eq 0 ]
then
echo "[5/5] [DONE] Successfully deleted application"
else
echo "[5/5] [ERROR] Could not delete application" >&2
fi
echo "Application uninstall process finished"
exit 0

4
osx-brew/zrythm.rb.in

@ -32,7 +32,7 @@ class Zrythm@TRIAL_INITIAL_UPPERCASE@ < Formula @@ -32,7 +32,7 @@ class Zrythm@TRIAL_INITIAL_UPPERCASE@ < Formula
mkdir "build" do
system "meson",
"--prefix=#{prefix}", "--libdir=#{lib}",
"--buildtype=debug", "-Dextra_debug_info=true",
"--buildtype=debugoptimized", "-Dextra_debug_info=true",
"-Dtests=false", "-Dtrial_ver=@TRIAL_TRUE_FALSE@",
"-Dcarla=enabled",
"-Drtmidi=auto", "-Drtaudio=auto",
@ -47,7 +47,7 @@ class Zrythm@TRIAL_INITIAL_UPPERCASE@ < Formula @@ -47,7 +47,7 @@ class Zrythm@TRIAL_INITIAL_UPPERCASE@ < Formula
system "ninja", "install", "-v"
system "cp", "-r", "@BREEZE_DARK@", "#{share}/icons/breeze-dark"
system "mkdir", "-p", "#{lib}/zrythm/lib"
system "cp", "-RLv", "@BUILT_ZPLUGINS_DIR@", "#{lib}/zrythm/lib/lv2"
system "cp", "-RLv", "@BUILT_ZPLUGINS_DIR@/lib/lv2", "#{lib}/zrythm/lib/"
end
end

12
scripts/make_zplugins.sh.in

@ -12,6 +12,7 @@ private_dir="$3" @@ -12,6 +12,7 @@ private_dir="$3"
meson_bin="@MESON_BIN@"
zplugins_ver="@ZPLUGINS_VER@"
distro="@DISTRO@"
inner_dir_name=zplugins-$zplugins_ver
full_private_dir="`pwd`/$private_dir"
@ -24,7 +25,16 @@ mkdir -p $private_dir @@ -24,7 +25,16 @@ mkdir -p $private_dir
mkdir -p $out_file
tar xf $tarball -C $private_dir
pushd $private_dir/$inner_dir_name
meson_opts="--prefix=/"
if [ "$distro" = "osx-brew" ]; then
# set lv2 core spec path
lv2_cellar=`brew info lv2 | sed '4q;d' | awk '{print $1;}'`
meson_opts="$meson_opts -Dlv2_core_path=$lv2_cellar/lib"
else
meson_opts="$meson_opts -Dlv2_core_path=/usr/lib/lv2"
fi
$meson_bin build --buildtype=debugoptimized \
--prefix=/ -Dlv2dir=
$meson_opts
popd
ninja -C $private_dir/$inner_dir_name/build test
DESTDIR="`pwd`/$out_file" ninja -C $private_dir/$inner_dir_name/build install

15
tools/osx/appify.sh

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
#!/usr/bin/env bash
APPNAME=${2:-$(basename "${1}" '.sh')};
DIR="${APPNAME}.app/Contents/MacOS";
if [ -a "${APPNAME}.app" ]; then
echo "${PWD}/${APPNAME}.app already exists";
exit 1;
fi;
mkdir -p "${DIR}";
cp "${1}" "${DIR}/${APPNAME}";
chmod +x "${DIR}/${APPNAME}";
echo "${PWD}/$APPNAME.app";
Loading…
Cancel
Save