Subversion Repositories tpanel

Rev

Rev 118 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 118 Rev 186
Line 19... Line 19...
19
#include "ticons.h"
19
#include "ticons.h"
20
#include "terror.h"
20
#include "terror.h"
21
#include "texpat++.h"
21
#include "texpat++.h"
22
#include "tconfig.h"
22
#include "tconfig.h"
23
 
23
 
-
 
24
#if __cplusplus < 201402L
-
 
25
#   error "This module requires at least C++14 standard!"
-
 
26
#else
-
 
27
#   if __cplusplus < 201703L
-
 
28
#       include <experimental/filesystem>
-
 
29
namespace fs = std::experimental::filesystem;
-
 
30
#       warning "Support for C++14 and experimental filesystem will be removed in a future version!"
-
 
31
#   else
-
 
32
#       include <filesystem>
-
 
33
#       ifdef __ANDROID__
-
 
34
namespace fs = std::__fs::filesystem;
-
 
35
#       else
-
 
36
namespace fs = std::filesystem;
-
 
37
#       endif
-
 
38
#   endif
-
 
39
#endif
-
 
40
 
24
using std::string;
41
using std::string;
25
using std::vector;
42
using std::vector;
26
using std::map;
43
using std::map;
27
using std::pair;
44
using std::pair;
28
using namespace Expat;
45
using namespace Expat;
Line 44... Line 61...
44
    DECL_TRACER("TIcons::initialize()");
61
    DECL_TRACER("TIcons::initialize()");
45
 
62
 
46
    if (mIcons.size() > 0)
63
    if (mIcons.size() > 0)
47
        mIcons.clear();
64
        mIcons.clear();
48
 
65
 
-
 
66
    string projectPath = TConfig::getProjectPath();
-
 
67
 
-
 
68
    if (!fs::exists(projectPath + "/prj.xma"))
-
 
69
        projectPath += "/__system";
-
 
70
 
49
    string path = makeFileName(TConfig::getProjectPath(), "icon.xma");
71
    string path = makeFileName(projectPath, "icon.xma");
50
 
72
 
51
    if (!isValidFile())
73
    if (!isValidFile())
52
    {
74
    {
53
        MSG_ERROR("File " << path << " doesn't exist or is not readable!");
75
        MSG_ERROR("File " << path << " doesn't exist or is not readable!");
54
        TError::setError();
76
        TError::setError();