mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Installers!
This commit is contained in:
parent
514a21d5d8
commit
fae4fc9bf2
3 changed files with 84 additions and 35 deletions
31
installer/installer.bat
Normal file
31
installer/installer.bat
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
echo Sunshine installer
|
||||||
|
set /p oneshot_path=Enter the Oneshot 2016 installation path:
|
||||||
|
set /p install_path=Enter the path to install Sunshine:
|
||||||
|
|
||||||
|
set "TARGET=%install_path%\oneshot.exe"
|
||||||
|
set "ICON=%install_path%\icon.ico"
|
||||||
|
|
||||||
|
if not exist "%install_path%\" mkdir "%install_path%"
|
||||||
|
|
||||||
|
echo Copying the files of the original Oneshot
|
||||||
|
xcopy "%oneshot_path%\*" "%install_path%\" /E /I /Y
|
||||||
|
if errorlevel 1 echo Warning: xcopy from oneshot_path returned non-zero code.
|
||||||
|
|
||||||
|
echo Patching the original game
|
||||||
|
xcopy "Sunshine\*" "%install_path%\" /E /I /Y
|
||||||
|
if errorlevel 1 echo Warning: xcopy from Sunshine returned non-zero code.
|
||||||
|
|
||||||
|
echo (create .int files) :: <-- реализуйте здесь если нужно
|
||||||
|
|
||||||
|
powershell -NoProfile -Command ^
|
||||||
|
"$s=New-Object -ComObject WScript.Shell; $l=$s.CreateShortcut('%USERPROFILE%\Desktop\Sunshine.lnk'); $l.TargetPath='%TARGET%'; $l.IconLocation='%ICON%'; $l.WorkingDirectory=(Split-Path '%TARGET%'); $l.Save()"
|
||||||
|
|
||||||
|
powershell -NoProfile -Command ^
|
||||||
|
"$s=New-Object -ComObject WScript.Shell; $l=$s.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\Sunshine.lnk'); $l.TargetPath='%TARGET%'; $l.IconLocation='%ICON%'; $l.WorkingDirectory=(Split-Path '%TARGET%'); $l.Save()"
|
||||||
|
|
||||||
|
echo Done!
|
||||||
|
endlocal
|
||||||
|
pause
|
||||||
18
installer/installer.sh
Executable file
18
installer/installer.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
read -rp "Enter your Oneshot 2016 installation path: " oneshot_path
|
||||||
|
read -rp "Enter path for installation: " install_path
|
||||||
|
|
||||||
|
mkdir -p $install_path
|
||||||
|
cp -r "$oneshot_path/*" "$install_path/"
|
||||||
|
cp -r "Sunshine/*" "$install_path/"
|
||||||
|
|
||||||
|
echo """[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Oneshot: Sunshine
|
||||||
|
Comment=Oneshot mod
|
||||||
|
Exec=$install_path/oneshot
|
||||||
|
Icon=$install_path/icon.png
|
||||||
|
Categories=Game;
|
||||||
|
""" > $HOME/.local/share/applications/sunshine.desktop
|
||||||
|
|
@ -7,7 +7,6 @@ cd `dirname $0`
|
||||||
linux_version="0.1.0"
|
linux_version="0.1.0"
|
||||||
make_threads=8
|
make_threads=8
|
||||||
oneshot_id=420530
|
oneshot_id=420530
|
||||||
ONESHOT_PATH=$HOME/.local/share/Steam/steamapps/common/OneShot
|
|
||||||
STEAMWORKS_PATH=$(realpath ..)/steamworks
|
STEAMWORKS_PATH=$(realpath ..)/steamworks
|
||||||
|
|
||||||
# Colors.
|
# Colors.
|
||||||
|
|
@ -19,59 +18,60 @@ color_reset="\033[0m" # Reset Colors
|
||||||
|
|
||||||
echo -e "${white}Compiling ${bold}SyngleChance v${linux_version} ${white}engine for Linux...${color_reset}\n"
|
echo -e "${white}Compiling ${bold}SyngleChance v${linux_version} ${white}engine for Linux...${color_reset}\n"
|
||||||
|
|
||||||
# Generate makefile.
|
cmake . -B build/
|
||||||
echo -e "-> ${cyan}Generate makefile...${color_reset}"
|
cd build
|
||||||
export MRIVERSION=$(echo "puts RUBY_VERSION.split('.').slice(0, 2).join('.')" | ruby)
|
make -j${nproc}
|
||||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
cd ..
|
||||||
qmake mkxp.pro > oneshot.qmake.out
|
|
||||||
|
|
||||||
# Compile OneShot.
|
mkdir build/bandle
|
||||||
echo -e "-> ${cyan}Compile engine...${color_reset}"
|
mkdir build/bandle/Sunshine
|
||||||
make -j${make_threads} > oneshot.make.out
|
mkdir build/bandle/Sunshine/Data
|
||||||
|
|
||||||
# Compile steamshim.
|
# Compile steamshim.
|
||||||
echo -e "-> ${cyan}Compile steamshim...${color_reset}"
|
#echo -e "-> ${cyan}Compile steamshim...${color_reset}"
|
||||||
cd steamshim_parent
|
#cd steamshim_parent
|
||||||
mkdir build
|
#mkdir build
|
||||||
cd build
|
#cd build
|
||||||
cmake -DSTEAMWORKS_PATH=${STEAMWORKS_PATH} .. > steamshim.cmake.out
|
#cmake -DSTEAMWORKS_PATH=${STEAMWORKS_PATH} .. > steamshim.cmake.out
|
||||||
cp "$STEAMWORKS_PATH/redistributable_bin/linux64/libsteam_api.so" .
|
#cp "$STEAMWORKS_PATH/redistributable_bin/linux64/libsteam_api.so" .
|
||||||
make -j${make_threads} > steamshim.make.out
|
#make -j${make_threads} > steamshim.make.out
|
||||||
cd ../..
|
#cd ../..
|
||||||
|
|
||||||
# Compile Journal.
|
# Compile Journal.
|
||||||
echo -e "-> ${cyan}Compile journal...${color_reset}"
|
echo -e "-> ${cyan}Compile journal...${color_reset}"
|
||||||
pyinstaller journal/unix/journal.spec --windowed
|
pyinstaller journal/unix/journal.spec #--windowed
|
||||||
|
|
||||||
# Compile scripts.
|
# Compile scripts.
|
||||||
echo -e "-> ${cyan}Compile xScripts.rxdata...${color_reset}"
|
echo -e "-> ${cyan}Compile xScripts.rxdata...${color_reset}"
|
||||||
ruby rpgscript.rb ./scripts "$ONESHOT_PATH" > rpgscript.out
|
ruby rpgscript.rb scripts/ build/bandle/Sunshine/
|
||||||
|
|
||||||
# Copy results.
|
# Copy results.
|
||||||
echo -e "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}"
|
echo -e "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}"
|
||||||
yes | cp -r dist/_______/* "$ONESHOT_PATH"
|
yes | cp -r dist/_______/* build/bandle/Sunshine/
|
||||||
yes | cp oneshot "$ONESHOT_PATH"
|
yes | cp build/oneshot build/bandle/Sunshine
|
||||||
yes | cp steamshim_parent/build/steamshim "$ONESHOT_PATH"
|
|
||||||
echo "$oneshot_id" > "$ONESHOT_PATH/steam_appid.txt"
|
#yes | cp steamshim_parent/build/steamshim "$ONESHOT_PATH"
|
||||||
|
#echo "$oneshot_id" > "$ONESHOT_PATH/steam_appid.txt"
|
||||||
|
|
||||||
# Copy libraries.
|
# Copy libraries.
|
||||||
echo -e "-> ${cyan}Install OneShot libraries to Steam directory...${color_reset}"
|
echo -e "-> ${cyan}Install OneShot libraries to Steam directory...${color_reset}"
|
||||||
mkdir libs
|
mkdir libs
|
||||||
ldd oneshot | ruby libraries.rb
|
ldd build/oneshot | ruby libraries.rb
|
||||||
ldd steamshim_parent/build/steamshim | ruby libraries.rb
|
#ldd steamshim_parent/build/steamshim | ruby libraries.rb
|
||||||
yes | cp libs/* "$ONESHOT_PATH"
|
yes | cp libs/* build/bandle/Sunshine
|
||||||
|
yes | cp build/oneshot build/bandle/Sunshine
|
||||||
|
|
||||||
|
cp installer/installer.sh build/bandle/
|
||||||
|
cp -r ../SunshineAssets/* build/bandle/Sunshine
|
||||||
|
|
||||||
|
cd build
|
||||||
|
zip -r OneshotSunshine.zip bandle/*
|
||||||
|
cd ..
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
echo -e "-> ${cyan}Cleanup files...${color_reset}"
|
echo -e "-> ${cyan}Cleanup files...${color_reset}"
|
||||||
rm -rf journal/unix/__pycache__
|
rm -rf journal/unix/__pycache__
|
||||||
rm -rf build
|
#rm -rf build/*
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
rm -rf steamshim_parent/build
|
#rm -rf steamshim_parent/build
|
||||||
rm -rf libs
|
rm -rf libs
|
||||||
make clean > clean.out
|
|
||||||
rm -f *.out
|
|
||||||
rm Makefile
|
|
||||||
rm oneshot
|
|
||||||
rm .qmake.stash
|
|
||||||
|
|
||||||
echo -e "\n${green}Complete! ${white}Please report any issues to https://github.com/GooborgStudios/synglechance/issues${color_reset}"
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue