Mahou icon indicating copy to clipboard operation
Mahou copied to clipboard

Command-line parameter for Mahou.ini location

Open m-alice opened this issue 4 years ago • 4 comments

When using the application as part of the portableapps suite, Mahou.ini is deleted if you click "restart". tl;dr: I want to point the application to the direct path to the settings file. E.G. Mahou.exe -settings=Mahou.ini -dictionary=TSDict.txt More details: Since the settings file can now only be appdata or next to the executable file, i have to use the code

[FilesMove] Mahou.ini =%PAL:AppDir%\Mahou TSDict.txt=%PAL:AppDir%\Mahou

And I would like to use something like

[Launch] CommandLineArguments= -settings=%PAL:DataDir%\Mahou.ini CommandLineArguments=-dictionary=%PAL:DataDir%\TSDict.txt

Thanks in advance.

m-alice avatar Feb 11 '21 20:02 m-alice

Why do you need "portableapps suite", since Mahou normally already portable? Although this is possible, but I am curious why would you prefer "portableapps suite" over "native portable"?

BladeMight avatar Feb 11 '21 20:02 BladeMight

Why do you need "portableapps suite", since Mahou normally already portable? Although this is possible, but I am curious why would you prefer "portableapps suite" over "native portable"?

Kind of professional deformation, I suppose. I like it when all the applications I need are in one place and obey the same rules. A matter of years of convenience. I promise to do the build on their forum, with the permission of the author, of course.

m-alice avatar Feb 11 '21 21:02 m-alice

@m-alice OK, I got it.

Since Mahou don't use "separate folders for each file", I added only option to specify "config folder". Here you go in c8bbde9 you can run:

N:\Path\To\Mahou.exe -C "S:\Path\To\Config\Directory"

-C can be either: /C or C or -C or same lowercase.

And Mahou will store all its configs there, that includes:

  1. Mahou.ini, Mahou.mm, TSDict.txt, CustomConversion.txt, AS_dict.txt, ASsymDiff.txt, LayoutReplaces.txt, snippets.txt, history.txt.
  2. Folders: Logs, histories
  3. when looking for Flags folder, for custom flags images(see wiki).
  4. maybe something else that I can't remember at this moment...

BladeMight avatar Feb 12 '21 12:02 BladeMight

Can't reproduce on v2.9.0.1-dev <7590976>, for testing did:

D:\Mahou\Mahou.exe -C "D:\Mahou_config"

Even with no D:\Mahou_config directory existing, Mahou created it and wrote configs there, I changed a bunch of settings like snippets, appearance and functions and applied. Then quit Mahou, and restarted with same switch - everything loaded, just as I configured previously.

BladeMight avatar Jul 19 '22 10:07 BladeMight