Finally getting started on the app that will map in paths before launching a command for my cross-platform & cross-distro solution to development in general, idea being "develop for cross-platform before developing for native" unlike the current "develop for native before developing for developing for cross-platform" paradigm we currently have on all platforms & distros.
What I'm fishing for here is options that would be desired/needed for flexibility regarding development and usage with things like flatpak, this is what I currently have:
Code:
OPTION options[]
{
/* Compile to ".../" - intended for developers, app may look for
* PAW_TODIR environment variable */
{ "-o" },
{ "--todir" },
/* Launch from ".../" [...], apps may look for PAW_WHERE environment
* variable */
{ "-c" },
{ "--build" },
{ "--where" },
/* Launch CMD [...] with PATH prefixed with release paths, example:
* paw -c ~/ ./ "./test path/" -x=x86,windows rm test.txt
* Would be the roughly the same as:
* cd ~/ && PATH=/abi/paw/fast/windows/x86/bin:$(PATH) && rm test.txt
* cd ./ && PATH=/abi/paw/fast/windows/x86/bin:$(PATH) && rm test.txt
* cd "./test path" && PATH=/abi/paw/fast/windows/x86/bin:$(PATH) && rm test.txt
* Or:
* cd %USERPROFILE% && PATH=C:\abi\paw\fast\windows\x86\bin;%PATH% && rm test.txt
* cd ./ && PATH=C:\abi\paw\fast\windows\x86\bin;%PATH% && rm test.txt
* cd "./test path" && PATH=C:\abi\paw\fast\windows\x86\bin;%PATH% && rm test.txt */
{ "-x" },
{ "--start" },
/* As --start but debug paths prefixed before release paths */
{ "-g" },
{ "--debug" },
/* As --start but with paths for timed variants prefixed before release
* paths */
{ "-t" },
{ "--timed" },
{ NULL }
};
Edit: Just realised the example I gave in the comment for -x & --start was not clear enough with what it would do so I added in a few lines under the initial command indicating roughly what would happen once the initial command was given