-
Notifications
You must be signed in to change notification settings - Fork 4
/
hugin-bundle.patch
56 lines (53 loc) · 1.83 KB
/
hugin-bundle.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff -r -c hugin/src/hugin1/icpfind/AutoCtrlPointCreator.cpp hugin-new/src/hugin1/icpfind/AutoCtrlPointCreator.cpp
*** hugin/src/hugin1/icpfind/AutoCtrlPointCreator.cpp Sat Nov 3 19:12:42 2018
--- hugin-new/src/hugin1/icpfind/AutoCtrlPointCreator.cpp Sat Nov 3 23:57:29 2018
***************
*** 36,41 ****
--- 36,42 ----
#include <hugin_utils/platform.h>
#include <wx/app.h>
+ #include <wx/stdpaths.h>
#include "hugin/config_defaults.h"
#include "panodata/StandardImageVariableGroups.h"
#include "icpfind/AutoCtrlPointCreator.h"
***************
*** 85,91 ****
else
{
wxString cmdline=prog+wxT(" ")+args;
! return wxExecute(cmdline,wxEXEC_SYNC | wxEXEC_MAKE_GROUP_LEADER);
};
};
--- 86,98 ----
else
{
wxString cmdline=prog+wxT(" ")+args;
! wxArrayString output;
! int ret = wxExecute(cmdline,output,wxEXEC_SYNC | wxEXEC_MAKE_GROUP_LEADER);
! std::cout << cmdline << std::endl;
! std::cout << "Output:" << std::endl;
! for ( size_t n=0; n < output.GetCount(); ++n )
! std::cout << output.Item(n) << std::endl;
! return ret;
};
};
***************
*** 378,383 ****
--- 385,401 ----
}
// create suitable command line..
wxString autopanoExe = GetProgPath(setting.GetProg());
+ #if defined UNIX_SELF_CONTAINED_BUNDLE
+ {
+ wxFileName autopanoExeName = autopanoExe;
+ if( autopanoExeName.IsRelative() ) {
+ wxFileName exePath(wxStandardPaths::Get().GetExecutablePath());
+ wxString binPath = exePath.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
+ wxString autopanoExeFull = binPath + autopanoExe;
+ autopanoExe = autopanoExeFull;
+ }
+ }
+ #endif
if(setting.IsTwoStepDetector())
{
std::vector<wxString> keyFiles(pano.getNrOfImages());