diff --git a/build/Linux/artemis3.svg b/build/Linux/artemis3.svg new file mode 100644 index 0000000..7626745 --- /dev/null +++ b/build/Linux/artemis3.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/Linux/setup.py b/build/Linux/setup.py new file mode 100644 index 0000000..4aa40e7 --- /dev/null +++ b/build/Linux/setup.py @@ -0,0 +1,75 @@ +import os +from os import listdir +from os.path import isfile, join + +mypath='../..' +excluded=['.gitignore','requirements_win.txt','artemis.py'] +data_files = [f for f in listdir(mypath) if isfile(join(mypath, f))] + +for i in excluded: + data_files.remove(i) + +datas=["('../../" + i + "', '.')" for i in data_files] + +pyinst_head=''' +# -*- mode: python -*- + +block_cipher = None + +a = Analysis(['../../artemis.py'], + pathex=['../../'], + binaries=[], + datas=[ +''' + +pyinst_tail=''' + hiddenimports=[], + hookspath=[], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) + +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='Artemis', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + runtime_tmpdir=None, + console=True) +''' + +setup_file = open('./setup.spec','w') +setup_file.write(pyinst_head + ','.join(datas) + "]," + pyinst_tail) +setup_file.close() + +os.system("pyinstaller --onefile setup.spec") +os.system("cp -r ../../themes dist") +os.system("rm -rf build") + +desktop = open('./artemis.desktop','w') +desktop.write("""#!/usr/bin/env xdg-open +[Desktop Entry] +Name=Artemis +StartupWMClass=artemis3 +Exec=. /SETUP_PATH/Artemis +Terminal=False +Icon=artemis3 +Type=Application""") +desktop.close() + +print("""To finalize the installation (add Artemis in the main menu):\n +1)\tEdit artemis.desktop file properly and move it to '/.local/share/applications' +2)\tMove the icon file artemis3.svg to '/usr/share/icons/' +""") \ No newline at end of file diff --git a/build/artemis_linux.spec b/build/artemis_linux.spec deleted file mode 100644 index a7e137c..0000000 --- a/build/artemis_linux.spec +++ /dev/null @@ -1,47 +0,0 @@ -# -*- mode: python -*- - -block_cipher = None - - -a = Analysis(['../artemis.py'], - pathex=['../'], - binaries=[], - datas=[('../artemis.ui', '.'), - ('../audio_player.py', '.'), - ('../clickable_progress_bar.py', '.'), - ('../constants.py', '.'), - ('../double_text_button.py', '.'), - ('../download_db_window.ui', '.'), - ('../download_window.py', '.'), - ('../fixed_aspect_ratio_label.py', '.'), - ('../fixed_aspect_ratio_widget.py', '.'), - ('../icon.qrc', '.'), - ('../icon_rc.py', '.'), - ('../space_weather_data.py', '.'), - ('../switchable_label.py', '.'), - ('../themes.py', '.'), - ('../threads.py', '.'), - ('../utilities.py', '.')], - hiddenimports=[], - hookspath=[], - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher, - noarchive=False) -pyz = PYZ(a.pure, a.zipped_data, - cipher=block_cipher) -exe = EXE(pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - [], - name='artemis', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - runtime_tmpdir=None, - console=True ) diff --git a/build/build_linux b/build/build_linux deleted file mode 100644 index b378c0a..0000000 --- a/build/build_linux +++ /dev/null @@ -1,4 +0,0 @@ -pyinstaller --onefile artemis_linux.spec -cp -r ../themes dist -mv dist dist_linux -rm -rf build