Clean up Client::DoInstallation

Also Factor out app constants that mods might change into Meson options and clean up format::URLEncode in the process, convert app and document icon data in arrays to actual images, actualize AppStream data for possible future packaging, add alternative command line format for opening filesystem saves and ptsave URLs, fix a memory leak in Platform::GetCwd, and add format::URLDecode.
This commit is contained in:
Tamás Bálint Misius
2022-09-08 06:52:23 +02:00
parent 04e899e824
commit a674498a96
24 changed files with 360 additions and 663 deletions

View File

@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<component type="desktop">
<id>@APPID@</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>@APPNAME@</name>
<summary>@APPCOMMENT@</summary>
<content_rating type="oars-1.1">
<content_attribute id="social-chat">moderate</content_attribute>
</content_rating>
<launchable type="desktop-id">@APPID@.desktop</launchable>
<description>
<p>
Have you ever wanted to blow something up? Or maybe you always dreamt of operating an atomic power plant? Do you have a will to develop your own CPU? The Powder Toy lets you to do all of these, and even more!
</p>
<p>
The Powder Toy is a free physics sandbox game, which simulates air pressure and velocity, heat, gravity and a countless number of interactions between different substances! The game provides you with various building materials, liquids, gases and electronic components which can be used to construct complex machines, guns, bombs, realistic terrains and almost anything else. You can then mine them and watch cool explosions, add intricate wirings, play with little stickmen or operate your machine. You can browse and play thousands of different saves made by the community or upload your own we welcome your creations!
</p>
<p>
There is a Lua API you can automate your work or even make plugins for the game. The Powder Toy is free and the source code is distributed under the GNU General Public License, so you can modify the game yourself or help with development.
</p>
</description>
<screenshots>
<screenshot>
<image>https://powdertoy.co.uk/Themes/Next/Design/Images/Screen2.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://powdertoy.co.uk/</url>
<url type="bugtracker">https://github.com/The-Powder-Toy/The-Powder-Toy/issues</url>
<url type="help">https://powdertoy.co.uk/Wiki/W/Main_Page.html</url>
<releases>
<release date="@BSH_DATE@" version="@SAVE_VERSION@.@MINOR_VERSION@" />
</releases>
</component>

BIN
resources/cps16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 533 B

BIN
resources/cps32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
resources/exe48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,11 +1,20 @@
resources_files += files(
'icon.ico',
'document.ico',
)
if host_platform == 'windows'
powder_files += windows_mod.compile_resources(
'powder-res.rc',
depend_files: [ resources_files, 'resource.h' ],
depend_files: [
'icon.ico',
'document.ico',
'resource.h',
],
)
endif
data_files += to_array.process('cps16.png', extra_args: 'cps16_png')
data_files += to_array.process('cps32.png', extra_args: 'cps32_png')
data_files += to_array.process('exe48.png', extra_args: 'exe48_png')
data_files += to_array.process('save.xml', extra_args: 'save_xml')
data_files += to_array.process(configure_file(
input: 'powder.template.desktop',
output: 'powder.desktop',
configuration: conf_data,
), extra_args: 'powder_desktop')

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<component type="desktop">
<id>uk.co.powdertoy.tpt</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>Powder Toy</name>
<summary>Physics sandbox game</summary>
<content_rating type="oars-1.1">
<content_attribute id="social-chat">moderate</content_attribute>
</content_rating>
<launchable type="desktop-id">powder.desktop</launchable>
<description>
<p>
The Powder Toy is a free physics sandbox game, which simulates air pressure and velocity, heat, gravity and a countless number of interactions between different substances! The game provides you with various building materials, liquids, gases and electronic components which can be used to construct complex machines, guns, bombs, realistic terrains and almost anything else. You can then mine them and watch cool explosions, add intricate wirings, play with little stickmen or operate your machine. You can browse and play thousands of different saves made by the community or upload your own - we welcome your creations!
</p>
</description>
<screenshots>
<screenshot>
<image>http://powdertoy.co.uk/Themes/Next/Design/Images/Screen2.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://powdertoy.co.uk/</url>
<url type="bugtracker">https://github.com/The-Powder-Toy/The-Powder-Toy/issues</url>
<url type="help">https://powdertoy.co.uk/Wiki/W/Main_Page.html</url>
<releases>
<release date="2019-02-21" version="94.1" />
</releases>
</component>

View File

@@ -1,9 +0,0 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Powder Toy
Comment=Physics sandbox game
Exec=powder
Icon=powder
Type=Application
Categories=Game;Simulation;

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Name=@APPNAME@
Type=Application
Comment=@APPCOMMENT@
MimeType=application/vnd.powdertoy.save;x-scheme-handler/ptsave;
Categories=Game;Simulation;
Exec=@APPEXE@ %u
Icon=@APPEXE@

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/vnd.powdertoy.save">
<comment>Powder Toy save</comment>
<glob pattern="*.cps"/>