Skip to content

Commit

Permalink
Added ability to specify version in a file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jyapayne committed Nov 26, 2015
1 parent 14097f2 commit 8378130
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Web2Exe.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Web2Exe"
!define PRODUCT_VERSION "0.3.1b"
!define /file PRODUCT_VERSION "files\version.txt"
!define PRODUCT_PUBLISHER "SimplyPixelated"
!define PRODUCT_WEB_SITE "http://www.simplypixelated.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}.exe"
Expand Down
4 changes: 3 additions & 1 deletion build_command_line_linux.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
rm -rf Web2ExeLinux*.zip
rm -rf Web2ExeLinux-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/*
Expand All @@ -15,4 +17,4 @@ rm Web2ExeLinux/files/error.log Web2ExeLinux/files/last_project_path.txt Web2Exe


zip -r -9 Web2ExeLinux-CMD.zip Web2ExeLinux-CMD/*
zip -r -9 Web2ExeLinux-v0.3.1b.zip Web2ExeLinux
zip -r -9 Web2ExeLinux-${VERSION}.zip Web2ExeLinux
4 changes: 3 additions & 1 deletion build_mac.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
VERSION=$(cat files/version.txt)

rm -rf Web2ExeMac*
rm files/error.log files/last_project_path.txt files/recent_files.txt
rm -rf files/downloads/*
Expand Down Expand Up @@ -27,4 +29,4 @@ cp -rf files Web2Executable.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-v0.3.1b.zip Web2Executable.app
/Applications/Keka.app/Contents/Resources/keka7z a -r Web2ExeMac-${VERSION}.zip Web2Executable.app
4 changes: 3 additions & 1 deletion build_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ del command_line_builds\files\compressors\upx-linux-x32

makensis /V4 Web2Exe.nsi

7z a Web2ExeWin-v0.3.1b.zip -r Web2ExeWin
set /p Version=<version.txt

7z a Web2ExeWin-%Version%.zip -r Web2ExeWin
cd command_line_builds
7z a ..\Web2ExeWin-CMD.zip -tzip -r *
cd ..
Expand Down
10 changes: 8 additions & 2 deletions command_line.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'''Command line module for web2exe.'''

__version__ = "v0.3.3b"

import ssl

try:
Expand Down Expand Up @@ -51,6 +49,8 @@

COMMAND_LINE = True



inside_packed_exe = getattr(sys, 'frozen', '')

if inside_packed_exe:
Expand All @@ -65,6 +65,12 @@ def get_file(path):
independent_path = utils.path_join(CWD, *parts)
return independent_path

__version__ = "v0.0.0"

with open(get_file('files/version.txt')) as f:
__version__ = f.read().strip()


TEMP_DIR = get_temp_dir()
DEFAULT_DOWNLOAD_PATH = get_data_path('files/downloads')

Expand Down

0 comments on commit 8378130

Please sign in to comment.