From aa9e2e2df516bf2204c3c8dce380c3a3c9bee656 Mon Sep 17 00:00:00 2001 From: redtide Date: Sun, 5 Sep 2021 19:29:17 +0200 Subject: [PATCH] Fixed some build scripts issues, keep bash always updated on macOS --- scripts/install-dependencies.sh | 2 +- scripts/package.sh | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index bad3b358..2f9519b1 100644 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -55,7 +55,7 @@ main() { if [[ $lhelper == true ]]; then brew install bash md5sha1sum ninja else - brew install ninja sdl2 + brew install bash ninja sdl2 fi pip3 install meson cd ~; npm install appdmg; cd - diff --git a/scripts/package.sh b/scripts/package.sh index b014c41c..1370aee8 100644 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -192,10 +192,12 @@ main() { local exe_file="$(pwd)/${dest_dir}/lite-xl" local package_name=lite-xl$version-$platform-$arch local bundle=false + local portable=false local stripcmd="strip" if [[ -d "${data_dir}" ]]; then - # Portable archive + echo "Creating a portable, compressed archive..." + portable=true exe_file="$(pwd)/${dest_dir}/lite-xl" if [[ $platform == "windows" ]]; then exe_file="${exe_file}.exe" @@ -205,15 +207,20 @@ main() { package_name+="-portable" fi elif [[ $platform == "macos" && ! -d "${data_dir}" ]]; then - # macOS bundle app - bundle=true - # Specify "bundle" on compressed archive only, implicit on images - if [[ $dmg == false ]]; then package_name+="-bundle"; fi - rm -rf "Lite XL.app"; mv "${dest_dir}" "Lite XL.app" - dest_dir="Lite XL.app" data_dir="$(pwd)/${dest_dir}/Contents/Resources" - exe_file="$(pwd)/${dest_dir}/Contents/MacOS/lite-xl" - else + if [[ -d "${data_dir}" ]]; then + echo "Creating a macOS bundle application..." + bundle=true + # Specify "bundle" on compressed archive only, implicit on images + if [[ $dmg == false ]]; then package_name+="-bundle"; fi + rm -rf "Lite XL.app"; mv "${dest_dir}" "Lite XL.app" + dest_dir="Lite XL.app" + exe_file="$(pwd)/${dest_dir}/Contents/MacOS/lite-xl" + fi + fi + + if [[ $bundle == false && $portable == false ]]; then + echo "Creating a compressed archive..." data_dir="$(pwd)/${dest_dir}/$prefix/share/lite-xl" exe_file="$(pwd)/${dest_dir}/$prefix/bin/lite-xl" fi