diff --git a/spec_files/Linux/Aretmis.spec b/spec_files/Linux/Aretmis.spec new file mode 100644 index 0000000..e928de1 --- /dev/null +++ b/spec_files/Linux/Aretmis.spec @@ -0,0 +1,35 @@ +# -*- mode: python -*- + +block_cipher = None + +import glob, os + +data_file = [(f, '.') for f in glob.glob('*.[pu][yi]') if f != "artemis.py"] + +a = Analysis(['artemis.py'], + 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, 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=False) diff --git a/spec_files/Linux/artemis3.svg b/spec_files/Linux/artemis3.svg new file mode 100644 index 0000000..7626745 --- /dev/null +++ b/spec_files/Linux/artemis3.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spec_files/Linux/create_shortcut.sh b/spec_files/Linux/create_shortcut.sh new file mode 100644 index 0000000..c53a1d1 --- /dev/null +++ b/spec_files/Linux/create_shortcut.sh @@ -0,0 +1,62 @@ +clear +echo " + =================================== + Artemis 3 Shortcut Creator + LINUX + =================================== +" + +# Set the correct permissions for Artemis folder +echo "Gaining admin privileges and set folder read/write permission..." +echo "" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +sudo chmod 700 $DIR + +# Generation of shortcut +file=/home/$USER/.local/share/applications/artemis.desktop +if [ -e "$file" ]; then + echo "A shortcut of Artemis 3 is already present:" + echo "" + echo "R) Remove the shortcut and the icon file" + echo "U) Update the shortcut" + echo "" + read -p "" doit + case $doit in + u|U) + echo "#!/usr/bin/env xdg-open" > /home/$USER/.local/share/applications/artemis.desktop + echo "[Desktop Entry]" >> /home/$USER/.local/share/applications/artemis.desktop + echo "Name=Artemis" >> /home/$USER/.local/share/applications/artemis.desktop + echo "StartupWMClass=artemis3" >> /home/$USER/.local/share/applications/artemis.desktop + echo "Exec=sh -c 'cd $DIR && ./artemis' " >> /home/$USER/.local/share/applications/artemis.desktop + echo "Terminal=False" >> /home/$USER/.local/share/applications/artemis.desktop + echo "Icon=artemis3" >> /home/$USER/.local/share/applications/artemis.desktop + sudo cp ./artemis3.svg /usr/share/icons/ + echo "Link Updated!" + ;; + r|R) + sudo rm /home/$USER/.local/share/applications/artemis.desktop + sudo rm /usr/share/icons/artemis3.svg + echo "Link and icon removed!" + ;; + *) echo "Sorry! Invalid option $REPLY";; + esac +else + echo "#!/usr/bin/env xdg-open" > /home/$USER/.local/share/applications/artemis.desktop + echo "[Desktop Entry]" >> /home/$USER/.local/share/applications/artemis.desktop + echo "Name=Artemis" >> /home/$USER/.local/share/applications/artemis.desktop + echo "StartupWMClass=artemis3" >> /home/$USER/.local/share/applications/artemis.desktop + echo "Exec=sh -c 'cd $DIR && ./artemis' " >> /home/$USER/.local/share/applications/artemis.desktop + echo "Terminal=False" >> /home/$USER/.local/share/applications/artemis.desktop + echo "Icon=artemis3" >> /home/$USER/.local/share/applications/artemis.desktop + sudo cp ./artemis3.svg /usr/share/icons/ + echo " + Link copied in: /home/$USER/.local/share/applications/artemis.desktop + Icon copied in: /usr/share/icons/artemis3.svg + " +fi + +echo " + ================================ + SETTING COMPLETE + ================================ +" diff --git a/spec_files/README.md b/spec_files/README.md new file mode 100644 index 0000000..719abbd --- /dev/null +++ b/spec_files/README.md @@ -0,0 +1,39 @@ + + +# ARTEMIS 3 ![LICENSE](https://img.shields.io/github/license/AresValley/Artemis.svg?style=flat-square) ![ISSUE](https://img.shields.io/github/issues/AresValley/Artemis.svg?style=flat-square) ![LANGUAGE](https://img.shields.io/github/languages/top/AresValley/Artemis.svg?style=flat-square) + +*Radio Signals Recognition Manual* + +## ARTEMIS 3 .SPEC FILES + +Artemis 3 .spec files are used by the package **pyinstaller** (https://www.pyinstaller.org/) to build a single standalone executable. The extreme versatility of this package is the fact that every external dependency is already embedded into the bundle. The interpreter of Python 3 is also included. + +## Requirements +- Python 3.7.0+ +- Pyinstaller + +## Package Building +**IMPORTANT:** *To generate the standalone, you must use an operating system that coincides with the target one (pyinstaller doesn't allow cross-compilation).* +1. Download a fresh copy of the git repository. +2. Choose the target OS in `spec_files` folder and copy the whole content into `src` +3. Open a terminal into `src` and run: +``` +pyinstaller Artemis.spec +``` +4. The ready-to-use compiled software is now present into `src/dist` folder. + +## License +This program (ARTEMIS 3, 2014-2019) is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program. If not, see: www.gnu.org/licenses + +## Thanks +* **Marco Dalla Tiezza** - *Artemis I-II developer, DB parsing, Website* +* [**Alessandro Ceccato**](https://github.com/alessandro90 "GitHub profile") - *Artemis III lead developer* +* **Paolo Romani (IZ1MLL)** - *Lead β Tester, RF specialist* +* **Carl Colena** - *Sigidwiki admin, β Tester, Signals expert* +* **Marco Bortoli** - *macOS deployment, β Tester* +* **Pierpaolo Pravatto** - *Wiki page, β Tester* +* **Francesco Capostagno, Luca, Pietro** - *β Tester* diff --git a/spec_files/Windows/Artemis3.ico b/spec_files/Windows/Artemis3.ico new file mode 100644 index 0000000..5677102 Binary files /dev/null and b/spec_files/Windows/Artemis3.ico differ diff --git a/spec_files/Windows/artemis.spec b/spec_files/Windows/artemis.spec new file mode 100644 index 0000000..f62320f --- /dev/null +++ b/spec_files/Windows/artemis.spec @@ -0,0 +1,35 @@ +# -*- mode: python -*- + +block_cipher = None + +import glob,os + +data_file = [(f, '.') for f in glob.glob('*.[pu][yi]') if f != "artemis.py"] + +a = Analysis(['artemis.py'], + 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, 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=False , icon='Artemis3.ico') diff --git a/spec_files/macOS/Artemis.spec b/spec_files/macOS/Artemis.spec new file mode 100644 index 0000000..189ac95 --- /dev/null +++ b/spec_files/macOS/Artemis.spec @@ -0,0 +1,43 @@ +# -*- mode: python -*- + +block_cipher = None +import glob, os + +data_file = [(f, '.') for f in glob.glob('*.[pu][yi]') if f != "artemis.py"] +data_file.append(('themes','./themes')) + +a = Analysis(['artemis.py'], + 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, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + [], + exclude_binaries=True, + name='Artemis', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False ) +coll = COLLECT(exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + name='Artemis') +app = BUNDLE(coll, + name='Artemis.app', + icon='Artemis3.icns', + bundle_identifier=None) diff --git a/spec_files/macOS/Artemis3.icns b/spec_files/macOS/Artemis3.icns new file mode 100644 index 0000000..76c9527 Binary files /dev/null and b/spec_files/macOS/Artemis3.icns differ