matthiasblaesing commented on pull request #1584:
URL: https://github.com/apache/netbeans/pull/1584#issuecomment-689730261
I had a look at the code, the netbeans launcher uses. There are two code
paths:
Linux/mac OS (from `nb/ide.launcher/unix/netbeans`):
```bash
case "`uname`" in
Darwin*)
# set default userdir and cachedir on Mac OS X
DEFAULT_USERDIR_ROOT="${HOME}/Library/Application Support/NetBeans"
DEFAULT_CACHEDIR_ROOT=${HOME}/Library/Caches/NetBeans
;;
*)
# set default userdir and cachedir on unix systems
DEFAULT_USERDIR_ROOT=${HOME}/.netbeans
DEFAULT_CACHEDIR_ROOT=${HOME}/.cache/netbeans
;;
esac
```
Windows (from `nb/ide.launcher/windows/nblauncher.cpp`):
```c++
string NbLauncher::getDefaultCacheDirRoot() {
TCHAR defCacheDirRootChar[MAX_PATH];
if (FAILED(SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA, NULL, 0,
defCacheDirRootChar))) {
return std::string();
}
defCacheDirRoot = constructApplicationDir((string) defCacheDirRootChar,
true);
defCacheDirRoot.erase(defCacheDirRoot.rfind('\\'));
logMsg("Default Cachedir Root: %s", defCacheDirRoot.c_str());
return defCacheDirRoot;
}
```
The shell variant is trivial to replicate, but the windows code is harder -
if we are willing to pull `jna-platform` into the build, the function is
already build. Alternative 1: We copy the function definition from jna-platform
(JNA has no notice, so only the copyright will remain with JNA), Alternatve 2:
Someone say how to access the special folders from the CLI.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists