mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 14:56:17 +00:00
Merge branch 'master' into linux
This commit is contained in:
commit
9653a59bcc
10 changed files with 60 additions and 4 deletions
|
|
@ -17,6 +17,7 @@ Thanks to [hunternet93](https://github.com/hunternet93) for starting the reimple
|
||||||
* Boost.Unordered (headers only)
|
* Boost.Unordered (headers only)
|
||||||
* Boost.Program_options
|
* Boost.Program_options
|
||||||
* Boost.CRC
|
* Boost.CRC
|
||||||
|
* Vim XXD (vim-common in apt)
|
||||||
* libsigc++ 2.0
|
* libsigc++ 2.0
|
||||||
* PhysFS (latest hg)
|
* PhysFS (latest hg)
|
||||||
* OpenAL
|
* OpenAL
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ void oneshotBindingInit()
|
||||||
VALUE msg = rb_define_module_under(module, "Msg");
|
VALUE msg = rb_define_module_under(module, "Msg");
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
rb_const_set(module, rb_intern("OS"), rb_str_new2(shState->oneshot().os().c_str()));
|
||||||
rb_const_set(module, rb_intern("USER_NAME"), rb_str_new2(shState->oneshot().userName().c_str()));
|
rb_const_set(module, rb_intern("USER_NAME"), rb_str_new2(shState->oneshot().userName().c_str()));
|
||||||
rb_const_set(module, rb_intern("SAVE_PATH"), rb_str_new2(shState->oneshot().savePath().c_str()));
|
rb_const_set(module, rb_intern("SAVE_PATH"), rb_str_new2(shState->oneshot().savePath().c_str()));
|
||||||
rb_const_set(module, rb_intern("DOCS_PATH"), rb_str_new2(shState->oneshot().docsPath().c_str()));
|
rb_const_set(module, rb_intern("DOCS_PATH"), rb_str_new2(shState->oneshot().docsPath().c_str()));
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ rm -rf "$ONESHOT_PATH/*.exe"
|
||||||
rm -rf "$ONESHOT_PATH/*.dll"
|
rm -rf "$ONESHOT_PATH/*.dll"
|
||||||
|
|
||||||
echo "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}"
|
echo "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}"
|
||||||
cp -rf "./*" "$ONESHOT_PATH"
|
cp -rf "." "$ONESHOT_PATH"
|
||||||
|
rm -f "$ONESHOT_PATH/install.command"
|
||||||
ln -sfh "$ONESHOT_PATH/OneShot.app" "$HOME/Applications/OneShot.app"
|
ln -sfh "$ONESHOT_PATH/OneShot.app" "$HOME/Applications/OneShot.app"
|
||||||
|
|
||||||
rm -f /tmp/oneshot-pipe # Important for pre-release version cleanup
|
rm -f /tmp/oneshot-pipe # Important for pre-release version cleanup
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,8 @@ class Journal(QWidget):
|
||||||
self.close_label.setPixmap(QPixmap(os.path.join(base_path, 'images', 'close.png')))
|
self.close_label.setPixmap(QPixmap(os.path.join(base_path, 'images', 'close.png')))
|
||||||
if not left_close: self.close_label.move(776, 0) # X = 800-24
|
if not left_close: self.close_label.move(776, 0) # X = 800-24
|
||||||
|
|
||||||
|
self.close_button = True
|
||||||
|
|
||||||
if "linux" in sys.platform: self.setWindowFlags(Qt.FramelessWindowHint)
|
if "linux" in sys.platform: self.setWindowFlags(Qt.FramelessWindowHint)
|
||||||
else: self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint | Qt.NoDropShadowWindowHint)
|
else: self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint | Qt.NoDropShadowWindowHint)
|
||||||
self.setAttribute(Qt.WA_TranslucentBackground)
|
self.setAttribute(Qt.WA_TranslucentBackground)
|
||||||
|
|
@ -103,7 +105,7 @@ class Journal(QWidget):
|
||||||
self.mousedown = True
|
self.mousedown = True
|
||||||
self.mousedownpos = event.pos()
|
self.mousedownpos = event.pos()
|
||||||
|
|
||||||
if ((left_close and self.mousedownpos.x() <= 24) or (not left_close and self.mousedownpos.x() >= 776)) and self.mousedownpos.y() < 24:
|
if self.close_button and (((left_close and self.mousedownpos.x() <= 24) or (not left_close and self.mousedownpos.x() >= 776)) and self.mousedownpos.y() < 24):
|
||||||
self.app.quit()
|
self.app.quit()
|
||||||
|
|
||||||
def mouseReleaseEvent(self, event):
|
def mouseReleaseEvent(self, event):
|
||||||
|
|
@ -122,6 +124,11 @@ class Journal(QWidget):
|
||||||
if not "_" in image: return
|
if not "_" in image: return
|
||||||
|
|
||||||
name, lang = image.split('_', 1)
|
name, lang = image.split('_', 1)
|
||||||
|
|
||||||
|
if name != "default":
|
||||||
|
self.close_label.hide()
|
||||||
|
self.close_button = False
|
||||||
|
|
||||||
if lang == 'en': img = os.path.join(base_path, 'images', '{}.png'.format(name))
|
if lang == 'en': img = os.path.join(base_path, 'images', '{}.png'.format(name))
|
||||||
else: img = os.path.join(base_path, 'images', lang.upper(), '{}.png'.format(name))
|
else: img = os.path.join(base_path, 'images', lang.upper(), '{}.png'.format(name))
|
||||||
if not os.path.exists(img): return
|
if not os.path.exists(img): return
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ set -e
|
||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
|
|
||||||
# User-configurable variables
|
# User-configurable variables
|
||||||
mac_version="1.0.1"
|
mac_version="1.0.2"
|
||||||
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
|
||||||
|
|
||||||
|
|
@ -62,6 +62,7 @@ m4 patches/mac/JournalInfo.plist.in -DONESHOTMACVERSION=$mac_version > _______.a
|
||||||
# Compile scripts
|
# Compile scripts
|
||||||
echo "-> ${cyan}Compile xScripts.rxdata...${color_reset}"
|
echo "-> ${cyan}Compile xScripts.rxdata...${color_reset}"
|
||||||
ruby rpgscript.rb ./scripts "$ONESHOT_PATH"
|
ruby rpgscript.rb ./scripts "$ONESHOT_PATH"
|
||||||
|
cp "$ONESHOT_PATH/Data/xScripts.rxdata" .
|
||||||
|
|
||||||
echo "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}"
|
echo "-> ${cyan}Install OneShot apps to Steam directory...${color_reset}"
|
||||||
cp -rf "./OneShot.app" "$ONESHOT_PATH"
|
cp -rf "./OneShot.app" "$ONESHOT_PATH"
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,12 @@ module EdText
|
||||||
if Graphics.fullscreen
|
if Graphics.fullscreen
|
||||||
Graphics.fullscreen = false
|
Graphics.fullscreen = false
|
||||||
$console = false
|
$console = false
|
||||||
sleep 0.2
|
if Oneshot::OS == "macos"
|
||||||
|
sleep 0.65
|
||||||
|
else
|
||||||
|
sleep 0.2
|
||||||
|
end
|
||||||
|
Graphics.update
|
||||||
end
|
end
|
||||||
result = nil
|
result = nil
|
||||||
# so here, we strip unescaped newlines from the untranslated text
|
# so here, we strip unescaped newlines from the untranslated text
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,16 @@ end
|
||||||
|
|
||||||
module Wallpaper
|
module Wallpaper
|
||||||
def self.set_persistent(name, color)
|
def self.set_persistent(name, color)
|
||||||
|
if Graphics.fullscreen
|
||||||
|
Graphics.fullscreen = false
|
||||||
|
$console = false
|
||||||
|
if Oneshot::OS == "macos"
|
||||||
|
sleep 0.65
|
||||||
|
else
|
||||||
|
sleep 0.2
|
||||||
|
end
|
||||||
|
Graphics.update
|
||||||
|
end
|
||||||
|
|
||||||
if (name == 'save_w32')
|
if (name == 'save_w32')
|
||||||
case $persistent.langcode
|
case $persistent.langcode
|
||||||
|
|
@ -55,6 +65,17 @@ module Wallpaper
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.reset_persistent
|
def self.reset_persistent
|
||||||
|
if Graphics.fullscreen
|
||||||
|
Graphics.fullscreen = false
|
||||||
|
$console = false
|
||||||
|
if Oneshot::OS == "macos"
|
||||||
|
sleep 0.65
|
||||||
|
else
|
||||||
|
sleep 0.2
|
||||||
|
end
|
||||||
|
Graphics.update
|
||||||
|
end
|
||||||
|
|
||||||
$game_oneshot.wallpaper = nil
|
$game_oneshot.wallpaper = nil
|
||||||
$game_oneshot.wallpaper_color = nil
|
$game_oneshot.wallpaper_color = nil
|
||||||
Wallpaper.reset
|
Wallpaper.reset
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,11 @@ begin
|
||||||
# Fade out
|
# Fade out
|
||||||
Oneshot.exiting true
|
Oneshot.exiting true
|
||||||
Graphics.transition(20)
|
Graphics.transition(20)
|
||||||
|
|
||||||
|
if Journal.active?
|
||||||
|
Journal.set ''
|
||||||
|
end
|
||||||
|
|
||||||
Oneshot.allow_exit true
|
Oneshot.allow_exit true
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
# Supplement Errno::ENOENT exception
|
# Supplement Errno::ENOENT exception
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ struct OneshotPrivate
|
||||||
SDL_Window *window;
|
SDL_Window *window;
|
||||||
|
|
||||||
// String data
|
// String data
|
||||||
|
std::string os;
|
||||||
std::string lang;
|
std::string lang;
|
||||||
std::string userName;
|
std::string userName;
|
||||||
std::string savePath;
|
std::string savePath;
|
||||||
|
|
@ -183,6 +184,13 @@ Oneshot::Oneshot(RGSSThreadData &threadData) :
|
||||||
p->winPosChanged = false;
|
p->winPosChanged = false;
|
||||||
p->allowExit = true;
|
p->allowExit = true;
|
||||||
p->exiting = false;
|
p->exiting = false;
|
||||||
|
#ifdef OS_W32
|
||||||
|
p->os = "windows";
|
||||||
|
#elif defined OS_OSX
|
||||||
|
p->os = "macos";
|
||||||
|
#else
|
||||||
|
p->os = "linux";
|
||||||
|
#endif
|
||||||
|
|
||||||
/********************
|
/********************
|
||||||
* USERNAME/DOCS PATH
|
* USERNAME/DOCS PATH
|
||||||
|
|
@ -373,6 +381,11 @@ void Oneshot::update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string &Oneshot::os() const
|
||||||
|
{
|
||||||
|
return p->os;
|
||||||
|
}
|
||||||
|
|
||||||
const std::string &Oneshot::lang() const
|
const std::string &Oneshot::lang() const
|
||||||
{
|
{
|
||||||
return p->lang;
|
return p->lang;
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ public:
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
//Accessors
|
//Accessors
|
||||||
|
const std::string &os() const;
|
||||||
const std::string &lang() const;
|
const std::string &lang() const;
|
||||||
const std::string &userName() const;
|
const std::string &userName() const;
|
||||||
const std::string &savePath() const;
|
const std::string &savePath() const;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue