mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Merge branch 'master' into linux
This commit is contained in:
commit
97b3bf4a46
3 changed files with 31 additions and 11 deletions
|
|
@ -6,7 +6,7 @@ conan_basic_setup()
|
||||||
|
|
||||||
## Setup options ##
|
## Setup options ##
|
||||||
|
|
||||||
option(STEAM "Build for Steam" OFF)
|
option(STEAM "Build for Steam" ON)
|
||||||
|
|
||||||
## Misc setup ##
|
## Misc setup ##
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,17 +15,24 @@ cyan="\033[1;36m" # Cyan - Bold
|
||||||
green="\033[1;32m" # Green - Bold
|
green="\033[1;32m" # Green - Bold
|
||||||
color_reset="\033[0m" # Reset Colors
|
color_reset="\033[0m" # Reset Colors
|
||||||
|
|
||||||
|
use_qmake=True
|
||||||
|
|
||||||
echo "${white}Compiling ${bold}SyngleChance v${mac_version} ${white}engine for macOS...${color_reset}\n"
|
echo "${white}Compiling ${bold}SyngleChance v${mac_version} ${white}engine for macOS...${color_reset}\n"
|
||||||
|
|
||||||
# Generate makefile and build main + journal
|
# Generate makefile and build main + journal
|
||||||
echo "-> ${cyan}Generate makefile...${color_reset}"
|
if [[ $use_qmake == True ]]
|
||||||
qmake MRIVERSION=2.5
|
then
|
||||||
echo "-> ${cyan}Compile engine...${color_reset}"
|
echo "-> ${cyan}Generate makefile...${color_reset}"
|
||||||
make -j${make_threads}
|
qmake MRIVERSION=2.5
|
||||||
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
echo "-> ${cyan}Compile engine...${color_reset}"
|
||||||
cd steamshim_parent
|
make -j${make_threads}
|
||||||
HOST=osx make -j${make_threads}
|
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
||||||
cd ..
|
cd steamshim_parent
|
||||||
|
HOST=osx make -j${make_threads}
|
||||||
|
cd ..
|
||||||
|
else
|
||||||
|
echo "${bold}WARNING: Conan/CMake method not ready yet.${color_reset}"
|
||||||
|
fi
|
||||||
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#define OS_OSX
|
#define OS_OSX
|
||||||
|
#include <dispatch/dispatch.h>
|
||||||
#else
|
#else
|
||||||
#define OS_LINUX
|
#define OS_LINUX
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
@ -503,7 +504,7 @@ bool Oneshot::msgbox(int type, const char *body, const char *title)
|
||||||
|
|
||||||
// Messagebox data
|
// Messagebox data
|
||||||
SDL_MessageBoxData data;
|
SDL_MessageBoxData data;
|
||||||
data.window = NULL;//p->window;
|
data.window = NULL; //p->window;
|
||||||
data.colorScheme = 0;
|
data.colorScheme = 0;
|
||||||
data.title = title;
|
data.title = title;
|
||||||
data.message = body;
|
data.message = body;
|
||||||
|
|
@ -557,7 +558,19 @@ bool Oneshot::msgbox(int type, const char *body, const char *title)
|
||||||
PlaySoundW((LPCWSTR)sound, NULL, SND_ALIAS_ID | SND_ASYNC);
|
PlaySoundW((LPCWSTR)sound, NULL, SND_ALIAS_ID | SND_ASYNC);
|
||||||
#endif
|
#endif
|
||||||
int button;
|
int button;
|
||||||
SDL_ShowMessageBox(&data, &button);
|
|
||||||
|
#ifdef OS_OSX
|
||||||
|
int *btn = &button;
|
||||||
|
|
||||||
|
// Message boxes and UI changes must be performed from the main thread on macOS Mojave and above.
|
||||||
|
// This block ensures the message box will show from the main thread.
|
||||||
|
dispatch_sync(dispatch_get_main_queue(),
|
||||||
|
^{ SDL_ShowMessageBox(&data, btn); }
|
||||||
|
);
|
||||||
|
#else
|
||||||
|
SDL_ShowMessageBox(&data, &button);
|
||||||
|
#endif
|
||||||
|
|
||||||
return button ? true : false;
|
return button ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue