diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d462e55b0fd..76287b179df6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -595,8 +595,10 @@ endif(ENABLE_CAMPAIGN_SERVER AND NOT ENABLE_GAME) # Install desktop file so wesnoth appears in the application start menu with an icon # if(ENABLE_DESKTOP_ENTRY AND ENABLE_GAME) - install(FILES packaging/org.wesnoth.Wesnoth.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications ) install(DIRECTORY packaging/icons/hicolor DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons ) + install(FILES packaging/org.wesnoth.Wesnoth.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications ) + install(FILES packaging/org.wesnoth.Wesnoth_Editor.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications ) + install(FILES packaging/org.wesnoth.Wesnoth.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/mime/packages ) endif(ENABLE_DESKTOP_ENTRY AND ENABLE_GAME) if(ENABLE_APPDATA_FILE AND ENABLE_GAME) diff --git a/SConstruct b/SConstruct index 3564cfe75f72..62e8f7b31c02 100755 --- a/SConstruct +++ b/SConstruct @@ -73,6 +73,7 @@ opts.AddVariables( PathVariable('datadirname', 'sets the name of data directory', "wesnoth$version_suffix", PathVariable.PathAccept), PathVariable('desktopdir', 'sets the desktop entry directory to a non-default location', "$datarootdir/applications", PathVariable.PathAccept), PathVariable('icondir', 'sets the icons directory to a non-default location', "$datarootdir/icons", PathVariable.PathAccept), + PathVariable('mimedir', 'sets the mimetype directory to a non-default location', "$datarootdir/mime/packages", PathVariable.PathAccept), PathVariable('appdatadir', 'sets the appdata directory to a non-default location', "$datarootdir/metainfo", PathVariable.PathAccept), BoolVariable('internal_data', 'Set to put data in Mac OS X application fork', False), PathVariable('localedirname', 'sets the locale data directory to a non-default location', "translations", PathVariable.PathAccept), @@ -745,6 +746,8 @@ InstallManpages(env, "wesnoth") if have_client_prereqs and have_X and env["desktop_entry"]: env.InstallData("icondir", "wesnoth", "packaging/icons") env.InstallData("desktopdir", "wesnoth", "packaging/org.wesnoth.Wesnoth.desktop") + env.InstallData("desktopdir", "wesnoth", "packaging/org.wesnoth.Wesnoth_Editor.desktop") + env.InstallData("mimedir", "wesnoth", "packaging/org.wesnoth.Wesnoth.xml") if have_client_prereqs and "linux" in sys.platform and env["appdata_file"]: env.InstallData("appdatadir", "wesnoth", "packaging/org.wesnoth.Wesnoth.appdata.xml") diff --git a/packaging/icons/hicolor/128x128/apps/wesnoth_editor-icon.png b/packaging/icons/hicolor/128x128/apps/wesnoth_editor-icon.png new file mode 100644 index 000000000000..8fce4e1390a2 Binary files /dev/null and b/packaging/icons/hicolor/128x128/apps/wesnoth_editor-icon.png differ diff --git a/packaging/icons/hicolor/128x128/mimetypes/wesnoth-map.png b/packaging/icons/hicolor/128x128/mimetypes/wesnoth-map.png new file mode 100644 index 000000000000..8fce4e1390a2 Binary files /dev/null and b/packaging/icons/hicolor/128x128/mimetypes/wesnoth-map.png differ diff --git a/packaging/icons/hicolor/64x64/apps/wesnoth_editor-icon.png b/packaging/icons/hicolor/64x64/apps/wesnoth_editor-icon.png new file mode 100644 index 000000000000..db7514f78a30 Binary files /dev/null and b/packaging/icons/hicolor/64x64/apps/wesnoth_editor-icon.png differ diff --git a/packaging/icons/hicolor/64x64/mimetypes/wesnoth-map.png b/packaging/icons/hicolor/64x64/mimetypes/wesnoth-map.png new file mode 100644 index 000000000000..db7514f78a30 Binary files /dev/null and b/packaging/icons/hicolor/64x64/mimetypes/wesnoth-map.png differ diff --git a/packaging/org.wesnoth.Wesnoth.desktop b/packaging/org.wesnoth.Wesnoth.desktop index 2dd0fb22bcbb..b06a37156756 100644 --- a/packaging/org.wesnoth.Wesnoth.desktop +++ b/packaging/org.wesnoth.Wesnoth.desktop @@ -93,4 +93,4 @@ Name[sr@ijekavian]=Уређивач мапа Name[sr@ijekavianlatin]=Uređivač mapa Name[sr@latin]=Uređivač mapa Name[tr]=Harita Düzenleyici -Exec=sh -c "wesnoth -e >/dev/null 2>&1" +Exec=sh -c "wesnoth -e >/dev/null 2>&1" diff --git a/packaging/org.wesnoth.Wesnoth.xml b/packaging/org.wesnoth.Wesnoth.xml new file mode 100644 index 000000000000..2b05a1a21e75 --- /dev/null +++ b/packaging/org.wesnoth.Wesnoth.xml @@ -0,0 +1,17 @@ + + + + + Wesnoth Map + Wesnoth Karte + + + + + + Wesnoth Map + Wesnoth Karte + + + + diff --git a/packaging/org.wesnoth.Wesnoth_Editor.desktop b/packaging/org.wesnoth.Wesnoth_Editor.desktop new file mode 100644 index 000000000000..9d41ba6a94db --- /dev/null +++ b/packaging/org.wesnoth.Wesnoth_Editor.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +NoDisplay=True +Version=1.0 +Type=Application +Name=Battle for Wesnoth (Map Editor) +GenericName=Map editor of a strategy game +GenericName[de]=Karteneditor eines Strategiespiels +Comment=Map Editor of a turn-based strategy game +Comment[de]=Karteneditor eines rundenbasierten Strategiespiels +Icon=wesnoth_editor-icon +Exec=sh -c "wesnoth -e -l %u >/dev/null 2>&1" +MimeType=application/x-wesnoth-map;