{"action":"created","issue":{"url":"https://api.github.com/repos/MinVR/MinVR/issues/118","repository_url":"https://api.github.com/repos/MinVR/MinVR","labels_url":"https://api.github.com/repos/MinVR/MinVR/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/MinVR/MinVR/issues/118/comments","events_url":"https://api.github.com/repos/MinVR/MinVR/issues/118/events","html_url":"https://github.com/MinVR/MinVR/pull/118","id":208768194,"number":118,"title":"Centralized / installed config files","user":{"login":"dankeefe","id":11034631,"avatar_url":"https://avatars.githubusercontent.com/u/11034631?v=3","gravatar_id":"","url":"https://api.github.com/users/dankeefe","html_url":"https://github.com/dankeefe","followers_url":"https://api.github.com/users/dankeefe/followers","following_url":"https://api.github.com/users/dankeefe/following{/other_user}","gists_url":"https://api.github.com/users/dankeefe/gists{/gist_id}","starred_url":"https://api.github.com/users/dankeefe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankeefe/subscriptions","organizations_url":"https://api.github.com/users/dankeefe/orgs","repos_url":"https://api.github.com/users/dankeefe/repos","events_url":"https://api.github.com/users/dankeefe/events{/privacy}","received_events_url":"https://api.github.com/users/dankeefe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-02-20T02:12:50Z","updated_at":"2017-02-20T13:59:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MinVR/MinVR/pulls/118","html_url":"https://github.com/MinVR/MinVR/pull/118","diff_url":"https://github.com/MinVR/MinVR/pull/118.diff","patch_url":"https://github.com/MinVR/MinVR/pull/118.patch"},"body":"This is a fairly significant pull request in that it shifts us into the mode of having centralized common config files (desktop, YURT, ivlabcave, etc..) that exist in one common place in the build directory rather than having multiple copies included with each example app.  In the build directory, the configs are in MinVR/config  and the files there get installed to INSTALL_PREFIX/config.  I also changed the config file extensions to .minvr rather than .xml.  The .minvr extension is used to distinguish installed vs. uninstalled config files when they are listed on the command line (see below).\r\n\r\nThis pull includes a default MinVR command line convention that is updated a bit from before.  It now supports 3 things:  (1) loading pre-installed configurations, (2) loading regular config files that have not been pre-installed, and (3) setting specific overrides with a key=value argument.  The help message for the command line is copied below.  Also, since some users may not want to use this command line convention, there are two distinct ways to initialize MinVR in this branch:  (1) VRMain::initializeWithMinVRCommandLineParsing() and (2) VRMain::initializeWithUserCommandLineParsing().  There is a caveat with the user command line parsing in that users must write their command line parser so that it ignores a special argument of the form MINVR_DATA=xxxxxxx so that MinVR can pass data to subprocesses.  This uses @dtorban's approach for encoding data on the command line in a single argument so it is not too hard for users to ignore if they really want to do their own command line parsing.\r\n\r\n@dtorban I adjusted the VRAppLauncher code a bit to make this work.  Can you please review that specifically and make sure that I did not cause a problem for how you intend for that feature to be used.  I'm not sure if I completely preserved your vision for how developers should use it.  I left a bunch of comments for what I was intending.  As I understand it from the code, it looks like exactly what we would want to use to launch programs over SSH as is done in the YURT, and I wonder if we should write a VRSSHAppLauncher(..) to do that.  I renamed the VRDefaultAppLauncher to VRLocalAppLauncher with the idea that there might be a VRSSHAppLauncher or VRRemoteAppLauncher or VRMPIAppLauncher etc. on the way.  I would guess that the specific app launcher to use is something that could be set via a config file, so as I reorganized the initialize*() functions I did not preserve the ability to send a VRAppLauncher into the initialize() function.  Do you foresee any problem with that?  Let me know if I have the right idea on this... I want to make sure that this doesn't squash any idea you had for how to use it.  Thanks!\r\n\r\nNew default MinVR command line args:\r\n```\r\n-h, --help         Display this help message.\r\n\r\n<configname>       Search for and load the pre-installed MinVR config file\r\n                   named <configname>.minvr -- the search looks in:\r\n                   1. the current working directory [cwd]\r\n                   2. [cwd]/config\r\n                   3. ../../config (for developers running build tree\r\n                      executables from build/bin or tests/testname\r\n                   4. MINVR_ROOT/config if the MINVR_ROOT envvar is defined\r\n                   5. the install_prefix specified when libMinVR was built.\r\n\r\n<path/file.minvr>  Load the exact MinVR config file specified as a complete\r\n                   relative or absolute path and filename.  The filename\r\n                   must include a .minvr extension to distinguish this\r\n                   option from loading a pre-installed configuration.\r\n\r\n<key>=<value>      Add an entry to the MinVR configuration directly from\r\n                   the command line rather than by specifying it in a\r\n                   config file. This can be used to override one specific\r\n                   option in a pre-installed configuration or config file\r\n                   specified earlier on the command line.  For example,\r\n                   'myprogram desktop WindowHeight=500 WindowWidth=500'\r\n                   would start myprogram, load the installed desktop MinVR\r\n                   config and then override the WindowHeight and\r\n                   WindowWidth values specified in the pre-installed\r\n                   desktop configuration with the new values specified.\r\n\r\n[nothing]          If no command line arguments are provided, then MinVR\r\n                   will try to load the pre-installed default\r\n                   configuration, whis is the same as running the command\r\n                   'myprogram default'.\r\n\r\nMINVR_DATA=xxxxx   A special command line argument reserved for internal\r\n                   use by MinVR.\r\n  ```"},"comment":{"url":"https://api.github.com/repos/MinVR/MinVR/issues/comments/281086178","html_url":"https://github.com/MinVR/MinVR/pull/118#issuecomment-281086178","issue_url":"https://api.github.com/repos/MinVR/MinVR/issues/118","id":281086178,"user":{"login":"dtorban","id":7785726,"avatar_url":"https://avatars.githubusercontent.com/u/7785726?v=3","gravatar_id":"","url":"https://api.github.com/users/dtorban","html_url":"https://github.com/dtorban","followers_url":"https://api.github.com/users/dtorban/followers","following_url":"https://api.github.com/users/dtorban/following{/other_user}","gists_url":"https://api.github.com/users/dtorban/gists{/gist_id}","starred_url":"https://api.github.com/users/dtorban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtorban/subscriptions","organizations_url":"https://api.github.com/users/dtorban/orgs","repos_url":"https://api.github.com/users/dtorban/repos","events_url":"https://api.github.com/users/dtorban/events{/privacy}","received_events_url":"https://api.github.com/users/dtorban/received_events","type":"User","site_admin":false},"created_at":"2017-02-20T13:59:42Z","updated_at":"2017-02-20T13:59:42Z","body":"I think one of the original purposes of VRDefaultAppLauncher was so that users who wanted to take control of the command line didn't have to know about the MINVR_DATA= parameter, or they could define it to be something else if they needed.  This is no longer the case, but that's probably fine since taking control of the command line is a more advanced feature."}}
{"actor":{"display_login":"dtorban"}}