From 0856e5ac150e372e55fd560b22820049a47e4c38 Mon Sep 17 00:00:00 2001 From: Simon Judd Date: Tue, 19 Dec 2023 20:55:26 +1030 Subject: [PATCH] Bump version to 3.2.5 Also some minor tweaks/fixes to cmake and release script --- cmake/win_msvc.cmake | 6 +++++- dist/CMakeLists.txt | 10 ++++++++-- dist/makebuild.ps1 | 16 ++++++++++------ msvc/SLADE.rc | 8 ++++---- net.mancubus.SLADE.metainfo.xml | 1 + src/Application/App.cpp | 2 +- win_installer/SLADE-x64.iss | 2 +- win_installer/include/Defines.iss | 2 +- 8 files changed, 31 insertions(+), 16 deletions(-) diff --git a/cmake/win_msvc.cmake b/cmake/win_msvc.cmake index a8ade22bd..cbbf32343 100644 --- a/cmake/win_msvc.cmake +++ b/cmake/win_msvc.cmake @@ -71,11 +71,15 @@ add_executable(slade WIN32 ${SLADE_HEADERS} ) +if(NOT SLADE_EXE_NAME) +set(SLADE_EXE_NAME SLADE) +endif() + # Properties set_target_properties(slade PROPERTIES LINK_FLAGS "/subsystem:windows" - OUTPUT_NAME "SLADE" + OUTPUT_NAME "${SLADE_EXE_NAME}" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/dist" ) diff --git a/dist/CMakeLists.txt b/dist/CMakeLists.txt index 4160e704f..2d73399e6 100644 --- a/dist/CMakeLists.txt +++ b/dist/CMakeLists.txt @@ -1,13 +1,19 @@ find_program(ZIPTOOL_ZIP_EXECUTABLE zip) find_program(ZIPTOOL_7Z_EXECUTABLE 7z "$ENV{ProgramFiles}/7-Zip") +if(WIN32 AND MSVC) +set(PK3_DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}) # Put it directly in dist/ on windows +else() +set(PK3_DESTINATION ${CMAKE_BINARY_DIR}) +endif() + if(ZIPTOOL_7Z_EXECUTABLE) - set(ZIP_COMMAND "${ZIPTOOL_7Z_EXECUTABLE}" u -tzip -mtc- -mcu+ -mx=9 -r "${CMAKE_BINARY_DIR}/slade.pk3" .) + set(ZIP_COMMAND "${ZIPTOOL_7Z_EXECUTABLE}" u -tzip -mtc- -mcu+ -mx=9 -r "${PK3_DESTINATION}/slade.pk3" .) elseif(ZIPTOOL_ZIP_EXECUTABLE) if(NOT APPLE) set(ZIP_COMMAND_CHARSET "-UN=UTF8") endif() - set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -X ${ZIP_COMMAND_CHARSET} -9 -r "${CMAKE_BINARY_DIR}/slade.pk3" .) + set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -X ${ZIP_COMMAND_CHARSET} -9 -r "${PK3_OUTPUT}/slade.pk3" .) else() message(STATUS "no zip executable, slade.pk3 won't build") endif() diff --git a/dist/makebuild.ps1 b/dist/makebuild.ps1 index b990c9ca9..a00f66a01 100644 --- a/dist/makebuild.ps1 +++ b/dist/makebuild.ps1 @@ -1,4 +1,4 @@ -$version = "3.2.4" +$version = "3.2.5" $rev_short = Invoke-Expression "git.exe rev-parse --short HEAD" # Check for 7-zip install @@ -17,6 +17,9 @@ if ($userev.ToLower() -eq "y") $version = "${version}_$rev_short" } +<# SLADE is now built on Windows via cmake, not sure how to do it here properly yet + so will just build manually in VS for now + # Prompt to build SLADE Write-Host "`nRebuild SLADE? (y/n) " -foregroundcolor cyan -nonewline $buildbinaries = Read-Host @@ -54,6 +57,7 @@ if ($buildbinaries.ToLower() -eq "y") } } } +#> # Determine release directory + platforms $releasedir = "$PSScriptRoot\$version" @@ -88,11 +92,11 @@ Write-Host "`nCopying SLADE files..." -foregroundcolor yellow # Common Copy-Item (resolve-path ".\slade.pk3") "$releasedir" -Force # Win32 -Copy-Item (resolve-path ".\SLADE.exe") "$releasedir32" -Force -Copy-Item (resolve-path ".\SLADE.pdb") "$releasedir32" -Force +Copy-Item (resolve-path ".\SLADE.exe") "$releasedir32" -Force +Copy-Item (resolve-path ".\SLADE.pdb") "$releasedir32" -Force # x64 -Copy-Item (resolve-path ".\SLADE-x64.exe") "$releasedir64\SLADE.exe" -Force -Copy-Item (resolve-path ".\SLADE-x64.pdb") "$releasedir64\SLADE.pdb" -Force +Copy-Item (resolve-path ".\SLADE-x64.exe") "$releasedir64\SLADE.exe" -Force +Copy-Item (resolve-path ".\SLADE-x64.pdb") "$releasedir64" -Force Write-Host "Done" -foregroundcolor green # Prompt to build binaries 7z @@ -121,7 +125,7 @@ if ($buildbinaries.ToLower() -eq "y") Write-Host "`nBuiling x64 binaries 7z..." -foregroundcolor yellow & $7zpath a -t7z "$releasedir\slade_${version}_x64${timestamp}.7z" ` "$releasedir64\SLADE.exe" ` - "$releasedir64\SLADE.pdb" ` + "$releasedir64\SLADE-x64.pdb" ` "$releasedir\slade.pk3" Write-Host "Done" -foregroundcolor green } diff --git a/msvc/SLADE.rc b/msvc/SLADE.rc index 32d6d179f..71beeed70 100644 --- a/msvc/SLADE.rc +++ b/msvc/SLADE.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,2,4 - PRODUCTVERSION 3,2,4 + FILEVERSION 3,2,5 + PRODUCTVERSION 3,2,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BLOCK "0c0904b0" BEGIN VALUE "FileDescription", "SLADE" - VALUE "FileVersion", "3.2.4" + VALUE "FileVersion", "3.2.5" VALUE "InternalName", "SLADE.exe" VALUE "LegalCopyright", "Copyright (C) 2023" VALUE "OriginalFilename", "SLADE.exe" VALUE "ProductName", "SLADE" - VALUE "ProductVersion", "3.2.4" + VALUE "ProductVersion", "3.2.5" END END BLOCK "VarFileInfo" diff --git a/net.mancubus.SLADE.metainfo.xml b/net.mancubus.SLADE.metainfo.xml index a9ed65573..3efd7edad 100644 --- a/net.mancubus.SLADE.metainfo.xml +++ b/net.mancubus.SLADE.metainfo.xml @@ -64,6 +64,7 @@ + diff --git a/src/Application/App.cpp b/src/Application/App.cpp index 6f32061f7..5824e85ac 100644 --- a/src/Application/App.cpp +++ b/src/Application/App.cpp @@ -83,7 +83,7 @@ bool exiting = false; std::thread::id main_thread_id; // Version -Version version_num{ 3, 2, 4, 0 }; +Version version_num{ 3, 2, 5, 0 }; // Directory paths string dir_data; diff --git a/win_installer/SLADE-x64.iss b/win_installer/SLADE-x64.iss index 1b52d5b09..4ee7d8c1c 100644 --- a/win_installer/SLADE-x64.iss +++ b/win_installer/SLADE-x64.iss @@ -10,7 +10,7 @@ OutputBaseFilename=Setup_{#MyAppName}_{#MyAppVersion}_x64 [Files] Source: "..\dist\SLADE-x64.exe"; DestName: "SLADE.exe"; DestDir: "{app}"; Flags: ignoreversion -Source: "..\dist\SLADE-x64.pdb"; DestName: "SLADE.pdb"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\dist\SLADE-x64.pdb"; DestName: "SLADE-x64.pdb"; DestDir: "{app}"; Flags: ignoreversion Source: "..\dist\slade.pk3"; DestDir: "{app}"; Flags: ignoreversion #include "include/Icons.iss" diff --git a/win_installer/include/Defines.iss b/win_installer/include/Defines.iss index 48ac0ca04..a2d4722b5 100644 --- a/win_installer/include/Defines.iss +++ b/win_installer/include/Defines.iss @@ -1,5 +1,5 @@ #define MyAppName "SLADE" -#define MyAppVersion "3.2.4" +#define MyAppVersion "3.2.5" #define MyAppURL "https://slade.mancubus.net" #define MyAppExeName "SLADE.exe" #define MyAppPublisher "sirjuddington"