From f05a2891d3da9f9fcd9c7457ca0c2a54ff65078b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 27 Jun 2022 03:08:59 -0700 Subject: build: rename build-related dirs Problem: Dirs "config", "packaging", and "third-party" are all closely related but this is not obvious from the layout. This adds friction for new contributors. Solution: - rename config/ to cmake.config/ - rename test/config/ to test/cmakeconfig/ because it is used in Lua tests: require('test.cmakeconfig.paths'). - rename packaging/ to cmake.packaging/ - rename third-party/ to cmake.deps/ (parallel with .deps/) --- cmake.packaging/CMakeLists.txt | 64 ++++++++++++++++++ cmake.packaging/WixPatch.xml | 14 ++++ cmake.packaging/neovim.icns | Bin 0 -> 86517 bytes cmake.packaging/neovim.ico | Bin 0 -> 122355 bytes cmake.packaging/neovim.png | Bin 0 -> 6758 bytes cmake.packaging/neovim.svg | 147 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 225 insertions(+) create mode 100644 cmake.packaging/CMakeLists.txt create mode 100644 cmake.packaging/WixPatch.xml create mode 100644 cmake.packaging/neovim.icns create mode 100644 cmake.packaging/neovim.ico create mode 100644 cmake.packaging/neovim.png create mode 100644 cmake.packaging/neovim.svg (limited to 'cmake.packaging') diff --git a/cmake.packaging/CMakeLists.txt b/cmake.packaging/CMakeLists.txt new file mode 100644 index 0000000000..8538075388 --- /dev/null +++ b/cmake.packaging/CMakeLists.txt @@ -0,0 +1,64 @@ +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) + + # 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}/neovim.ico) + + # We use a wix patch to add further options to the installer. At present, it's just to add neovim to the path + # on installation, however, it can be extended. + # See: https://cmake.org/cmake/help/v3.7/module/CPackWIX.html#variable:CPACK_WIX_PATCH_FILE + list(APPEND CPACK_WIX_EXTENSIONS WixUtilExtension) + list(APPEND CPACK_WIX_PATCH_FILE ${CMAKE_CURRENT_LIST_DIR}/WixPatch.xml) +elseif(APPLE) + set(CPACK_PACKAGE_FILE_NAME "nvim-macos") + set(CPACK_GENERATOR TGZ) + set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_LIST_DIR}/neovim.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/cmake.packaging/WixPatch.xml b/cmake.packaging/WixPatch.xml new file mode 100644 index 0000000000..3cbbb04850 --- /dev/null +++ b/cmake.packaging/WixPatch.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/cmake.packaging/neovim.icns b/cmake.packaging/neovim.icns new file mode 100644 index 0000000000..df0e982369 Binary files /dev/null and b/cmake.packaging/neovim.icns differ diff --git a/cmake.packaging/neovim.ico b/cmake.packaging/neovim.ico new file mode 100644 index 0000000000..e0c151c966 Binary files /dev/null and b/cmake.packaging/neovim.ico differ diff --git a/cmake.packaging/neovim.png b/cmake.packaging/neovim.png new file mode 100644 index 0000000000..a3960b41bd Binary files /dev/null and b/cmake.packaging/neovim.png differ diff --git a/cmake.packaging/neovim.svg b/cmake.packaging/neovim.svg new file mode 100644 index 0000000000..d82ad667c1 --- /dev/null +++ b/cmake.packaging/neovim.svg @@ -0,0 +1,147 @@ + + + + + + image/svg+xml + + neovim-mark@2x + + + + + neovim-mark@2x + Created with Sketch (http://www.bohemiancoding.com/sketch) + + + + + + + + + + + + + + + + + + + + + + + -- cgit