Package: abacusSoftware
AbacusSoftwareAbacus Software is a suite of tools built to ensure your experience with Tausand's coincidence counters becomes simplified.Written in Python3, abacusSoftware relies on the following modules:pyAbacuspyqtgraphNumPyPyQt5pyserialqtmodernPreviewA quick demo video to preview this software is available at:https://youtu.be/c4QO8p1WeSEInstallationabacusSoftwarecan be installed usingpipas:pip install abacusSoftwareOr from GitHubpip install git+https://github.com/Tausand-dev/abacusSoftware.gitExecute abacusSoftwareOn a terminal or command prompt typeabacusSoftwareGrant port access on LinuxMost Linux configurations have a dialout group for full and direct access to serial ports. By adding your user account to this group you will have the necessary permissions for Abacus Software to communicate with the serial ports.Open Terminal.Enter the following command, replacing<username>with the name of your account.sudo usermod -a -G dialout <username>Sign in and out for the changes to take effect.For developersCreating a virtual environmentRun the following code to create a virtual environment called.venvpython -m venv .venvActivateOn Unix systems:source .venv/bin/activateOn Windows:.venv\Scripts\activateDeactivatedeactivateInstalling packagesAfter the virtual environment has been activated, install required packages by using:python -m pip install -r requirements.txtFreezing codeAfter activating the virtual environmentWindowsRun the following commandpyinstaller --additional-hooks-dir installers/pyinstaller_hooks/ --name AbacusSoftware --onefile --noconsole -i abacusSoftware/GUI/images/abacus_small.ico test.pyTwo folders will be created: build and dist. Insidedistyou'll find the.exefile. To create an installer, first install Inno Setup fromhttps://jrsoftware.org/isinfo.php#stable. Then, using the File Explorer, go to the folderinstallersand double-clickinstaller_builder.issor open it from Inno Setup if it is already opened. Click on the play icon and then follow the process, which includes the creation of the installer and the installation itself.The installer will be saved in a folder calledOutput.MacOSRun the following commandpyinstaller --additional-hooks-dir installers/pyinstaller_hooks/ --name AbacusSoftware --onefile --noconsole -i abacusSoftware/GUI/images/Abacus_small.png test.pyTwo folders will be created: build and dist. Insidedistyou'll find the.appfile. This file can be run from a console by executing the command
To change the icon of the.appfile follow the instructions herehttps://appleinsider.com/articles/21/01/06/how-to-change-app-icons-on-macosLinuxRun the following commandpyinstaller --additional-hooks-dir installers/pyinstaller_hooks/ --name AbacusSoftware --onefile --noconsole -i abacusSoftware/GUI/images/Abacus_small.png test.pyTwo folders will be created: build and dist. Inside dist you'll find the executable file. This file can be run from a console by executing the command./AbacusSoftwareIf it doesn't run, make sure it has execute permissions. In case it doesn't runchmod +x AbacusSoftwareand then try again. The executable file could be used to create a Desktop entry so it can be lauched as an application (for example in Gnome, an icon could be assigned)To create an AppImage that can be run from multiple Linux distributions and be launch by double clicking, follow the next steps.Create the following folder path:
AbacusSoftware.AppDir/usr/binPlace the executable inside the bin folderPlace the icon Abacus_small.png located at abacusSoftware/GUI/images/Abacus_small.png inside AbacusSoftware.AppDirCreate a file called AbacusSoftware.desktop inside AbacusSoftware.AppDirEdit the.desktopfile with the following[Desktop Entry]
Name=AbacusSoftware
Exec=AbacusSoftware
Icon=Abacus_small
Type=Application
Categories=Utility;Give execution permisions to the.desktopfile:chmod +x AbacusSoftware.desktopCreate a script calledAppRunwith the following contents#!/bin/bash
SELF=$(readlink -f "$0")
HERE=${SELF%/*}
EXEC="${HERE}/usr/bin/AbacusSoftware"
exec "${EXEC}"Give execution permisions to theAppRunfile:chmod +x AppRun. After this step, the app should run after doing./AppRunon a Terminal.For 64-bit architecture, download appimagetool-x86_64.AppImage fromhttps://github.com/AppImage/AppImageKit/releases/and give execution permisions to it.Place appimagetool outside AbacusSoftware.AppDir and runARCH=x86_64 ./appimagetool-x86_64.AppImage AbacusSoftware.AppDirThe fileAbacusSoftware-x86_64.AppImagewill be created. This file can be opened by double clicking it.Generating images and iconsIn linux,cdintoabacusSoftware/GUI/images/, where you'll find the image files that will be used in the application. You'll also find a .qrc file which specifies any image that you want to include. If you want to use new images you'll need to specify their name inside such file. Next execute the following commandpyrcc5 -o __GUI_images__.py images.qrcThis will update the__GUI_images__.pyfile, which needs to be copied into the folderabacusSoftwareand replace the file located there with the same name. Now the image resources can be called from within the code by doing, for example,splash_pix = QtGui.QPixmap(':/splash.png').scaledToWidth(600)Fixing pyinstaller:https://github.com/pyinstaller/pyinstaller/commit/082078e30aff8f5b8f9a547191066d8b0f1dbb7ehttps://github.com/pyinstaller/pyinstaller/commit/59a233013cf6cdc46a67f0d98a995ca65ba7613a