-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
139 lines (121 loc) · 3.56 KB
/
install.bat
File metadata and controls
139 lines (121 loc) · 3.56 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
@echo off
REM Cross-platform installation script for Lua Game Example (Windows)
REM This script will help you set up all required dependencies
setlocal enabledelayedexpansion
echo ===================================================================
echo Lua Game Example - Installation Script (Windows)
echo ===================================================================
echo.
REM Check if LOVE2D is installed
echo -------------------------------------------------------------------
echo Step 1: Checking LOVE2D installation
echo -------------------------------------------------------------------
where love >nul 2>nul
if %errorlevel% equ 0 (
echo [OK] LOVE2D is installed
love --version 2>nul
) else (
echo [MISSING] LOVE2D is not installed
echo.
echo To install LOVE2D on Windows:
echo 1. Visit https://love2d.org/
echo 2. Download the Windows installer
echo 3. Run the installer
echo 4. Restart this script after installation
echo.
pause
)
echo.
REM Check if Node.js is installed
echo -------------------------------------------------------------------
echo Step 2: Checking Node.js installation
echo -------------------------------------------------------------------
where node >nul 2>nul
if %errorlevel% equ 0 (
echo [OK] Node.js is installed
node --version
) else (
echo [MISSING] Node.js is not installed
echo.
echo To install Node.js on Windows:
echo 1. Visit https://nodejs.org/
echo 2. Download the Windows installer (LTS version recommended)
echo 3. Run the installer and follow the prompts
echo 4. Restart this script after installation
echo.
pause
goto :summary
)
echo.
REM Install NPM dependencies
echo -------------------------------------------------------------------
echo Step 3: Installing Node.js dependencies
echo -------------------------------------------------------------------
if exist "integration\package.json" (
cd integration
echo Installing dependencies in integration\ directory...
call npm install
if %errorlevel% equ 0 (
echo [DONE] Node.js dependencies installed
) else (
echo [ERROR] Failed to install Node.js dependencies
)
cd ..
) else (
echo [WARNING] package.json not found in integration\
)
echo.
:summary
REM Verification
echo ===================================================================
echo Installation Summary
echo ===================================================================
echo.
where love >nul 2>nul
if %errorlevel% equ 0 (
echo [OK] LOVE2D: Installed
) else (
echo [MISSING] LOVE2D: Not installed
)
where node >nul 2>nul
if %errorlevel% equ 0 (
echo [OK] Node.js: Installed
node --version
) else (
echo [MISSING] Node.js: Not installed
)
where npm >nul 2>nul
if %errorlevel% equ 0 (
echo [OK] npm: Installed
npm --version
) else (
echo [MISSING] npm: Not installed
)
if exist "integration\node_modules" (
echo [OK] Node dependencies: Installed
) else (
echo [MISSING] Node dependencies: Not installed
)
echo.
echo ===================================================================
echo Next Steps
echo ===================================================================
echo.
echo To run the LOVE2D game:
echo love .
echo.
echo To run JavaScript integration examples:
echo cd integration
echo node lua-runner.js
echo.
echo To run TypeScript integration examples:
echo cd integration
echo npx ts-node lua-bridge.ts
echo.
echo To build TypeScript to Lua:
echo cd integration
echo npx tstl
echo.
echo For more information, see README.md
echo.
pause