Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launcher #106

Merged
merged 33 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
79cd0cb
🎉 [Launcher] Basic project setup
JulesFouchy Jul 5, 2024
1de823a
feat : check Launcher_test release assets
smallboyc Jul 17, 2024
3290085
try to get zip bin/Release
smallboyc Jul 17, 2024
0f916a1
fix : yml indentation
smallboyc Jul 17, 2024
c8d9ef8
fix : yml edit
smallboyc Jul 17, 2024
d94b4ca
fix : cancel changes
smallboyc Jul 17, 2024
d8622d8
try again add zip in assets
smallboyc Jul 17, 2024
61750d0
fix : windows unzip command
smallboyc Jul 17, 2024
0391bd6
fix : windows path zip yml
smallboyc Jul 17, 2024
d6aeffc
fix : path download zip
smallboyc Jul 17, 2024
51b807d
feat : try macos-latest
smallboyc Jul 18, 2024
8e6ebf2
try with llvm@16
smallboyc Jul 18, 2024
e41c1ec
try llvm
smallboyc Jul 18, 2024
f2af05c
edit cmake_configure_args
smallboyc Jul 18, 2024
d2a4498
edit cmake_configure_args (again)
smallboyc Jul 18, 2024
691c7c1
update Cool submodule
smallboyc Jul 18, 2024
1ce108e
fix : keep clang on macOS config
smallboyc Jul 18, 2024
94b2606
feat : get_release & download_zip
smallboyc Jul 23, 2024
04ea689
feat : clean launcher v1 01
smallboyc Jul 23, 2024
5fbf123
use try catch
smallboyc Jul 23, 2024
47fb635
clean cmake
smallboyc Jul 23, 2024
870fb41
Move Launcher to a new repo
smallboyc Jul 23, 2024
e8a87f6
🐛 Fix : Info.plist for MacOS
smallboyc Jul 24, 2024
65fdfdc
🐛 Fix : Info.plist for MacOS (Coollab)
smallboyc Jul 24, 2024
8e3bb5e
⚗️Edit Info.plist
smallboyc Jul 25, 2024
c362c8d
⚗️Complete test Info.plist
smallboyc Jul 25, 2024
80e6667
⚗️Cancel : edit Info.plist
smallboyc Jul 25, 2024
5c7d038
⚗️ Edit : Info.plist (complete 2)
smallboyc Jul 25, 2024
baf9cf6
Merge remote-tracking branch 'origin/main' into launcher
smallboyc Jul 31, 2024
3883e03
⬆ [Cool]
JulesFouchy Jul 31, 2024
32304b2
🔨 [CI] Change name of the release zips
JulesFouchy Jul 31, 2024
67658d4
🔨 [CI] Cleanup
JulesFouchy Jul 31, 2024
aab2fb3
🔧 [Info.plist] Remove useless entries
JulesFouchy Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/create_release_executables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,16 @@ jobs:
name: Windows,
os: windows-latest,
cmake_configure_args: -D CMAKE_C_COMPILER=cl CMAKE_CXX_COMPILER=cl -G Ninja,
cpack_generator: NSIS,
installer_name: Coollab-Windows.exe,
}
- {
name: Linux,
os: ubuntu-latest,
cmake_configure_args: -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ -G Ninja,
cpack_generator: STGZ,
installer_name: Coollab-Linux.sh,
}
- {
name: MacOS,
os: macos-12, # 13 and 14 run on M1 chips, and we get a linker error when using them
cmake_configure_args: -D CMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -D CMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++ -G Ninja -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl -D OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include,
cpack_generator: Bundle,
installer_name: Coollab-Mac.dmg,
os: macos-latest,
cmake_configure_args: -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ -G Ninja -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl -D OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include,
}

steps:
Expand Down Expand Up @@ -82,12 +76,18 @@ jobs:
cmakeBuildType: Release
buildDirectory: ${{github.workspace}}/build

- name: Create installer
- name: Zip Release binaries (Linux and MacOS)
if: runner.os != 'Windows'
run: |
cd ${{github.workspace}}/build
cpack
cd ${{github.workspace}}/bin/Release
zip -r ${{github.workspace}}/build/Coollab-${{matrix.config.name}}.zip .

- name: Zip Release binaries (Windows)
if: runner.os == 'Windows'
run: |
Compress-Archive -Path ${{github.workspace}}\bin\Release\* -DestinationPath ${{github.workspace}}\build\Coollab-${{matrix.config.name}}.zip

- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{runner.os != 'Windows' && github.workspace || ''}}${{runner.os != 'Windows' && '/' || ''}}build/${{matrix.config.installer_name}}
files: ${{runner.os != 'Windows' && github.workspace || ''}}${{runner.os != 'Windows' && '/' || ''}}build/Coollab-${{matrix.config.name}}.zip
71 changes: 2 additions & 69 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ endif()
# Choose our GPU API and its version
# set(COOL_USE_VULKAN 110)
set(COOL_USE_OPENGL $<IF:$<PLATFORM_ID:Darwin>,410,430>) # Must be >= 330 for ImGui to work properly # We use 410 when building on Mac because it doesn't support higher versions of OpenGL
set(COOL_USE_INSTALLER OFF)

# Include Cool
add_subdirectory(Cool)
Expand Down Expand Up @@ -126,72 +127,4 @@ list(REMOVE_ITEM COOL_LAB_SOURCES ${CMAKE_SOURCE_DIR}/src/main.cpp)
add_executable(Tests-Coollab tests/tests.cpp ${COOL_LAB_SOURCES})
target_compile_definitions(Tests-Coollab PRIVATE LAB_ENABLE_TESTS)
target_link_libraries(Tests-Coollab PRIVATE Coollab-Properties)
target_link_libraries(Tests-Coollab PRIVATE doctest::doctest)

# ---------------------
# ---CPack---
# ---------------------
if(APPLE)
install(TARGETS ${PROJECT_NAME} DESTINATION ../MacOS) # MacOS bundles must be installed at the root of the package: https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators#dragndrop-osx-only
else()
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
endif()

if(WIN32)
set(SEP "\\\\")
else()
set(SEP "/")
endif()

# Installer Info
set(CPACK_PACKAGE_NAME "Coollab")
set(CPACK_PACKAGE_VERSION "${COOLLAB_VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Coollab") # Don't put this in a Coollab parent folder. In NSIS this messes up the install and prevents our app to appear in "Apps and Features" to uninstall it for example.
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/app-resources${SEP}installer_banner.bmp") # Seems like it has to be .bmp, at least for NSIS. NB: if there is any transparency in the image, NSIS won't be able to render it at all. Exporting a fully opaque .bmp from Paint.net works. 150x57 pixels is the ideal size to avoid uggly downscale artifacts.
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}${SEP}LICENSE.txt")
set(CPACK_PACKAGE_VENDOR "Coollab")
set(CPACK_PACKAGE_EXECUTABLES "Coollab" "Coollab") # Creates Start Menu shortcuts
set(CPACK_PACKAGE_CONTACT "coollab.lib@gmail.com")

# Name of the installer exe file
if(WIN32)
set(OS_NAME "Windows")
elseif(APPLE)
set(OS_NAME "Mac")
else()
set(OS_NAME "Linux")
endif()

set(CPACK_PACKAGE_FILE_NAME "Coollab-${OS_NAME}")

# NSIS specifics
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\Coollab.exe")

# .coollab extension
# --- Windows
set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
WriteRegStr HKCR '.coollab' '' 'CoollabFile'
WriteRegStr HKCR 'CoollabFile' '' 'Coollab File'
WriteRegStr HKCR 'CoollabFile\\\\shell' '' 'open'
WriteRegStr HKCR 'CoollabFile\\\\DefaultIcon' \\\\
'' '$INSTDIR\\\\bin\\\\coollab.exe,0'
WriteRegStr HKCR 'CoollabFile\\\\shell\\\\open\\\\command' \\\\
'' '$INSTDIR\\\\bin\\\\coollab.exe \\\"%1\\\"'
WriteRegStr HKCR 'CoollabFile\\\\shell\\\\edit\\\\command' \\\\
'' '$INSTDIR\\\\bin\\\\coollab.exe \\\"%1\\\"'
System::Call \\\\
'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
")
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
DeleteRegKey HKCR '.coollab'
DeleteRegKey HKCR 'CoollabFile'
")

# MacOS Bundle specifics
set(CPACK_BUNDLE_NAME "Coollab")
set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/app-resources/Info.plist")
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/app-resources/icon.icns")

#
include(CPack)
target_link_libraries(Tests-Coollab PRIVATE doctest::doctest)
2 changes: 1 addition & 1 deletion Cool
12 changes: 6 additions & 6 deletions app-resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIdentifier</key>
<string></string>
<string>coollab.launcher</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string></string>
<string>1.0.0</string>
<key>CFBundleName</key>
<string></string>
<string>Coollab</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string></string>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string></string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
Expand Down
Loading