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