-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.toml
58 lines (48 loc) · 1.69 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
env_scripts = [
"""
#!@duckscript
if is_empty ${GW2_ADDON_PATH}
if is_empty ${GW2_PATH}
steam_path = set "C:/Program Files (x86)/Steam/steamapps/common/Guild Wars 2"
if is_path_exists ${steam_path}
GW2_PATH = set ${steam_path}
else
GW2_PATH = set "C:/Program Files/Guild Wars 2"
end
set_env GW2_PATH ${GW2_PATH}
end
addon_manager_path = join_path ${GW2_PATH} addons/arcdps
addon_manager_arcdps = join_path ${addon_manager_path} gw2addon_arcdps.dll
nexus_path = join_path ${GW2_PATH} addons
nexus_arcdps1 = join_path ${nexus_path} arcdps.dll
nexus_arcdps2 = join_path ${nexus_path} nexus_arcdps.dll
if is_path_exists ${addon_manager_arcdps}
echo "Loader: Addon Manager"
GW2_ADDON_PATH = set ${addon_manager_path}
elseif is_path_exists ${nexus_arcdps1} or is_path_exists ${nexus_arcdps2}
echo "Loader: Nexus"
GW2_ADDON_PATH = set ${nexus_path}
else
echo "Loader: ArcDPS"
GW2_ADDON_PATH = set ${GW2_PATH}
end
set_env GW2_ADDON_PATH ${GW2_ADDON_PATH}
end
"""
]
[tasks.copy-release]
script = "cp \"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/release/${CARGO_MAKE_CRATE_NAME}.dll\" \"${GW2_ADDON_PATH}\""
script_runner = "@shell"
[tasks.copy-debug]
script = "cp \"${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/debug/${CARGO_MAKE_CRATE_NAME}.dll\" \"${GW2_ADDON_PATH}\""
script_runner = "@shell"
[tasks.remove]
script = "rm \"${GW2_ADDON_PATH}/${CARGO_MAKE_CRATE_NAME}.dll\""
script_runner = "@shell"
[tasks.install]
run_task = { name = ["build-release", "copy-release"] }
[tasks.uninstall]
alias = "remove"
[tasks.dev]
run_task = { name = ["build", "copy-debug"] }
watch = true