Use java system properties to find the user's home directory before looking to ENV properties.
This commit is contained in:
@ -151,8 +151,13 @@ Configuration:
|
||||
if (!cfgFile || !cfgFile.exists() || !cfgFile.isFile())
|
||||
cfgFile = new File("wdiwtlt.cli.properties")
|
||||
|
||||
if (!cfgFile || !cfgFile.exists() || !cfgFile.isFile())
|
||||
cfgFile = new File(System.getenv().HOME, ".wdiwtlt.cli.properties")
|
||||
if (!cfgFile || !cfgFile.exists() || !cfgFile.isFile()) {
|
||||
String userHome = System.getenv().HOME
|
||||
if (userHome) cfgFile = new File(userHome, ".wdiwtlt.cli.properties")
|
||||
|
||||
if (!cfgFile || !cfgFile.exists() || !cfgFile.isFile()) {
|
||||
userHome = System.getProperty('user.home')
|
||||
if (userHome) cfgFile = new File(userHome, 'wdiwtlt.cli.properties') } }
|
||||
|
||||
if (cfgFile.exists() && cfgFile.isFile()) {
|
||||
try { cfgFile.withInputStream { givenCfg.load(it) } }
|
||||
@ -273,6 +278,9 @@ Configuration:
|
||||
// Try to discover the VLC native libraries
|
||||
def vlcj
|
||||
try {
|
||||
|
||||
String vlcLibDir = opts['--vlc-lib-dir'] || givenCfg['vlc.lib.dir']
|
||||
//if (vlcLibDir) NativeLibrary.addSearchPath('libvlc', vlcLibDir)
|
||||
new NativeDiscovery().discover()
|
||||
vlcj = new AudioMediaListPlayerComponent() }
|
||||
catch (Exception e) {
|
||||
|
Reference in New Issue
Block a user