mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-23 22:01:49 +03:00
Update DEVELOP.md
This commit is contained in:
parent
76a574efd1
commit
9a19b7ffcc
86
DEVELOP.md
Normal file
86
DEVELOP.md
Normal file
@ -0,0 +1,86 @@
|
||||
## How to develop
|
||||
|
||||
### No change in NvimServer
|
||||
|
||||
If you did not change NvimServer, i.e. NvimServer, NvimServerTypes, and neovim,
|
||||
then, do the following to run VimR:
|
||||
|
||||
* `./bin/download_nvimserver.sh`
|
||||
* Run VimR scheme in Xcode
|
||||
|
||||
A development version of VimR will be built and run,
|
||||
i.e. the bundle identifier will be `com.qvacua.VimR.dev` and the name of the app will be `VimR-dev`.
|
||||
If you want to build a development version as a release build, then use the following:
|
||||
|
||||
```bash
|
||||
clean=true ./bin/build_vimr_dev.sh
|
||||
```
|
||||
|
||||
### Changes in NvimServer
|
||||
|
||||
Since SwiftPM does not support a script phase, we have to copy some files manually,
|
||||
e.g. `NvimServer` binary.
|
||||
This can be done with the following:
|
||||
|
||||
```bash
|
||||
build_libnvim=true clean=true download_gettext=true ./bin/build_nvimserver_for_local_dev.sh
|
||||
```
|
||||
|
||||
Set `download_gettext` to true when you are building NvimServer locally for the first time.
|
||||
See the `build_nvimserver_for_local_dev` script for default values of the env vars.
|
||||
You can also use a watch script as follows (it uses `entr`):
|
||||
|
||||
```bash
|
||||
clean_initial_build=true ./bin/watch_nvimserver_and_build
|
||||
```
|
||||
|
||||
When `clean_initial_build` is `true`, the script will download `gettext`, clean, and build,
|
||||
then continuously invoke the `build_nvimserver_for_local_dev` script.
|
||||
|
||||
## How to release
|
||||
|
||||
### NvimServer
|
||||
|
||||
#### Dependencies
|
||||
|
||||
* Tag with the name `nvimserver-deps-yyyy-mm-dd`. GitHub actions will build the `x86_64` version,
|
||||
create a release and upload it.
|
||||
* Build the `arm64` version locally (on an Apple Silicon machine since I could not find out
|
||||
how to cross-compile `libnvim`) and upload it.
|
||||
* Update `NvimServer/Resources/nvimserver-deps-for-download.txt` and push.
|
||||
|
||||
#### Executable
|
||||
|
||||
* Tag with the name `nvimserver-x.y.z-n`. GitHub actions will build the `x86_64` version,
|
||||
create a release and upload it.
|
||||
* Build the `arm64` version locally and upload it.
|
||||
|
||||
### VimR
|
||||
|
||||
#### Dependencies
|
||||
|
||||
* Tag with the name `vimr-deps-yyyy-mm-dd`. GitHub actions will build the universal version,
|
||||
create a release and upload it.
|
||||
* Update `resources/vimr-deps_version.txt` and push.
|
||||
|
||||
#### Executable
|
||||
|
||||
* Set a new version of VimR via
|
||||
```bash
|
||||
is_snapshot=true ./bin/set_new_versions.sh
|
||||
```
|
||||
and commit. This will print out some environment variables you can use when invoking the
|
||||
`build_release.sh` script later.
|
||||
* Tag with the name
|
||||
- Snapshot: `snapshot/yyyymmdd.HHMMSS`
|
||||
- Release: `vX.Y.Z`
|
||||
* Push, create a release and add release notes.
|
||||
* Build, package and upload via
|
||||
```bash
|
||||
is_snapshot=true \
|
||||
bundle_version=20211212.213543 tag=snapshot/20211212.213543 marketing_version=SNAPSHOT-20211212.213543 \
|
||||
upload=true update_appcast=true \
|
||||
./bin/build_release.sh
|
||||
```
|
||||
* The `appcast{-snapshot}.xml` file is modified. Check and push.
|
||||
|
41
README.md
41
README.md
@ -12,18 +12,17 @@ The goal is to build an editor that uses Neovim inside with many of the convenie
|
||||
GUI features similar to those present in modern editors. We mainly use Swift,
|
||||
but also use C/Objective-C when where appropriate.
|
||||
|
||||
There are other Neovim GUIs for macOS, e.g. [NyaoVim](https://github.com/rhysd/NyaoVim), [neovim-dot-app](https://github.com/rogual/neovim-dot-app), [Oni](https://www.onivim.io), etc., so why?
|
||||
There are other Neovim GUIs for macOS, see the [list](https://github.com/neovim/neovim/wiki/Related-projects#gui), so why?
|
||||
|
||||
- Play around with [Neovim](https://github.com/qvacua/neovim),
|
||||
- play around with Swift (and especially with [RxSwift](https://github.com/ReactiveX/RxSwift)), and
|
||||
- (most importantly) have fun!
|
||||
|
||||
If you want to support VimR financially, use [Github's Sponsor](https://github.com/sponsors/qvacua)
|
||||
or [Bountysource](https://www.bountysource.com/teams/vimr).
|
||||
If you want to support VimR financially, use [Github's Sponsor](https://github.com/sponsors/qvacua).
|
||||
|
||||
## Download
|
||||
|
||||
Pre-built binaries can be found under [Releases](https://github.com/qvacua/vimr/releases).
|
||||
Pre-built Universal signed and notarized binaries can be found under [Releases](https://github.com/qvacua/vimr/releases).
|
||||
|
||||
## Reusable Components
|
||||
|
||||
@ -45,45 +44,21 @@ Pre-built binaries can be found under [Releases](https://github.com/qvacua/vimr/
|
||||
|
||||
## How to Build
|
||||
|
||||
First after cloning the VimR source tree you need to initialize git submodules
|
||||
|
||||
```bash
|
||||
git lfs install
|
||||
git submodule update --init
|
||||
```
|
||||
|
||||
First install `homebrew`, then in the project root:
|
||||
Clone this repository. Install `homebrew`, then in the project root:
|
||||
|
||||
```bash
|
||||
xcode-select --install # install the Xcode command line tools, if you haven't already
|
||||
brew bundle
|
||||
|
||||
code_sign=false use_carthage_cache=false ./bin/build_vimr.sh # VimR.app will be placed in build/Build/Products/Release/
|
||||
code_sign=false use_carthage_cache=false download_deps=true ./bin/build_vimr.sh
|
||||
# VimR.app will be placed in ./build/Build/Products/Release/
|
||||
```
|
||||
|
||||
## Project Setup
|
||||
## Development
|
||||
|
||||
### Artifacts Hierarchy
|
||||
|
||||
```
|
||||
VimR.app
|
||||
+-- NvimView.framework
|
||||
+-- NvimServer
|
||||
+-- libnvim
|
||||
+-- other libs for Neovim
|
||||
+-- NvimView
|
||||
+-- NvimServer binary (copied by the build script)
|
||||
+-- runtime files for Neovim (copied by the build script)
|
||||
```
|
||||
|
||||
### How to develop
|
||||
|
||||
See [DEVELOP.md](docs/develop.md).
|
||||
See [DEVELOP.md](DEVELOP.md).
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/qvacua/vimr/blob/master/LICENSE)
|
||||
|
||||
---
|
||||
|
||||
If you are here for VimR-MacVim, use the [macvim/master](https://github.com/qvacua/vimr/tree/macvim/master) branch and the version [0.8.0 (32)](https://github.com/qvacua/vimr/releases/tag/v0.8.0-32).
|
||||
|
@ -97,10 +97,10 @@ main() {
|
||||
|
||||
if [[ "${upload}" == true ]]; then
|
||||
upload_artifact
|
||||
fi
|
||||
|
||||
if [[ "${update_appcast}" == true ]]; then
|
||||
update_appcast_file
|
||||
if [[ "${update_appcast}" == true ]]; then
|
||||
update_appcast_file
|
||||
fi
|
||||
fi
|
||||
popd >/dev/null
|
||||
}
|
||||
|
@ -7,6 +7,12 @@ marketing_version=${marketing_version:-""}
|
||||
main() {
|
||||
if [[ "${is_snapshot}" == false && -z "${marketing_version}" ]]; then
|
||||
echo "When no snapshot, you have to set 'marketing_version', eg 0.38.1"
|
||||
|
||||
if [[ "${marketing_version}" =~ ^v.* ]]; then
|
||||
echo "### marketing_version must not begin with v!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -29,6 +35,14 @@ main() {
|
||||
|
||||
popd >/dev/null
|
||||
echo "### Set versions of VimR"
|
||||
|
||||
local tag
|
||||
if [[ "${is_snapshot}" == true ]]; then
|
||||
tag="tag=snapshot/${bundle_version}"
|
||||
else
|
||||
tag="tag=v${marketing_version}"
|
||||
fi
|
||||
echo "bundle_version=${bundle_version} marketing_version=${marketing_version} tag=${tag}"
|
||||
}
|
||||
|
||||
main
|
||||
|
@ -1,70 +0,0 @@
|
||||
## How to develop
|
||||
|
||||
### No change in NvimServer
|
||||
|
||||
If you did not change code in NvimServer, i.e. NvimServer, NvimServerTypes, and neovim,
|
||||
then, do the following to run VimR:
|
||||
|
||||
* `./bin/download_nvimserver.sh`
|
||||
* Run VimR scheme in Xcode
|
||||
|
||||
A development version of VimR will be built and run,
|
||||
i.e. the bundle identifier will be `com.qvacua.VimR.dev` and the name of the app will be `VimR-dev`.
|
||||
If you want to build a development version as a release build, then use the following:
|
||||
|
||||
```bash
|
||||
clean=true ./bin/build_vimr_dev.sh
|
||||
```
|
||||
|
||||
### Changes in NvimServer
|
||||
|
||||
Since SwiftPM does not support a script phase, we have to copy some files manually,
|
||||
e.g. `NvimServer` binary.
|
||||
This can be done with the following:
|
||||
|
||||
```bash
|
||||
build_libnvim=true clean=true download_gettext=true ./bin/build_nvimserver_for_local_dev.sh
|
||||
```
|
||||
|
||||
Set `download_gettext` to true when you are building NvimServer locally for the first time.
|
||||
See the `build_nvimserver_for_local_dev` script for default values of the env vars.
|
||||
You can also use a watch script as follows:
|
||||
|
||||
```bash
|
||||
clean_initial_build=true ./bin/watch_nvimserver_and_build
|
||||
```
|
||||
|
||||
When `clean_initial_build` is `true`, the script will download `gettext`, clean, and build,
|
||||
then continuously invoke the `build_nvimserver_for_local_dev` script.
|
||||
|
||||
## How to release
|
||||
|
||||
* Tag NvimServer: Travis will create a Github release, build,
|
||||
and upload `gettext` and `NvimServer` for `x86_64`.
|
||||
* Build `gettext` and `NvimServer` on an `arm64` Mac
|
||||
and upload them to the release from the last step.
|
||||
* Set a new version of VimR via
|
||||
```
|
||||
is_snapshot=true ./bin/set_new_versions.sh
|
||||
```
|
||||
* Push and and build using
|
||||
```
|
||||
code_sign=true use_carthage_cache=false ./bin/build_vimr.sh
|
||||
```
|
||||
* Notarize using
|
||||
```
|
||||
vimr_app_path=./build/Build/Products/Release/VimR.app ./bin/notarize_vimr.sh
|
||||
```
|
||||
* Create a Github release, add release notes, and upload VimR archived by
|
||||
```
|
||||
cd ./build/Build/Products/Release
|
||||
tar cjf VimR-SNAPSHOT-20201210.181940.tar.bz2 VimR.app
|
||||
```
|
||||
* Update `appcast` file, e.g.
|
||||
```
|
||||
cd ./build/Build/Products/Release
|
||||
./bin/set_appcast.py "${vimr_file}" "${bundle_version}" "${marketing_version}" "${tag}" "${is_snapshot}"
|
||||
cp appcast_snapshot.xml "${project_root}"
|
||||
```
|
||||
|
||||
*TODO*: Automate this again.
|
Loading…
Reference in New Issue
Block a user