Update build-package.sh script for macos
This commit is contained in:
parent
40326c6497
commit
394f98041d
|
@ -86,22 +86,16 @@ lite_build_package_windows () {
|
||||||
}
|
}
|
||||||
|
|
||||||
lite_build_package_macosx () {
|
lite_build_package_macosx () {
|
||||||
local portable=""
|
|
||||||
if [ "$1" == "-portable" ]; then
|
|
||||||
portable="-portable"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
local build="$1"
|
local build="$1"
|
||||||
local arch="$2"
|
local arch="$2"
|
||||||
local os="macosx"
|
local os="macosx"
|
||||||
local pdir=".package-build/lite-xl.app/Contents/MacOS"
|
|
||||||
if [ "$portable" == "-portable" ]; then
|
local appdir=".package-build/lite-xl.app"
|
||||||
local bindir="$pdir"
|
mkdir -p "$appdir/Contents"/{MacOS,Resources}
|
||||||
local datadir="$pdir/data"
|
local pdir="$appdir/Contents/MacOS"
|
||||||
else
|
|
||||||
local bindir="$pdir/bin"
|
local bindir="$pdir"
|
||||||
local datadir="$pdir/share/lite-xl"
|
local datadir="$pdir/data"
|
||||||
fi
|
|
||||||
mkdir -p "$bindir"
|
mkdir -p "$bindir"
|
||||||
mkdir -p "$datadir"
|
mkdir -p "$datadir"
|
||||||
for module_name in core plugins colors fonts; do
|
for module_name in core plugins colors fonts; do
|
||||||
|
@ -110,10 +104,12 @@ lite_build_package_macosx () {
|
||||||
for module_name in plugins colors; do
|
for module_name in plugins colors; do
|
||||||
cp -r "$build/third/data/$module_name" "$datadir"
|
cp -r "$build/third/data/$module_name" "$datadir"
|
||||||
done
|
done
|
||||||
cp "$build/src/lite" "$bindir"
|
cp dev-utils/icon.icns "$appdir/Contents/Resources/icon.icns"
|
||||||
strip "$bindir/lite"
|
cp dev-utils/Info.plist "$appdir/Contents/Info.plist"
|
||||||
|
cp "$build/src/lite" "$bindir/lite-xl"
|
||||||
|
strip "$bindir/lite-xl"
|
||||||
pushd ".package-build"
|
pushd ".package-build"
|
||||||
local package_name="lite-xl-$os-$arch$portable.zip"
|
local package_name="lite-xl-$os-$arch.zip"
|
||||||
zip "$package_name" -r "lite-xl.app"
|
zip "$package_name" -r "lite-xl.app"
|
||||||
mv "$package_name" ..
|
mv "$package_name" ..
|
||||||
popd
|
popd
|
||||||
|
@ -219,6 +215,6 @@ else
|
||||||
fi
|
fi
|
||||||
lite_copy_third_party_modules "$build_dir"
|
lite_copy_third_party_modules "$build_dir"
|
||||||
lite_build_package "$build_dir" "$arch"
|
lite_build_package "$build_dir" "$arch"
|
||||||
if [[ ! ( "$OSTYPE" == "linux"* || "$OSTYPE" == "freebsd"* ) ]]; then
|
if [[ ! ( "$OSTYPE" == "linux"* || "$OSTYPE" == "freebsd"* || "$OSTYPE" == "darwin"* ) ]]; then
|
||||||
lite_build_package -portable "$build_dir" "$arch"
|
lite_build_package -portable "$build_dir" "$arch"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue