-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
81 lines (66 loc) · 2.27 KB
/
Copy pathsetup.bat
File metadata and controls
81 lines (66 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@echo off
echo.
echo ========================================================
echo Welcome to the Dhaher Trading Plan AI Setup Script
echo ========================================================
echo.
echo Checking for dependencies...
where /q flutter
if %errorlevel% neq 0 (
echo [ERROR] Flutter is not installed. Please install it from https://flutter.dev
exit /b
)
where /q node
if %errorlevel% neq 0 (
echo [ERROR] Node.js is not installed. Please install it from https://nodejs.org
exit /b
)
where /q pip
if %errorlevel% neq 0 (
echo [ERROR] pip is not installed. Please ensure Python and pip are installed.
exit /b
)
echo Dependencies found.
echo.
echo ========================================================
echo Installing packages...
echo ========================================================
echo.
echo Installing Flutter packages...
cd flutter_app
call flutter pub get
cd ..
echo Installing WhatsApp Bot packages...
cd whatsapp_bot
call npm install
cd ..
echo Installing Python client packages...
call pip install -r python_client/requirements.txt
echo.
echo ========================================================
echo API Key Configuration
echo ========================================================
echo.
set /p APPS_SCRIPT_URL="Enter your Google Apps Script URL: "
set /p LLM7_API_KEY="Enter your LLM7 API Key: "
set /p NEWS_API_KEY="Enter your NewsAPI.org Key: "
set /p FINNHUB_API_KEY="Enter your Finnhub.io Key: "
set /p WA_BOT_URL="Enter your WhatsApp Bot Server URL: "
echo.
echo ========================================================
echo Configuring files...
echo ========================================================
echo.
powershell -Command "(gc flutter_app/lib/services/api_service.dart) -replace 'https://script.google.com/macros/s/YOUR_DEPLOYMENT_ID/exec', '%APPS_SCRIPT_URL%' | Out-File -encoding ASCII flutter_app/lib/services/api_service.dart"
(
echo LLM7_API_KEY=%LLM7_API_KEY%
echo NEWS_API_KEY=%NEWS_API_KEY%
echo FINNHUB_API_KEY=%FINNHUB_API_KEY%
echo WHATSAPP_API_URL=%WA_BOT_URL%
) > google_apps_scripts/properties.env
echo.
echo ========================================================
echo SETUP COMPLETE!
echo You can now run the application using launch.bat
echo ========================================================
echo.