mirror of
https://github.com/qvacua/vimr.git
synced 2024-09-11 17:15:34 +03:00
Compare commits
29 Commits
661937c397
...
0ba7d8a0e5
Author | SHA1 | Date | |
---|---|---|---|
|
0ba7d8a0e5 | ||
|
0b95059ad1 | ||
|
44c0134fca | ||
|
23472d7e5c | ||
|
7325960e56 | ||
|
47cc40f3a5 | ||
|
b915da2c06 | ||
|
861f9ff08d | ||
|
6f4d5ce3cf | ||
|
95431d4b97 | ||
|
6df888fbb0 | ||
|
add6933150 | ||
|
162119fc78 | ||
|
9163dc96cc | ||
|
f7a00ce478 | ||
|
09cd3519e0 | ||
|
2e72c661cf | ||
|
9a6fb5b754 | ||
|
f21e71c1d5 | ||
|
9a73f4ad7c | ||
|
dbd658fc5c | ||
|
cd8e19edf6 | ||
|
11de4c720d | ||
|
74d3a9565d | ||
|
d9cc1da85b | ||
|
6445f5521d | ||
|
602161adc2 | ||
|
776eb9bd1f | ||
|
c95a81f299 |
80
.github/workflows/build-universal-neovim.yml
vendored
Normal file
80
.github/workflows/build-universal-neovim.yml
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
name: 'Universal Neovim'
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
# example: neovim-v0.10.0-20240601.102525
|
||||
- neovim-v[0-9]+.[0-9]+.[0-9]+-*
|
||||
|
||||
jobs:
|
||||
macos:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner: [ macos-12, macos-14 ]
|
||||
include:
|
||||
- runner: macos-12
|
||||
arch: x86_64
|
||||
- runner: macos-14
|
||||
arch: arm64
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
# Perform a full checkout #13471
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- name: Install dependencies
|
||||
run: brew bundle
|
||||
|
||||
- name: Build neovim
|
||||
run: clean=true ./bin/neovim/bin/build_neovim.sh
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: nvim-macos-${{ matrix.arch }}
|
||||
path: Neovim/build/nvim-macos-${{ matrix.arch }}.tar.gz
|
||||
retention-days: 1
|
||||
|
||||
publish:
|
||||
needs: [macos]
|
||||
runs-on: macos-14
|
||||
env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
# Must perform checkout first, since it deletes the target directory
|
||||
# before running, and would therefore delete the downloaded artifacts
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: brew bundle
|
||||
|
||||
- name: Set tag name env
|
||||
run: |
|
||||
TAG_NAME=${{ github.ref }}
|
||||
echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Move downloaded artifacts
|
||||
run: |
|
||||
mv nvim-macos-x86_64/* .
|
||||
mv nvim-macos-arm64/* .
|
||||
rm -r nvim-macos-x86_64
|
||||
rm -r nvim-macos-arm64
|
||||
|
||||
- name: Create universal Neovim
|
||||
run: ./bin/neovim/bin/build_universal_neovim.sh
|
||||
|
||||
# Set as prerelease such that the latest VimR release is marked as the latest stable release
|
||||
- name: Publish release
|
||||
run: |
|
||||
gh release create $TAG_NAME \
|
||||
--prerelease \
|
||||
--title "Universal ${TAG_NAME}" \
|
||||
--notes "Neovim universal build with `libintl`" \
|
||||
--target $GITHUB_SHA nvim-macos-x86_64.tar.gz nvim-macos-arm64.tar.gz nvim-macos-universal.tar.bz
|
25
DEVELOP.md
25
DEVELOP.md
@ -1,12 +1,18 @@
|
||||
## How to develop
|
||||
|
||||
To build Neovim for development, i.e., no universal binary, do the following
|
||||
In most cases, you can use the pre-built universal Neovim build by running
|
||||
|
||||
```bash
|
||||
clean=false for_dev=true ./bin/build_nvimserver.sh
|
||||
clean=true for_dev=false ./bin/build_nvimserver.sh
|
||||
```
|
||||
|
||||
You can set `clean=true` if you want to clean the existing build.
|
||||
If you want to build Neovim locally, i.e., no universal build, you can use
|
||||
|
||||
```bash
|
||||
clean=true for_dev=true ./bin/build_nvimserver.sh
|
||||
```
|
||||
|
||||
This is used when generating source since we need some generated header files.
|
||||
|
||||
### Generating sources when upgrading Neovim
|
||||
|
||||
@ -23,6 +29,19 @@ defaults write com.qvacua.VimR enable-debug-menu 1
|
||||
|
||||
## How to release
|
||||
|
||||
### Neovim
|
||||
|
||||
* Update Neovim and generate sources.
|
||||
* Commit and push.
|
||||
* Tag and push with the following
|
||||
```bash
|
||||
version=neovim-vX.Y.Z-$(date "+%Y%m%d.%H%M%S"); git tag -a "${version}" -m "${version}"; git push origin "${version}"
|
||||
```
|
||||
* Github action will build universal binary + runtime and package it.
|
||||
* Update the version of Neovim in `/bin/neovim/resources/buildInfo.json`
|
||||
|
||||
### VimR
|
||||
|
||||
* Set a new version of VimR via
|
||||
```bash
|
||||
is_snapshot=true ./bin/set_new_versions.sh # for snapshot or
|
||||
|
2
Neovim
2
Neovim
@ -1 +1 @@
|
||||
Subproject commit 8744ee8783a8597f9fce4a573ae05aca2f412120
|
||||
Subproject commit 27fb62988e922c2739035f477f93cc052a4fee1e
|
@ -1,4 +1,4 @@
|
||||
// Auto generated for nvim v0.9.4
|
||||
// Auto generated for nvim v0.10.0
|
||||
// See bin/generate_autocmds.py
|
||||
|
||||
enum NvimAutoCommandEvent: String {
|
||||
@ -74,7 +74,10 @@ enum NvimAutoCommandEvent: String {
|
||||
case insertleavepre
|
||||
case lspattach
|
||||
case lspdetach
|
||||
case lsprequest
|
||||
case lspnotify
|
||||
case lsptokenupdate
|
||||
case lspprogress
|
||||
case menupopup
|
||||
case modechanged
|
||||
case optionset
|
||||
@ -84,8 +87,10 @@ enum NvimAutoCommandEvent: String {
|
||||
case recordingenter
|
||||
case recordingleave
|
||||
case remotereply
|
||||
case safestate
|
||||
case searchwrapped
|
||||
case sessionloadpost
|
||||
case sessionwritepost
|
||||
case shellcmdpost
|
||||
case shellfilterpost
|
||||
case signal
|
||||
@ -107,6 +112,7 @@ enum NvimAutoCommandEvent: String {
|
||||
case termenter
|
||||
case termleave
|
||||
case termopen
|
||||
case termrequest
|
||||
case termresponse
|
||||
case textchanged
|
||||
case textchangedi
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Auto generated for nvim v0.9.4
|
||||
// Auto generated for nvim v0.10.0
|
||||
// See bin/generate_cursor_shape.py
|
||||
|
||||
public enum CursorModeShape: String {
|
||||
|
@ -18,33 +18,6 @@
|
||||
"version" : "2.2.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "dictionarycoding",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/elegantchaos/DictionaryCoding",
|
||||
"state" : {
|
||||
"revision" : "ae19e456bd550fed8f341e5bae4318333c53a5b4",
|
||||
"version" : "1.0.9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "down",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/johnxnguyen/Down",
|
||||
"state" : {
|
||||
"revision" : "f34b166be1f1db4aa8f573067e901d72f2a6be57",
|
||||
"version" : "0.11.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "fsevents",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/qvacua/FSEvents",
|
||||
"state" : {
|
||||
"branch" : "release-fseventstream",
|
||||
"revision" : "90ed674df15b5e546a061052dad70228b3300fba"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "material-icons",
|
||||
"kind" : "remoteSourceControl",
|
||||
@ -98,42 +71,6 @@
|
||||
"revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4",
|
||||
"version" : "6.6.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "shortcutrecorder",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/Kentzo/ShortcutRecorder",
|
||||
"state" : {
|
||||
"revision" : "c86ce0f9be5353ba998966121c7631602a9a36f7",
|
||||
"version" : "3.4.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "sparkle",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/sparkle-project/Sparkle",
|
||||
"state" : {
|
||||
"revision" : "0a4caaf7a81eea2cece651ef4b17331fa0634dff",
|
||||
"version" : "2.6.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-collections",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-collections.git",
|
||||
"state" : {
|
||||
"revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb",
|
||||
"version" : "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swifter",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/httpswift/swifter",
|
||||
"state" : {
|
||||
"revision" : "9483a5d459b45c3ffd059f7b55f9638e268632fd",
|
||||
"version" : "1.5.0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 2
|
||||
|
@ -1126,7 +1126,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 20240517.102525;
|
||||
CURRENT_PROJECT_VERSION = 20240528.123921;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_MODULE_VERIFIER = YES;
|
||||
@ -1192,7 +1192,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 20240517.102525;
|
||||
CURRENT_PROJECT_VERSION = 20240528.123921;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_MODULE_VERIFIER = YES;
|
||||
@ -1225,7 +1225,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 20240517.102525;
|
||||
CURRENT_PROJECT_VERSION = 20240528.123921;
|
||||
DEFINES_MODULE = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
IBC_MODULE = VimR;
|
||||
@ -1250,7 +1250,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 20240517.102525;
|
||||
CURRENT_PROJECT_VERSION = 20240528.123921;
|
||||
DEFINES_MODULE = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
IBC_MODULE = VimR;
|
||||
|
@ -1224,7 +1224,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.46.2</string>
|
||||
<string>SNAPSHOT-20240528.123921</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
@ -1241,7 +1241,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>20240517.102525</string>
|
||||
<string>20240528.123921</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.productivity</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.46.2</string>
|
||||
<string>SNAPSHOT-20240528.123921</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>20240517.102525</string>
|
||||
<string>20240528.123921</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1,13 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
declare -r -x clean=${clean:-false}
|
||||
# This script prepares Neovim binary and the runtime files for building VimR.
|
||||
# For most cases, you can just download the pre-built universal Neovim releases by running
|
||||
# `clean=true for_dev=false ./bin/neovim/bin/download_neovim_releases.sh`
|
||||
# If you want to build Neovim locally, use `for_dev=true`, then, the Neovim binary will be
|
||||
# built for the current architecture only and using the simple `make` command.
|
||||
|
||||
declare -r -x clean=${clean:-true}
|
||||
declare -r -x for_dev=${for_dev:-false}
|
||||
|
||||
main() {
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
|
||||
|
||||
resources_folder="./NvimView/Sources/NvimView/Resources"
|
||||
local -r resources_folder="./NvimView/Sources/NvimView/Resources"
|
||||
rm -rf "${resources_folder}/NvimServer"
|
||||
rm -rf "${resources_folder}/runtime"
|
||||
|
||||
@ -17,24 +23,39 @@ main() {
|
||||
rm -rf build
|
||||
make distclean
|
||||
popd >/dev/null
|
||||
|
||||
rm -rf "${resources_folder}/NvimServer"
|
||||
rm -rf "${resources_folder}/runtime"
|
||||
fi
|
||||
|
||||
if [[ "${for_dev}" == true ]]; then
|
||||
pushd ./Neovim >/dev/null
|
||||
mkdir -p ./build/install
|
||||
make CMAKE_BUILD_TYPE=Release CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=./install"
|
||||
make install
|
||||
|
||||
./bin/neovim/bin/build_neovim_for_dev.sh
|
||||
|
||||
pushd ./Neovim/build >/dev/null
|
||||
local arch; arch="$(uname -m)"; readonly arch
|
||||
tar -xf "nvim-macos-${arch}.tar.gz"
|
||||
popd >/dev/null
|
||||
|
||||
cp ./Neovim/build/install/bin/nvim "${resources_folder}/NvimServer"
|
||||
cp -r ./Neovim/build/install/share/nvim/runtime "${resources_folder}"
|
||||
cp "./Neovim/build/nvim-macos-${arch}/bin/nvim" "${resources_folder}/NvimServer"
|
||||
cp -r "./Neovim/build/nvim-macos-${arch}/share/nvim/runtime" "${resources_folder}"
|
||||
|
||||
else
|
||||
./bin/neovim/bin/build_neovim.sh
|
||||
pushd ./Neovim/build >/dev/null
|
||||
tar -xf nvim-macos.tar.gz
|
||||
|
||||
local neovim_release; neovim_release=$(jq -r ".neovimRelease" ./bin/neovim/resources/buildInfo.json)
|
||||
readonly neovim_release
|
||||
|
||||
pushd ./Neovim >/dev/null
|
||||
mkdir -p build
|
||||
pushd ./build >/dev/null
|
||||
curl -LO "https://github.com/qvacua/vimr/releases/download/${neovim_release}/nvim-macos-universal.tar.bz"
|
||||
tar -xf nvim-macos-universal.tar.bz
|
||||
popd >/dev/null
|
||||
popd >/dev/null
|
||||
cp ./Neovim/build/nvim-macos/bin/nvim "${resources_folder}/NvimServer"
|
||||
cp -r ./Neovim/build/nvim-macos/share/nvim/runtime "${resources_folder}"
|
||||
|
||||
cp ./Neovim/build/nvim-macos-universal/bin/nvim "${resources_folder}/NvimServer"
|
||||
cp -r ./Neovim/build/nvim-macos-universal/share/nvim/runtime "${resources_folder}"
|
||||
|
||||
fi
|
||||
|
||||
# Copy VimR specific vim file to runtime/plugin folder
|
||||
|
@ -120,31 +120,31 @@ main() {
|
||||
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
|
||||
|
||||
# check_version
|
||||
# prepare_bin
|
||||
# build_release
|
||||
#
|
||||
# if [[ "${create_gh_release}" == false ]]; then
|
||||
# echo "### No github release, exiting"
|
||||
# exit 0
|
||||
# fi
|
||||
#
|
||||
# local -x GH_TOKEN
|
||||
# GH_TOKEN=$(cat ~/.local/secrets/github.qvacua.release.token)
|
||||
# readonly GH_TOKEN
|
||||
#
|
||||
# create_gh_release
|
||||
#
|
||||
# if [[ "${upload}" == true ]]; then
|
||||
# # Give GitHub some time.
|
||||
# sleep 5
|
||||
# check_gh_release_present
|
||||
# upload_artifact
|
||||
# fi
|
||||
check_version
|
||||
prepare_bin
|
||||
build_release
|
||||
|
||||
if [[ "${create_gh_release}" == false ]]; then
|
||||
echo "### No github release, exiting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
local -x GH_TOKEN
|
||||
GH_TOKEN=$(cat ~/.local/secrets/github.qvacua.release.token)
|
||||
readonly GH_TOKEN
|
||||
|
||||
create_gh_release
|
||||
|
||||
if [[ "${upload}" == true ]]; then
|
||||
# Give GitHub some time.
|
||||
sleep 5
|
||||
check_gh_release_present
|
||||
upload_artifact
|
||||
fi
|
||||
|
||||
if [[ "${update_appcast}" == true ]]; then
|
||||
# Sometimes GitHub is not yet up-to-date with the uploaded asset.
|
||||
# sleep 5
|
||||
sleep 5
|
||||
update_appcast_file
|
||||
fi
|
||||
|
||||
|
@ -24,7 +24,7 @@ main() {
|
||||
nvim_version="v$major.$minor.$patch$prerelease"
|
||||
echo "### Using nvim version: $nvim_version"
|
||||
|
||||
../bin/neovim/bin/build_neovim.sh
|
||||
for_dev=true ../bin/build_nvimserver.sh
|
||||
popd > /dev/null
|
||||
|
||||
pushd Neovim
|
||||
|
@ -1,28 +1,27 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
# This script builds Neovim with gettext for host's architecture, *no* universal build
|
||||
# Produces /Neovim/build/neovim-macos-$arch.tar.gz
|
||||
|
||||
readonly clean=${clean:?"true or false"}
|
||||
readonly NVIM_BUILD_TYPE=${NVIM_BUILD_TYPE:-"Release"}
|
||||
readonly gettext_version="0.22.5"
|
||||
readonly gettext_url="https://ftp.gnu.org/pub/gnu/gettext/gettext-${gettext_version}.tar.gz"
|
||||
declare temp_dir; temp_dir="$(mktemp -d)"; readonly temp_dir
|
||||
readonly gettext_install_dir="${temp_dir}/universal"
|
||||
readonly gettext_install_dir="${temp_dir}/gettext"
|
||||
|
||||
build_gettext() {
|
||||
local -r -x MACOSX_DEPLOYMENT_TARGET=$1
|
||||
local -r -x MACOSX_DEPLOYMENT_TARGET="$1"
|
||||
|
||||
pushd "${temp_dir}" >/dev/null
|
||||
curl -L "${gettext_url}" -o gettext.tar.gz
|
||||
tar -xzf gettext.tar.gz
|
||||
|
||||
mkdir universal
|
||||
mkdir gettext
|
||||
|
||||
pushd "./gettext-${gettext_version}" >/dev/null
|
||||
./configure \
|
||||
CC="gcc -arch x86_64 -arch arm64" \
|
||||
CXX="g++ -arch x86_64 - arch arm64" \
|
||||
CPP="gcc -E" \
|
||||
CXXCPP="g++ -E" \
|
||||
--prefix "${gettext_install_dir}" \
|
||||
--disable-silent-rules \
|
||||
--with-included-glib \
|
||||
@ -43,9 +42,9 @@ build_gettext() {
|
||||
}
|
||||
|
||||
build_neovim() {
|
||||
# slightly modified version of /Neovim/.github/scripts/build_universal_macos.sh
|
||||
# slightly modified version of Neovim's Github workflow for release
|
||||
local -r -x MACOSX_DEPLOYMENT_TARGET=$1
|
||||
local -r -x SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
|
||||
local -x SDKROOT; SDKROOT=$(xcrun --sdk macosx --show-sdk-path); readonly SDKROOT
|
||||
|
||||
# Brew's gettext does not get sym-linked to PATH
|
||||
export PATH="/opt/homebrew/opt/gettext/bin:/usr/local/opt/gettext/bin:${PATH}"
|
||||
@ -53,7 +52,6 @@ build_neovim() {
|
||||
cmake -S cmake.deps -B .deps -G Ninja \
|
||||
-D CMAKE_BUILD_TYPE="${NVIM_BUILD_TYPE}" \
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}" \
|
||||
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
|
||||
-D CMAKE_FIND_FRAMEWORK=NEVER
|
||||
cmake --build .deps
|
||||
|
||||
@ -62,8 +60,7 @@ build_neovim() {
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_BUILD_TYPE="${NVIM_BUILD_TYPE}" \
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}" \
|
||||
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
|
||||
-D CMAKE_FIND_FRAMEWORK=LAST \
|
||||
-D CMAKE_FIND_FRAMEWORK=NEVER \
|
||||
-D LIBINTL_INCLUDE_DIR="${gettext_install_dir}/include" \
|
||||
-D LIBINTL_LIBRARY="${gettext_install_dir}/lib/libintl.a"
|
||||
cmake --build build
|
||||
|
43
bin/neovim/bin/build_neovim_for_dev.sh
Executable file
43
bin/neovim/bin/build_neovim_for_dev.sh
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
# This script builds Neovim with gettext for host's architecture, *no* universal build
|
||||
# Produces /Neovim/build/neovim-macos-$arch.tar.gz
|
||||
|
||||
readonly clean=${clean:?"true or false"}
|
||||
readonly NVIM_BUILD_TYPE=${NVIM_BUILD_TYPE:-"Release"}
|
||||
|
||||
build_neovim() {
|
||||
# slightly modified version of Neovim's Github workflow for release
|
||||
local -r -x MACOSX_DEPLOYMENT_TARGET=$1
|
||||
local -x SDKROOT; SDKROOT=$(xcrun --sdk macosx --show-sdk-path); readonly SDKROOT
|
||||
|
||||
# Brew's gettext does not get sym-linked to PATH
|
||||
export PATH="/opt/homebrew/opt/gettext/bin:/usr/local/opt/gettext/bin:${PATH}"
|
||||
|
||||
make CMAKE_BUILD_TYPE="${NVIM_BUILD_TYPE}"
|
||||
cpack --config build/CPackConfig.cmake
|
||||
}
|
||||
|
||||
main() {
|
||||
# This script is located in /bin/neovim/bin and we have to go to /
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" >/dev/null
|
||||
|
||||
local deployment_target
|
||||
deployment_target=$(jq -r .deploymentTarget ./bin/neovim/resources/buildInfo.json)
|
||||
readonly deployment_target
|
||||
|
||||
pushd ./Neovim >/dev/null
|
||||
echo "### Building neovim binary"
|
||||
if [[ "${clean}" == true ]]; then
|
||||
make distclean
|
||||
fi
|
||||
|
||||
build_neovim "${deployment_target}"
|
||||
popd >/dev/null
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
main
|
||||
|
48
bin/neovim/bin/build_universal_neovim.sh
Executable file
48
bin/neovim/bin/build_universal_neovim.sh
Executable file
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
# This script creates a universal build, incl. Treesitter `so`s. The Treesitter
|
||||
# libs are put under the `runtime` folder instead of under `lib`.
|
||||
#
|
||||
# It expects to find the following files in the workspace root:
|
||||
# - nvim-macos-x86_64.tar.gz
|
||||
# - nvim-macos-arm64.tar.gz
|
||||
# It will produce the following in the workspace root:
|
||||
# - nvim-macos-universal.tar.bz
|
||||
#
|
||||
# To be used in the context of Github actions
|
||||
|
||||
main() {
|
||||
# This script is located in /bin/neovim/bin and we have to go to /
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" >/dev/null
|
||||
|
||||
tar -xf nvim-macos-x86_64.tar.gz
|
||||
tar -xf nvim-macos-arm64.tar.gz
|
||||
|
||||
mkdir -p "nvim-macos-universal"
|
||||
|
||||
local universal_folder_path; universal_folder_path="$(pwd)/nvim-macos-universal";
|
||||
readonly universal_folder_path
|
||||
echo "${universal_folder_path}"
|
||||
ls -la
|
||||
|
||||
mkdir -p "${universal_folder_path}/bin"
|
||||
cp -r nvim-macos-arm64/share "${universal_folder_path}"
|
||||
mkdir -p "${universal_folder_path}/share/nvim/runtime/parser"
|
||||
|
||||
lipo -create nvim-macos-arm64/bin/nvim nvim-macos-x86_64/bin/nvim \
|
||||
-output "${universal_folder_path}/bin/nvim"
|
||||
for f in nvim-macos-arm64/lib/nvim/parser/*; do
|
||||
f="${f%/}"
|
||||
local filename="${f##*/}"
|
||||
lipo -create "nvim-macos-arm64/lib/nvim/parser/${filename}" \
|
||||
"nvim-macos-x86_64/lib/nvim/parser/${filename}" \
|
||||
-output "${universal_folder_path}/share/nvim/runtime/parser/${filename}"
|
||||
done
|
||||
|
||||
tar -cjf nvim-macos-universal.tar.bz nvim-macos-universal
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
main
|
@ -1,7 +1,4 @@
|
||||
{
|
||||
"deploymentTarget": "12",
|
||||
"gettext": {
|
||||
"arm64BottleTag": "arm64_monterey",
|
||||
"x86_64BottleTag": "monterey"
|
||||
}
|
||||
"neovimRelease": "neovim-v0.10.0-20240527.232810"
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
# Next
|
||||
|
||||
* Neovim 0.10.0 😀
|
||||
|
||||
# v0.46.2-20240517.102525
|
||||
|
||||
* GH-1059: Improved coloring of custom tabs; thanks @s-daveb for the PR!
|
||||
|
||||
# v0.46.1-20240426.143700
|
||||
|
Loading…
Reference in New Issue
Block a user