|
@@ -466,13 +466,13 @@ class PackageClass
|
|
|
$regAutorun = $app["distribute-root"]["register-autorun"] ? : array();
|
|
|
|
|
|
$auto = new WinAutorun();
|
|
|
- for($removeAutorun as $item){
|
|
|
+ foreach($removeAutorun as $item){
|
|
|
if(! $auto->remove($item['name']) ){
|
|
|
logError('failed to remove autorun',$item['name']);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- for($regAutorun as $item){
|
|
|
+ foreach($regAutorun as $item){
|
|
|
$cmd = pathJoin($rootDir,$item['path']);
|
|
|
if(! $auto->register($item['name'],$cmd) ){
|
|
|
logError('failed to register autorun',$item['name']);
|
|
@@ -491,13 +491,13 @@ class PackageClass
|
|
|
$regShortcut = $app["distribute-root"]["register-shortcut"] ? : array();
|
|
|
|
|
|
$sc = new WinDesktopShortcut();
|
|
|
- for($removeShortcut as $item){
|
|
|
+ foreach($removeShortcut as $item){
|
|
|
if(! $sc->remove($item['name']) ){
|
|
|
logError('failed to remove shortcut',$item['name']);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- for($regShortcut as $item){
|
|
|
+ foreach($regShortcut as $item){
|
|
|
$path = pathJoin($rootDir,$item['path']);
|
|
|
if(! $sc->register($item['name'],$path,$item['desc']) ){
|
|
|
logError('failed to register shortcut',$item['name']);
|