mirror of
https://github.com/Enyby/APK-Info.git
synced 2026-09-22 18:16:10 +00:00
Avoid use extension for binaries for ability use .cmd files as replace.
This commit is contained in:
1 parent
57099f24d1
commit
305be43a09
1 file changed
+12
-12
@@ -1033,7 +1033,7 @@ Func _getSignatureName()
|
||||
EndFunc ;==>_getSignatureName
|
||||
|
||||
Func _getBadge($prmAPK)
|
||||
$foo = _Run('badging', '"' & $toolsDir & 'aapt.exe" d --include-meta-data badging ' & '"' & $prmAPK & '"', $STDERR_CHILD + $STDOUT_CHILD)
|
||||
$foo = _Run('badging', '"' & $toolsDir & 'aapt" d --include-meta-data badging ' & '"' & $prmAPK & '"', $STDERR_CHILD + $STDOUT_CHILD)
|
||||
$output = StringStripWS(_readAll($foo, 'badging'), $STR_STRIPLEADING + $STR_STRIPTRAILING)
|
||||
If $output == '' Then $output = StringStripWS(_readAll($foo, 'badging stderr', False), $STR_STRIPLEADING + $STR_STRIPTRAILING)
|
||||
Return $output
|
||||
@@ -1301,7 +1301,7 @@ Func _searchPng($res)
|
||||
$ret = $res
|
||||
|
||||
If Not $searchPngCache Then
|
||||
$foo = _Run('list', '"' & $toolsDir & 'unzip.exe" -l ' & '"' & $fullPathAPK & '"', $STDERR_CHILD + $STDOUT_CHILD)
|
||||
$foo = _Run('list', '"' & $toolsDir & 'unzip" -l ' & '"' & $fullPathAPK & '"', $STDERR_CHILD + $STDOUT_CHILD)
|
||||
$output = _readAll($foo, 'list')
|
||||
$searchPngCache = _StringExplode($output, @CRLF)
|
||||
EndIf
|
||||
@@ -1324,7 +1324,7 @@ Func _searchPng($res)
|
||||
EndFunc ;==>_searchPng
|
||||
|
||||
Func _parseXmlIcon($icon)
|
||||
$foo = _Run('xmltree', '"' & $toolsDir & 'aapt.exe" d xmltree ' & '"' & $fullPathAPK & '" "' & $icon & '"', $STDERR_CHILD + $STDOUT_CHILD)
|
||||
$foo = _Run('xmltree', '"' & $toolsDir & 'aapt" d xmltree ' & '"' & $fullPathAPK & '" "' & $icon & '"', $STDERR_CHILD + $STDOUT_CHILD)
|
||||
$output = _readAll($foo, 'xmltree')
|
||||
$arrayLines = _StringExplode($output, @CRLF)
|
||||
|
||||
@@ -1351,7 +1351,7 @@ Func _parseXmlIcon($icon)
|
||||
_setProgress(1)
|
||||
|
||||
If $ids[0] Or $ids[1] Then
|
||||
$foo = _Run('resources', '"' & $toolsDir & 'aapt.exe" d resources ' & '"' & $fullPathAPK & '"', $STDERR_CHILD + $STDOUT_CHILD)
|
||||
$foo = _Run('resources', '"' & $toolsDir & 'aapt" d resources ' & '"' & $fullPathAPK & '"', $STDERR_CHILD + $STDOUT_CHILD)
|
||||
$output = _readAll($foo, 'resources')
|
||||
$arrayLines = _StringExplode($output, @CRLF)
|
||||
|
||||
@@ -1425,7 +1425,7 @@ Func _extractIcon()
|
||||
$files = StringStripWS($files, $STR_STRIPLEADING + $STR_STRIPTRAILING)
|
||||
If $files <> '' Then
|
||||
DirCreate($tempPath)
|
||||
_RunWait('icons', '"' & $toolsDir & 'unzip.exe" -o -j ' & '"' & $fullPathAPK & '" ' & $files & " -d " & '"' & $tempPath & '"')
|
||||
_RunWait('icons', '"' & $toolsDir & 'unzip" -o -j ' & '"' & $fullPathAPK & '" ' & $files & " -d " & '"' & $tempPath & '"')
|
||||
EndIf
|
||||
EndFunc ;==>_extractIcon
|
||||
|
||||
@@ -1441,7 +1441,7 @@ Func _cleanUp()
|
||||
|
||||
DirRemove($tempPath, 1) ; clean own dir
|
||||
DirRemove(@TempDir & "\APK-Info", 1) ; clean files from previous runs
|
||||
If $AdbKill == '2' Then _RunWait('kill', '"' & $toolsDir & 'adb.exe" kill-server')
|
||||
If $AdbKill == '2' Then _RunWait('kill', '"' & $toolsDir & 'adb" kill-server')
|
||||
EndFunc ;==>_cleanUp
|
||||
|
||||
Func _translateSDKLevel($sdk, $withNumber = True)
|
||||
@@ -1478,7 +1478,7 @@ Func _drawImg($path)
|
||||
If StringRight($filename, 5) == '.webp' Then
|
||||
$tmpFilename = StringTrimRight($filename, 5) & '.png'
|
||||
DirCreate($tempPath)
|
||||
_RunWait('dwebp', '"' & $toolsDir & 'dwebp.exe" "' & $filename & '" -o "' & $tmpFilename & '"')
|
||||
_RunWait('dwebp', '"' & $toolsDir & 'dwebp" "' & $filename & '" -o "' & $tmpFilename & '"')
|
||||
If FileExists($tmpFilename) Then
|
||||
FileDelete($filename) ; no need - try delete
|
||||
$filename = $tmpFilename
|
||||
@@ -1546,14 +1546,14 @@ EndFunc ;==>_showText
|
||||
|
||||
Func _adbDevice($title)
|
||||
ProgressOn($title, 'ADB')
|
||||
_RunWait('start', '"' & $toolsDir & 'adb.exe" start-server')
|
||||
_RunWait('start', '"' & $toolsDir & 'adb" start-server')
|
||||
|
||||
For $cmd In _StringExplode($AdbInit, '|')
|
||||
If $cmd == '' Then ContinueLoop
|
||||
_RunWait('init', '"' & $toolsDir & 'adb.exe" ' & $cmd)
|
||||
_RunWait('init', '"' & $toolsDir & 'adb" ' & $cmd)
|
||||
Next
|
||||
|
||||
$foo = _Run('devices', '"' & $toolsDir & 'adb.exe" devices -l', $STDERR_CHILD + $STDOUT_CHILD + $STDERR_MERGED)
|
||||
$foo = _Run('devices', '"' & $toolsDir & 'adb" devices -l', $STDERR_CHILD + $STDOUT_CHILD + $STDERR_MERGED)
|
||||
$output = _readAll($foo, 'devices')
|
||||
|
||||
$output = StringStripWS(StringReplace($output, 'List of devices attached', ''), $STR_STRIPLEADING + $STR_STRIPTRAILING)
|
||||
@@ -1597,7 +1597,7 @@ Func _adbDevice($title)
|
||||
$cmd = _StringExplode($cmd, ': ', 1)
|
||||
|
||||
$ids &= GUICtrlCreateButton($cmd[0], $left, $top, $btnWidth, $btnHeight) & @CRLF
|
||||
$commands &= StringReplace($cmd[1], '%adb%', '"' & $toolsDir & 'adb.exe" -s "' & $device & '"') & @CRLF
|
||||
$commands &= StringReplace($cmd[1], '%adb%', '"' & $toolsDir & 'adb" -s "' & $device & '"') & @CRLF
|
||||
|
||||
$left += $btnWidth + $gap
|
||||
Next
|
||||
@@ -1694,7 +1694,7 @@ Func _adb()
|
||||
|
||||
MsgBox(0, $title, $output)
|
||||
|
||||
If $AdbKill == '1' Then _RunWait('kill', '"' & $toolsDir & 'adb.exe" kill-server')
|
||||
If $AdbKill == '1' Then _RunWait('kill', '"' & $toolsDir & 'adb" kill-server')
|
||||
EndFunc ;==>_adb
|
||||
|
||||
Func _readAll($process, $error, $stdout = True)
|
||||
|
||||
Reference in new issue
Block a user