MovingBlocks / TerasologyLauncher

Terasology Launcher is the official launcher for the open source game Terasology.
http://terasology.org/
Apache License 2.0
153 stars 76 forks source link

fix(settings): stop writing legacy configuration file #702

Closed jschadewald closed 1 year ago

jschadewald commented 1 year ago

Removes code that wrote to a legacy TerasologyLauncherSettings.properties Still reads from the legacy file if it cannot find the new JSON config

Contains

Deletes some code that was marked for deletion via code comments

How to test

  1. Build the launcher with the changes in this PR
  2. Find the directory where the launcher stores its configuration files. On Windows, it's under /AppData/Roaming/TerasologyLauncher by default
  3. However you prefer, create or modify your own TerasologyLauncherSettings.properties to include these modified field values:
maxHeapSize=MB_512
initialHeapSize=MB_512
  1. If settings.json exists, delete it.
  2. Run the development build of the launcher.
  3. It will prompt you to select a game data folder (this is the current behavior of the release version of the launcher). Go ahead and do that.
  4. In the Launcher settings, verify that minHeap and maxHeap are set to 512MB, as specified in the legacy properties file.
  5. If so, good. Continue.
  6. Exit the Launcher. Notice that a new settings.json was written with the MB_512 values.
  7. If so, good. Continue.
  8. Delete TerasologyLauncherSettings.properties
  9. In settings.json, change the MB_512 values to GB_1 for maxHeapSize and minHeapSize
  10. Run the Launcher again.
  11. It will not prompt you to select a game data folder (this is the current behavior of the release version of the launcher).
  12. Go to the launcher's settings and verify that minHeap and maxHeap are set to 1GB.
  13. Close the launcher.
  14. Notice that the launcher did not write a new TerasologyLauncherSettings.properties. Good, that's the intended change.
  15. END

Outstanding before merging

Nothing comes to mind.

skaldarnar commented 1 year ago

Build in CI fails due to https://github.com/check-run-reporter/action/issues/15 (or rather https://github.com/MovingBlocks/TerasologyLauncher/issues/694), tested locally, all looks fine.