forked from Zerthox/arcdps-food-reminder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
60 lines (48 loc) · 1.52 KB
/
Makefile.toml
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
env_scripts = [
"""
#!@duckscript
if is_empty ${GW2_PATH}
GW2_PATH = set "C:/Program Files/Guild Wars 2"
steam_path = set "C:/Program Files (x86)/Steam/steamapps/common/Guild Wars 2"
if get_env GW2_STEAM
GW2_PATH = set ${steam_path}
elseif is_empty ${GW2_STEAM}
if is_path_exists ${steam_path}
GW2_PATH = set ${steam_path}
end
end
addon_path = join_path ${GW2_PATH} addons/arcdps
has_addon_manager = set false
if not is_empty ${GW2_ADDON_MANAGER}
has_addon_manager = get_env GW2_ADDON_MANAGER
else
arcdps_path = join_path ${addon_path} gw2addon_arcdps.dll
has_addon_manager = is_path_exists ${arcdps_path}
end
if ${has_addon_manager}
GW2_PATH = set ${addon_path}
end
set_env GW2_PATH ${GW2_PATH}
end
"""
]
[tasks.build-demo]
script = "cargo build --release --features demo"
[tasks.copy-release]
script = "cp \"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/release/${CARGO_MAKE_CRATE_NAME}.dll\" \"${GW2_PATH}\""
script_runner = "@shell"
[tasks.copy-debug]
script = "cp \"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/debug/${CARGO_MAKE_CRATE_NAME}.dll\" \"${GW2_PATH}\""
script_runner = "@shell"
[tasks.remove]
script = "rm \"${GW2_PATH}/${CARGO_MAKE_CRATE_NAME}.dll\""
script_runner = "@shell"
[tasks.install]
run_task = { name = ["build-release", "copy-release"] }
[tasks.uninstall]
alias = "remove"
[tasks.demo]
run_task = { name = ["build-demo", "copy-release"] }
[tasks.dev]
run_task = { name = ["build", "copy-debug"] }
watch = true