Better packaging
parent
7f8e249a18
commit
6f4df225c5
|
@ -33,19 +33,19 @@ deploy:package:
|
|||
- mkdir out # package
|
||||
- cd build
|
||||
- mkdir -p applications
|
||||
- cp ../resource/config/*.desktop applications
|
||||
- cp ../resource/package/*.desktop applications
|
||||
- mkdir -p icons/hicolor/256x256/apps
|
||||
- cp ../univerxel.png icons/hicolor/256x256/apps
|
||||
- cp ../resource/config/full.toml config.toml
|
||||
- tar cfz ../out/full-nux64.tar.gz univerxel applications/fr.wadza.univerxel.desktop config.toml icons content
|
||||
- cp ../resource/config/client.toml config.toml
|
||||
- tar cfz ../out/client-nux64.tar.gz univerxel-client applications/fr.wadza.univerxel.client.desktop config.toml icons content/shaders content/textures
|
||||
- cp ../resource/config/server.toml config.toml
|
||||
- tar cfz ../out/server-nux64.tar.gz univerxel-server applications/fr.wadza.univerxel.server.desktop config.toml icons content/cert.pem content/key.pem content/zstd.dict
|
||||
- cp ../resource/package/config.full.toml config.toml
|
||||
- tar cfz ../out/full.tar.gz univerxel applications/fr.wadza.univerxel.desktop config.toml icons content
|
||||
- cp ../resource/package/config.client.toml config.toml
|
||||
- tar cfz ../out/client.tar.gz univerxel-client applications/fr.wadza.univerxel.client.desktop config.toml icons content/shaders content/textures
|
||||
- cp ../resource/package/config.server.toml config.toml
|
||||
- tar cfz ../out/server.tar.gz univerxel-server applications/fr.wadza.univerxel.server.desktop config.toml icons content/cert.pem content/key.pem content/zstd.dict
|
||||
- cd ../out # deploy
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file full-nux64.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel/$CI_COMMIT_TAG/Univerxel-$CI_COMMIT_TAG-nux64.tar.gz'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file client-nux64.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel-client/$CI_COMMIT_TAG/Univerxel-client-$CI_COMMIT_TAG-nux64.tar.gz'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file server-nux64.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel-server/$CI_COMMIT_TAG/Univerxel-server-$CI_COMMIT_TAG-nux64.tar.gz'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file full.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel/$CI_COMMIT_TAG/Univerxel.tar.gz'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file client.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel/$CI_COMMIT_TAG/Univerxel-client.tar.gz'
|
||||
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file server.tar.gz ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/Univerxel/$CI_COMMIT_TAG/Univerxel-server.tar.gz'
|
||||
dependencies:
|
||||
- build:linux
|
||||
artifacts:
|
||||
|
|
|
@ -77,7 +77,9 @@ else()
|
|||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set(ICON univerxel.rc)
|
||||
configure_file(resource/package/info.rc.in info.rc @ONLY)
|
||||
set(ICON resource/package/icon.rc ${CMAKE_CURRENT_BINARY_DIR}/info.rc)
|
||||
file(COPY resource/package/install.nsi DESTINATION ${CMAKE_BINARY_DIR})
|
||||
elseif (APPLE)
|
||||
set(ICON univerxel.icns)
|
||||
endif()
|
||||
|
|
2
TODO.md
2
TODO.md
|
@ -82,6 +82,7 @@
|
|||
|
||||
## Hello darkness
|
||||
|
||||
- [ ] Launcher / Updater
|
||||
- [ ] Break area part to entity
|
||||
- [ ] Slash screen
|
||||
- [ ] Start/Pause menu
|
||||
|
@ -115,3 +116,4 @@
|
|||
- [ ] Avoid transparent back-face
|
||||
- [ ] Translucency
|
||||
- Back face Depth based
|
||||
- [ ] I18L
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
UNIVERXEL ICON "univerxel.ico"
|
|
@ -0,0 +1,53 @@
|
|||
// info.rc.in
|
||||
#if defined(__MINGW64__) || defined(__MINGW32__)
|
||||
// MinGW-w64, MinGW
|
||||
#if defined(__has_include) && __has_include(<winres.h>)
|
||||
#include <winres.h>
|
||||
#else
|
||||
#include <afxres.h>
|
||||
#include <winresrc.h>
|
||||
#endif
|
||||
#else
|
||||
// MSVC, Windows SDK
|
||||
#include <winres.h>
|
||||
#endif
|
||||
|
||||
#define VER_VERSION @CMAKE_PROJECT_VERSION_MAJOR@,@CMAKE_PROJECT_VERSION_MINOR@,@CMAKE_PROJECT_VERSION_PATCH@,1
|
||||
#define VER_VERSION_STR "@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@.@CMAKE_PROJECT_VERSION_PATCH@\0"
|
||||
#define NAME_STR "Univerxel\0"
|
||||
|
||||
#ifndef DEBUG
|
||||
#define VER_DEBUG 0
|
||||
#else
|
||||
#define VER_DEBUG VS_FF_DEBUG
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_VERSION
|
||||
PRODUCTVERSION VER_VERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS (VS_FF_PRERELEASE|VER_DEBUG)
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Shu\0"
|
||||
VALUE "FileDescription", NAME_STR
|
||||
VALUE "FileVersion", VER_VERSION_STR
|
||||
VALUE "InternalName", NAME_STR
|
||||
VALUE "LegalCopyright", "MIT - Shu\0"
|
||||
VALUE "ProductName", NAME_STR
|
||||
VALUE "ProductVersion", VER_VERSION_STR
|
||||
END
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
|
||||
END
|
||||
END
|
|
@ -0,0 +1,126 @@
|
|||
!include "MUI2.nsh"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; The name of the installer
|
||||
Name "Univerxel"
|
||||
|
||||
Icon "../resource/package/univerxel.ico"
|
||||
|
||||
; Request application privileges for Windows Vista and higher
|
||||
RequestExecutionLevel user
|
||||
|
||||
; Build Unicode installer
|
||||
Unicode True
|
||||
|
||||
SetCompressor /SOLID LZMA
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $LOCALAPPDATA\Univerxel
|
||||
|
||||
; Registry key to check for directory (so if you install again, it will
|
||||
; overwrite the old one automatically)
|
||||
InstallDirRegKey HKLM "Software\Univerxel" "Install_Dir"
|
||||
|
||||
VIAddVersionKey "CompanyName" "Shu"
|
||||
VIAddVersionKey "FileDescription" "Univerxel installer"
|
||||
VIAddVersionKey "ProductName" "Univerxel installer"
|
||||
VIAddVersionKey "LegalCopyright" "MIT - Shu"
|
||||
VIAddVersionKey "FileVersion" "0.0.1"
|
||||
VIProductVersion "0.0.1.1"
|
||||
|
||||
OutFile "Univerxel-installer.exe"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; Pages
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; The stuff to install
|
||||
Section "Dependencies"
|
||||
SectionIn RO
|
||||
SetOutPath $INSTDIR
|
||||
File "package\libcrypto-1_1-x64.dll"
|
||||
File "package\openssl-license.txt"
|
||||
|
||||
; Write the installation path into the registry
|
||||
WriteRegStr HKLM SOFTWARE\Univerxel "Install_Dir" "$INSTDIR"
|
||||
|
||||
; Write the uninstall keys for Windows
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Univerxel" "DisplayName" "Univerxel"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Univerxel" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Univerxel" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Univerxel" "NoRepair" 1
|
||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||
CreateDirectory "$SMPROGRAMS\Univerxel"
|
||||
SectionEnd
|
||||
Section "All in one"
|
||||
SetOutPath $INSTDIR
|
||||
File "Release\univerxel.exe"
|
||||
File /r content
|
||||
SetOverwrite off
|
||||
File /oname=config.toml "..\resource\package\config.full.toml"
|
||||
SetOverwrite on
|
||||
CreateShortcut "$SMPROGRAMS\Univerxel\Univerxel (Full).lnk" "$INSTDIR\univerxel.exe"
|
||||
SectionEnd
|
||||
Section /o "Client"
|
||||
SetOutPath $INSTDIR
|
||||
File "Release\univerxel-client.exe"
|
||||
File /r /x *.pem /x *.dict content
|
||||
SetOverwrite off
|
||||
File /oname=config.toml "..\resource\package\config.client.toml"
|
||||
SetOverwrite on
|
||||
CreateShortcut "$SMPROGRAMS\Univerxel\Univerxel (Client).lnk" "$INSTDIR\univerxel-client.exe"
|
||||
SectionEnd
|
||||
Section /o "Server"
|
||||
SetOutPath $INSTDIR
|
||||
File "Release\univerxel-server.exe"
|
||||
CreateDirectory "$INSTDIR\content"
|
||||
File /oname=content\cert.pem content\cert.pem
|
||||
File /oname=content\key.pem content\key.pem
|
||||
File /oname=content\zstd.dict content\zstd.dict
|
||||
SetOverwrite off
|
||||
File /oname=config.toml "..\resource\package\config.server.toml"
|
||||
SetOverwrite on
|
||||
CreateShortcut "$SMPROGRAMS\Univerxel\Univerxel (Server).lnk" "$INSTDIR\univerxel-server.exe"
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; Uninstaller
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
; Remove registry keys
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Univerxel"
|
||||
DeleteRegKey HKLM SOFTWARE\Univerxel
|
||||
|
||||
; Remove files and uninstaller
|
||||
Delete "$INSTDIR\libcrypto-1_1-x64.dll"
|
||||
Delete "$INSTDIR\openssl-license.txt"
|
||||
Delete "$INSTDIR\univerxel.exe"
|
||||
Delete "$INSTDIR\univerxel-client.exe"
|
||||
Delete "$INSTDIR\univerxel-server.exe"
|
||||
RMDir /r "$INSTDIR\content"
|
||||
Delete "$INSTDIR\uninstall.exe"
|
||||
|
||||
; Remove shortcuts, if any
|
||||
Delete "$SMPROGRAMS\Univerxel\*.lnk"
|
||||
|
||||
; Remove directories
|
||||
RMDir /r "$SMPROGRAMS\Univerxel"
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
SectionEnd
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
@ -118,7 +118,7 @@ namespace world::generator {
|
|||
const auto heightRatio = static_cast<float>((getHeight(pos) - params.height) / params.height);
|
||||
const auto scale = params.height >> 7;
|
||||
const auto mass = scale * scale * scale; //FIXME: average material density
|
||||
return -getSurfaceDir(pos) * std::max(0.f, 1.f - heightRatio * heightRatio) * glm::vec3(mass);
|
||||
return -getSurfaceDir(pos) * std::max<float>(0, 1.f - heightRatio * heightRatio) * glm::vec3(mass);
|
||||
}
|
||||
private:
|
||||
static constexpr PlanetShape shape = PS;
|
||||
|
|
28
univerxel.rc
28
univerxel.rc
|
@ -1,28 +0,0 @@
|
|||
|
||||
UNIVERXEL ICON "univerxel.ico"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 0,0,1,0
|
||||
PRODUCTVERSION 0,0,1,0
|
||||
|
||||
EGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP */
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Shu"
|
||||
VALUE "FileVersion", "0,0,1,0"
|
||||
VALUE "LegalCopyright", "MIT"
|
||||
VALUE "ProductName", "Univerxel"
|
||||
VALUE "ProductVersion", "0,0,1,0"
|
||||
VER_SPECIAL_BUILD_LINE
|
||||
VER_PRIVATE_BUILD_LINE
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 0x04B0
|
||||
END
|
||||
END
|
Loading…
Reference in New Issue