Electrify renaming.

This commit is contained in:
Joey Payne 2016-02-08 09:49:06 -07:00
commit e8a8bfed9a
18 changed files with 115 additions and 182 deletions

View file

@ -1,7 +1,7 @@
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Web2Exe"
!define PRODUCT_NAME "Electrify"
!define /file PRODUCT_VERSION "files\version.txt"
!define PRODUCT_PUBLISHER "SimplyPixelated"
!define PRODUCT_WEB_SITE "http://www.simplypixelated.com"
@ -53,7 +53,7 @@ var ICONS_GROUP
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Web2Exe-Setup.exe"
OutFile "Electrify-Setup.exe"
RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
@ -74,15 +74,15 @@ InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
Section "Web2Executable" SEC01
Section "Electrifycutable" SEC01
SectionIn RO
SetOutPath "$INSTDIR"
SetOverwrite try
File /r /x compressors "Web2ExeWin\"
File /r /x compressors "ElectrifyWin\"
CreateDirectory "$LocalAppData\Web2Executable\Web2Executable\files\compressors"
SetOutPath "$LocalAppData\Web2Executable\Web2Executable\files\compressors"
File "Web2ExeWin\files\compressors\upx-win.exe"
CreateDirectory "$LocalAppData\Electrifycutable\Electrifycutable\files\compressors"
SetOutPath "$LocalAppData\Electrifycutable\Electrifycutable\files\compressors"
File "ElectrifyWin\files\compressors\upx-win.exe"
; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application

View file

@ -1,44 +1,20 @@
Web2Executable
Electrify
==============
[Releases (Downloads)](https://github.com/jyapayne/Web2Executable/releases) (new!)
[Releases (Downloads)](https://github.com/jyapayne/Electrify/releases)
What is it?
-----------
Web2Executable is a friendly command line and GUI application that can transform your Nodejs (or any other JS/HTML) app into a standalone executable. It can export to Mac OS X, Windows and Linux all from one platform, so no need to go out and buy expensive hardware.
From the creator of [Electrifycutable](https://github.com/jyapayne/Electrifycutable) comes Electrify, another friendly command line and GUI application that can transform your Nodejs (or any other JS/HTML) app into a standalone executable. The difference is that it is now powered by [Electron](https://github.com/atom/electron) instead of NW.js. It can export to Mac OS X, Windows and Linux all from one platform, so no need to go out and buy expensive hardware.
It's powered by the very awesome project [NWJS](https://github.com/nwjs) and PySide, is open source, and is just dang awesome and easy to use.
It's powered by the very awesome project [Electron](https://github.com/atom/electron) and PySide, is open source, and is just dang awesome and easy to use.
If you have an idea for a feature, please create a new issue with a format like this: "Feature - My Awesome New Feature", along with a good description of what you'd like the feature to do.
If you got some value out of using my app, consider donating a dollar to keep me caffeinated :)
<a href='https://pledgie.com/campaigns/26899'><img alt='Click here to lend your support to: Web2Executable Donations and make a donation at pledgie.com !' src='https://pledgie.com/campaigns/26899.png?skin_name=chrome' border='0' ></a>
On the other hand, if you have any annoyances with the application and want to contribute to making it better for everyone, please file an issue with "Annoyance:" as the first part of the title. Sometimes it's hard to know what is annoying for people and input is much appreciated :)
Who's Using It?
---------------
Lots of people! There are currently thousands of downloads and several articles written about using Web2Executable.
Some articles include:
[Getting a Phaser Game on Steam](http://phaser.io/news/2015/10/getting-a-phaser-game-on-steam)
[Packt Publishing NW.js Essentials Tutorial](https://www.packtpub.com/packtlib/book/Web-Development/9781785280863/7/ch07lvl1sec53/Web2Executable) and [Ebook](https://books.google.ca/books?id=wz6qCQAAQBAJ&pg=PA135&lpg=PA135&dq=web2executable&source=bl&ots=sPP-3BOMXX&sig=UolyF31WcTgA-lrel2UTIfzs65U&hl=en&sa=X&redir_esc=y#v=onepage&q=web2executable&f=false)
[A Russian NW.js Tutoral](http://canonium.com/articles/nwjs-web-to-executable)
[Marv's Blog](http://www.marv.ph/tag/web2exe/)
[Shotten.com Node-webkit for Poets](http://www.shotton.com/wp/2014/10/27/node-webkit-for-poets-mac-version/)
If you have a project you'd like to see listed here that was successfully built using Web2Executable or you have written an article that mentions it, feel free to send me an email with a link and I'd be super stoked to paste it here :)
Features
--------
@ -49,24 +25,17 @@ Features
- Same performance as Google Chrome
- Works with Phaser; should work with other HTML5 game libraries
- Export web applications to all platforms from your current OS
- Ability to specify a node-webkit version to download
- Ability to specify an Electron version to download
- Automatic insertion of icon files into Windows exe's or Mac Apps by filling out the icon fields as necessary
- A command line utility with functionality equivalent to the GUI. Useful for automated builds.
- Compression of executables with upx
Planned New Features
--------------------
- The ability to add external files to the project
- Minifying JS and HTML
Getting Started
---------------
###Using Prebuilt Binaries
When using the prebuilt binaries for Windows, Mac, or Ubuntu, there are NO dependencies or extra applications needed. Simply download Web2Exe for the platform of your choice, extract, and double click the app/exe/binary to start. This applies to both the command-line version and the GUI version.
When using the prebuilt binaries for Windows, Mac, or Ubuntu, there are NO dependencies or extra applications needed. Simply download Electrify for the platform of your choice, extract, and double click the app/exe/binary to start. This applies to both the command-line version and the GUI version.
**NOTE!**: Some people report needing the Microsoft Visual C++ 2008/2010 SP1 and regular Redistributable package. I don't have a machine to test this, but just know that you might need the package if the application won't open or spits out the following error:
@ -77,11 +46,15 @@ Error: The application has failed to start because the side by side configuratio
### Run from Python Source
Requires the pyside library and python 2.X. If you want to replace the icon in the Windows Exe's, this will do it automatically with the latest code if you have PIL or Pillow installed. I've only tested the code on python 2.7.3-2.7.9, so I can't speak about any lower version, but it should work as long as PySide is supported.
Requires the pyside library and Python 3.4 or higher. If you want to replace the icon in the Windows Exe's, this will do it automatically with the latest code if you have PIL or Pillow installed.
####GUI
Install dependencies **PIL or Pillow** for icon and icns exporting.
Install dependencies:
```
pip install -r requirements.txt
```
Initiate submodules:
@ -92,7 +65,7 @@ git submodule update --init --recursive
Run with:
```
python main.py
python3.4 main.py
```
It's a pretty simple app. Just point it to the directory where your web application lives, customize the options (the two marked with a star are the only ones required) and then choose your export options. The app will export under YOUR_OUTPUT_DIR/YOUR_APP_NAME.
@ -106,12 +79,12 @@ Run the command_line.py with the --help option to see a list of export options.
Example usage (if using the prebuilt binary, replace `python command_line.py` with the exe name):
```
python command_line.py /var/www/html/CargoBlaster/ --main html/index.html --export-to linux-x64 windows mac --width 900 --height 700 --nw-version 0.10.5
python3.4 command_line.py /var/www/html/CargoBlaster/ --main html/index.html --export-to linux-x64 windows mac --width 900 --height 700 --electron-version 0.36.7
```
###GUI Instructions
To use Web2Exe:
To use Electrify:
1. Choose a project folder with at least one html or php file. The name of the export application will be autogenerated from the folder that you choose, so change it if you so desire.
2. Modify the options as needed.
3. Choose at least one export platform and then the Export button should enable (as long as the field names marked with a star are filled out and all files in the fields exist).
@ -122,14 +95,14 @@ To use Web2Exe:
If you have an issue, please check the FAQ before filing an issue to see if it helps.
[FAQ](https://github.com/jyapayne/Web2Executable/wiki/FAQ)
[FAQ](https://github.com/jyapayne/Electrify/wiki/FAQ)
### Additional Info
[Changelog](https://github.com/jyapayne/Web2Executable/wiki/Changelog)
[Changelog](https://github.com/jyapayne/Electrify/wiki/Changelog)
[Screenshots](https://github.com/jyapayne/Web2Executable/wiki/Screenshots)
[Screenshots](https://github.com/jyapayne/Electrify/wiki/Screenshots)
License

View file

@ -1,22 +1,22 @@
rm -rf Web2ExeLinux*.zip
rm -rf Web2ExeLinux-CMD
rm -rf ElectrifyLinux*.zip
rm -rf ElectrifyLinux-CMD
VERSION=$(cat files/version.txt)
pyinstaller --onefile --hidden-import PIL.Jpeg2KImagePlugin --hidden-import pkg_resources --hidden-import PIL._imaging --hidden-import configobj --distpath Web2ExeLinux-CMD -n web2exe-linux command_line.py
cp -rf files Web2ExeLinux-CMD/files
rm -rf Web2ExeLinux-CMD/files/downloads/*
rm Web2ExeLinux-CMD/files/error.log Web2ExeLinux-CMD/files/last_project_path.txt Web2ExeLinux-CMD/files/recent_files.txt Web2ExeLinux-CMD/files/compressors/upx-mac Web2ExeLinux-CMD/files/compressors/upx-win.exe
pyinstaller --onefile --hidden-import PIL.Jpeg2KImagePlugin --hidden-import pkg_resources --hidden-import PIL._imaging --hidden-import configobj --distpath ElectrifyLinux-CMD -n electrify-linux command_line.py
cp -rf files ElectrifyLinux-CMD/files
rm -rf ElectrifyLinux-CMD/files/downloads/*
rm ElectrifyLinux-CMD/files/error.log ElectrifyLinux-CMD/files/last_project_path.txt ElectrifyLinux-CMD/files/recent_files.txt ElectrifyLinux-CMD/files/compressors/upx-mac ElectrifyLinux-CMD/files/compressors/upx-win.exe
rm -rf Web2ExeLinux
pyinstaller -F --hidden-import PIL.Jpeg2KImagePlugin --hidden-import configobj --hidden-import PIL._imaging --hidden-import pkg_resources -n web2exe --distpath Web2ExeLinux main.py
cp -rf files Web2ExeLinux/files
rm -rf Web2ExeLinux/files/downloads/*
rm Web2ExeLinux/files/error.log Web2ExeLinux/files/last_project_path.txt Web2ExeLinux/files/recent_files.txt Web2ExeLinux/files/compressors/upx-mac Web2ExeLinux/files/compressors/upx-win.exe
rm -rf ElectrifyLinux
pyinstaller -F --hidden-import PIL.Jpeg2KImagePlugin --hidden-import configobj --hidden-import PIL._imaging --hidden-import pkg_resources -n electrify --distpath ElectrifyLinux main.py
cp -rf files ElectrifyLinux/files
rm -rf ElectrifyLinux/files/downloads/*
rm ElectrifyLinux/files/error.log ElectrifyLinux/files/last_project_path.txt ElectrifyLinux/files/recent_files.txt ElectrifyLinux/files/compressors/upx-mac ElectrifyLinux/files/compressors/upx-win.exe
zip -r -9 Web2ExeLinux-CMD.zip Web2ExeLinux-CMD/*
zip -r -9 Web2ExeLinux-${VERSION}.zip Web2ExeLinux
zip -r -9 ElectrifyLinux-CMD.zip ElectrifyLinux-CMD/*
zip -r -9 ElectrifyLinux-${VERSION}.zip ElectrifyLinux
python3.4 upload_release.py

View file

@ -1,34 +1,34 @@
VERSION=$(cat files/version.txt)
rm -rf Web2ExeMac*
rm -rf ElectrifyMac*
rm files/error.log files/last_project_path.txt files/recent_files.txt
rm -rf files/downloads/*
rm -rf Web2ExeMac-CMD/files
pyinstaller --hidden-import PIL.Jpeg2KImagePlugin --hidden-import configobj --hidden-import pkg_resources --distpath Web2ExeMac-CMD --onefile -n web2exe-mac command_line.py
cp -rf files Web2ExeMac-CMD/files/
rm -rf ElectrifyMac-CMD/files
pyinstaller --hidden-import PIL.Jpeg2KImagePlugin --hidden-import configobj --hidden-import pkg_resources --distpath ElectrifyMac-CMD --onefile -n electrify-mac command_line.py
cp -rf files ElectrifyMac-CMD/files/
rm -rf build dist Web2Executable.app
rm -rf build dist Electrifycutable.app
#sudo python build_mac_setup.py py2app --iconfile icon.icns
pyinstaller -w --hidden-import PIL.Jpeg2KImagePlugin --hidden-import PyQt4 --hidden-import PIL --hidden-import configobj --hidden-import pkg_resources --distpath Web2ExeMac --onefile -n Web2Executable main.py
pyinstaller -w --hidden-import PIL.Jpeg2KImagePlugin --hidden-import PyQt4 --hidden-import PIL --hidden-import configobj --hidden-import pkg_resources --distpath ElectrifyMac --onefile -n Electrifycutable main.py
#sudo chown -R joey dist/Web2Executable.app
#sudo chown -R joey dist/Electrifycutable.app
#sudo chown -R joey dist/ build/
#mv dist/Web2Executable.app Web2Executable.app
#mv dist/Electrifycutable.app Electrifycutable.app
mv Web2ExeMac/Web2Executable.app .
mv ElectrifyMac/Electrifycutable.app .
#rm -rf Web2Executable.app/Contents/Frameworks/QtDesigner*
#rm -rf Web2Executable.app/Contents/Frameworks/QtXml*
#rm -rf Web2Executable.app/Contents/Frameworks/QtWebKit*
#rm -rf Web2Executable.app/Contents/Frameworks/QtScript*
#rm -rf Electrifycutable.app/Contents/Frameworks/QtDesigner*
#rm -rf Electrifycutable.app/Contents/Frameworks/QtXml*
#rm -rf Electrifycutable.app/Contents/Frameworks/QtWebKit*
#rm -rf Electrifycutable.app/Contents/Frameworks/QtScript*
cp icon.icns Web2Executable.app/Contents/Resources/icon-windowed.icns
cp -rf files Web2Executable.app/Contents/MacOS/
cp icon.icns Electrifycutable.app/Contents/Resources/icon-windowed.icns
cp -rf files Electrifycutable.app/Contents/MacOS/
rm -rf build dist
/Applications/Keka.app/Contents/Resources/keka7z a -r Web2ExeMac-CMD.zip Web2ExeMac-CMD
/Applications/Keka.app/Contents/Resources/keka7z a -r Web2ExeMac-${VERSION}.zip Web2Executable.app
/Applications/Keka.app/Contents/Resources/keka7z a -r ElectrifyMac-CMD.zip ElectrifyMac-CMD
/Applications/Keka.app/Contents/Resources/keka7z a -r ElectrifyMac-${VERSION}.zip Electrifycutable.app
python upload_release.py

View file

@ -1,28 +0,0 @@
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['main.py']
DATA_FILES = ['files']
OPTIONS = {
'iconfile': 'icon.icns',
'includes': ['PySide.QtCore', 'PySide.QtGui', 'PySide.QtNetwork', 'configobj', 'PIL.Jpeg2KImagePlugin', 'pkg_resources'],
'packages': ['PIL'],
'excludes': ['numpy', 'matplotlib', 'PyQt5', 'PySide.QtXmlPatterns', 'PySide.QtWebEngineCore', 'PySide.QtDesigner', 'PySide.QtScript', 'PySide.QtWebkit', 'Cython', 'selenium', 'scapy', 'pytz', 'pygments', 'pip', 'netaddr', 'mercurial', 'cx_Freeze', 'bpython', 'astroid', 'Shiboken', 'PyInstaller', 'sip', 'llvmpy', 'llvm', 'pylint', 'unittest', 'pysideuic', 'email', 'Tkinter', 'multiprocessing', 'yaml', 'logilab', 'urwid', 'test', 'networkx' ],
'dylib_excludes':['QtXml.framework', 'QtWebkit.framework', 'QtScript.framework', 'QtDesigner.framework', 'QtWebEngineCore.framework', 'QtXmlPatterns.framework', 'QtNetwork.framework', 'QtGui.framework', 'QtCore.framework']
}
setup(
name='Web2Executable',
version='0.2.2b',
app=APP,
author='Joey Payne',
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)

View file

@ -1,29 +1,29 @@
rd /S /Q Web2ExeWin
rd /S /Q ElectrifyWin
del *.zip
call pyinstaller --onefile --hidden-import PIL.Jpeg2KImagePlugin --hidden-import configobj --hidden-import pkg_resources -i icon.ico --distpath command_line_builds -n web2exe-win command_line.py
call pyinstaller --onefile --hidden-import PIL.Jpeg2KImagePlugin --hidden-import configobj --hidden-import pkg_resources -i icon.ico --distpath command_line_builds -n electrify-win command_line.py
rd /S /Q command_line_builds\files
echo D | xcopy /s files command_line_builds\files
call pyinstaller -w --onefile --hidden-import PIL.Jpeg2KImagePlugin --hidden-import pkg_resources --hidden-import configobj -i icon.ico --distpath Web2ExeWin -n Web2Exe main.py
echo D | xcopy /s files Web2ExeWin\files
call pyinstaller -w --onefile --hidden-import PIL.Jpeg2KImagePlugin --hidden-import pkg_resources --hidden-import configobj -i icon.ico --distpath ElectrifyWin -n Electrify main.py
echo D | xcopy /s files ElectrifyWin\files
del Web2ExeWin\files\compressors\upx-mac
del Web2ExeWin\files\compressors\upx-linux-x64
del Web2ExeWin\files\compressors\upx-linux-x32
del ElectrifyWin\files\compressors\upx-mac
del ElectrifyWin\files\compressors\upx-linux-x64
del ElectrifyWin\files\compressors\upx-linux-x32
del command_line_builds\files\compressors\upx-mac
del command_line_builds\files\compressors\upx-linux-x64
del command_line_builds\files\compressors\upx-linux-x32
makensis /V4 Web2Exe.nsi
makensis /V4 Electrify.nsi
set /p Version=<files\version.txt
7z a Web2ExeWin-%Version%.zip -r Web2ExeWin
7z a ElectrifyWin-%Version%.zip -r ElectrifyWin
cd command_line_builds
7z a ..\Web2ExeWin-CMD.zip -tzip -r *
7z a ..\ElectrifyWin-CMD.zip -tzip -r *
cd ..
7z a Web2ExeWin-Setup.zip Web2Exe-Setup.exe
7z a ElectrifyWin-Setup.zip Electrify-Setup.exe
call python upload_release.py

View file

@ -1,4 +1,4 @@
'''Command line module for web2exe.'''
'''Command line module for electrify.'''
import ssl
@ -104,15 +104,6 @@ except:
pass
def get_base_url():
url = None
try:
url = codecs.open(get_file('files', 'base_url.txt'), encoding='utf-8').read().strip()
except (OSError, IOError):
url = 'http://dl.node-webkit.org/v{}/'
return url
class Setting(object):
def __init__(self, name='', display_name=None, value=None,
required=False, type=None, file_types=None, *args, **kwargs):
@ -146,6 +137,8 @@ class Setting(object):
convert = eval(convert)
def conv(x):
if x is None or x == '':
return x
try:
x = convert(x)
except ValueError:
@ -203,8 +196,6 @@ class Setting(object):
versions = re.findall('(\d+)\.(\d+)\.(\d+)', version)[0]
minor = int(versions[1])
if minor >= 12:
path = path.replace('node-webkit', 'nwjs')
return path
@ -489,7 +480,7 @@ class CommandBase(object):
dl_export_items = (list(self.settings['download_settings'].items()) +
list(self.settings['export_settings'].items()) +
list(self.settings['compression'].items()) +
list(self.settings['web2exe_settings'].items()))
list(self.settings['electrify_settings'].items()))
else:
dl_export_items = (list(self.settings['download_settings'].items()) +
list(self.settings['export_settings'].items()) +
@ -720,13 +711,13 @@ class CommandBase(object):
zip_file = utils.path_join(temp_dir, self.project_name()+'.nw')
app_nw_folder = utils.path_join(temp_dir, self.project_name()+'.nwf')
app_electron_folder = utils.path_join(temp_dir, self.project_name()+'.nwf')
if self.project_dir() in self.output_dir():
utils.copytree(self.project_dir(), app_nw_folder,
utils.copytree(self.project_dir(), app_electron_folder,
ignore=shutil.ignore_patterns(os.path.basename(self.output_dir())))
else:
utils.copytree(self.project_dir(), app_nw_folder)
utils.copytree(self.project_dir(), app_electron_folder)
for ex_setting in self.settings['export_settings'].values():
if ex_setting.value:
@ -737,8 +728,6 @@ class CommandBase(object):
versions = re.findall('(\d+)\.(\d+)\.(\d+)', self.selected_version())[0]
minor = int(versions[1])
if minor >= 12:
export_dest = export_dest.replace('node-webkit', 'nwjs')
if os.path.exists(export_dest):
utils.rmtree(export_dest, ignore_errors=True)
@ -775,16 +764,16 @@ class CommandBase(object):
self.progress_text += '.'
app_nw_res = utils.path_join(app_path,
app_electron_res = utils.path_join(app_path,
'Contents',
'Resources',
'default_app')
if os.path.exists(app_nw_res):
utils.rmtree(app_nw_res)
if os.path.exists(app_electron_res):
utils.rmtree(app_electron_res)
utils.copytree(app_nw_folder, app_nw_res)
utils.copytree(app_electron_folder, app_electron_res)
self.create_icns_for_app(utils.path_join(app_path,
'Contents',
@ -799,13 +788,13 @@ class CommandBase(object):
ext = '.exe'
windows = True
nw_path = utils.path_join(export_dest,
electron_path = utils.path_join(export_dest,
ex_setting.binary_location)
if windows:
self.replace_icon_in_exe(nw_path)
self.replace_icon_in_exe(electron_path)
self.compress_nw(nw_path)
self.compress_nw(electron_path)
dest_binary_path = utils.path_join(export_dest,
self.project_name() +
@ -813,16 +802,16 @@ class CommandBase(object):
if 'linux' in ex_setting.name:
self.make_desktop_file(dest_binary_path, export_dest)
utils.move(nw_path, dest_binary_path)
utils.move(electron_path, dest_binary_path)
app_nw_res = utils.path_join(export_dest,
app_electron_res = utils.path_join(export_dest,
'resources',
'default_app')
if os.path.exists(app_nw_res):
utils.rmtree(app_nw_res)
if os.path.exists(app_electron_res):
utils.rmtree(app_electron_res)
utils.copytree(app_nw_folder, app_nw_res)
utils.copytree(app_electron_folder, app_electron_res)
sevenfivefive = (stat.S_IRWXU |
stat.S_IRGRP |
@ -834,8 +823,8 @@ class CommandBase(object):
self.progress_text += '.'
if os.path.exists(nw_path):
os.remove(nw_path)
if os.path.exists(electron_path):
os.remove(electron_path)
except Exception:
error = u''.join([x for x in traceback.format_exception(sys.exc_info()[0],
@ -846,7 +835,7 @@ class CommandBase(object):
finally:
utils.rmtree(temp_dir, onerror=self.remove_readonly)
def make_desktop_file(self, nw_path, export_dest):
def make_desktop_file(self, electron_path, export_dest):
icon_set = self.get_setting('icon')
icon_path = utils.path_join(self.project_dir(), icon_set.value)
if os.path.exists(icon_path) and icon_set.value:
@ -873,15 +862,15 @@ class CommandBase(object):
file_str = file_str.format(version.value,
name,
desc.value,
nw_path,
electron_path,
icon_path)
with codecs.open(dfile_path, 'w+', encoding='utf-8') as f:
f.write(file_str)
os.chmod(dfile_path, 0o755)
def compress_nw(self, nw_path):
compression = self.get_setting('nw_compression_level')
def compress_nw(self, electron_path):
compression = self.get_setting('electron_compression_level')
if compression.value == 0:
return
@ -903,7 +892,7 @@ class CommandBase(object):
if upx_version is not None:
upx_bin = upx_version
os.chmod(upx_bin, 0o755)
cmd = [upx_bin, '--lzma', u'-{}'.format(compression.value), nw_path]
cmd = [upx_bin, '--lzma', u'-{}'.format(compression.value), electron_path]
if platform.system() == 'Windows':
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
@ -1216,8 +1205,8 @@ def unicode_arg(bytestring):
def main():
parser = ArgParser(description=('Command line interface '
'to web2exe. {}'.format(__version__)),
prog='web2execmd')
'to electrify. {}'.format(__version__)),
prog='electrifycmd')
command_base = CommandBase()
command_base.init()
parser.add_argument('project_dir', metavar='project_dir',

View file

@ -12,7 +12,7 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
inkscape:export-filename="/home/joey/Projects/Web2Executable/files/images/compress_settings.png"
inkscape:export-filename="/home/joey/Projects/Electrify/files/images/compress_settings.png"
sodipodi:docname="compress_settings.svg"
inkscape:version="0.91+devel r"
version="1.1"

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

View file

@ -12,7 +12,7 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
inkscape:export-filename="/home/joey/Projects/Web2Executable/files/images/download_settings.png"
inkscape:export-filename="/home/joey/Projects/Electrify/files/images/download_settings.png"
sodipodi:docname="download_settings.svg"
inkscape:version="0.91+devel r"
version="1.1"

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Before After
Before After

View file

@ -17,7 +17,7 @@
version="1.1"
inkscape:version="0.91+devel r"
sodipodi:docname="export_settings.svg"
inkscape:export-filename="/home/joey/Projects/Web2Executable/files/images/export_settings.png"
inkscape:export-filename="/home/joey/Projects/Electrify/files/images/export_settings.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<sodipodi:namedview

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before After
Before After

View file

@ -18,7 +18,7 @@
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-filename="/home/joey/Projects/Electrify/files/images/icon.png"
inkscape:export-xdpi="1536.9606"
inkscape:export-ydpi="1536.9606"><metadata
id="metadata47"><rdf:RDF><cc:Work
@ -95,4 +95,4 @@
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>
id="path9" /></g></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before After
Before After

View file

@ -16,7 +16,7 @@
version="1.1"
inkscape:version="0.91+devel r"
sodipodi:docname="warning.svg"
inkscape:export-filename="/home/joey/Projects/Web2Executable/files/images/warning.png"
inkscape:export-filename="/home/joey/Projects/Electrify/files/images/warning.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<sodipodi:namedview

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After

View file

@ -12,7 +12,7 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:export-ydpi="96"
inkscape:export-xdpi="96"
inkscape:export-filename="/home/joey/Projects/Web2Executable/files/images/download_settings.png"
inkscape:export-filename="/home/joey/Projects/Electrify/files/images/download_settings.png"
sodipodi:docname="web_prefs.svg"
inkscape:version="0.91+devel r"
version="1.1"

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before After
Before After

View file

@ -17,7 +17,7 @@
version="1.1"
inkscape:version="0.91+devel r"
sodipodi:docname="window_settings.svg"
inkscape:export-filename="/home/joey/Projects/Web2Executable/files/images/window_settings.png"
inkscape:export-filename="/home/joey/Projects/Electrify/files/images/window_settings.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<sodipodi:namedview

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before After
Before After

View file

@ -157,7 +157,7 @@ linux_64_dir_prefix = 'electron-v{}-linux-x64'
default_value=False
type='check'
[[web2exe_settings]]
[[electrify_settings]]
[[[export_dir]]]
default_value=''
type='string'
@ -276,12 +276,12 @@ linux_64_dir_prefix = 'electron-v{}-linux-x64'
type='string'
convert='int'
[[[x]]]
default_value='800'
default_value='100'
type='string'
convert='int'
description="Window's left offset from screen. Default is to center the window"
[[[y]]]
default_value='600'
default_value='100'
convert='int'
type='string'
description="Window's top offset from screen. Default is to center the window."
@ -433,13 +433,13 @@ linux_64_dir_prefix = 'electron-v{}-linux-x64'
binary_location='electron'
[compression]
[[nw_compression_level]]
[[electron_compression_level]]
display_name='Compression Level'
default_value=0
min=0
max=9
type='range'
description='Compression to be applied to the executable\'s nwjs binary.\n0 is no compression, 9 is maximum. They all use lzma.'
description='Compression to be applied to the executable\'s electron binary.\n0 is no compression, 9 is maximum. They all use lzma.'
[[uncompressed_folder]]
display_name='Uncompressed Folder'
type='check'
@ -471,11 +471,10 @@ linux_64_dir_prefix = 'electron-v{}-linux-x64'
'direct_write']"""
export_setting_order = """['windows-x32', 'windows-x64', 'mac-x32', 'mac-x64', 'linux-x64', 'linux-x32']"""
compression_setting_order = """['nw_compression_level', 'uncompressed_folder']"""
compression_setting_order = """['electron_compression_level']"""
download_setting_order = """['electron_version', 'download_dir',
'force_download']"""
[version_info]
urls="""['https://raw.githubusercontent.com/nwjs/nw.js/master/CHANGELOG.md']"""
electron_url='https://api.github.com/repos/atom/electron/releases'

View file

@ -300,7 +300,7 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
self.option_settings_enabled(False)
self.setWindowTitle(u"Web2Executable {}".format(__gui_version__))
self.setWindowTitle(u"Electrify {}".format(__gui_version__))
self.update_electron_versions(None)
def open_recent_file(self):
@ -445,7 +445,7 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
'window_settings': 1,
'web_preferences': 2,
'export_settings': 3,
'web2exe_settings': 3,
'electrify_settings': 3,
'compression': 4,
'download_settings': 5}
for setting_group_name, setting_group in self._setting_items:
@ -459,7 +459,7 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
red_border = 'QLineEdit{border:3px solid rgba(238, 68, 83, 200); border-radius:5px;}'
settings_valid = True
for sgroup in self.settings['setting_groups']+[self.settings['web2exe_settings']]:
for sgroup in self.settings['setting_groups']+[self.settings['electrify_settings']]:
for sname, setting in sgroup.items():
if setting.type in set(['file', 'folder']) and os.path.isabs(setting.value):
setting_path = setting.value
@ -1513,7 +1513,7 @@ class MainWindow(QtGui.QMainWindow, CommandBase):
if __name__ == '__main__':
app = QApplication(sys.argv)
QCoreApplication.setApplicationName("Web2Executable")
QCoreApplication.setApplicationName("Electrify")
QCoreApplication.setApplicationVersion(__gui_version__)
QCoreApplication.setOrganizationName("SimplyPixelated")
QCoreApplication.setOrganizationDomain("simplypixelated.com")

View file

@ -15,7 +15,7 @@ def main():
with open('files/version.txt') as f:
version = f.read().strip()
base_url = 'https://api.github.com/repos/jyapayne/Web2Executable/releases'
base_url = 'https://api.github.com/repos/jyapayne/Electrify/releases'
req = requests.get(base_url+'/tags/'+version)
@ -42,7 +42,7 @@ def main():
print('Creating release:', version)
data = {'tag_name': version,
'target_commitish': 'master',
'name': 'Web2Executable ' + version}
'name': 'Electrify ' + version}
post_res = requests.post(base_url, data=json.dumps(data), auth=(github_user, password))
if post_res.status_code == 201:
json_data = json.loads(post_res.text)

View file

@ -39,7 +39,7 @@ def path_join(base, *rest):
def get_data_path(dir_path):
parts = dir_path.split('/')
dirs = AppDirs('Web2Executable', 'Web2Executable')
dirs = AppDirs('Electrify', 'Electrify')
data_path = path_join(dirs.user_data_dir, *parts)
if is_windows():