mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-26 07:13:24 +03:00
Merge branch 'build' into develop
This commit is contained in:
commit
a34da5b1b9
@ -6,7 +6,6 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/.." > /dev/null
|
||||
|
||||
readonly deployment_target_file="./resources/macos_deployment_target.txt"
|
||||
readonly deployment_target=$(cat ${deployment_target_file})
|
||||
readonly gettext_version="0.20.1"
|
||||
readonly pcre_version="8.43"
|
||||
readonly xz_version="5.2.4"
|
||||
readonly ag_version="2.2.0"
|
||||
@ -14,7 +13,6 @@ readonly ag_version="2.2.0"
|
||||
readonly build_ag=${build_ag:-false}
|
||||
readonly build_pcre=${build_pcre:-false}
|
||||
readonly build_xz=${build_xz:-false}
|
||||
readonly build_gettext=${build_gettext:-false}
|
||||
|
||||
build_ag () {
|
||||
echo "### Building ag..."
|
||||
@ -123,60 +121,8 @@ if [[ ${build_ag} == true ]] ; then
|
||||
fi
|
||||
}
|
||||
|
||||
build_gettext () {
|
||||
pushd NvimView > /dev/null
|
||||
mkdir -p third-party/libintl
|
||||
rm -rf .deps
|
||||
mkdir .deps
|
||||
pushd .deps > /dev/null
|
||||
curl -L -o gettext.tar.xz https://ftp.gnu.org/gnu/gettext/gettext-${gettext_version}.tar.xz
|
||||
tar xf gettext.tar.xz
|
||||
mv gettext-${gettext_version} gettext
|
||||
|
||||
pushd gettext > /dev/null
|
||||
# Configure from https://github.com/Homebrew/homebrew-core/blob/8d1ae1b8967a6b77cc1f6f1af6bb348b3268553e/Formula/gettext.rb
|
||||
# Set the deployment target to $deployment_target
|
||||
./configure CFLAGS="-mmacosx-version-min=${deployment_target}" MACOSX_DEPLOYMENT_TARGET=${deployment_target} \
|
||||
--disable-dependency-tracking \
|
||||
--disable-silent-rules \
|
||||
--disable-debug \
|
||||
--prefix=$(pwd)/../../third-party/libintl \
|
||||
--with-included-gettext \
|
||||
--with-included-glib \
|
||||
--with-included-libcroco \
|
||||
--with-included-libunistring \
|
||||
--with-emacs \
|
||||
--disable-java \
|
||||
--disable-csharp \
|
||||
--without-git \
|
||||
--without-cvs \
|
||||
--without-xz
|
||||
make
|
||||
echo "### libintl: ./NvimView/.deps/gettext/gettext-runtime/intl/.libs"
|
||||
popd > /dev/null
|
||||
popd > /dev/null
|
||||
|
||||
echo "### Copy header/libs to third-party"
|
||||
mkdir -p third-party/libintl
|
||||
cp .deps/gettext/gettext-runtime/intl/libintl.h third-party/libintl/include/
|
||||
cp .deps/gettext/gettext-runtime/intl/.libs/libintl.a third-party/libintl/lib/
|
||||
cp .deps/gettext/gettext-runtime/intl/.libs/libintl.8.dylib third-party/libintl/lib/
|
||||
|
||||
pushd third-party/libintl/lib
|
||||
ln -f -s libintl.8.dylib libintl.dylib
|
||||
popd > /dev/null
|
||||
popd > /dev/null
|
||||
|
||||
popd > /dev/null
|
||||
echo "### Built deps"
|
||||
}
|
||||
|
||||
main () {
|
||||
if [[ ${build_gettext} == true ]] ; then
|
||||
build_gettext
|
||||
fi
|
||||
|
||||
build_vimr_deps
|
||||
build_vimr_deps
|
||||
}
|
||||
|
||||
main
|
||||
|
@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
echo "### Building libnvim"
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/.." > /dev/null
|
||||
|
||||
readonly deployment_target_file="./resources/macos_deployment_target.txt"
|
||||
readonly deployment_target=$(cat ${deployment_target_file})
|
||||
|
||||
# Brew's gettext does not get sym-linked to PATH
|
||||
export PATH=/usr/local/opt/gettext/bin:$PATH
|
||||
|
||||
pushd NvimView/neovim
|
||||
ln -sf ../local.mk .
|
||||
|
||||
# Use custom gettext source only when building libnvim => not in local.mk which is also used to build the full nvim
|
||||
# to get the full runtime.
|
||||
make \
|
||||
SDKROOT=$(xcrun --show-sdk-path) \
|
||||
CFLAGS="-mmacosx-version-min=${deployment_target}" \
|
||||
CXXFLAGS="-mmacosx-version-min=${deployment_target}" \
|
||||
MACOSX_DEPLOYMENT_TARGET=${deployment_target} \
|
||||
CMAKE_EXTRA_FLAGS="-DGETTEXT_SOURCE=CUSTOM -DCMAKE_OSX_DEPLOYMENT_TARGET=${deployment_target} -DCMAKE_CXX_COMPILER=$(xcrun -find c++)" \
|
||||
DEPS_CMAKE_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=${deployment_target} -DCMAKE_CXX_COMPILER=$(xcrun -find c++)" \
|
||||
libnvim
|
||||
popd > /dev/null
|
||||
|
||||
popd > /dev/null
|
||||
echo "### Built libnvim"
|
@ -18,35 +18,7 @@ else
|
||||
carthage update --platform macos
|
||||
fi
|
||||
|
||||
# Build NeoVim
|
||||
# 0. Delete previously built things
|
||||
# 1. Build normally to get the full runtime folder and copy it to the neovim's project root
|
||||
# 2. Delete the build folder to re-configure
|
||||
# 3. Build libnvim
|
||||
pushd NvimView/neovim
|
||||
ln -f -s ../local.mk .
|
||||
|
||||
rm -rf build
|
||||
make distclean
|
||||
|
||||
echo "### Building nvim to get the complete runtime folder"
|
||||
rm -rf /tmp/nvim-runtime
|
||||
make \
|
||||
CFLAGS="-mmacosx-version-min=${deployment_target}" \
|
||||
MACOSX_DEPLOYMENT_TARGET=${deployment_target} \
|
||||
CMAKE_FLAGS="-DCUSTOM_UI=0 -DCMAKE_INSTALL_PREFIX=/tmp/nvim-runtime" \
|
||||
DEPS_CMAKE_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=${deployment_target} -DCMAKE_CXX_COMPILER=$(xcrun -find c++)" \
|
||||
install
|
||||
|
||||
rm -rf build
|
||||
make clean
|
||||
|
||||
../../bin/build_libnvim.sh
|
||||
|
||||
echo "### Copying runtime"
|
||||
rm -rf runtime
|
||||
cp -r /tmp/nvim-runtime/share/nvim/runtime .
|
||||
popd > /dev/null
|
||||
./bin/download_nvimserver.sh
|
||||
|
||||
echo "### Xcodebuilding"
|
||||
|
||||
@ -54,15 +26,12 @@ rm -rf ${build_path}
|
||||
|
||||
if [[ ${code_sign} == true ]] ; then
|
||||
identity="Developer ID Application: Tae Won Ha (H96Q2NKTQH)"
|
||||
entitlements_path=$(realpath NvimView/NvimServer/NvimServer.entitlements)
|
||||
entitlements_path=$(realpath Carthage/Build/Mac/NvimServer/NvimServer.entitlements)
|
||||
|
||||
xcodebuild \
|
||||
CODE_SIGN_IDENTITY="${identity}" \
|
||||
OTHER_CODE_SIGN_FLAGS="--timestamp --options=runtime" \
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS=NO \
|
||||
-configuration Release -derivedDataPath ./build -workspace VimR.xcworkspace -scheme VimR clean build
|
||||
xcodebuild -configuration Release -derivedDataPath ./build -workspace VimR.xcworkspace -scheme VimR clean build
|
||||
|
||||
pushd ${build_path}/Build/Products/Release > /dev/null
|
||||
codesign --force -s "${identity}" --deep --timestamp --options=runtime VimR.app
|
||||
codesign --force -s "${identity}" --timestamp --options=runtime --entitlements="${entitlements_path}" \
|
||||
VimR.app/Contents/Frameworks/NvimView.framework/Versions/A/NvimServer
|
||||
codesign --force -s "${identity}" --timestamp --options=runtime VimR.app/Contents/Frameworks/NvimView.framework/Versions/A
|
||||
|
@ -17,13 +17,5 @@ echo "### Pushing commit and tag to vimr repository"
|
||||
git push origin HEAD:"${branch}"
|
||||
git push origin "${tag}"
|
||||
|
||||
#pushd NvimView/neovim > /dev/null
|
||||
# echo "### tagging neovim"
|
||||
# git tag -s -m "vimr/${tag}" "vimr/${tag}"
|
||||
#
|
||||
# echo "### Pushing tag to neovim repository"
|
||||
# git push origin "vimr/${tag}"
|
||||
#popd > /dev/null
|
||||
|
||||
popd > /dev/null
|
||||
echo "### Committed and pushed tags"
|
||||
|
Loading…
Reference in New Issue
Block a user