remove chp.exe. Fixes #630

Big Thanks @nikagl
This commit is contained in:
clinton-hall 2014-12-04 13:12:32 +10:30
commit 1e309b5891
4 changed files with 25 additions and 9 deletions

Binary file not shown.

View file

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

View file

@ -0,0 +1,20 @@
set args = WScript.Arguments
num = args.Count
if num = 0 then
WScript.Echo "Usage: [CScript | WScript] invis.vbs aScript.bat <some script arguments>"
WScript.Quit 1
end if
sargs = ""
if num > 1 then
sargs = " "
for k = 1 to num - 1
anArg = args.Item(k)
sargs = sargs & anArg & " "
next
end if
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """" & WScript.Arguments(0) & """" & sargs, 0, True

View file

@ -10,16 +10,11 @@ def extract(filePath, outputDestination):
success = 0
# Using Windows
if platform.system() == 'Windows':
chplocation = os.path.join(nzbtomedia.PROGRAM_DIR, 'nzbtomedia', 'extractor', 'bin', 'chp.exe')
if not os.path.exists(nzbtomedia.SEVENZIP):
nzbtomedia.logger.error("EXTRACTOR: Could not find 7-zip, Exiting")
return False
else:
if not os.path.exists(chplocation):
cmd_7zip = [nzbtomedia.SEVENZIP, "x", "-y"]
else:
cmd_7zip = [chplocation, nzbtomedia.SEVENZIP, "x", "-y"]
invislocation = os.path.join(nzbtomedia.PROGRAM_DIR, 'nzbtomedia', 'extractor', 'bin', 'invisible.cmd')
cmd_7zip = [invislocation, nzbtomedia.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