-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.scm
66 lines (54 loc) · 2.06 KB
/
build.scm
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
@; ;; Tell Gambit to pass along remaining command line args to this script
;; Copyright (c) 2020 by David Wilson, All Rights Reserved.
;;
;; This file is part of Crash The Stack.
;; https://github.com/substratic/crash-the-stack
;;
;; Crash The Stack is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; Crash The Stack is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with Crash The Stack. If not, see <https://www.gnu.org/licenses/>.
(import (github.com/substratic build))
(define crash-the-stack
(make-project
name: "Crash The Stack"
exe-name: "crash-the-stack"
version: "0.1.0"
output-path:
(lambda (target)
(if (equal? target 'MacOS)
"./dist/crash-the-stack.app/Contents/MacOS"
"./dist"))
search-paths: '("src/")
files:
(lambda (mode target)
(if (equal? mode 'build)
'("src/release.scm")
'("src/dev.scm")))
modules: '(;; Components
"crash/components/menu"
"crash/components/editor"
;; Controllers
"crash/controllers/wsad"
"crash/controllers/hack"
"crash/controllers/mouse"
;; Game-specific code
"crash/tile"
"crash/stack"
"crash/modes/game"
"crash/modes/title-screen"
;; Program entrypoint
"crash/main")
test-files: '("src/crash/stack.test.scm")))
(cond
((member "--dev" (command-line)) (run-interactively crash-the-stack))
((member "--test" (command-line)) (test-project crash-the-stack))
(else (build-project crash-the-stack)))