diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 9928d472b3..7181972696 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -6,8 +6,26 @@ ${NVIM_VERSION} ### Windows -1. Extract **nvim-win64.zip** -2. Run `nvim-qt.exe` +#### Zip + +1. Download **nvim-win64.zip** +2. Extract the zip. +3. Run `nvim-qt.exe` + +#### MSI + +1. Download **nvim-win64.msi** +2. Run the MSI +3. Add the Neovim location to your path. + - Default location is `C:\Program Files\Neovim` +4. Search and run `nvim-qt.exe` or run `nvim.exe` on your CLI of choice. + +#### NSIS + +1. Download **nvim-win64.exe** +2. Run the installer. + - Ensure that the option to add the installation location to your path is checked if it's your first installation. +3. Search and run `nvim-qt.exe` or run `nvim.exe` on your CLI of choice. ### macOS @@ -17,6 +35,19 @@ ${NVIM_VERSION} ### Linux (x64) +#### Tarball + +1. Download **nvim-linux64.tar.gz** +2. Extract: `tar xzvf nvim-linux64.tar.gz` +3. Run `./nvim-linux64/bin/nvim` + +#### Debian Package + +1. Download **nvim-linux64.deb** +2. Install the package using `sudo apt install ./nvim-linux64.deb` +3. Run `nvim` + +#### AppImage 1. Download **nvim.appimage** 2. Run `chmod u+x nvim.appimage && ./nvim.appimage` - If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage): @@ -32,9 +63,12 @@ ${NVIM_VERSION} ## SHA256 Checksums ``` -${SHA_LINUX_64} +${SHA_LINUX_64_TAR} +${SHA_LINUX_64_DEB} ${SHA_APP_IMAGE} ${SHA_APP_IMAGE_ZSYNC} ${SHA_MACOS} -${SHA_WIN_64} +${SHA_WIN_64_ZIP} +${SHA_WIN_64_MSI} +${SHA_WIN_64_EXE} ``` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b72c2ab71d..503db400ce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,12 +39,17 @@ jobs: printf '::set-output name=version::%s\n' "$(./build/bin/nvim --version | head -n 3 | sed -z 's/\n/%0A/g')" printf '::set-output name=release::%s\n' "$(./build/bin/nvim --version | head -n 1)" make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-linux64" install - cd "$GITHUB_WORKSPACE/build/release" - tar cfz nvim-linux64.tar.gz nvim-linux64 + cd "$GITHUB_WORKSPACE/build/" + cpack -C $NVIM_BUILD_TYPE - uses: actions/upload-artifact@v2 with: name: nvim-linux64 - path: build/release/nvim-linux64.tar.gz + path: build/nvim-linux64.tar.gz + retention-days: 1 + - uses: actions/upload-artifact@v2 + with: + name: nvim-linux64 + path: build/nvim-linux64.deb retention-days: 1 appimage: @@ -131,12 +136,21 @@ jobs: - run: powershell ci\build.ps1 -NoTests env: CONFIGURATION: ${{ matrix.config }} - - run: move build\Neovim.zip build\${{ matrix.archive }}.zip - uses: actions/upload-artifact@v2 with: name: ${{ matrix.archive }} path: build/${{ matrix.archive }}.zip retention-days: 1 + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.archive }} + path: build/${{ matrix.archive }}.msi + retention-days: 1 + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.archive }} + path: build/${{ matrix.archive }}.exe + retention-days: 1 publish: needs: [linux, appimage, macOS, windows] @@ -187,7 +201,9 @@ jobs: run: | cd ./nvim-linux64 sha256sum nvim-linux64.tar.gz > nvim-linux64.tar.gz.sha256sum - echo "SHA_LINUX_64=$(cat nvim-linux64.tar.gz.sha256sum)" >> $GITHUB_ENV + echo "SHA_LINUX_64_TAR=$(cat nvim-linux64.tar.gz.sha256sum)" >> $GITHUB_ENV + sha256sum nvim-linux64.deb > nvim-linux64.deb.sha256sum + echo "SHA_LINUX_64_DEB=$(cat nvim-linux64.deb.sha256sum)" >> $GITHUB_ENV - name: Generate App Image SHA256 checksums run: | cd ./appimage @@ -207,7 +223,11 @@ jobs: run: | cd ./nvim-win64 sha256sum nvim-win64.zip > nvim-win64.zip.sha256sum - echo "SHA_WIN_64=$(cat nvim-win64.zip.sha256sum)" >> $GITHUB_ENV + echo "SHA_WIN_64_ZIP=$(cat nvim-win64.zip.sha256sum)" >> $GITHUB_ENV + sha256sum nvim-win64.msi > nvim-win64.msi.sha256sum + echo "SHA_WIN_64_MSI=$(cat nvim-win64.msi.sha256sum)" >> $GITHUB_ENV + sha256sum nvim-win64.exe > nvim-win64.exe.sha256sum + echo "SHA_WIN_64_EXE=$(cat nvim-win64.exe.sha256sum)" >> $GITHUB_ENV - name: Publish release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index e0f05e1205..08d52eb071 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -736,17 +736,6 @@ else() COMMENT "lualint: LUACHECK_PRG not defined") endif() -set(CPACK_PACKAGE_NAME "Neovim") -set(CPACK_PACKAGE_VENDOR "neovim.io") -set(CPACK_PACKAGE_VERSION ${NVIM_VERSION_MEDIUM}) -set(CPACK_PACKAGE_INSTALL_DIRECTORY "Neovim") -# Set toplevel directory/installer name as Neovim -set(CPACK_PACKAGE_FILE_NAME "Neovim") -set(CPACK_TOPLEVEL_TAG "Neovim") -set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") -set(CPACK_NSIS_MODIFY_PATH ON) -set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) -include(CPack) #add uninstall target if(NOT TARGET uninstall) @@ -758,3 +747,8 @@ if(NOT TARGET uninstall) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/UninstallHelper.cmake) endif() + + +if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) + add_subdirectory(packaging) +endif() diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/ci/build.ps1 b/ci/build.ps1 index ef5ba3bf2d..5bbf3c4d8a 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -167,7 +167,4 @@ if (Test-Path -Path $env:ChocolateyInstall\bin\cpack.exe) { } # Build artifacts -cpack -G ZIP -C RelWithDebInfo -if ($env:APPVEYOR_REPO_TAG_NAME -ne $null) { - cpack -G NSIS -C RelWithDebInfo -} +cpack -C $cmakeBuildType diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt new file mode 100644 index 0000000000..6ae744c2cd --- /dev/null +++ b/packaging/CMakeLists.txt @@ -0,0 +1,78 @@ +set(CPACK_PACKAGE_NAME "Neovim") +set(CPACK_PACKAGE_VENDOR "neovim.io") +set(CPACK_PACKAGE_FILE_NAME "nvim") + +# From the GitHub About section +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Vim-fork focused on extensibility and usability.") + +set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) + +# Pull the versions defined with the top level CMakeLists.txt +set(CPACK_PACKAGE_VERSION_MAJOR ${NVIM_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${NVIM_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${NVIM_VERSION_PATCH}) + +# CPACK_VERBATIM_VARIABLES ensures that the variables prefixed with *CPACK_* +# are correctly passed to the cpack program. +# This should always be set to true. +set(CPACK_VERBATIM_VARIABLES TRUE) + +set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.txt") +set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md) + + +if(WIN32) + set(CPACK_PACKAGE_FILE_NAME "nvim-win64") + set(CPACK_GENERATOR ZIP WIX NSIS) + + # WIX + # CPACK_WIX_UPGRADE_GUID should be set, but should never change. + # CPACK_WIX_PRODUCT_GUID should not be set (leave as default to auto-generate). + + # The following guid is just a randomly generated guid that's been pasted here. + # It has no special meaning other than to supply it to WIX. + set(CPACK_WIX_UPGRADE_GUID "207A1A70-7B0C-418A-A153-CA6883E38F4D") + set(CPACK_WIX_PRODUCT_ICON ${CMAKE_CURRENT_LIST_DIR}/logo.ico) + + # NSIS + # install icon + set(CPACK_NSIS_MUI_ICON ${CMAKE_CURRENT_LIST_DIR}/logo.ico) + + # uninstall icon + set(CPACK_NSIS_MUI_UNIICON ${CMAKE_CURRENT_LIST_DIR}/logo.ico) + + # icon that appears when you search in Add/Remove programs + set(CPACK_NSIS_INSTALLED_ICON_NAME ${CMAKE_CURRENT_LIST_DIR}/logo.ico) + + # name that appears in the list in Add/Remove programs + set(CPACK_NSIS_DISPLAY_NAME "Neovim") + + # name used in various installer UI locations, such as the title + set(CPACK_NSIS_PACKAGE_NAME "Neovim") + + # Allow the user to modify their path to include neovim during + # the installation process. + set(CPACK_NSIS_MODIFY_PATH TRUE) +elseif(APPLE) + set(CPACK_PACKAGE_FILE_NAME "nvim-macos") + set(CPACK_GENERATOR TGZ) + set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_LIST_DIR}/logo.icns) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(CPACK_PACKAGE_FILE_NAME "nvim-linux64") + set(CPACK_GENERATOR TGZ DEB) + set(CPACK_DEBIAN_PACKAGE_NAME "Neovim") # required + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Neovim.io") # required + + # Automatically compute required shared lib dependencies. + # Unfortunately, you "just need to know" that this has a hidden + # dependency on dpkg-shlibdeps whilst using a debian based host. + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) +else() + set(CPACK_GENERATOR TGZ) +endif() + +# CPack variables are loaded in on the call to include(CPack). If you set +# variables *after* the inclusion, they don't get updated within the CPack +# config. Note that some CPack commands should still be run after it, such +# as cpack_add_component(). +include(CPack) diff --git a/packaging/logo.icns b/packaging/logo.icns new file mode 100644 index 0000000000..a6377d9cdb Binary files /dev/null and b/packaging/logo.icns differ diff --git a/packaging/logo.ico b/packaging/logo.ico new file mode 100644 index 0000000000..a4523501b9 Binary files /dev/null and b/packaging/logo.ico differ diff --git a/packaging/logo.svg b/packaging/logo.svg new file mode 100644 index 0000000000..e8aa8bd33e --- /dev/null +++ b/packaging/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file