summaryrefslogtreecommitdiff
path: root/solenv/doc/gbuild/solenv/gbuild/alllangres.mk
blob: ae9d5130c2da653502bba02f8f2cbf1972a8a65b (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include <types.h>

namespace gb
{
    class SrsTarget;
    class ResTarget;
    class AllLangResTarget;

    class SrsPartTarget : public Target, public HasDependencies, public UsesRsc
    {
        private:
            /// SrsPartTarget s do not need to be explicitly constructed.

            /// They are a helper class for the SrsTarget class.
            /// They are named after the path of their source file (without
            /// file extension) from the root of their source repository.
            SrsPartTarget(String name);
            friend class SrsTarget;

            /// Platformdependant command to generate the dependencies for the srs target.
            static const Command command_dep(
                String srsname,
                Path sourcefile,
                List<Path> include,
                List<String> defs);
    };

    class SrsTarget : public Target, public HasDependencies, public IsCleanable
    {
        public:
            /// Sets defines for srs processing.
            /// \$\$(DEFS) contains the current flags and can be used, if
            /// just a few need to be modified.
            void set_defs(List<String> defs);
            /// Sets the include paths for srs processing.
            /// \$\$(INCLUDE) contains the current paths and can be used, if
            /// just a few need to be modified.
            void set_include(List<String> include);
            /// Adds a SrsPartTarget to be processed.
            void add_file(SrsPartTarget part);
            /// Adds multiple SrsPartTarget s to be processed.
            void add_files(List<SrsPartTarget> parts);
        private:
            /// SrsTarget s do not need to be explicitly constructed.

            /// They are a helper class for the ResTarget class.
            SrsTarget(String name);
            friend class ResTarget;

            List<String> DEFS;
            List<String> INCLUDE
            List<SrsPartTarget> PARTS;
            static const List<String> DEFAULTDEFS;
    };

    class ResTarget : public Target, public IsCleanable, public HasSrs
    {
        public:
            void add_file(Path file);
            void add_files(List<Path> files);
        private:
            /// ResTarget do not need to be explicitly constructed.

            /// They are a helper class for the AllLangResTarget class.
            ResTarget(String name, String library, Language lang, Path reslocation);
            friend class AllLangResTarget;

            String LIBRARY;
            Language LANGUAGE;
            Path RESLOCATION;
    };

    class AllLangResTarget : public Target, public IsCleanable, public HasSrs
    {
        public:
            AllLangResTarget(String name);
            /// Sets the location where resources are to be found. reslocation is a path relative to the icon-themes/galaxy directory.
            /// Resources will be found in reslocation itself and in the subdirectories res/ and imglst/ of it and again in subdirectories
            /// of those named as the language of the processed resource. In addition, resources are found in the res/ directory directly
            /// below icon-themes/galaxy and the subdirectory of it named as the language of the processed resource.
            void set_reslocation(Path reslocation);
        private:
            /// Sets the languages for which to create resources.
            static void set_langs(List<Language> langs);

            /// The list of languages that need to be build.
            static List<Language> LANGS;
    };
}
/* vim: set filetype=cpp : */