Fix a bug in the *.spec files and also apply the following major changes:

- Add support for adding the base folder to PATH.
- Only display one pop up window at a time in order to avoid confusion.
- Add automatic updates feature:
	- Windows and Linux versions will be shipped with an updater program used to
	  update both Artemis and the updater itself.
	- MacOs versions will not have the updater. Instead the user will be asked
	  to download the new software version (if present) via browser.
This commit is contained in:
Alessandro
2019-09-21 16:11:53 +02:00
parent 08b3312b23
commit 8e79bf6adf
34 changed files with 1360 additions and 280 deletions

View File

@@ -12,7 +12,8 @@ SRC_PATH = "../../src/"
data_file = [
(f, '.') for f in glob.glob(SRC_PATH + '*.[pu][yi]')
if f.split('/')[-1] != "artemis.py"
].append((SRC_PATH + 'cacert.pem', '.'))
]
data_file.append((SRC_PATH + 'cacert.pem', '.'))
a = Analysis(SRC_PATH + ['artemis.py'], # noqa: 821
pathex=[os.getcwd()],

View File

@@ -11,8 +11,9 @@ SRC_PATH = "../../src/"
data_file = [
(f, '.') for f in glob.glob(SRC_PATH + '*.[pu][yi]')
if f.split('/')[-1] != "artemis.py"
].append((SRC_PATH + 'cacert.pem', '.'))
if f.split('/')[-1] != "artemis.py" and f.split('/')[-1] != "updater.py"
]
data_file.append((SRC_PATH + 'cacert.pem', '.'))
a = Analysis([SRC_PATH + 'artemis.py'], # noqa: 821
pathex=[os.getcwd()],
@@ -42,4 +43,5 @@ exe = EXE(pyz, # noqa: 821
upx=True,
runtime_tmpdir=None,
console=False,
icon='Artemis3.ico')
icon='Artemis3.ico',
uac_admin=True)

View File

@@ -0,0 +1,30 @@
ECHO OFF
ECHO Building Artemis executable...
RMDIR /s /q output
MKDIR output
pyinstaller artemis.spec
ECHO Remove directories
MOVE dist\Artemis.exe .\output\Artemis.exe
RMDIR /s /q dist
RMDIR /s /q build
ECHO *************
ECHO *************
ECHO Building updater...
pyinstaller updater.spec
ECHO Remove directories
MOVE dist\_ArtemisUpdater.exe .\output\_ArtemisUpdater.exe
RMDIR /s /q dist
RMDIR /s /q build
CD output
MKDIR Artemis
XCOPY /y Artemis.exe Artemis\
XCOPY /e /k /y ..\..\..\src\themes Artemis\themes\ /EXCLUDE:..\excluded_files.txt
XCOPY /y _ArtemisUpdater.exe Artemis\
ECHO "Compress files themes+Artemis.exe -> Artemis.zip"
"C:\Program Files\7-Zip\7z.exe" a -r Artemis_win.zip Artemis.exe Artemis\themes
"C:\Program Files\7-Zip\7z.exe" a _ArtemisUpdater_win.zip _ArtemisUpdater.exe
ECHO "Compress all files for website download"
"C:\Program Files\7-Zip\7z.exe" a ArtemisWebsite_win.zip Artemis\
python ..\..\__get_hash_code.py Artemis_win.zip _ArtemisUpdater_win.zip ArtemisWebsite_win.zip
CD ..
ECHO Done.

View File

@@ -0,0 +1 @@
__current_theme

View File

@@ -0,0 +1,52 @@
# -*- mode: python ; coding: utf-8 -*-
import os
BASE_FOLDER = "../../src/"
block_cipher = None
data_file = [
(os.path.join(BASE_FOLDER, "download_db_window.ui"), "."),
(os.path.join(BASE_FOLDER, "download_window.py"), "."),
(os.path.join(BASE_FOLDER, "utilities.py"), "."),
(os.path.join(BASE_FOLDER, "versioncontroller.py"), "."),
(os.path.join(BASE_FOLDER, "downloadtargetfactory.py"), "."),
(os.path.join(BASE_FOLDER, "executable_utilities.py"), "."),
(os.path.join(BASE_FOLDER, "os_utilities.py"), "."),
(os.path.join(BASE_FOLDER, "web_utilities.py"), "."),
(os.path.join(BASE_FOLDER, "constants.py"), "."),
(os.path.join(BASE_FOLDER, "threads.py"), "."),
(os.path.join(BASE_FOLDER, "default_imgs_rc.py"), "."),
(os.path.join(BASE_FOLDER, "cacert.pem"), "."),
]
a = Analysis([os.path.join(BASE_FOLDER, 'updater.py')], # noqa: 821
pathex=[os.getcwd()],
binaries=[],
datas=data_file,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, # noqa: 821
a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz, # noqa: 821
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='_ArtemisUpdater',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=False,
icon='Artemis3.ico',
uac_admin=True)