1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-24 22:33:52 +03:00

Adapt local build script

This commit is contained in:
Tae Won Ha 2020-12-05 11:54:08 +01:00
parent 125f6d0ee5
commit dfe3a6b117
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44
3 changed files with 10 additions and 70 deletions

@ -1 +1 @@
Subproject commit b09f95908226ac12ff9ff1940a782aecc1f865b0
Subproject commit 1d21e958b03be230c0e564ad08e97a0259ca055f

View File

@ -1,42 +1,20 @@
#!/bin/bash
# Executing this script will replace the download step of pre-built NvimServer.
set -Eeuo pipefail
readonly clean=${clean:?"true or false: when true, xcodebuild clean for NvimServer and make distclean for libnvim"}
readonly build_libnvim=${build_libnvim:?"true or false: when true, libnvim will be built"}
readonly build_deps=${build_deps:?"true or false: when true, eg libintl will be built"}
readonly build_dir_name="build"
readonly build_dir_path="./${build_dir_name}"
readonly nvimview_dir_path="./NvimView/Sources/NvimView/"
build_for_local_dev() {
local -r nvimserver_path="./NvimServer"
pushd ${nvimserver_path} >/dev/null
if [[ "${clean}" == true ]]; then
local -r -x clean_deps=false
./NvimServer/bin/clean_all.sh
fi
local -r -x build_dir="${build_dir_path}"
./NvimServer/bin/build_nvimserver.sh
popd >/dev/null
cp -r "./NvimServer/runtime" ${nvimview_dir_path}
cp "./NvimServer/${build_dir_path}/Build/Products/Release/NvimServer" ${nvimview_dir_path}
cp "${nvimview_dir_path}/com.qvacua.NvimView.vim" "${nvimview_dir_path}/runtime/plugin"
}
declare -x target; target="$(uname -m)"; readonly target
declare -r -x download_gettext=${download_gettext:-false}
declare -r -x clean=${clean:-false}
declare -r -x build_libnvim=${build_libnvim:-true}
declare -r -x build_dir=${build_dir:-"./build"}
main() {
echo "### Building for local dev"
# This script is located in /NvimServer/bin and we have to go to /
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
build_for_local_dev
pushd "./NvimServer"
./NvimServer/bin/build_nvimserver.sh
cp ./build/Build/Products/Release/NvimServer ../NvimView/Sources/NvimView
popd >/dev/null
echo "### Built for local dev"
popd >/dev/null
}

View File

@ -1,38 +0,0 @@
#!/bin/bash
# Executing this script will replace the download step of pre-built NvimServer.
set -Eeuo pipefail
readonly clean=${clean:?"true or false: when true, xcodebuild clean for NvimServer and make distclean for libnvim"}
readonly build_libnvim=${build_libnvim:?"true or false: when true, libnvim will be built"}
readonly build_deps=${build_deps:?"true or false: when true, eg libintl will be built"}
readonly build_dir_name="build"
readonly build_dir_path="./${build_dir_name}"
readonly nvimview_dir_path="./NvimView/Sources/NvimView/"
build_for_local_dev() {
local -r nvimserver_path="./NvimServer"
pushd ${nvimserver_path} >/dev/null
if [[ "${build_libnvim}" == true ]]; then
./NvimServer/bin/build_for_local_dev_on_x86_64.sh
fi
xcodebuild -derivedDataPath "${build_dir_path}" -configuration Release ARCHS=x86_64 -scheme NvimServer build
popd >/dev/null
pwd
cp "./NvimServer/${build_dir_path}/Build/Products/Release/NvimServer" ${nvimview_dir_path}
}
main() {
echo "### Building for local dev"
# This script is located in /NvimServer/bin and we have to go to /
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
build_for_local_dev
echo "### Built for local dev"
popd >/dev/null
}
main