aboutsummaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2022-02-24 06:46:07 -0500
committerGitHub <noreply@github.com>2022-02-24 06:46:07 -0500
commit73da7cef7b09181152cb71a9835148da68dd2e6d (patch)
tree200ec5c0d0ca860f2bcd22cab76d5b0b06146bd2 /packaging
parent15004473b531e37a6ff3aeca9e3bfeaaa1487d9e (diff)
parent087aad3dcd3439bb87832356067e0a9e26eca510 (diff)
downloadrneovim-73da7cef7b09181152cb71a9835148da68dd2e6d.tar.gz
rneovim-73da7cef7b09181152cb71a9835148da68dd2e6d.tar.bz2
rneovim-73da7cef7b09181152cb71a9835148da68dd2e6d.zip
Merge pull request #17390 from RenFraser/feature/packaging
ci: improve cpack packaging
Diffstat (limited to 'packaging')
-rw-r--r--packaging/CMakeLists.txt78
-rw-r--r--packaging/logo.icnsbin0 -> 637562 bytes
-rw-r--r--packaging/logo.icobin0 -> 3518 bytes
-rw-r--r--packaging/logo.svg1
4 files changed, 79 insertions, 0 deletions
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
--- /dev/null
+++ b/packaging/logo.icns
Binary files differ
diff --git a/packaging/logo.ico b/packaging/logo.ico
new file mode 100644
index 0000000000..a4523501b9
--- /dev/null
+++ b/packaging/logo.ico
Binary files 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 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 54 65" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><use xlink:href="#D" x=".5" y=".5"/><defs><linearGradient x1="50.00%" y1="0.00%" x2="50.00%" y2="100.00%" id="A"><stop stop-color="#16b0ed" stop-opacity=".8" offset="0%"/><stop stop-color="#0f59b2" stop-opacity=".837" offset="100%"/></linearGradient><linearGradient x1="50.00%" y1="0.00%" x2="50.00%" y2="100.00%" id="B"><stop stop-color="#7db643" offset="0%"/><stop stop-color="#367533" offset="100%"/></linearGradient><linearGradient x1="50.00%" y1="-0.00%" x2="50.00%" y2="100.01%" id="C"><stop stop-color="#88c649" stop-opacity=".8" offset="0%"/><stop stop-color="#439240" stop-opacity=".84" offset="100%"/></linearGradient></defs><symbol id="D" overflow="visible"><g stroke="none"><path d="M0 13.761L13.63 0v63.983L0 50.381z" fill="url(#A)"/><path d="M52.664 13.894L38.848.008l.281 63.976 13.63-13.602z" fill="url(#B)"/><path d="M13.621.011l35.435 54.07-9.916 9.915L3.686 10.046z" fill="url(#C)"/><path d="M13.633 25.092l-.019 2.13L2.676 11.069l1.013-1.032z" fill="#000" fill-opacity=".13"/></g></symbol></svg> \ No newline at end of file