Simplify mime type handling.
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=OpenRA - {MODNAME}
|
||||
GenericName=Real Time Strategy Game
|
||||
GenericName[de]=Echtzeit-Strategiespiel
|
||||
Comment=Reimagining of early Westwood Games
|
||||
Icon=openra-{MOD}
|
||||
Exec=openra-{MOD} Launch.URI=%U
|
||||
Terminal=false
|
||||
NoDisplay=true
|
||||
Categories=Game;StrategyGame;
|
||||
MimeType=x-scheme-handler/openra-{MOD}-{TAG};
|
||||
@@ -1,23 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
|
||||
|
||||
<mime-type type="x-scheme-handler/openra-ra-{TAG}">
|
||||
<icon name="openra-ra" />
|
||||
<mime-type type="x-scheme-handler/openra-{MODID}-{TAG}">
|
||||
<icon name="openra-{MODID}" />
|
||||
<generic-icon name="applications-games"/>
|
||||
<comment>OpenRA connect to server scheme</comment>
|
||||
<glob weight="60" pattern="openra-ra-{TAG}://*"/>
|
||||
<comment>Join OpenRA server</comment>
|
||||
<glob weight="60" pattern="openra-{MODID}-{TAG}://*"/>
|
||||
</mime-type>
|
||||
<mime-type type="x-scheme-handler/openra-cnc-{TAG}">
|
||||
<icon name="openra-cnc" />
|
||||
<generic-icon name="applications-games"/>
|
||||
<comment>OpenRA connect to server scheme</comment>
|
||||
<glob weight="60" pattern="openra-cnc-{TAG}://*"/>
|
||||
</mime-type>
|
||||
<mime-type type="x-scheme-handler/openra-d2k-{TAG}">
|
||||
<icon name="openra-d2k" />
|
||||
<generic-icon name="applications-games"/>
|
||||
<comment>OpenRA connect to server scheme</comment>
|
||||
<glob weight="60" pattern="openra-d2k-{TAG}://*"/>
|
||||
</mime-type>
|
||||
|
||||
</mime-info>
|
||||
|
||||
@@ -6,6 +6,7 @@ GenericName=Real Time Strategy Game
|
||||
GenericName[de]=Echtzeit-Strategiespiel
|
||||
Comment=Reimagining of early Westwood Games
|
||||
Icon=openra-{MOD}
|
||||
Exec=openra-{MOD}
|
||||
Exec=openra-{MOD} %U
|
||||
Terminal=false
|
||||
Categories=Game;StrategyGame;
|
||||
MimeType=x-scheme-handler/openra-{MOD}-{TAG};
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
#!/bin/sh
|
||||
cd "{GAME_INSTALL_DIR}"
|
||||
|
||||
mono {DEBUG} OpenRA.Game.exe Game.Mod={MOD} Engine.LaunchPath="{BIN_DIR}/openra-{MOD}" "$@"
|
||||
# Search for server connection
|
||||
PROTOCOL_PREFIX="openra-{MODID}-{TAG}://"
|
||||
JOIN_SERVER=""
|
||||
if [ "${1#${PROTOCOL_PREFIX}}" != "${1}" ]; then
|
||||
JOIN_SERVER="Launch.Connect=${1#${PROTOCOL_PREFIX}}"
|
||||
fi
|
||||
|
||||
# Run the game
|
||||
mono {DEBUG} OpenRA.Game.exe Game.Mod={MODID} Engine.LaunchPath="{BIN_DIR}/openra-{MODID}" "${JOIN_SERVER}" "$@"
|
||||
|
||||
# Show a crash dialog if required
|
||||
if [ $? != 0 ] && [ $? != 1 ]
|
||||
|
||||
Reference in New Issue
Block a user