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,8 +78,12 @@ Section "Web2Executable" SEC01
|
|||
SectionIn RO
|
||||
SetOutPath "$INSTDIR"
|
||||
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
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
|
||||
|
|
|
|||
|
|
@ -65,6 +65,10 @@ def get_file(path):
|
|||
independent_path = utils.path_join(CWD, *parts)
|
||||
return independent_path
|
||||
|
||||
def is_installed():
|
||||
uninst = get_file('uninst.exe')
|
||||
return utils.is_windows() and os.path.exists(uninst)
|
||||
|
||||
__version__ = "v0.0.0"
|
||||
|
||||
with open(get_file('files/version.txt')) as f:
|
||||
|
|
@ -842,6 +846,7 @@ class CommandBase(object):
|
|||
compression = self.get_setting('nw_compression_level')
|
||||
if compression.value == 0:
|
||||
return
|
||||
|
||||
comp_dict = {'Darwin64bit': get_file('files/compressors/upx-mac'),
|
||||
'Darwin32bit': get_file('files/compressors/upx-mac'),
|
||||
'Linux64bit': get_file('files/compressors/upx-linux-x64'),
|
||||
|
|
@ -850,6 +855,10 @@ class CommandBase(object):
|
|||
'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]
|
||||
upx_version = comp_dict.get(plat, None)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue