-
Notifications
You must be signed in to change notification settings - Fork 0
/
StartDevelopmentServers.bat
41 lines (33 loc) · 1.41 KB
/
StartDevelopmentServers.bat
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
@echo off
rem # Initialization
SET basePath=%~dp0
rem ## Copy initial database files if not already existing
SET initDatabaseDataSourceDir=%basePath:~0,-1%\DevelopmentServers\MySQL\initialData\clanmanager
SET initDatabaseDataTargetDir=%basePath:~0,-1%\DevelopmentServers\MySQL\mysql_mini_server_11\udrive\data\clanmanager
IF NOT EXIST %initDatabaseDataTargetDir% (
mkdir %initDatabaseDataTargetDir%
xcopy %initDatabaseDataSourceDir% %initDatabaseDataTargetDir% /s > nul
)
rem # Start MySQL server
SET mysqlStartBatch=%basePath:~0,-1%\DevelopmentServers\MySQL\mysql_mini_server_11\mysql_start.bat
call %mysqlStartBatch% > nul
rem # Start PHP Server
cd DevelopmentServers\PHP\php-5.3.0-Win32-VC6-x86
SET phpStartExecutable=%basePath:~0,-1%\DevelopmentServers\PHP\php-5.3.0-Win32-VC6-x86\QuickPHP.exe /Minimized /Start
start %phpStartExecutable% > nul
cd ..
cd ..
rem # Show intermediate message
echo If no error messages occured, the servers should be running now.
echo To start the application, type http://localhost:5723 into your webbrowser.
echo To terminate the application, press enter twice in this window.
pause
pause
rem # Stop PHP Server
taskkill /f /im QuickPHP.exe > nul
rem # Stop MySQL Server
SET mysqlStopBatch=%basePath:~0,-1%\DevelopmentServers\MySQL\mysql_mini_server_11\mysql_stop.bat
call %mysqlStopBatch% > nul
rem # Show goodbye message
echo If no error messages occured, the servers should be stopped now.
pause