Compare commits
3 Commits
ff372a8d82
...
d5e013f891
Author | SHA1 | Date |
---|---|---|
Wolfgang Thaller | d5e013f891 | |
Wolfgang Thaller | 5f72352b3e | |
Wolfgang Thaller | 147252f5a4 |
|
@ -60,6 +60,7 @@ static void usage()
|
|||
{
|
||||
std::cerr << "Usage: " << "LaunchAPPL [options] appl-file\n";
|
||||
std::cerr << desc << std::endl;
|
||||
std::cerr << "Options can also be specified as environment variables of the form RETRO68_LAUNCHAPPL_OPTION_NAME.\n";
|
||||
std::cerr << "Defaults are read from:\n";
|
||||
for(string str : configFiles)
|
||||
{
|
||||
|
@ -118,6 +119,8 @@ int main(int argc, char *argv[])
|
|||
("help,h", "show this help message")
|
||||
("list-emulators,l", "get the list of available, fully configured emulators/environments")
|
||||
("make-executable,x", po::value<std::string>(), "make a MacBinary file executable")
|
||||
("config-file", po::value<vector<string>>(), "read defaults from the given file")
|
||||
|
||||
;
|
||||
po::options_description configdesc;
|
||||
configdesc.add_options()
|
||||
|
@ -145,6 +148,16 @@ int main(int argc, char *argv[])
|
|||
.run();
|
||||
|
||||
po::store(parsed, options);
|
||||
|
||||
po::store(po::parse_environment(configdesc, [](std::string_view s) {
|
||||
const std::string_view prefix = "RETRO68_LAUNCHAPPL_";
|
||||
if(s.compare(0, prefix.size(), prefix) != 0)
|
||||
return std::string();
|
||||
std::string option(s.substr(prefix.size()));
|
||||
for (char& c : option)
|
||||
c = c == '_' ? '-' : std::tolower(c);
|
||||
return option;
|
||||
}), options);
|
||||
}
|
||||
catch(po::error& e)
|
||||
{
|
||||
|
@ -153,6 +166,9 @@ int main(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (options.count("config-file"))
|
||||
configFiles = options["config-file"].as<vector<string>>();
|
||||
|
||||
for(string configFileName : configFiles)
|
||||
{
|
||||
try
|
||||
|
|
|
@ -177,6 +177,9 @@ Likewise, use
|
|||
If you have a local checkout of Retro68, you can replace `github:autc04/Retro68` by the path
|
||||
to that local checkout, e.g., run `nix develop .#m68k` from inside the Retro68 directory.
|
||||
|
||||
To see how to set up your own nix-based build and development environment for your own application,
|
||||
head over to the github.com/autc04/Retro68NixSample repository.
|
||||
|
||||
You can also use the `nix build` command to build packages. As always with `nix`,
|
||||
the result will be somewhere in a subdirectory of `/nix/store`, with a symlink
|
||||
named `result` placed in the directory where you invoked the command.
|
||||
|
|
|
@ -132,6 +132,7 @@ jobs:
|
|||
TARGET: carbon
|
||||
pool:
|
||||
vmImage: 'macOS-latest'
|
||||
timeoutInMinutes: 90
|
||||
steps:
|
||||
- script: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix \
|
||||
|
|
Loading…
Reference in New Issue