-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_win.sh
50 lines (43 loc) · 1.08 KB
/
build_win.sh
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
#!/bin/bash
love_title=GoingHomeRevisited.love
dir_source=src
dir_output=output_dev
file_makelove=makelove.toml
cmd="/mnt/c/Windows/System32/cmd.exe"
path_love="C:\Program Files\LOVE"
path_game='Z:\home\flamendless\GoingHomeRevisited\release\love\'${love_title}
path_prof_viewer="Z:\home\flamendless\GoingHomeRevisited\modules\jprof"
echo $path_game
function win32()
{
cd "$dir_output" && makelove --config ../"$file_makelove" win32
}
function win64()
{
cd "$dir_output" && makelove --config ../"$file_makelove" win64
}
function love_only()
{
if [ ! -d release ]; then
mkdir -p ../release/love
fi
cd "$dir_output" && zip -9ru "../release/love/${love_title}" . -x "${love_title}"
}
function prof_viewer()
{
$cmd /c "cd $path_love & lovec.exe $path_prof_viewer goinghomerevisited prof.mpack"
}
function run()
{
echo "Running build_win.sh"
# TODO change this when in RELEASE mode
# win64
love_only
$cmd /c start cmd.exe /c "cd $path_love && lovec.exe $path_game & pause"
echo "Completed build_win.sh"
}
if [ $# -eq 0 ]; then
echo "Must pass command: win32, win64, run"
else
"$@"
fi