Feat/file manager panel #32

Merged
BlackAngelTV merged 9 commits from feat/file-manager-panel into main 2026-11-09 08:52:36 +01:00
Showing only changes of commit a12a05e666 - Show all commits
+18 -4
View File
@@ -367,6 +367,18 @@ func prepend(env_var, path string) {
os.Setenv(env_var, path+val)
}
func python_exe() string {
switch runtime.GOOS {
case "linux":
return filepath.Join(root_dir(), "bin", "python")
case `darwin`:
return filepath.Join(root_dir(), macos_python)
default:
exit("Building is only supported on Linux and macOS")
}
return ""
}
func setup_to_run_python() (python string) {
root := root_dir()
for _, x := range os.Environ() {
@@ -379,18 +391,20 @@ func setup_to_run_python() (python string) {
case "linux":
prepend("LD_LIBRARY_PATH", filepath.Join(root, "lib"))
os.Setenv("PYTHONHOME", root)
python = filepath.Join(root, "bin", "python")
case `darwin`:
python = filepath.Join(root, macos_python)
default:
exit("Building is only supported on Linux and macOS")
}
return
return python_exe()
}
func build(args []string) {
chdir_to_base()
if _, err := os.Stat(folder); err != nil {
// Check the Python binary instead of the dependencies folder: the folder
// survives a git pull (it is gitignored, so a clone has none) but can
// contain only the cached tarball, which used to fail later with a
// cryptic missing Python error instead of downloading the bundle.
if _, err := os.Stat(python_exe()); err != nil {
dependencies(nil)
}
root := root_dir()