ATTENTION: Newest git changes SMC folder structure

Source Code and development in general from a technical point of view. Post Patches here.

Moderator: SMC Team

ATTENTION: Newest git changes SMC folder structure

Postby Quintus » 04 Jun 2014 11:55

Hi there,

With commit 4d5460a121702386c8fb1720d8edf0b27bca802f I have changed SMC’s folder structure regarding user data. As you know, SMC used to store everything in a folder ~/.smc. I have now changed this to follow the XDG guidelines as any modern program on *nix should do, so that everything will now be placed inside ~/.cache/smc (Image cache), ~/.config/smc (configuration file), and ~/.local/share/smc (user data). The configuration option game_user_data_dir has been removed from the configuration file without replacement. If you urgently need to use nonstandard user directories, please adjust the XDG environment variables properly, they are honoured by SMC now[1].

When you compile and start SMC with this commit (or later), two things will happen.

  1. The image cache will be rebuild. This is due to it having been moved to ~/.cache/smc/images.
  2. Your existing ~/.smc directory will be converted and removed.

As for #2, this means that all your existing levels, worlds, savagames, campaigns, and screenshots will be copied into the new folder structure. You will find them in ~/.local/share/smc. After copying, your ~/.smc directory will be removed. Removed as in "completely erased from your hard drive". So, while I do not expect any problems (I’ve tested it, and if copying errors occur, SMC crashes with a boost exception instead of accidentally removing sensitive data), if you are paranoid, you can backup your ~/.smc folder before running this commit.

For Windows users, nothing should have changed. SMC stores all its files still under %APPLICATION_DATA%/smc, but the image cache will be rebuild on Windows as well.


[1]: Well, not completely. The additional search variables (the *_DIRS variables) are not honoured, as implementing that would make something meant to be simple overly complex.
Come to our fork of SMC:
SMC Team
SMC Team
Posts: 354
Joined: 14 Sep 2010 18:05

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest