@echo off echo ==================================== echo Logix Designer SDK Setup for Windows echo ==================================== echo. REM Check if Python 3.12 is available py -3.12 --version >nul 2>&1 if errorlevel 1 ( echo ERROR: Python 3.12 is not installed or not in PATH echo This compilation system requires Python 3.12 specifically echo Please install Python 3.12 and add it to your PATH echo Download from: https://www.python.org/downloads/ echo During installation, check "Add Python to PATH" pause exit /b 1 ) echo ✓ Python 3.12 found py -3.12 --version echo. REM Check if pip is available with Python 3.12 py -3.12 -m pip --version >nul 2>&1 if errorlevel 1 ( echo ERROR: pip is not available with Python 3.12 echo Please ensure pip is installed with Python 3.12 pause exit /b 1 ) echo ✓ pip found for Python 3.12 py -3.12 -m pip --version echo. REM Check if the wheel file exists set WHEEL_FILE=logix_designer_sdk-2.0.1-py3-none-any.whl if exist "%WHEEL_FILE%" ( echo ✓ Found SDK wheel file: %WHEEL_FILE% ) else ( echo ERROR: SDK wheel file not found: %WHEEL_FILE% echo. echo Please ensure the wheel file is in this directory: echo %CD% echo. echo The wheel file should be copied from the project root. pause exit /b 1 ) echo. echo Installing Logix Designer SDK with Python 3.12... echo Command: py -3.12 -m pip install "%WHEEL_FILE%" echo. py -3.12 -m pip install "%WHEEL_FILE%" if errorlevel 1 ( echo. echo ==================================== echo ERROR: SDK installation failed! echo ==================================== echo. echo This could be due to: echo 1. Python 3.12 compatibility issues echo 2. Missing dependencies echo 3. Permission issues (try running as administrator) echo 4. Corrupted wheel file echo. echo Try running this batch file as administrator. echo. pause exit /b 1 ) echo. echo ==================================== echo Testing SDK installation... echo ==================================== py -3.12 -c "import logix_designer_sdk; print('✓ Logix Designer SDK successfully imported')" if errorlevel 1 ( echo ERROR: SDK import test failed echo The package was installed but cannot be imported pause exit /b 1 ) echo. echo ==================================== echo SUCCESS: Logix Designer SDK installed! echo ==================================== echo. echo You can now run PLC L5X to ACD compilation. echo. echo IMPORTANT NOTES: echo 1. Make sure Logix Designer is installed on this Windows machine echo 2. The SDK requires Logix Designer to be present for compilation echo 3. Large L5X files may take 15-20 minutes to compile echo. echo Next steps: echo 1. Run your project's compilation batch file echo 2. Or use: py -3.12 l5x_to_acd.py "your_file.L5X" echo. pause