rev: e32a77264f85054e8319dff5214de6a709ba3384 tukan/externals/build_cimgui.py -rw-r--r-- 1.6 KiB View raw Log this file
e32a77264f85 — Leonard Ritter * updated imgui/cimgui to latest revision (docking branch) 3 months ago
                                                                                
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
# SDL downloader & builder

import os
from build_common import BuilderBase

class Builder(BuilderBase):
    NAME = 'cimgui'
    GIT_URL = "https://github.com/Extrawurst/cimgui"
    # 1.53
    #GIT_REVISION = "1a5e261a8e97d58b32a474779774eca9314c10d0"
    # 1.69
    #GIT_REVISION = "4be0522d9f1513e9f14dd3510c396325007f58ad"
    # 1.75+ docking branch
    #GIT_REVISION = "1d32b3804d834da4d05f02d6d81e2f6b4b94138e"
    # jun 30, 2020, master
    GIT_REVISION = "c1f0030b20488a940f0813f413d84313652bb0b2"

    def run_any_build(self):
        self.copy2(os.path.join(self.TARGETDIR, '..', 'imgui', 'imgui.h'),
            os.path.join(self.TARGETDIR, 'imgui'))
        self.copy2(os.path.join(self.TARGETDIR, '..', 'imgui', 'imgui_internal.h'),
            os.path.join(self.TARGETDIR, 'imgui'))
        self.copy2(os.path.join(self.TARGETDIR, '..', 'imgui', 'imconfig.h'),
            os.path.join(self.TARGETDIR, 'imgui'))
        self.chdir(os.path.join(self.TARGETDIR, 'generator'))
        self.shell("luajit ./generator.lua gcc")
        self.copy2(os.path.join(self.TARGETDIR, 'generator', 'output', 'cimgui.h'), self.TARGETDIR)
        self.copy2(os.path.join(self.TARGETDIR, 'generator', 'output', 'cimgui.cpp'), self.TARGETDIR)
        self.copy2(os.path.join(self.TARGETDIR, 'cimgui.h'),
            self.CDEFDIR)

    def run_linux2_build(self):
        self.run_any_build()

    def run_darwin_build(self):
        self.run_any_build()

    def run_win32_build(self):
        self.run_any_build()

    def gen_cdef(self):
        pass

if __name__ == '__main__':
    Builder().run()