mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-08-22 15:05:26 +00:00
feat: update install_cli.sh to support --zenzai and improve stability
This commit is contained in:
@ -1,9 +1,27 @@
|
|||||||
swift build -c release -Xcxx -xobjective-c++
|
#!/bin/bash
|
||||||
cp -f .build/release/CliTool /usr/local/bin/anco
|
set -e
|
||||||
|
|
||||||
# FIXME: Unfortunately, in order to use zenzai in anco, you will need to build CliTool with xcodebuild
|
USE_ZENZAI=0
|
||||||
# It is highly desirable to make it work only with `swift build`
|
|
||||||
# For Xcode 16 or later
|
# 引数の解析
|
||||||
# xcodebuild -scheme CliTool -destination "platform=macOS,name=My Mac" -configuration Release
|
for arg in "$@"; do
|
||||||
# For Xcode 15 or former
|
if [ "$arg" = "--zenzai" ]; then
|
||||||
# xcodebuild -scheme CliTool -destination "platform=macOS,name=Any Mac" -configuration Release
|
USE_ZENZAI=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$USE_ZENZAI" -eq 1 ]; then
|
||||||
|
echo "📦 Building with Zenzai support..."
|
||||||
|
swift build -c release -Xcxx -xobjective-c++ --traits Zenzai
|
||||||
|
else
|
||||||
|
echo "📦 Building..."
|
||||||
|
# Build
|
||||||
|
swift build -c release -Xcxx -xobjective-c++
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy Required Resources
|
||||||
|
cp -R .build/release/llama.framework /usr/local/lib/
|
||||||
|
# add rpath
|
||||||
|
install_name_tool -add_rpath /usr/local/lib/ .build/release/CliTool
|
||||||
|
# Install
|
||||||
|
cp -f .build/release/CliTool /usr/local/bin/anco
|
||||||
|
Reference in New Issue
Block a user