Agrident Database Converter Setup Script - Documentation
1. Introduction
This Database_Converter_Install.py script is designed to simplify the setup process for the Agrident Database Converter tool on a Windows computer. It automatically downloads the necessary application files and dependencies from the official source and creates a convenient desktop shortcut.
2. Prerequisites
- Operating System: Windows
- Python: A working Python 3 installation must be present on the system. The script uses
pip to install required Python packages if they are not already available.
- Internet Connection: Required to download the tool files and Python packages.
- Permissions: The script needs permission to install Python packages, create directories (
C:\Allflex\Reader), download files, and create a desktop shortcut. It's recommended to run it with appropriate privileges if needed.
3. How it Works
- Dependency Check: The script first checks if required Python libraries (
requests, winshell, pywin32, openpyxl) are installed. If not, it attempts to install them using pip. If this fails, the script will stop. Note: If run as a compiled .exe in the future, these might be bundled.
- File List Download: It fetches a list of required files and their structure from
http://reader.podlecki.pl/converter/default/fileList.json.
- Directory Creation: It creates the target directory
C:\Allflex\Reader if it doesn't exist.
- File Download: Based on the file list, it downloads all necessary application files into the
C:\Allflex\Reader directory, recreating the required subfolder structure.
- Shortcut Creation: It creates a shortcut on the current user's Desktop named
AWR & APR - Database Update.lnk. This shortcut points to C:\Allflex\Reader\START.cmd, which is presumably the main executable or batch file to launch the actual Database Converter tool. The shortcut uses the icon located at C:\Allflex\Reader\icons\logo.ico.
4. Usage
- Download the
Database_Converter_Install.py script.
- Open a Command Prompt or PowerShell.
- Navigate to the directory where you saved the script using the
cd command.
- Run the script using Python:
python Database_Converter_Install.py
- Follow any on-screen prompts (mainly related to package installation if needed).
- Once finished, you should find the complete toolset in
C:\Allflex\Reader and a new shortcut on your Desktop.
5. Troubleshooting
- Package Installation Fails: Ensure
pip is working correctly and you have the necessary permissions. You might need to run the command prompt as an administrator. Check your internet connection.
- Download Fails: Verify your internet connection and ensure the download URLs (
http://reader.podlecki.pl/...) are accessible. Check for firewalls or proxy issues.
- Shortcut Creation Fails: Ensure you have permissions to write to the Desktop.