Follow XDG basedir specification
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Right now a new folder for configurations and userdata is created in `$HOME/.widelands`.
To be more flexible it would be nice to implement the [XDG Base Directory Specification](https:/
> `$XDG_DATA_HOME` defines the base directory relative to which user specific data files should be stored. If `$XDG_DATA_HOME` is either not set or empty, a default equal to `$HOME/
> `$XDG_CONFIG_HOME` defines the base directory relative to which user specific configuration files should be stored. If `$XDG_CONFIG_HOME` is either not set or empty, a default equal to `$HOME/.config` should be used.
This would result in the following folders:
- `$XDG_CONFIG_
- `$XDG_DATA_
Related branches
- kaputtnik (community): Needs Fixing
- Toni Förster: Approve
- Klaus Halfmann: Approve (code review)
- GunChleoc: Needs Fixing
-
Diff: 2598 lines (+670/-270)73 files modifiedCMakeLists.txt (+6/-0)
compile.sh (+27/-2)
src/CMakeLists.txt (+3/-2)
src/editor/CMakeLists.txt (+1/-1)
src/editor/editorinteractive.cc (+3/-2)
src/editor/ui_menus/main_menu_map_options.cc (+2/-1)
src/editor/ui_menus/main_menu_new_map.cc (+2/-1)
src/editor/ui_menus/main_menu_random_map.cc (+2/-1)
src/editor/ui_menus/main_menu_save_map.cc (+2/-1)
src/editor/ui_menus/player_menu.cc (+3/-5)
src/game_io/CMakeLists.txt (+1/-1)
src/game_io/game_preload_packet.cc (+1/-1)
src/io/CMakeLists.txt (+15/-0)
src/io/filesystem/filesystem.cc (+99/-0)
src/io/filesystem/filesystem.h (+8/-0)
src/io/profile.cc (+1/-3)
src/io/profile.h (+4/-4)
src/logic/CMakeLists.txt (+3/-2)
src/logic/ai_dna_handler.cc (+1/-1)
src/logic/game.cc (+3/-2)
src/logic/save_handler.cc (+5/-6)
src/logic/single_player_game_controller.cc (+2/-2)
src/map_io/CMakeLists.txt (+1/-1)
src/map_io/coords_profile.cc (+1/-1)
src/map_io/map_allowed_building_types_packet.cc (+1/-1)
src/map_io/map_allowed_worker_types_packet.cc (+1/-1)
src/map_io/map_elemental_packet.cc (+1/-1)
src/map_io/map_objective_packet.cc (+1/-1)
src/map_io/map_player_names_and_tribes_packet.cc (+1/-1)
src/map_io/map_player_position_packet.cc (+1/-1)
src/map_io/map_players_messages_packet.cc (+1/-1)
src/map_io/map_port_spaces_packet.cc (+1/-1)
src/map_io/map_version_packet.cc (+1/-1)
src/network/CMakeLists.txt (+0/-1)
src/network/gameclient.cc (+4/-4)
src/network/gamehost.cc (+6/-6)
src/profile/CMakeLists.txt (+0/-14)
src/scripting/CMakeLists.txt (+2/-1)
src/scripting/lua_bases.cc (+1/-1)
src/scripting/lua_game.cc (+2/-1)
src/sound/CMakeLists.txt (+1/-1)
src/sound/sound_handler.cc (+15/-19)
src/ui_basic/CMakeLists.txt (+0/-1)
src/ui_basic/panel.cc (+2/-2)
src/ui_fsmenu/CMakeLists.txt (+5/-5)
src/ui_fsmenu/campaign_select.cc (+0/-1)
src/ui_fsmenu/campaigns.cc (+1/-1)
src/ui_fsmenu/internet_lobby.cc (+6/-9)
src/ui_fsmenu/launch_mpg.cc (+1/-1)
src/ui_fsmenu/loadgame.cc (+3/-4)
src/ui_fsmenu/multiplayer.cc (+8/-10)
src/ui_fsmenu/netsetup_lan.cc (+5/-7)
src/ui_fsmenu/options.cc (+3/-2)
src/ui_fsmenu/scenario_select.cc (+1/-1)
src/wlapplication.cc (+89/-90)
src/wlapplication.h (+10/-0)
src/wlapplication_options.cc (+151/-0)
src/wlapplication_options.h (+118/-0)
src/wui/CMakeLists.txt (+4/-4)
src/wui/chat_overlay.cc (+2/-3)
src/wui/economy_options_window.cc (+1/-1)
src/wui/game_main_menu_save_game.cc (+2/-1)
src/wui/interactive_base.cc (+0/-1)
src/wui/interactive_base.h (+1/-1)
src/wui/interactive_gamebase.cc (+0/-1)
src/wui/interactive_gamebase.h (+1/-1)
src/wui/interactive_player.cc (+0/-1)
src/wui/interactive_player.h (+1/-1)
src/wui/interactive_spectator.cc (+0/-1)
src/wui/interactive_spectator.h (+1/-1)
src/wui/login_box.cc (+14/-18)
src/wui/mapview.cc (+2/-2)
src/wui/watchwindow.cc (+2/-2)
Changed in widelands: | |
status: | New → Fix Committed |
I am against this. Here are my 2c: First XDG is an opinion - I for one much prefer pure dotfile directories instead of smearing everything across an entire tree. Second, Widelands has done dotfiles for > 15 years, like vim and emacs - it works well and is well tested. Third, the pain of implementing this and transitioning old directories over is substantial and the gains are minimal.
+1 for wontfix.