Fixed compression not working in Windows 10.
This commit is contained in:
parent
d7beb8d860
commit
270642f027
2 changed files with 14 additions and 1 deletions
|
|
@ -78,7 +78,11 @@ Section "Web2Executable" SEC01
|
||||||
SectionIn RO
|
SectionIn RO
|
||||||
SetOutPath "$INSTDIR"
|
SetOutPath "$INSTDIR"
|
||||||
SetOverwrite try
|
SetOverwrite try
|
||||||
File /r "Web2ExeWin\"
|
File /r /x compressors "Web2ExeWin\"
|
||||||
|
|
||||||
|
CreateDirectory "$LocalAppData\Web2Executable\Web2Executable\files\compressors"
|
||||||
|
SetOutPath "$LocalAppData\Web2Executable\Web2Executable\files\compressors"
|
||||||
|
File "Web2ExeWin\files\compressors\upx-win.exe"
|
||||||
|
|
||||||
; Shortcuts
|
; Shortcuts
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,10 @@ def get_file(path):
|
||||||
independent_path = utils.path_join(CWD, *parts)
|
independent_path = utils.path_join(CWD, *parts)
|
||||||
return independent_path
|
return independent_path
|
||||||
|
|
||||||
|
def is_installed():
|
||||||
|
uninst = get_file('uninst.exe')
|
||||||
|
return utils.is_windows() and os.path.exists(uninst)
|
||||||
|
|
||||||
__version__ = "v0.0.0"
|
__version__ = "v0.0.0"
|
||||||
|
|
||||||
with open(get_file('files/version.txt')) as f:
|
with open(get_file('files/version.txt')) as f:
|
||||||
|
|
@ -842,6 +846,7 @@ class CommandBase(object):
|
||||||
compression = self.get_setting('nw_compression_level')
|
compression = self.get_setting('nw_compression_level')
|
||||||
if compression.value == 0:
|
if compression.value == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
comp_dict = {'Darwin64bit': get_file('files/compressors/upx-mac'),
|
comp_dict = {'Darwin64bit': get_file('files/compressors/upx-mac'),
|
||||||
'Darwin32bit': get_file('files/compressors/upx-mac'),
|
'Darwin32bit': get_file('files/compressors/upx-mac'),
|
||||||
'Linux64bit': get_file('files/compressors/upx-linux-x64'),
|
'Linux64bit': get_file('files/compressors/upx-linux-x64'),
|
||||||
|
|
@ -850,6 +855,10 @@ class CommandBase(object):
|
||||||
'Windows32bit': get_file('files/compressors/upx-win.exe')
|
'Windows32bit': get_file('files/compressors/upx-win.exe')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if is_installed():
|
||||||
|
comp_dict['Windows64bit'] = get_data_file_path('files/compressors/upx-win.exe')
|
||||||
|
comp_dict['Windows32bit'] = get_data_file_path('files/compressors/upx-win.exe')
|
||||||
|
|
||||||
plat = platform.system()+platform.architecture()[0]
|
plat = platform.system()+platform.architecture()[0]
|
||||||
upx_version = comp_dict.get(plat, None)
|
upx_version = comp_dict.get(plat, None)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue