-
Notifications
You must be signed in to change notification settings - Fork 24
/
install.bat
executable file
·47 lines (33 loc) · 1.3 KB
/
install.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
42
43
44
45
46
47
@echo off
IF DEFINED %1 (
set APP_DIR_PATH=%1\.smockin
) ELSE (
set APP_DIR_PATH=%userprofile%\.smockin
)
setx SMOCKIN_DIR_PATH = %APP_DIR_PATH%
set DB_DIR_PATH=%APP_DIR_PATH%\db
set DB_DRIVER_DIR_PATH=%DB_DIR_PATH%\driver
set DB_DATA_DIR_PATH=%DB_DIR_PATH%\data
set H2_JAR_NAME=h2-2.3.232.jar
set DB_PROPS_FILE=db.properties
set APP_PROPS_FILE=app.properties
set DB_PLACEHOLDER_FILE=smockin_db.mv.db
IF EXIST %DB_DIR_PATH% (
echo sMockin is already installed : '%APP_DIR_PATH%'
) ELSE (
echo Installing .smockin config directory to user home...
mkdir %DB_DRIVER_DIR_PATH%
echo - Created directory %DB_DRIVER_DIR_PATH%
mkdir %DB_DATA_DIR_PATH%
echo - Created directory %DB_DATA_DIR_PATH%
copy install\%H2_JAR_NAME% %DB_DRIVER_DIR_PATH%\%H2_JAR_NAME%
echo - Added file %DB_DRIVER_DIR_PATH\%H2_JAR_NAME%
copy install\%DB_PROPS_FILE% %DB_DIR_PATH%\%DB_PROPS_FILE%
echo - Added file %DB_DIR_PATH%\%DB_PROPS_FILE%
copy install\%APP_PROPS_FILE% %APP_DIR_PATH%
echo - Added file %APP_DIR_PATH%\%APP_PROPS_FILE%
copy install\%DB_PLACEHOLDER_FILE% %DB_DATA_DIR_PATH%\%DB_PLACEHOLDER_FILE%
echo - Added file %DB_DATA_DIR_PATH%\%DB_PLACEHOLDER_FILE%
echo The default H2 DB has been installed
echo Please run start.bat to launch the Smockin Application
)