forked from hexdump0815/surge-arm-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-to-usr-local.patch
79 lines (75 loc) · 3.32 KB
/
install-to-usr-local.patch
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
67
68
69
70
71
72
73
74
75
76
77
78
diff --git a/src/common/SurgeStorage.cpp b/src/common/SurgeStorage.cpp
index 164189ce..6fbdb5d9 100644
--- a/src/common/SurgeStorage.cpp
+++ b/src/common/SurgeStorage.cpp
@@ -272,27 +272,27 @@ SurgeStorage::SurgeStorage(std::string suppliedDataPath) : otherscene_clients(0)
/*
** If local directory doesn't exists - we probably came here through an installer -
- ** check for /usr/share/surge and use /usr/share/Surge as our last guess
+ ** check for /usr/local/share/surge and use /usr/local/share/Surge as our last guess
*/
if (!fs::is_directory(string_to_path(datapath)))
{
if (fs::is_directory(string_to_path(std::string(Surge::Build::CMAKE_INSTALL_PREFIX) +
- "/share/surge")))
+ "/local/share/surge")))
{
- datapath = std::string() + Surge::Build::CMAKE_INSTALL_PREFIX + "/share/surge";
+ datapath = std::string() + Surge::Build::CMAKE_INSTALL_PREFIX + "/local/share/surge";
}
else if (fs::is_directory(string_to_path(
- std::string(Surge::Build::CMAKE_INSTALL_PREFIX) + "/share/Surge")))
+ std::string(Surge::Build::CMAKE_INSTALL_PREFIX) + "/local/share/Surge")))
{
- datapath = std::string() + Surge::Build::CMAKE_INSTALL_PREFIX + "/share/Surge";
+ datapath = std::string() + Surge::Build::CMAKE_INSTALL_PREFIX + "/local/share/Surge";
}
else
{
- std::string systemDataPath = "/usr/share/surge/";
+ std::string systemDataPath = "/usr/local/share/surge/";
if (fs::is_directory(string_to_path(systemDataPath)))
datapath = systemDataPath;
else
- datapath = "/usr/share/Surge/";
+ datapath = "/usr/local/share/Surge/";
}
}
}
@@ -478,7 +478,7 @@ bailOnPortable:
<< "%ProgramData%\\Surge directory."
#endif
#if LINUX
- << "/usr/share/Surge or ~/.local/share/Surge."
+ << "/usr/local/share/Surge or ~/.local/share/Surge."
#endif
<< " Please reinstall Surge and try again!";
Surge::UserInteractions::promptError(oss.str(), "Surge Resources Loading Error");
diff --git a/build-linux.sh b/build-linux.sh
index 7100d53e..ec0b13f9 100755
--- a/build-linux.sh
+++ b/build-linux.sh
@@ -28,7 +28,7 @@ Options:
vst2, vst3, lv2 or headless.
-d, --debug Use a debug version.
-l, --local Install/uninstall built assets under /home instead
- of /usr
+ of /usr/local
EOHELP
}
@@ -266,11 +266,11 @@ if [[ ! -z "$option_local" ]]; then
headless_dest_path="$HOME/bin"
data_path="$HOME/.local/share/surge"
else
- vst2_dest_path="/usr/lib/vst"
- vst3_dest_path="/usr/lib/vst3"
- lv2_dest_path="/usr/lib/lv2"
- headless_dest_path="/usr/bin"
- data_path="/usr/share/surge"
+ vst2_dest_path="/usr/local/lib/vst"
+ vst3_dest_path="/usr/local/lib/vst3"
+ lv2_dest_path="/usr/local/lib/lv2"
+ headless_dest_path="/usr/local/bin"
+ data_path="/usr/local/share/surge"
fi
case $1 in