63 lines
1.6 KiB
Batchfile
63 lines
1.6 KiB
Batchfile
@echo off
|
|
REM Setup script for Google API Client library (Windows)
|
|
REM This script downloads and installs the Google API Client using Composer
|
|
REM
|
|
REM Usage: setup-vendor.bat
|
|
REM
|
|
|
|
echo ================================================
|
|
echo Informatiq Smart Google Pricing - Vendor Setup
|
|
echo ================================================
|
|
echo.
|
|
|
|
REM Check if composer is installed
|
|
where composer >nul 2>nul
|
|
if %errorlevel% neq 0 (
|
|
echo X Composer is not installed.
|
|
echo.
|
|
echo Please install Composer from https://getcomposer.org
|
|
echo Or manually download Google API Client from:
|
|
echo https://github.com/googleapis/google-api-php-client/releases
|
|
echo.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo √ Composer found
|
|
echo.
|
|
|
|
REM Check if vendor directory already exists with Google Client
|
|
if exist "vendor\google\apiclient\src\Google\Client.php" (
|
|
echo √ Google API Client is already installed
|
|
echo.
|
|
set /p reinstall="Do you want to reinstall? (y/N): "
|
|
if /i not "%reinstall%"=="y" (
|
|
echo Setup cancelled.
|
|
pause
|
|
exit /b 0
|
|
)
|
|
echo.
|
|
)
|
|
|
|
echo Installing Google API Client and dependencies...
|
|
echo.
|
|
|
|
REM Install dependencies
|
|
composer install --no-dev --optimize-autoloader
|
|
|
|
echo.
|
|
echo ================================================
|
|
echo √ Installation Complete!
|
|
echo ================================================
|
|
echo.
|
|
echo Google API Client has been installed to vendor\
|
|
echo.
|
|
echo Next steps:
|
|
echo 1. Upload the entire plugin directory to WordPress
|
|
echo 2. Activate the plugin
|
|
echo 3. Configure settings at WooCommerce ^> Smart Pricing
|
|
echo.
|
|
echo The plugin is now ready for distribution!
|
|
echo.
|
|
pause
|