#include <stdarg.h>
#include <ctype.h>
#include <limits.h>
+#include <time.h>
// work arounds (centos)
#include <lzma.h>
#ifndef INT64_MAX
format_completion->lock("File::get_options");
switch( asset->format ) {
#ifdef HAVE_CIN_3RDPARTY
+#ifdef HAVE_LIBZMPEG
case FILE_AC3: FileAC3::get_parameters(parent_window, asset, format_window,
audio_options, video_options, edl);
break;
#endif
+#endif
#ifdef HAVE_DV
case FILE_RAWDV:
FileDV::get_parameters(parent_window, asset, format_window,
break; }
// format already determined
#ifdef HAVE_CIN_3RDPARTY
+#ifdef HAVE_LIBZMPEG
case FILE_AC3:
file = new FileAC3(this->asset, this);
break;
+#endif
#endif
case FILE_SCENE:
file = new FileScene(this->asset, this);
getenv_path(env_path, path);
setenv(var, env_path, overwrite);
}
-
-void File::init_cin_path()
+/**
+* @brief Set various environment variables to pass constant values to
+* forks, shell scripts, and other parts of CinGG.
+*/
+void File::init_cin_env_vars()
{
- char env_path[BCTEXTLEN], env_pkg[BCTEXTLEN];
-// these values are advertised for forks/shell scripts
+ char env_path[BCTEXTLEN], env_pkg[BCTEXTLEN], build_name[32], dateTimeText[32];
+ struct stat st;
+ struct tm *dateTime;
get_exe_path(env_path, env_pkg);
setenv_path("CIN_PATH", env_path, 1);
setenv_path("CIN_PKG", env_pkg, 1);
setenv_path("CIN_LADSPA", LADSPA_DIR, 0);
setenv_path("CIN_LOCALE", LOCALE_DIR, 0);
setenv_path("CIN_BROWSER", CIN_BROWSER, 0);
+// Create env_var CINGG_BUILD for use when running as AppImage
+ stat(env_path, &st);
+ dateTime = gmtime(&st.st_mtime);
+ strftime(dateTimeText, sizeof(dateTimeText), "%Y%m%d_%H%M%S", dateTime);
+ snprintf(build_name, sizeof(build_name), "CINGG_%s", dateTimeText);
+ build_name[sizeof(build_name) - 1] = 0;
+ setenv_path("CINGG_BUILD", build_name, 1);
}