Merge pull request #1403 from nikagl/nightly

Start vbs directly from extractor and use args instead of Wscript.Arguments
This commit is contained in:
Clinton Hall 2018-12-08 13:51:30 +13:00 committed by GitHub
commit c81d8bc7a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View file

@ -1,2 +0,0 @@
start /B /wait wscript "%~dp0\invisible.vbs" %*
exit %ERRORLEVEL%

View file

@ -17,5 +17,5 @@ end if
Set WshShell = WScript.CreateObject("WScript.Shell")
returnValue = WshShell.Run("""" & WScript.Arguments(1) & """" & sargs, WScript.Arguments(0), True)
returnValue = WshShell.Run("""" & args(1) & """" & sargs, args(0), True)
WScript.Quit(returnValue)

View file

@ -17,8 +17,9 @@ def extract(filePath, outputDestination):
if not os.path.exists(core.SEVENZIP):
core.logger.error("EXTRACTOR: Could not find 7-zip, Exiting")
return False
invislocation = os.path.join(core.PROGRAM_DIR, 'core', 'extractor', 'bin', 'invisible.cmd')
cmd_7zip = [invislocation, str(core.SHOWEXTRACT), core.SEVENZIP, "x", "-y"]
wscriptlocation = os.path.join(os.environ['WINDIR'], 'system32', 'wscript.exe')
invislocation = os.path.join(core.PROGRAM_DIR, 'core', 'extractor', 'bin', 'invisible.vbs')
cmd_7zip = [wscriptlocation, invislocation, str(core.SHOWEXTRACT), core.SEVENZIP, "x", "-y"]
ext_7zip = [".rar", ".zip", ".tar.gz", "tgz", ".tar.bz2", ".tbz", ".tar.lzma", ".tlz", ".7z", ".xz"]
EXTRACT_COMMANDS = dict.fromkeys(ext_7zip, cmd_7zip)
# Using unix