rework android-rmt display, add a few buttons
[goodguy/history.git] / cinelerra-5.0 / cinelerra / main.C
index e13cbabe5dd830f1cc605a8624946f1e72f4b101..bba65b7651c30b0a21a78af301b8f279775e6645 100644 (file)
@@ -22,8 +22,8 @@
 #include "batchrender.h"
 #include "bcsignals.h"
 #include "edl.h"
+#include "file.inc"
 #include "filexml.h"
-#include "fileserver.h"
 #include "filesystem.h"
 #include "language.h"
 #include "langinfo.h"
@@ -91,25 +91,6 @@ public:
 };
 
 
-void get_exe_path(char *result)
-{
-// Get executable path
-       pid_t pid = getpid();
-       char proc_path[BCTEXTLEN];
-       int len = 0;
-       result[0] = 0;
-       sprintf(proc_path, "/proc/%d/exe", pid);
-       if((len = readlink(proc_path, result, BCTEXTLEN)) >= 0)
-       {
-               result[len] = 0;
-//printf("Preferences::Preferences %d %s\n", __LINE__, result);
-               char *ptr = strrchr(result, '/');
-               if(ptr) *ptr = 0;
-       }
-
-}
-
-
 int main(int argc, char *argv[])
 {
 // handle command line arguments first
@@ -125,6 +106,7 @@ int main(int argc, char *argv[])
        char batch_path[BCTEXTLEN];
        char locale_path[BCTEXTLEN];
        char exe_path[BCTEXTLEN];
+       char env_path[BCTEXTLEN];
        int nice_value = 20;
        int start_remote_control = 0;
        config_path[0] = 0;
@@ -134,6 +116,8 @@ int main(int argc, char *argv[])
 
 
        get_exe_path(exe_path);
+       snprintf(env_path, sizeof(env_path), "CINELERRA_PATH=%s", exe_path);
+       putenv(env_path);
        sprintf(locale_path, "%s%s", exe_path, LOCALEDIR);
 
 
@@ -364,7 +348,6 @@ int main(int argc, char *argv[])
                        BatchRenderThread *thread = new BatchRenderThread;
                        thread->start_rendering(config_path,
                                batch_path);
-                       delete MWindow::file_server;
                        break;
                }