WSL/SLF GitLab Repository
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
inishell
Commits
b97a8b7a
Commit
b97a8b7a
authored
Dec 16, 2021
by
Mathias Bavay
Browse files
Fixed some PATH limitations on MacOS
parent
fbcc765d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/os.cc
View file @
b97a8b7a
...
...
@@ -183,7 +183,13 @@ QString getExtraPath(const QString& appname)
#if defined Q_OS_MAC
QString
Appname
(
appname
);
Appname
[
0
]
=
Appname
[
0
].
toUpper
();
const
QString
extra_path
(
":"
+
home
+
"/bin:"
+
home
+
"/usr/bin:"
+
home
+
"/src/"
+
appname
+
"/bin:"
+
desktop
+
"/"
+
appname
+
"/bin:"
+
"/Applications/"
+
appname
+
".app/Contents/bin:"
+
"/Applications/"
+
Appname
+
".app/Contents/bin:"
+
"/Applications/"
+
appname
+
"/bin:"
+
"/Applications/"
+
Appname
+
"/bin:"
+
own_path
);
const
bool
already_capitalized
=
(
Appname
[
0
]
==
appname
[
0
]);
//was the first letter of appname already capitalized?
const
QString
user_paths
(
home
+
"/bin:"
+
home
+
"/usr/bin:"
+
home
+
"/src/"
+
appname
+
"/bin:"
+
desktop
+
"/"
+
appname
+
"/bin"
);
const
QString
system_paths
=
(
already_capitalized
)
?
"/Applications/"
+
appname
+
".app/Contents/bin:"
+
"/Applications/"
+
appname
+
"/bin"
:
"/Applications/"
+
appname
+
".app/Contents/bin:"
+
"/Applications/"
+
Appname
+
".app/Contents/bin:"
+
"/Applications/"
+
appname
+
"/bin:"
+
"/Applications/"
+
Appname
+
"/bin"
;
const
QString
extra_path
(
":"
+
user_paths
+
":"
+
system_paths
+
":"
+
own_path
+
":"
+
own_path
+
"/../../.."
);
//own_path + getting out of a .app
return
extra_path
;
#endif
#if !defined Q_OS_WIN && !defined Q_OS_MAC
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment