mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-21 06:19:56 +00:00
Make Journal not create a symlink and instead a .desktop file on select DEs, make Color an array of strings
This commit is contained in:
parent
a59e26595d
commit
5e47258600
3 changed files with 22 additions and 6 deletions
|
|
@ -338,11 +338,11 @@ end:
|
|||
"d.writeConfig(\"Image\", \"file://" << concatPath << "\");" <<
|
||||
"d.writeConfig(\"FillMode\", \"6\");" <<
|
||||
"d.writeConfig(\"Blur\", false);" <<
|
||||
"d.writeConfig(\"Color\", \"" <<
|
||||
std::to_string((color >> 16) & 0xFF) << "," <<
|
||||
std::to_string((color >> 8) & 0xFF) << "," <<
|
||||
"d.writeConfig(\"Color\", [\"" <<
|
||||
std::to_string((color >> 16) & 0xFF) << "\", \"" <<
|
||||
std::to_string((color >> 8) & 0xFF) << "\", \"" <<
|
||||
std::to_string(color & 0xFF) <<
|
||||
"\");" <<
|
||||
"\"]);" <<
|
||||
"}" <<
|
||||
"'";
|
||||
Debug() << "Wallpaper command:" << command.str();
|
||||
|
|
@ -458,7 +458,7 @@ RB_METHOD(wallpaperReset)
|
|||
"d.writeConfig(\"Image\", dat.picture);" <<
|
||||
"}" <<
|
||||
"if (dat.color) {" <<
|
||||
"d.writeConfig(\"Color\", dat.color);" <<
|
||||
"d.writeConfig(\"Color\", dat.color.split(\",\"));" <<
|
||||
"}" <<
|
||||
"if (dat.mode) {" <<
|
||||
"d.writeConfig(\"FillMode\", dat.mode);" <<
|
||||
|
|
|
|||
BIN
journal/unix/images/icon.png
Normal file
BIN
journal/unix/images/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
|
|
@ -2,6 +2,8 @@ PROTO_TEXT = "put me in the big portal"
|
|||
CEDRIC_TEXT = "put me in the big portal"
|
||||
RUE_TEXT = "put me in the big portal"
|
||||
|
||||
SUPPORTED_DE = ["cinnamon", "gnome", "mate", "kde", "xfce"]
|
||||
|
||||
module Script
|
||||
def self.px
|
||||
logpos($game_player.x, $game_player.real_x, $game_player.direction == 6)
|
||||
|
|
@ -385,7 +387,21 @@ module Script
|
|||
end
|
||||
end
|
||||
else
|
||||
File.symlink Dir.pwd + "/" + Oneshot::JOURNAL, Oneshot::GAME_PATH + "/Oneshot/" + Oneshot::JOURNAL
|
||||
if Oneshot::OS == "linux" and SUPPORTED_DE.include? Oneshot::DE
|
||||
path = Oneshot::GAME_PATH + "/Oneshot/" + Oneshot::JOURNAL + ".desktop"
|
||||
File.open(path, "wb") do |output|
|
||||
output.write("[Desktop Entry]\n")
|
||||
output.write("Comment=...\n")
|
||||
output.write("Terminal=false\n")
|
||||
output.write("Name=_______\n")
|
||||
output.write("Exec=#{Dir.pwd}/#{Oneshot::JOURNAL}\n")
|
||||
output.write("Type=Application\n")
|
||||
output.write("Icon=#{Dir.pwd}/images/icon.png\n")
|
||||
end
|
||||
FileUtils.chmod 0777 path
|
||||
else
|
||||
File.symlink Dir.pwd + "/" + Oneshot::JOURNAL, Oneshot::GAME_PATH + "/Oneshot/" + Oneshot::JOURNAL
|
||||
end
|
||||
end
|
||||
rescue Errno::EACCES => e
|
||||
#this probably means the clover.exe already exists and is running, so no need to create it again
|
||||
|
|
|
|||
Loading…
Reference in a new issue