25#include "hugin_config.h"
30#include <wx/filename.h>
32#include <wx/translation.h>
33#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
120 while (!queue->empty())
122 delete queue->back();
131#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
137 std::cerr << wxString::Format(
_(
"External program %s not found in the bundle, reverting to system path"), name.c_str()) << std::endl;
150#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
151 if (
config->Read(name +
"/Custom", 0l))
154 if (wxFileName::FileExists(
fn))
160 std::cerr << wxString::Format(
_(
"WARNING: External program %s not found as specified in preferences, reverting to bundled version"),
fn.c_str()) << std::endl;
163 if (name ==
"exiftool")
172 std::cerr << wxString::Format(
_(
"WARNING: External program %s not found in the bundle, reverting to system path"), name.c_str()) << std::endl;
182 std::cerr << wxString::Format(
_(
"WARNING: External program %s not found in the bundle, reverting to system path"), name.c_str()) << std::endl;
187 if (
config->Read(name +
"/Custom", 0l))
193 if (prog.IsAbsolute())
195 if (prog.FileExists())
212 std::cerr << wxString::Format(
_(
"WARNING: External program %s not found as specified in preferences, reverting to bundled version"), name.c_str()) << std::endl;
219#elif defined UNIX_SELF_CONTAINED_BUNDLE
221 if (wxFileName::FileExists(
bindir + name))
252 if (prog.IsAbsolute())
254 if (prog.FileExists())
256 return prog.GetFullPath();
262 const bool hasExt = prog.HasExt();
284 s =
s.Trim(
true).Trim(
false);
307 if (
tempDir.Last() != wxFileName::GetPathSeparator())
309 tempDir.Append(wxFileName::GetPathSeparator());
basic classes and function for queuing commands in wxWidgets
wxString GetComment() const
virtual wxString GetCommand() const
virtual bool Execute(bool dryRun)
virtual bool CheckReturnCode() const
virtual bool Execute(bool dryRun)
virtual bool CheckReturnCode() const
str wxEscapeFilename(const str &arg)
special escaping routine for CommandQueues
wxString GetExternalProgram(wxConfigBase *config, const wxString &bindir, const wxString &name)
return path and name of external program, which can be overwritten by the user
void CleanQueue(CommandQueue *queue)
clean the queue, delete all entries, but not the queue itself
bool RunCommandsQueue(CommandQueue *queue, size_t threads, bool dryRun)
execute the given, set environment variable OMP_NUM_THREADS to threads (ignored for 0) after running ...
wxString wxStringFromCDouble(double val, int precision)
convert double to wxString, it is always using a '.
std::vector< NormalCommand * > CommandQueue
const wxString GetSettingStringTranslated(wxConfigBase *setting, const wxString &name, const wxString defaultValue)
read a translated string from settings and remove all whitespaces
wxString GetInternalProgram(const wxString &bindir, const wxString &name)
return path and name of external program, which comes bundled with Hugin
const wxString GetConfigTempDir(const wxConfigBase *config)
return the temp dir from the preferences, ensure that it ends with path separator
const wxString GetSettingString(wxConfigBase *setting, const wxString &name, const wxString defaultValue)
read a string from setting and remove all whitespaces
wxString doubleTowxString(double d, int digits)
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.