|
@@ -438,10 +438,10 @@ class PackageClass
|
|
$removePath = $app["distribute-root"]["remove-path"] ? : array();
|
|
$removePath = $app["distribute-root"]["remove-path"] ? : array();
|
|
$registerPath = $app["distribute-root"]["register-path"] ? : array();
|
|
$registerPath = $app["distribute-root"]["register-path"] ? : array();
|
|
|
|
|
|
- $arrRemovePath = array();
|
|
|
|
|
|
+ $arrRemovePattern = array();
|
|
foreach($removePath as $item){
|
|
foreach($removePath as $item){
|
|
- $path = pathJoin($rootDir,$item['path']);
|
|
|
|
- array_push($arrRemovePath,$path);
|
|
|
|
|
|
+ $pattern = pathJoin($rootDir,$item['pattern']);
|
|
|
|
+ array_push($arrRemovePattern,$pattern);
|
|
}
|
|
}
|
|
$arrAddPath = array();
|
|
$arrAddPath = array();
|
|
foreach($registerPath as $item){
|
|
foreach($registerPath as $item){
|
|
@@ -449,11 +449,18 @@ class PackageClass
|
|
array_push($arrAddPath,$path);
|
|
array_push($arrAddPath,$path);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $removePathes = array();
|
|
$env = new WinEnvPath();
|
|
$env = new WinEnvPath();
|
|
- if(! $env->updatePath($arrRemovePath,$arrAddPath) ){
|
|
|
|
- logError('failed to registerPath');
|
|
|
|
|
|
+ if(! $env->updatePath($arrRemovePattern,$arrAddPath,$removePathes) ){
|
|
|
|
+ logError('failed to register path');
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ foreach($removePathes as $path){
|
|
|
|
+ logInfo('succeeded to remove path',$path);
|
|
|
|
+ }
|
|
|
|
+ foreach($arrAddPath as $path){
|
|
|
|
+ logInfo('succeeded to add path',$path);
|
|
|
|
+ }
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -471,6 +478,7 @@ class PackageClass
|
|
logError('failed to remove autorun',$item['name']);
|
|
logError('failed to remove autorun',$item['name']);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ logInfo('succeeded to remove autorun',$item['name']);
|
|
}
|
|
}
|
|
foreach($regAutorun as $item){
|
|
foreach($regAutorun as $item){
|
|
$cmd = pathJoin($rootDir,$item['path']);
|
|
$cmd = pathJoin($rootDir,$item['path']);
|
|
@@ -478,6 +486,7 @@ class PackageClass
|
|
logError('failed to register autorun',$item['name']);
|
|
logError('failed to register autorun',$item['name']);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ logInfo('succeeded to register autorun',$item['name']);
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -496,6 +505,7 @@ class PackageClass
|
|
logError('failed to remove shortcut',$item['name']);
|
|
logError('failed to remove shortcut',$item['name']);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ logInfo('succeeded to remove shortcut',$item['name']);
|
|
}
|
|
}
|
|
foreach($regShortcut as $item){
|
|
foreach($regShortcut as $item){
|
|
$path = pathJoin($rootDir,$item['path']);
|
|
$path = pathJoin($rootDir,$item['path']);
|
|
@@ -503,6 +513,7 @@ class PackageClass
|
|
logError('failed to register shortcut',$item['name']);
|
|
logError('failed to register shortcut',$item['name']);
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ logInfo('succeeded to register shortcut',$item['name']);
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|