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++
|
||||
cp -f .build/release/CliTool /usr/local/bin/anco
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# FIXME: Unfortunately, in order to use zenzai in anco, you will need to build CliTool with xcodebuild
|
||||
# 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 Xcode 15 or former
|
||||
# xcodebuild -scheme CliTool -destination "platform=macOS,name=Any Mac" -configuration Release
|
||||
USE_ZENZAI=0
|
||||
|
||||
# 引数の解析
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = "--zenzai" ]; then
|
||||
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