add relative path call for engines
This commit is contained in:
@@ -28,7 +28,7 @@ class Scaler:
|
||||
if self.os_type == 'linux':
|
||||
self.command = f'wine ./bin/lib/FidelityFX_CLI.exe -Mode { scaler } -Scale {scalefactor}x {scalefactor}x {input_path} {output}'
|
||||
elif self.os_type == 'win32':
|
||||
self.command = f'FidelityFX_CLI -Mode { scaler } -Scale {scalefactor}x {scalefactor}x {input_path} {output}'
|
||||
self.command = f'bin\\lib\\FidelityFX_CLI.exe -Mode { scaler } -Scale {scalefactor}x {scalefactor}x {input_path} {output}'
|
||||
else:
|
||||
print( 'OS CURRENTLY UNSUPPORTED!' )
|
||||
return False
|
||||
@@ -39,7 +39,7 @@ class Scaler:
|
||||
if self.os_type == 'linux':
|
||||
self.command = f'wine ./bin/lib/FidelityFX_CLI.exe -Mode CAS -Sharpness {sharpening} {output} {output_path}'
|
||||
elif self.os_type == 'win32':
|
||||
self.command = f'FidelityFX_CLI -Mode CAS -Sharpness {sharpening} {output} {output_path}'
|
||||
self.command = f'bin\\lib\\FidelityFX_CLI.exe -Mode CAS -Sharpness {sharpening} {output} {output_path}'
|
||||
else:
|
||||
print( 'OS CURRENTLY UNSUPPORTED!' )
|
||||
return False
|
||||
@@ -234,7 +234,7 @@ def upscalerEngine ( files, scalefactor, number, maxlength, os_type, version ):
|
||||
if os_type == 'linux':
|
||||
command_us = f'wine ./bin/lib/FidelityFX_CLI.exe -Mode { scaler } -Scale {scalefactor}x {scalefactor}x {files_handle}'
|
||||
elif os_type == 'win32':
|
||||
command_us = f'FidelityFX_CLI -Mode { scaler } -Scale {scalefactor}x {scalefactor}x {files_handle}'
|
||||
command_us = f'bin\\lib\\FidelityFX_CLI.exe -Mode { scaler } -Scale {scalefactor}x {scalefactor}x {files_handle}'
|
||||
else:
|
||||
print( 'OS CURRENTLY UNSUPPORTED!' )
|
||||
return False
|
||||
@@ -308,7 +308,7 @@ def sharpeningEngine ( files, number, maxlength, os_type, sharpening, didUpscale
|
||||
if os_type == 'linux':
|
||||
command_sharpening = f'wine ./bin/lib/FidelityFX_CLI.exe -Mode CAS -Sharpness {sharpening} {files_handle}'
|
||||
elif os_type == 'win32':
|
||||
command_sharpening = f'FidelityFX_CLI -Mode CAS -Sharpness {sharpening} {files_handle}'
|
||||
command_sharpening = f'bin\\lib\\FidelityFX_CLI.exe -Mode CAS -Sharpness {sharpening} {files_handle}'
|
||||
else:
|
||||
print( 'OS CURRENTLY UNSUPPORTED!' )
|
||||
return False
|
||||
|
||||
@@ -16,7 +16,7 @@ class Scaler:
|
||||
if self.os_type == 'linux':
|
||||
self.command = f'wine ./bin/lib/realesrgan-ncnn-vulkan.exe -i {input_path} -o {output_path} -s {scalefactor} -j {threads}:{threads}:{threads} -n { modes[ mode ] }'
|
||||
elif self.os_type == 'win32':
|
||||
self.command = f'realesrgan-ncnn-vulkan -i {input_path} -o {output_path} -s {scalefactor} -j {threads}:{threads}:{threads} -n { modes[ mode ] }'
|
||||
self.command = f'bin\\lib\\realesrgan-ncnn-vulkan.exe -i {input_path} -o {output_path} -s {scalefactor} -j {threads}:{threads}:{threads} -n { modes[ mode ] }'
|
||||
else:
|
||||
print( 'OS CURRENTLY UNSUPPORTED!' )
|
||||
return False
|
||||
@@ -34,7 +34,7 @@ class Scaler:
|
||||
except FileExistsError:
|
||||
pass
|
||||
if ( self.os_type == 'win32' ):
|
||||
self.command = f'realesrgan-ncnn-vulkan -i {tmppath} -o {tmppath}sc -s {scalefactor} -j {threads}:{threads}:{threads} -n {modes[ mode ]}'
|
||||
self.command = f'bin\\lib\\realesrgan-ncnn-vulkan.exe -i {tmppath} -o {tmppath}sc -s {scalefactor} -j {threads}:{threads}:{threads} -n {modes[ mode ]}'
|
||||
elif ( self.os_type == 'linux' ):
|
||||
self.command = f'wine ./bin/lib/realesrgan-ncnn-vulkan.exe -i {tmppath} -o {tmppath}sc -s {scalefactor} -j {threads}:{threads}:{threads} -n {modes[ mode ]}'
|
||||
os.system( self.command );
|
||||
@@ -17,6 +17,7 @@ import json
|
||||
import importlib
|
||||
import shutil
|
||||
import time
|
||||
import tempfile
|
||||
|
||||
importedModules = {}
|
||||
|
||||
@@ -50,9 +51,9 @@ class Handler:
|
||||
print( '\n\n SimpleMediaScalerLite - V1.1.0\n\n(c) 2023 SimpleMediaScalerLite contributors\n\n\n\n' );
|
||||
|
||||
if self.os_type == 'linux':
|
||||
self.tmppath = config['PathSettings']['tmpPathLinux']
|
||||
self.tmppath = tempfile.gettempdir()
|
||||
elif self.os_type == 'win32':
|
||||
self.tmppath = config['PathSettings']['tmpPathWindows']
|
||||
self.tmppath = tempfile.gettempdir()
|
||||
else:
|
||||
print('OS CURRENTLY UNSUPPORTED!')
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user