Skip to content

Commit

Permalink
⏮ Revert "✨ Don't hardcode the version name in the exe anymore. Inste…
Browse files Browse the repository at this point in the history
…ad use the name of the folder containing the exe"

Using the folder name doesn't work on Linux because we package an AppImage, so the parent folder of the exe is always usr/bin/
It is simpler to just bake the name in the exe, it will work in all situations (and also in development!)
  • Loading branch information
JulesFouchy committed Feb 24, 2025
1 parent 019b2a5 commit aee8c6c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.20)

project(Coollab)
set(COOLLAB_VERSION "1.0.0 Launcher")
add_executable(${PROJECT_NAME})
add_library(Coollab-Properties INTERFACE) # This is needed by both Coollab and its tests
target_link_libraries(${PROJECT_NAME} PRIVATE Coollab-Properties)
Expand Down Expand Up @@ -78,6 +79,9 @@ install(FILES "LICENSE.txt" DESTINATION "license" RENAME "Coollab-LICENSE.txt")

# Grab all the source files
file(GLOB_RECURSE COOLLAB_SOURCES CONFIGURE_DEPENDS src/*)
set(COOLLAB_VERSION_STRING "\"${COOLLAB_VERSION}\"")
configure_file("src/Dump/coollab_version.cpp.in" "src/Dump/coollab_version.cpp")
list(APPEND COOLLAB_SOURCES "src/Dump/coollab_version.cpp")
target_sources(${PROJECT_NAME} PRIVATE ${COOLLAB_SOURCES})

# Set include directories
Expand Down
3 changes: 1 addition & 2 deletions _How to release a new version.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
- If new windows have been added, make sure that *imgui.ini* has been updated in *User data Default*
- Add gifs and images in the changelog to illustrate the changes
- Choose a name for the version and add it in *changelog.md*
- Create a new section with no name in *changelog.md*
- Choose a name for the version and add it in *changelog.md* and *CMakeLists.txt*
- At the top of *versions_compatibility.txt*, add the name of the version, and incompatibility markers if necessary
- Commit with the message "🔖 [version_name] Release" (make sure to replace with the right version name)
- On GitHub, create a new release with the name of the version you just chose. Use a new tag with the same name as the version. As a description, use whatever is in the changelog for the new version
Expand Down
2 changes: 0 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Changelog

##

## 1.0.0 Launcher

### Launcher
Expand Down
12 changes: 0 additions & 12 deletions src/Dump/coollab_version.cpp

This file was deleted.

8 changes: 8 additions & 0 deletions src/Dump/coollab_version.cpp.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Lab {

auto coollab_version() -> std::string
{
return @COOLLAB_VERSION_STRING@; // Variable configured by CMake
}

} // namespace Lab

0 comments on commit aee8c6c

Please sign in to comment.