diff --git a/README.md b/README.md index 7564e2e..be6743b 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,6 @@ In short, ARTEMIS is a signals hunter software and a useful aid for radio listen - [Run from binary](#Run-from-binary) - [Run from source code](#Run-from-source-code-OS-independent) - [Run using deploy script](#Run-using-deploy-script) - - [Windows](#Windows) - - [Linux](#Linux) - - [MacOS](#MacOS) - [Database](#database) - [Syntax](#syntax) - [Multiple Items fields (Location, Modulation)](#multiple-items-fields-location-modulation) @@ -35,16 +32,10 @@ For more information, follow the main page of Artemis 3: https://aresvalley.com/ ## Run from source code (OS independent) Run the software from the source code with the Python interpreter is the simplest and natural way to run Artemis 3. The main drawback: this is not the most convenient or fast way to launch the software. Requirements: -- Python 3 (>3.7) -- Pandas>=0.24.2 -- Certifi>=2019.6.16 -- Aiohttp>=3.5.4 -- Urllib3>=1.25.3 -- Pygame>=1.9.6 -- QtAwesome>=0.5.7 -- PyQt5==5.12.2 +- Python 3 (>3.7.0+) +- Python libraries (in `requirements/requirements.txt`) -1. Download and install Python 3 (> 3.7) from the official website (https://www.python.org/downloads/). Be sure to select the flag `Add Python 3.x to PATH` during the first part of the installation. +1. Download and install Python 3 (>3.7.0+) from the official website (https://www.python.org/downloads/). Be sure to select the flag `Add Python 3.x to PATH` during the first part of the installation. 2. Install the necessary Python libraries with PIP. Open a console in Artemis/requirements folder and type: @@ -60,54 +51,9 @@ python3 artemis.py ## Run using deploy script - +This is a third option to run Artemis 3 on your pc. The method of installation is based on an automatic script that set privileges, install dependencies and create a working shortcut to your desktop/menu. -> ### Windows: -> -> 1. Windows don't offer a native version of Python. Download and install Python 3 (> 3.7) from the official website (https://www.python.org/downloads/). Be sure to select the flag `Add Python 3.x to PATH` during the first part of the installation. To verify the correct installation of Python open a CMD terminal (Open the **run** windows with **Win+R** and type **cmd**) and check the version of the just installed python 3 with: -> ``` -> python --version -> ``` -> 2. Use the `clone or download` button (https://github.com/AresValley/Artemis/archive/master.zip) to download the source code of Artemis 3. -> 3. Extract the .zip and place Artemis folder where you prefer. The code must always be accompanied by a `themes` folder. -> 4. To install the necessary libraries open the `Artemis/deploy/Windows` folder. Run (with a double click) the script `deploy_win.bat`. The script will: -> -> * Set the correct read/write privileges for Artemis folder. The main folder **must have the reading/writing permission** to download the Signals Database. -> * Install the required Python 3 libraries with pip3. -> * Generate a .pyw file (script launcher without console), and it will create a shortcut on the desktop. - - - - -> ### Linux: -> -> 1. Linux already offers a native version of python on board. Please verify the presence of Python 3 and check the version (> 3.7) opening a terminal and typing: -> ``` -> python --version -> ``` -> If, for some reasons python, it is not present in your system follow the specific instructions to install it on your distro. For the common Linux OS: -> * **Ubuntu**, **Mint**: `sudo apt-get install python3.7` -> * **Fedora**: `sudo dnf install python37` -> 2. Use the `clone or download` button (https://github.com/AresValley/Artemis/archive/master.zip) to download the source code of Artemis 3. -> 3. Extract the .zip where you like (use `unzip Artemis-master.zip`). The code must always be accompanied by a `themes` folder. -> 4. To install the necessary libraries open the `Artemis/deploy/Linux` folder. Run the script `deploy_linux.sh` typing in a terminal: -> ``` -> cd PATH / TO / ARTEMIS / FOLDER /deploy/Linux -> sh deploy_linux.sh -> ``` -> -> 5. Follow the terminal instructions. At the end, you will find a shortcut to Artemis 3 in the main menu. The script `deploy_linux.sh` will: -> -> * Set the correct read/write privileges for Artemis folder. The main folder **must have the reading/writing permission** to download the Signals Database. -> * Install the required Python 3 libraries with pip3. -> * Generate a .desktop file (script launcher without console) in `$HOME/.local/share/applications` and it will copy the .svg Artemis icon in `/usr/share/icons/`. - - - - -> ### MacOS: -> -> 1. To Be Completed... +**For the sake of completeness, the documentation is available in `unused_installation_scripts`, but we strongly discourage any attempt to use it.** ## Database 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 diff --git a/unused_installation_scripts/Linux/artemis3.svg b/unused_installation_scripts/Linux/artemis3.svg new file mode 100644 index 0000000..7626745 --- /dev/null +++ b/unused_installation_scripts/Linux/artemis3.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/unused_installation_scripts/Linux/deploy_linux.sh b/unused_installation_scripts/Linux/deploy_linux.sh new file mode 100644 index 0000000..dd33c55 --- /dev/null +++ b/unused_installation_scripts/Linux/deploy_linux.sh @@ -0,0 +1,47 @@ +clear +echo " + =================================== + Artemis 3 Deploy Script + LINUX + =================================== +" + +# Set the correct permissions for Artemis folder +echo "Gaining admin privileges and set folder read/write permission..." +echo "" +sudo chmod 700 $PWD/../../ +# Download necessary libraries with pip3 +read -p "Install the necessary Python libraries? [Y,N]..." doit +case $doit in + y|Y) pip3 install -r requirements_lin.txt --user > log;; +esac + +# Generation of shortcut +echo "" +read -p "Create a desktop shortcut? [Y/N]..." doit +case $doit in + y|Y) +cat << EOR > /home/$USER/.local/share/applications/artemis.desktop +#!/usr/bin/env xdg-open +[Desktop Entry] +Name=Artemis +StartupWMClass=artemis3 +Exec=sh -c "cd $PWD/../../ && python3 artemis.py" +Terminal=False +Icon=artemis3 +Type=Application +EOR +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 +" + ;; + n|N) ;; + *) echo "invalid option $REPLY";; +esac +echo " + ================================ + SETTING COMPLETE + ================================ +" diff --git a/unused_installation_scripts/Linux/requirements_lin.txt b/unused_installation_scripts/Linux/requirements_lin.txt new file mode 100644 index 0000000..98560a7 --- /dev/null +++ b/unused_installation_scripts/Linux/requirements_lin.txt @@ -0,0 +1,7 @@ +pandas>=0.24.2 +certifi>=2019.6.16 +aiohttp>=3.5.4 +pygame>=1.9.6 +QtAwesome>=0.5.7 +urllib3>=1.25.3 +PyQt5>=5.12.3 diff --git a/unused_installation_scripts/README.md b/unused_installation_scripts/README.md new file mode 100644 index 0000000..2f9142a --- /dev/null +++ b/unused_installation_scripts/README.md @@ -0,0 +1,77 @@ + + +# 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 - Unused Deployment Scripts + +This folder contains a third option to run Artemis 3 on your pc. The method of installation is based on an automatic script that set privileges, install dependencies and create a working shortcut to your desktop/menu. + +**For the sake of completeness, the documentation is available below, but we strongly discourage any attempt to use it.** + +## Run using deploy script + + + +> ### Windows: +> +> 1. Windows don't offer a native version of Python. Download and install Python 3 (> 3.7) from the official website (https://www.python.org/downloads/). Be sure to select the flag `Add Python 3.x to PATH` during the first part of the installation. To verify the correct installation of Python open a CMD terminal (Open the **run** windows with **Win+R** and type **cmd**) and check the version of the just installed python 3 with: +> ``` +> python --version +> ``` +> 2. Use the `clone or download` button (https://github.com/AresValley/Artemis/archive/master.zip) to download the source code of Artemis 3. +> 3. Extract the .zip and place Artemis folder where you prefer. The code must always be accompanied by a `themes` folder. +> 4. To install the necessary libraries open the `Artemis/deploy/Windows` folder. Run (with a double click) the script `deploy_win.bat`. The script will: +> +> * Set the correct read/write privileges for Artemis folder. The main folder **must have the reading/writing permission** to download the Signals Database. +> * Install the required Python 3 libraries with pip3. +> * Generate a .pyw file (script launcher without console), and it will create a shortcut on the desktop. + + + + +> ### Linux: +> +> 1. Linux already offers a native version of python on board. Please verify the presence of Python 3 and check the version (> 3.7) opening a terminal and typing: +> ``` +> python --version +> ``` +> If, for some reasons python, it is not present in your system follow the specific instructions to install it on your distro. For the common Linux OS: +> * **Ubuntu**, **Mint**: `sudo apt-get install python3.7` +> * **Fedora**: `sudo dnf install python37` +> 2. Use the `clone or download` button (https://github.com/AresValley/Artemis/archive/master.zip) to download the source code of Artemis 3. +> 3. Extract the .zip where you like (use `unzip Artemis-master.zip`). The code must always be accompanied by a `themes` folder. +> 4. To install the necessary libraries open the `Artemis/deploy/Linux` folder. Run the script `deploy_linux.sh` typing in a terminal: +> ``` +> cd PATH / TO / ARTEMIS / FOLDER /deploy/Linux +> sh deploy_linux.sh +> ``` +> +> 5. Follow the terminal instructions. At the end, you will find a shortcut to Artemis 3 in the main menu. The script `deploy_linux.sh` will: +> +> * Set the correct read/write privileges for Artemis folder. The main folder **must have the reading/writing permission** to download the Signals Database. +> * Install the required Python 3 libraries with pip3. +> * Generate a .desktop file (script launcher without console) in `$HOME/.local/share/applications` and it will copy the .svg Artemis icon in `/usr/share/icons/`. + + + + +> ### MacOS: +> +> 1. To Be Completed... + +## 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 D.T.** - *Artemis I-II programmer, DB parsing, Website* +* **Alessandro C.** - *Artemis III lead programmer* +* **Paolo R. (IZ1MLL)** - *Lead β Tester, RF specialist* +* **Carl C.** - *Sigidwiki admin, β Tester, Signals expert* +* **Marco B.** - *macOS deployment, β Tester* +* **Francesco C., Pierpaolo P., Luca XYZ, Paolo XYZ, Daniele XYZ** - *β Tester* diff --git a/unused_installation_scripts/Windows/artemis3.ico b/unused_installation_scripts/Windows/artemis3.ico new file mode 100644 index 0000000..5677102 Binary files /dev/null and b/unused_installation_scripts/Windows/artemis3.ico differ diff --git a/unused_installation_scripts/Windows/deploy_win.bat b/unused_installation_scripts/Windows/deploy_win.bat new file mode 100644 index 0000000..b9dee6c --- /dev/null +++ b/unused_installation_scripts/Windows/deploy_win.bat @@ -0,0 +1,69 @@ +@echo off +echo =================================== +echo Artemis 3 Deploy Script +echo WINDOWS +echo =================================== +REM Check and gain admin permissions + IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( +>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" +) ELSE ( +>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" +) + +if '%errorlevel%' NEQ '0' ( + echo Requesting administrative privileges... + goto UACPrompt +) else ( goto gotAdmin ) + +:UACPrompt + echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" + set params= %* + echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs" + + "%temp%\getadmin.vbs" + del "%temp%\getadmin.vbs" + exit /B + +:gotAdmin + pushd "%CD%" + CD /D "%~dp0" + echo: + +REM Set the correct permissions for Artemis folder +set artemis_path=%~dp0..\.. +icacls "%artemis_path%" /grant %USERNAME%:(OI)(CI)F /T > log +echo Gaining admin privileges and set folder read/write permission... DONE! + +REM Download necessary libraries with pip3 +echo: +set choice=Y +set /p choice=Install the necessary Python libraries? [Y,N]... +echo: +if /I '%choice%'=='Y' pip3 install -r %~dp0requirements_win.txt --no-color >> log + +REM Generation of shortcut +echo: +set choice=Y +set /p choice=Create a desktop shortcut? [Y/N]... +if /I '%choice%'=='N' goto end + +IF EXIST "%artemis_path%\Artemis.py" ( + ren "%artemis_path%\Artemis.py" "Artemis.pyw" +) + +echo Set oWS = WScript.CreateObject("WScript.Shell") > CreateShortcut.vbs +echo sLinkFile = "%USERPROFILE%\Desktop\Artemis.lnk" >> CreateShortcut.vbs +echo Set oLink = oWS.CreateShortcut(sLinkFile) >> CreateShortcut.vbs +echo oLink.TargetPath = "%artemis_path%\Artemis.pyw" >> CreateShortcut.vbs +echo oLink.WorkingDirectory = "%artemis_path%" >> CreateShortcut.vbs +echo oLink.IconLocation = "%~dp0artemis3.ico" >> CreateShortcut.vbs +echo oLink.Save >> CreateShortcut.vbs +cscript /nologo CreateShortcut.vbs +del CreateShortcut.vbs +:end +echo: +echo ================================ +echo SETTING COMPLETE +echo ================================ +echo: +pause \ No newline at end of file diff --git a/unused_installation_scripts/Windows/requirements_win.txt b/unused_installation_scripts/Windows/requirements_win.txt new file mode 100644 index 0000000..98560a7 --- /dev/null +++ b/unused_installation_scripts/Windows/requirements_win.txt @@ -0,0 +1,7 @@ +pandas>=0.24.2 +certifi>=2019.6.16 +aiohttp>=3.5.4 +pygame>=1.9.6 +QtAwesome>=0.5.7 +urllib3>=1.25.3 +PyQt5>=5.12.3