Fixed issues with exporting 0.12.x binaries.
This commit is contained in:
parent
3b398d7b0b
commit
d5d48b2bb0
8 changed files with 153 additions and 8 deletions
9
build_command_line_linux.bash
Normal file → Executable file
9
build_command_line_linux.bash
Normal file → Executable file
|
|
@ -1,3 +1,10 @@
|
|||
rm -rf command_line_builds/files
|
||||
rm -rf command_line_builds
|
||||
|
||||
pyinstaller --onefile --hidden-import configobj --distpath command_line_builds -n web2exe-linux command_line.py
|
||||
cp -rf files command_line_builds/files
|
||||
rm -rf command_line_builds/files/downloads/*
|
||||
|
||||
rm -rf Web2ExeLinux
|
||||
pyinstaller -F --hidden-import configobj -n web2exe --distpath Web2ExeLinux main.py
|
||||
cp -rf files Web2ExeLinux/files
|
||||
rm -rf Web2ExeLinux/files/downloads/*
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import stat
|
|||
import tarfile
|
||||
import zipfile
|
||||
import traceback
|
||||
import platform
|
||||
import subprocess
|
||||
|
||||
from distutils.version import LooseVersion
|
||||
|
|
@ -99,6 +98,13 @@ class Setting(object):
|
|||
self.save_path = location
|
||||
else:
|
||||
self.save_path = self.save_path or DEFAULT_DOWNLOAD_PATH
|
||||
|
||||
versions = re.findall('(\d+)\.(\d+)\.(\d+)', version)[0]
|
||||
|
||||
minor = int(versions[1])
|
||||
if minor >= 12:
|
||||
self.save_path = self.save_path.replace('node-webkit', 'nwjs')
|
||||
|
||||
self.get_file_information_from_url()
|
||||
|
||||
if self.full_file_path:
|
||||
|
|
@ -117,19 +123,28 @@ class Setting(object):
|
|||
def get_file_bytes(self, version):
|
||||
fbytes = []
|
||||
|
||||
file = self.extract_class(self.save_file_path(version),
|
||||
path = self.save_file_path(version)
|
||||
|
||||
file = self.extract_class(path,
|
||||
*self.extract_args)
|
||||
for extract_path, dest_path in zip(self.extract_files,
|
||||
self.dest_files):
|
||||
new_bytes = None
|
||||
try:
|
||||
extract_p = extract_path.format(version)
|
||||
|
||||
versions = re.findall('(\d+)\.(\d+)\.(\d+)', version)[0]
|
||||
|
||||
minor = int(versions[1])
|
||||
if minor >= 12:
|
||||
extract_p = extract_p.replace('node-webkit', 'nwjs')
|
||||
|
||||
if self.file_ext == '.gz':
|
||||
new_bytes = file.extractfile(extract_p).read()
|
||||
elif self.file_ext == '.zip':
|
||||
new_bytes = file.read(extract_p)
|
||||
except KeyError as e:
|
||||
log(e)
|
||||
log(str(e))
|
||||
# dirty hack to support old versions of nw
|
||||
if 'no item named' in str(e):
|
||||
extract_path = '/'.join(extract_path.split('/')[1:])
|
||||
|
|
@ -139,7 +154,7 @@ class Setting(object):
|
|||
elif self.file_ext == '.zip':
|
||||
new_bytes = file.read(extract_path)
|
||||
except KeyError as e:
|
||||
log(e)
|
||||
log(str(e))
|
||||
|
||||
if new_bytes is not None:
|
||||
fbytes.append((dest_path, new_bytes))
|
||||
|
|
@ -639,6 +654,12 @@ class CommandBase(object):
|
|||
|
||||
location = self.get_setting('download_dir').value
|
||||
|
||||
versions = re.findall('v(\d+)\.(\d+)\.(\d+)', path)[0]
|
||||
|
||||
minor = int(versions[1])
|
||||
if minor >= 12:
|
||||
path = path.replace('node-webkit', 'nwjs')
|
||||
|
||||
url = path
|
||||
file_name = setting.save_file_path(self.selected_version(), location)
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 8.5 KiB |
98
files/images/icon.svg
Normal file
98
files/images/icon.svg
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 15.99 15.99"
|
||||
style="enable-background:new 0 0 15.99 15.99;"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.91+devel r"
|
||||
sodipodi:docname="icon.svg"
|
||||
inkscape:export-filename="/home/joey/Projects/Web2Executable/files/images/icon.png"
|
||||
inkscape:export-xdpi="1536.9606"
|
||||
inkscape:export-ydpi="1536.9606"><metadata
|
||||
id="metadata47"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs45" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1615"
|
||||
inkscape:window-height="1026"
|
||||
id="namedview43"
|
||||
showgrid="false"
|
||||
inkscape:zoom="38.782531"
|
||||
inkscape:cx="9.2328544"
|
||||
inkscape:cy="8.9442453"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /><g
|
||||
id="g13" /><g
|
||||
id="g15" /><g
|
||||
id="g17" /><g
|
||||
id="g19" /><g
|
||||
id="g21" /><g
|
||||
id="g23" /><g
|
||||
id="g25" /><g
|
||||
id="g27" /><g
|
||||
id="g29" /><g
|
||||
id="g31" /><g
|
||||
id="g33" /><g
|
||||
id="g35" /><g
|
||||
id="g37" /><g
|
||||
id="g39" /><g
|
||||
id="g41" /><g
|
||||
id="g5301"><g
|
||||
transform="matrix(0.9459441,0,0,0.9459441,0.43217386,1.5969171)"
|
||||
style="fill:#b7b7b7;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="g5"><path
|
||||
sodipodi:nodetypes="sssssccsscsccccc"
|
||||
style="fill:#b7b7b7;fill-opacity:1;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 14.926,0.656 -13.859,0 C 0.478,0.656 0,1.137 0,1.73 l 0,9.844 c 0,0.594 0.478,1.074 1.067,1.074 l 5.316,0 c 0.3680995,-0.0021 2.8087686,0.0012 3.222,0 l 5.32,0 c 0.588,0 1.065,-0.48 1.065,-1.074 l 0,-9.844 C 15.992,1.137 15.514,0.656 14.926,0.656 Z m -0.077,10.25 -13.706,0 0,-9.108 13.707,0 z"
|
||||
id="path7"
|
||||
inkscape:connector-curvature="0" /></g><rect
|
||||
ry="0"
|
||||
y="3.2113624"
|
||||
x="1.3780756"
|
||||
height="9.248354"
|
||||
width="13.186693"
|
||||
id="rect4228"
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffe496;fill-opacity:1;stroke:none;stroke-width:0.34977314;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" /><g
|
||||
transform="matrix(1.1504076,0,0,1.1504076,-1.0313251,0.66142205)"
|
||||
id="g4220"><ellipse
|
||||
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#07a7ff;fill-opacity:1;stroke:none;stroke-width:0.58165061;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
|
||||
id="path4198"
|
||||
cx="7.6741443"
|
||||
cy="6.3257656"
|
||||
rx="4.0388713"
|
||||
ry="3.9880612" /><g
|
||||
transform="matrix(0.41550363,0,0,0.41550363,3.3863,2.1217958)"
|
||||
id="g3"
|
||||
style="stroke:none;stroke-opacity:1"><g
|
||||
id="g5-6"
|
||||
style="stroke:none;stroke-opacity:1"><path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#010002;stroke:none;stroke-opacity:1"
|
||||
d="m 14.273,18.875 c 0.021,-0.011 0.043,-0.021 0.064,-0.031 -0.008,-0.012 -0.016,-0.022 -0.023,-0.034 -0.012,0.019 -0.028,0.045 -0.041,0.065 z"
|
||||
id="path7-2" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#13cf00;fill-opacity:1;stroke:none;stroke-opacity:1"
|
||||
d="M 10.175,18.56 C 8.516,18.56 6.97,18.084 5.651,17.273 6.838,17.285 4.768,15.467 6.194,15.188 7.69,14.894 8.32,13.183 7.841,13.209 7.363,13.234 6.453,12.962 5.813,12.158 5.172,11.348 4.611,11.533 3.95,11.66 3.372,11.774 2.66,13.446 2.483,13.885 2.033,13.023 1.728,12.076 1.59,11.075 2.324,10.691 3.522,10.045 3.955,9.688 4.593,9.159 3.742,8.945 3.637,8.626 c -0.104,-0.319 0,-1.062 0,-1.8 C 3.637,6.081 5.123,6.081 5.65,5.34 6.029,4.811 5.335,3.644 4.902,3.012 6.365,1.886 8.191,1.209 10.175,1.209 c 0.526,0 1.039,0.055 1.54,0.145 0.147,0.914 0.453,2.171 1.044,2.499 0.957,0.53 2.115,1.697 2.543,1.907 0.426,0.212 0.953,2.018 0.849,2.76 -0.075,0.524 -0.725,1.101 -0.991,1.656 l 4.42,2.754 C 19.892,11.97 20.064,10.949 20.064,9.886 20.064,4.434 15.626,0 10.176,0 4.723,0 0.288,4.434 0.288,9.886 c 0,5.453 4.435,9.889 9.888,9.889 0.207,0 0.409,-0.019 0.613,-0.031 L 10.558,18.54 c -0.128,0.006 -0.254,0.02 -0.383,0.02 z m 8.569,-7.394 C 18.557,10.424 18.195,9.708 17.425,9.155 16.898,8.783 16.468,7.141 16.788,6.609 c 0.191,-0.317 0.688,-0.596 1.054,-0.77 0.641,1.209 1.007,2.585 1.007,4.047 0,0.436 -0.043,0.861 -0.105,1.28 z"
|
||||
id="path9" /></g></g></g></g></svg>
|
||||
|
After Width: | Height: | Size: 5.5 KiB |
|
|
@ -1,3 +1,9 @@
|
|||
0.12.0-rc1
|
||||
0.12.0-alpha3
|
||||
0.12.0-alpha2
|
||||
0.12.0-alpha1
|
||||
0.12.0
|
||||
0.11.6
|
||||
0.11.5
|
||||
0.11.4
|
||||
0.11.3
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
|
|||
'%(win_32_dir_prefix)s/ffmpegsumo.dll',
|
||||
'%(win_32_dir_prefix)s/libGLESv2.dll',
|
||||
'%(win_32_dir_prefix)s/d3dcompiler_46.dll',
|
||||
'%(win_32_dir_prefix)s/d3dcompiler_47.dll',
|
||||
'%(win_32_dir_prefix)s/pdf.dll'
|
||||
]"""
|
||||
dest_files="""['nw.exe',
|
||||
|
|
@ -221,6 +222,7 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
|
|||
'ffmpegsumo.dll',
|
||||
'libGLESv2.dll',
|
||||
'd3dcompiler_46.dll',
|
||||
'd3dcompiler_47.dll',
|
||||
'pdf.dll'
|
||||
]"""
|
||||
[[windows-x64]]
|
||||
|
|
@ -234,6 +236,7 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
|
|||
'%(win_64_dir_prefix)s/ffmpegsumo.dll',
|
||||
'%(win_64_dir_prefix)s/libGLESv2.dll',
|
||||
'%(win_64_dir_prefix)s/d3dcompiler_46.dll',
|
||||
'%(win_64_dir_prefix)s/d3dcompiler_47.dll',
|
||||
'%(win_64_dir_prefix)s/pdf.dll'
|
||||
]"""
|
||||
dest_files="""['nw.exe',
|
||||
|
|
@ -243,6 +246,7 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
|
|||
'ffmpegsumo.dll',
|
||||
'libGLESv2.dll',
|
||||
'd3dcompiler_46.dll',
|
||||
'd3dcompiler_47.dll',
|
||||
'pdf.dll'
|
||||
]"""
|
||||
|
||||
|
|
|
|||
BIN
icon.png
BIN
icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 8.5 KiB |
15
main.py
15
main.py
|
|
@ -1,8 +1,9 @@
|
|||
from utils import log, open_folder_in_explorer
|
||||
|
||||
__gui_version__ = "v0.1.16b"
|
||||
__gui_version__ = "v0.1.17b"
|
||||
|
||||
import os
|
||||
import re
|
||||
import glob
|
||||
import sys
|
||||
|
||||
|
|
@ -364,10 +365,18 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
|||
|
||||
def download_file(self, path, setting):
|
||||
version_file = self.settings['base_url'].format(self.selected_version())
|
||||
self.progress_text = 'Downloading {}'.format(path.replace(version_file, ''))
|
||||
|
||||
location = self.get_setting('download_dir').value
|
||||
|
||||
versions = re.findall('v(\d+)\.(\d+)\.(\d+)', path)[0]
|
||||
|
||||
minor = int(versions[1])
|
||||
if minor >= 12:
|
||||
path = path.replace('node-webkit', 'nwjs')
|
||||
setting.url = path
|
||||
|
||||
self.progress_text = 'Downloading {}'.format(path.replace(version_file, ''))
|
||||
|
||||
url = QUrl(path)
|
||||
file_name = setting.save_file_path(self.selected_version(), location)
|
||||
|
||||
|
|
@ -387,7 +396,7 @@ class MainWindow(QtGui.QWidget, CommandBase):
|
|||
|
||||
self.out_file = QFile(file_name)
|
||||
if not self.out_file.open(QIODevice.WriteOnly):
|
||||
error = self.out_file.error_string()
|
||||
error = self.out_file.error().name
|
||||
self.show_error('Unable to save the file {}: {}.'.format(file_name,
|
||||
error))
|
||||
self.out_file = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue