Skip to content

Commit 3d9699b

Browse files
garrettjoecoxKiritoDv
authored andcommitted
Partial mac fix (.app still wont open)
1 parent d64efe3 commit 3d9699b

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,16 @@ jobs:
9292
path: ./build-cmake
9393
- name: Create Package
9494
run: |
95-
mkdir ghostship-release
96-
mv build-cmake/Ghostship ghostship-release/
97-
mv build-cmake/ghostship.o2r ghostship-release/
98-
mv config.yml ghostship-release/
99-
mv assets ghostship-release/
100-
curl -o ghostship-release/gamecontrollerdb.txt -sSL 'https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/refs/heads/master/gamecontrollerdb.txt'
95+
(cd build-cmake && cpack)
96+
mv _packages/*.dmg Ghostship.dmg
97+
mv README.md readme.txt
10198
- name: Publish packaged artifacts
10299
uses: actions/upload-artifact@v4
103100
with:
104-
name: ghostship-mac-x64
105-
path: ghostship-release
101+
name: ghostship-mac
102+
path: |
103+
Ghostship.dmg
104+
readme.txt
106105
107106
build-linux:
108107
needs: generate-port-o2r

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,9 @@ add_custom_target(
647647
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/ghostship.o2r" "${CMAKE_BINARY_DIR}/ghostship.o2r"
648648
)
649649

650+
find_program(CURL NAMES curl DOC "Path to the curl program. Used to download files.")
651+
execute_process(COMMAND ${CURL} -sSfL https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt OUTPUT_VARIABLE RESULT)
652+
650653
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
651654
install(FILES "${CMAKE_BINARY_DIR}/ghostship.o2r" DESTINATION . COMPONENT ${PROJECT_NAME})
652655
install(DIRECTORY "${CMAKE_SOURCE_DIR}/assets/" DESTINATION ./assets COMPONENT ${PROJECT_NAME})
@@ -673,6 +676,10 @@ add_custom_target(CreateOSXIcons
673676
add_dependencies(${PROJECT_NAME} CreateOSXIcons)
674677
configure_file("${CMAKE_SOURCE_DIR}/Info.plist" "${CMAKE_BINARY_DIR}/Info.plist" COPYONLY)
675678
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ../MacOS COMPONENT Ghostship)
679+
INSTALL(FILES ${CMAKE_BINARY_DIR}/gamecontrollerdb.txt DESTINATION ../MacOS COMPONENT Ghostship)
680+
INSTALL(FILES ${CMAKE_BINARY_DIR}/ghostship.o2r DESTINATION ../Resources COMPONENT Ghostship)
681+
INSTALL(FILES ${CMAKE_BINARY_DIR}/config.yml DESTINATION ../Resources COMPONENT Ghostship)
682+
INSTALL(DIRECTORY ${CMAKE_BINARY_DIR}/assets/ DESTINATION ../Resources/assets COMPONENT Ghostship)
676683
# Rename the installed soh binary to drop the macos suffix
677684
# INSTALL(CODE "FILE(RENAME \${CMAKE_INSTALL_PREFIX}/../MacOS/Ghostship-macos \${CMAKE_INSTALL_PREFIX}/../MacOS/Ghostship)")
678685
# install(CODE "

0 commit comments

Comments
 (0)