mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-28 10:20:04 +02:00
Unhardcode APPVENDOR here and there
This should have been done in a674498a96
.
This commit is contained in:
@@ -102,7 +102,11 @@ elif host_platform == 'linux'
|
||||
embedded_files += [
|
||||
[ 'icon_exe_png', rendered_icons['icon_exe'] ],
|
||||
[ 'icon_cps_png', rendered_icons['icon_cps'] ],
|
||||
[ 'save_xml', files('save.xml') ],
|
||||
[ 'save_xml', configure_file(
|
||||
input: 'save.template.xml',
|
||||
output: 'save.xml',
|
||||
configuration: conf_data,
|
||||
) ],
|
||||
[ 'powder_desktop', configure_file(
|
||||
input: 'powder.template.desktop',
|
||||
output: 'powder.desktop',
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Name=@APPNAME@
|
||||
Type=Application
|
||||
Comment=@APPCOMMENT@
|
||||
MimeType=application/vnd.powdertoy.save;x-scheme-handler/ptsave;
|
||||
MimeType=application/vnd.@APPVENDOR@.save;x-scheme-handler/ptsave;
|
||||
Categories=Game;Simulation;
|
||||
Exec=@APPEXE@ %u
|
||||
Icon=@APPVENDOR@-@APPEXE@
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/vnd.powdertoy.save">
|
||||
<mime-type type="application/vnd.@APPVENDOR@.save">
|
||||
<comment>Powder Toy save</comment>
|
||||
<glob pattern="*.cps"/>
|
||||
<glob pattern="*.stm"/>
|
@@ -2,12 +2,13 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include "common/String.h"
|
||||
#include "Config.h"
|
||||
|
||||
class GameSave;
|
||||
|
||||
namespace Clipboard
|
||||
{
|
||||
const ByteString clipboardFormatName = "application/vnd.powdertoy.save";
|
||||
const ByteString clipboardFormatName = "application/vnd." + ByteString(APPVENDOR) + ".save";
|
||||
void SetClipboardData(std::unique_ptr<GameSave> data);
|
||||
const GameSave *GetClipboardData();
|
||||
void Init();
|
||||
|
@@ -142,7 +142,7 @@ bool Install()
|
||||
ByteString file = ByteString::Build(APPVENDOR, "-", APPID, ".desktop");
|
||||
ok = ok && Platform::WriteFile(desktopData, file);
|
||||
ok = ok && Run("installing desktop file", { "xdg-desktop-menu", "install", file }, true);
|
||||
ok = ok && Run("associating save MIME type with desktop file", { "xdg-mime", "default", file, "application/vnd.powdertoy.save" }, true);
|
||||
ok = ok && Run("associating save MIME type with desktop file", { "xdg-mime", "default", file, "application/vnd.", APPVENDOR, ".save" }, true);
|
||||
ok = ok && Run("associating ptsave URL scheme with desktop file", { "xdg-mime", "default", file, "x-scheme-handler/ptsave" }, true);
|
||||
Platform::RemoveFile(file);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ bool Install()
|
||||
{
|
||||
ByteString file = ByteString(APPVENDOR) + "-cps.png";
|
||||
ok = ok && Platform::WriteFile(icon_cps_png.AsCharSpan(), file);
|
||||
ok = ok && Run("providing file icons for saves and stamps", { "xdg-icon-resource", "install", "--noupdate", "--context", "mimetypes", "--size", "64", file, "application-vnd.powdertoy.save" }, true);
|
||||
ok = ok && Run("providing file icons for saves and stamps", { "xdg-icon-resource", "install", "--noupdate", "--context", "mimetypes", "--size", "64", file, "application-vnd.", APPVENDOR, ".save" }, true);
|
||||
Platform::RemoveFile(file);
|
||||
}
|
||||
if (ok)
|
||||
|
Reference in New Issue
Block a user