-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup-gamemaker-devvit.bat
More file actions
69 lines (59 loc) · 2.09 KB
/
setup-gamemaker-devvit.bat
File metadata and controls
69 lines (59 loc) · 2.09 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
@echo off
setlocal enabledelayedexpansion
:: GameMaker to Devvit Setup Script
:: Usage: setup-gamemaker-devvit.bat "path\to\gamemaker\export\directory" "project-name"
if "%~1"=="" (
echo Error: Please provide the GameMaker export directory path
echo Usage: %0 "path\to\gamemaker\export\directory" "project-name"
echo Example: %0 "C:\path\to\mygame_12345_VM" "my-awesome-game"
exit /b 1
)
if "%~2"=="" (
echo Error: Please provide a project name
echo Usage: %0 "path\to\gamemaker\export\directory" "project-name"
echo Example: %0 "C:\path\to\mygame_12345_VM" "my-awesome-game"
exit /b 1
)
set GAMEMAKER_DIR=%~1
set PROJECT_NAME=%~2
:: Properly replace dash with underscore for subreddit name (needs to follow the pattern: ^[a-zA-Z][a-zA-Z0-9_]*$)
set "SUBREDDIT_NAME=%PROJECT_NAME:-=_%"
set RUNNER_DIR=%GAMEMAKER_DIR%\runner
set CLIENT_PUBLIC=%cd%\src\client\public
:: Check if GameMaker directory exists
if not exist "%GAMEMAKER_DIR%" (
echo Error: GameMaker directory does not exist: %GAMEMAKER_DIR%
exit /b 1
)
:: Check if runner directory exists
if not exist "%RUNNER_DIR%" (
echo Error: Runner directory does not exist: %RUNNER_DIR%
exit /b 1
)
:: Check if we're in a Devvit project directory
if not exist "src\client\public" (
echo Error: This doesn't appear to be a Devvit project directory
echo Make sure you're running this script from the root of your Devvit project
exit /b 1
)
echo Setting up GameMaker game in Devvit project...
echo GameMaker directory: %GAMEMAKER_DIR%
echo Project name: %PROJECT_NAME%
echo Devvit project: %cd%
:: Copy all files from runner directory to public directory
echo Copying GameMaker files to game directory...
xcopy "%RUNNER_DIR%\*" "%CLIENT_PUBLIC%\" /Y /Q
echo.
echo GameMaker game setup complete!
echo.
echo Project configured:
echo - Name: %PROJECT_NAME%
echo - GameMaker files: Copied
echo.
echo Next steps:
echo 1. Run "npm run dev" to start the development server
echo 2. Your GameMaker game should now load in the Devvit app
echo.
echo Files copied:
echo - Core runtime files → src\client\public\ (root level)
echo.