cemu-project / Cemu

Cemu - Wii U emulator
https://cemu.info
Mozilla Public License 2.0
7.37k stars 603 forks source link

Feature request: Enable generation of settings files from terminal in Cemu #1359

Closed davidhedlund closed 1 month ago

davidhedlund commented 1 month ago

Current Behavior

Currently, Cemu does not support generating settings files, such as settings.xml, directly from the terminal. When Cemu is launched for the first time, users must manually click the "Close" button in the second dialog box to generate the settings.xml file. This process can be inconvenient for users who prefer or require automation.

Expected Behavior

The settings.xml file should be automatically generated when Cemu is launched from the terminal without requiring any manual intervention through the GUI.

Solution

# Create the configuration directory if it doesn't exist
mkdir -p ~/.config/Cemu/

# Create an empty settings.xml file
echo "" > ~/.config/Cemu/settings.xml

# Launch Cemu with a timeout to allow it to generate additional required directories and files
timeout 5 ./Cemu-2.2-x86_64.AppImage

This BASH approach not only creates the settings.xml file but also ensures that Cemu initializes other necessary directories, such as ~/.local/share/Cemu/mlc01/, upon its first run. By implementing this solution in CPP, Cemu will automatically generate the settings.xml file when opened for the first time, eliminating the need for manual input through dialog boxes.

Proposed Solution

Implement a feature in Cemu that allows for the automatic generation of configuration files when it is executed from the terminal. This would enhance usability for users who rely on scripts and automation tools.

Additional Context

Automating this process would align with practices seen in other emulators and improve user experience by reducing manual steps required during initial setup or batch operations.

Steps to Reproduce

Steps to Reproduce

  1. Script Execution:

    • Run the following command:
      timeout 5 ./Cemu-2.2-x86_64.AppImage
    • Observe that ~/.config/Cemu/settings.xml is not generated.
    • image
  2. GUI Method:

    • Open Cemu-2.2-x86_64.AppImage.
    • image
    • Click on the "Close" button.
    • image
    • Verify that ~/.config/Cemu/settings.xml is generated.

System Info (Optional)

OS: GPU:

Emulation Settings (Optional)

No response

Logs (Optional)

No response

davidhedlund commented 1 month ago

Sorry, please replace the "bug" label with the "feature request" label.

Exzap commented 1 month ago

There are many ways to work around this, e.g. by supplying a pre-generated settings.xml file. Overall I feel this feature request is extremely niche and outside the scope of the project. If you want to see this happen then I invite you to add this yourself an submit it is as a PR.

davidhedlund commented 1 month ago

There are many ways to work around this, e.g. by supplying a pre-generated settings.xml file. Overall I feel this feature request is extremely niche and outside the scope of the project. If you want to see this happen then I invite you to add this yourself an submit it is as a PR.

I added a solution in the top post.