Added preliminary support for uncompressed folders on mac.
This commit is contained in:
parent
c7cee60da3
commit
caa0b2f3cf
3 changed files with 23 additions and 6 deletions
|
|
@ -638,6 +638,11 @@ class CommandBase(object):
|
||||||
|
|
||||||
zip_file = os.path.join(temp_dir, self.project_name()+'.nw')
|
zip_file = os.path.join(temp_dir, self.project_name()+'.nw')
|
||||||
|
|
||||||
|
app_nw_folder = os.path.join(temp_dir, self.project_name()+'.nwf')
|
||||||
|
|
||||||
|
shutil.copytree(self.project_dir(), app_nw_folder,
|
||||||
|
ignore=shutil.ignore_patterns(output_dir))
|
||||||
|
|
||||||
zip_files(zip_file, self.project_dir(), exclude_paths=[output_dir])
|
zip_files(zip_file, self.project_dir(), exclude_paths=[output_dir])
|
||||||
for ex_setting in self.settings['export_settings'].values():
|
for ex_setting in self.settings['export_settings'].values():
|
||||||
if ex_setting.value:
|
if ex_setting.value:
|
||||||
|
|
@ -662,6 +667,8 @@ class CommandBase(object):
|
||||||
self.progress_text += '.'
|
self.progress_text += '.'
|
||||||
|
|
||||||
if 'mac' in ex_setting.name:
|
if 'mac' in ex_setting.name:
|
||||||
|
uncomp_setting = self.get_setting('uncompressed_folder')
|
||||||
|
uncompressed = uncomp_setting.value
|
||||||
app_path = os.path.join(export_dest,
|
app_path = os.path.join(export_dest,
|
||||||
self.project_name()+'.app')
|
self.project_name()+'.app')
|
||||||
|
|
||||||
|
|
@ -689,10 +696,15 @@ class CommandBase(object):
|
||||||
|
|
||||||
self.progress_text += '.'
|
self.progress_text += '.'
|
||||||
|
|
||||||
shutil.copy(zip_file, os.path.join(app_path,
|
app_nw_res = os.path.join(app_path,
|
||||||
'Contents',
|
'Contents',
|
||||||
'Resources',
|
'Resources',
|
||||||
'app.nw'))
|
'app.nw')
|
||||||
|
|
||||||
|
if uncompressed:
|
||||||
|
shutil.copytree(app_nw_folder, app_nw_res)
|
||||||
|
else:
|
||||||
|
shutil.copy(zip_file, app_nw_res)
|
||||||
self.create_icns_for_app(os.path.join(app_path,
|
self.create_icns_for_app(os.path.join(app_path,
|
||||||
'Contents',
|
'Contents',
|
||||||
'Resources',
|
'Resources',
|
||||||
|
|
|
||||||
|
|
@ -337,6 +337,11 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
|
||||||
max=9
|
max=9
|
||||||
type='range'
|
type='range'
|
||||||
description='Compression to be applied to the executable\'s nwjs binary. 0 is no compression, 9 is maximum. They all use lzma.'
|
description='Compression to be applied to the executable\'s nwjs binary. 0 is no compression, 9 is maximum. They all use lzma.'
|
||||||
|
[[uncompressed_folder]]
|
||||||
|
display_name='Uncompressed Folder'
|
||||||
|
type='check'
|
||||||
|
default_value=False
|
||||||
|
description='Mac OSX Only! This option makes the resulting app.nw inside the app just a plain folder. This is useful to mitigate startup times and to modify files.'
|
||||||
|
|
||||||
|
|
||||||
[order]
|
[order]
|
||||||
|
|
@ -352,7 +357,7 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
|
||||||
'kiosk', 'kiosk_emulation', 'transparent']"""
|
'kiosk', 'kiosk_emulation', 'transparent']"""
|
||||||
|
|
||||||
export_setting_order = """['windows-x32', 'windows-x64', 'mac-x32', 'mac-x64', 'linux-x64', 'linux-x32']"""
|
export_setting_order = """['windows-x32', 'windows-x64', 'mac-x32', 'mac-x64', 'linux-x64', 'linux-x32']"""
|
||||||
compression_setting_order = """['nw_compression_level']"""
|
compression_setting_order = """['nw_compression_level', 'uncompressed_folder']"""
|
||||||
|
|
||||||
download_setting_order = """['nw_version', 'download_dir',
|
download_setting_order = """['nw_version', 'download_dir',
|
||||||
'force_download']"""
|
'force_download']"""
|
||||||
|
|
|
||||||
2
main.py
2
main.py
|
|
@ -860,7 +860,7 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
|
||||||
|
|
||||||
def create_compression_settings(self):
|
def create_compression_settings(self):
|
||||||
group_box = QtGui.QWidget()
|
group_box = QtGui.QWidget()
|
||||||
vlayout = self.create_layout(self.settings['order']['compression_setting_order'], cols=3)
|
vlayout = self.create_layout(self.settings['order']['compression_setting_order'], cols=1)
|
||||||
warning_label = QtGui.QLabel('Note: When using compression (greater than 0) it will decrease the executable size,\nbut will increase the startup time when running it.')
|
warning_label = QtGui.QLabel('Note: When using compression (greater than 0) it will decrease the executable size,\nbut will increase the startup time when running it.')
|
||||||
vbox = QtGui.QVBoxLayout()
|
vbox = QtGui.QVBoxLayout()
|
||||||
vbox.addLayout(vlayout)
|
vbox.addLayout(vlayout)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue