mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Convert Steamshim Makefile to CMake
This commit is contained in:
parent
804c52a83f
commit
5ea165cb36
6 changed files with 48 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -53,3 +53,5 @@ conan_imports_manifest\.txt
|
||||||
package/
|
package/
|
||||||
|
|
||||||
oclint/
|
oclint/
|
||||||
|
|
||||||
|
steamshim_parent/build/
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
rm -rf journal/mac/__pycache__
|
rm -rf journal/mac/__pycache__
|
||||||
rm -rf steamshim_parent/steamshim
|
rm -rf steamshim_parent/build
|
||||||
rm -rf build
|
rm -rf build
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
rm -rf _______.app
|
rm -rf _______.app
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ cd `dirname $0`
|
||||||
linux_version="0.1.0"
|
linux_version="0.1.0"
|
||||||
make_threads=8
|
make_threads=8
|
||||||
ONESHOT_PATH=$HOME/.steam/steam/steamapps/common/OneShot
|
ONESHOT_PATH=$HOME/.steam/steam/steamapps/common/OneShot
|
||||||
|
STEAMWORKS_PATH=/usr/steamworks
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
white="\033[0;37m" # White - Regular
|
white="\033[0;37m" # White - Regular
|
||||||
|
|
@ -24,8 +25,10 @@ echo "-> ${cyan}Compile engine...${color_reset}"
|
||||||
make -j${make_threads}
|
make -j${make_threads}
|
||||||
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
||||||
cd steamshim_parent
|
cd steamshim_parent
|
||||||
HOST=linux64 make -j${make_threads}
|
mkdir build && cd build
|
||||||
cd ..
|
cmake -DSTEAMWORKS_PATH=${STEAMWORKS_PATH} ..
|
||||||
|
make -j${make_threads}
|
||||||
|
cd ../..
|
||||||
echo "-> ${cyan}Compile journal...${color_reset}"
|
echo "-> ${cyan}Compile journal...${color_reset}"
|
||||||
pyinstaller journal/unix/journal.spec --onefile --windowed
|
pyinstaller journal/unix/journal.spec --onefile --windowed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ cd `dirname $0`
|
||||||
mac_version="1.1.0"
|
mac_version="1.1.0"
|
||||||
make_threads=8
|
make_threads=8
|
||||||
ONESHOT_PATH=$HOME/Library/Application\ Support/Steam/steamapps/common/OneShot
|
ONESHOT_PATH=$HOME/Library/Application\ Support/Steam/steamapps/common/OneShot
|
||||||
|
STEAMWORKS_PATH=$HOME/Developer/downloaded/steamworks
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
white="\033[0;37m" # White - Regular
|
white="\033[0;37m" # White - Regular
|
||||||
|
|
@ -28,8 +29,10 @@ if [[ $use_qmake == True ]]
|
||||||
make -j${make_threads}
|
make -j${make_threads}
|
||||||
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
||||||
cd steamshim_parent
|
cd steamshim_parent
|
||||||
HOST=osx make -j${make_threads}
|
mkdir build && cd build
|
||||||
cd ..
|
cmake -DSTEAMWORKS_PATH=${STEAMWORKS_PATH} ..
|
||||||
|
make -j${make_threads}
|
||||||
|
cd ../..
|
||||||
else
|
else
|
||||||
echo "${bold}WARNING: Conan/CMake method not ready yet.${color_reset}"
|
echo "${bold}WARNING: Conan/CMake method not ready yet.${color_reset}"
|
||||||
fi
|
fi
|
||||||
|
|
@ -54,7 +57,7 @@ if [ ! -e $ResourcesDir ]
|
||||||
mkdir -p "$ResourcesDir"
|
mkdir -p "$ResourcesDir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp steamshim_parent/steamshim ./OneShot.app/Contents/Resources/steamshim
|
cp steamshim_parent/build/steamshim ./OneShot.app/Contents/Resources/steamshim
|
||||||
cp patches/mac/libsteam_api.dylib ./OneShot.app/Contents/Libraries/libsteam_api.dylib
|
cp patches/mac/libsteam_api.dylib ./OneShot.app/Contents/Libraries/libsteam_api.dylib
|
||||||
cmake -P patches/mac/CompleteBundle.cmake
|
cmake -P patches/mac/CompleteBundle.cmake
|
||||||
cp assets/icon.icns ./OneShot.app/Contents/Resources/icon.icns
|
cp assets/icon.icns ./OneShot.app/Contents/Resources/icon.icns
|
||||||
|
|
|
||||||
34
steamshim_parent/CMakeLists.txt
Normal file
34
steamshim_parent/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
cmake_minimum_required(VERSION 2.8.11)
|
||||||
|
|
||||||
|
set(STEAMWORKS_PATH "" CACHE PATH "Path to Steamworks folder")
|
||||||
|
set(GAME_LAUNCH_NAME "oneshot" CACHE STRING "Game launch name")
|
||||||
|
option(DEBUG "Debug mode" OFF)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
steamshim_parent.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories(${STEAMWORKS_PATH}/public)
|
||||||
|
|
||||||
|
add_definitions(-DGAME_LAUNCH_NAME="${GAME_LAUNCH_NAME}")
|
||||||
|
|
||||||
|
IF(DEBUG)
|
||||||
|
add_definitions(-DSTEAMSHIM_DEBUG)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
link_directories(${STEAMWORKS_PATH}/redistributable_bin/osx32)
|
||||||
|
ELSEIF(WIN32)
|
||||||
|
list(APPEND SOURCES resources.rc)
|
||||||
|
link_directories(${STEAMWORKS_PATH}/redistributable_bin)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows")
|
||||||
|
ELSEIF(LINUX)
|
||||||
|
link_directories(${STEAMWORKS_PATH}/redistributable_bin/linux64)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
add_executable(steamshim
|
||||||
|
${SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(steamshim steam_api)
|
||||||
Loading…
Reference in a new issue