header in files with version information

This commit is contained in:
sonoro1234
2018-10-05 18:54:55 +02:00
parent bba07596a6
commit a2c1665e31
7 changed files with 3775 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.65" from Dear ImGui https://github.com/ocornut/imgui
#include "./imgui/imgui.h"
#include "cimgui.h"

View File

@@ -1,4 +1,5 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.65" from Dear ImGui https://github.com/ocornut/imgui
#include <stdio.h>
#if defined _WIN32 || defined __CYGWIN__

View File

@@ -1,4 +1,5 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.65" from Dear ImGui https://github.com/ocornut/imgui
#include "./imgui/imgui.h"
#include "cimgui.h"

View File

@@ -1,4 +1,5 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.65" from Dear ImGui https://github.com/ocornut/imgui
#include <stdio.h>
#if defined _WIN32 || defined __CYGWIN__

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -72,6 +72,11 @@ local cimgui_overloads = {
["(ImGuiCol,const ImVec4)"] = "igPushStyleColor"
}
}
--------------------------header definitions
local cimgui_header =
[[//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version XXX from Dear ImGui https://github.com/ocornut/imgui]]
--------------------------------------------------------------------------
--helper functions
--------------------------------------------------------------------------
@@ -1196,7 +1201,7 @@ local function cimgui_generation(postfix,STP,FP)
hstrfile = hstrfile:gsub([[#include "imgui_structs%.h"]],cstructsstr)
local cfuncsstr = func_header_generate(FP)
hstrfile = hstrfile:gsub([[#include "auto_funcs%.h"]],cfuncsstr)
save_data("./generated/cimgui"..postfix..".h",hstrfile)
save_data("./generated/cimgui"..postfix..".h",cimgui_header,hstrfile)
--merge it in cimgui_template.cpp to cimgui.cpp
@@ -1206,12 +1211,25 @@ local function cimgui_generation(postfix,STP,FP)
hfile:close()
hstrfile = hstrfile:gsub([[#include "auto_funcs%.cpp"]],cimplem)
hstrfile = hstrfile:gsub([[#include "cimgui%.h"]],[[#include "cimgui]]..postfix..[[.h"]])
save_data("./generated/cimgui"..postfix..".cpp",hstrfile)
save_data("./generated/cimgui"..postfix..".cpp",cimgui_header,hstrfile)
return typedefs_dict
end
--------------------------------------------------------
-----------------------------do it----------------------
--------------------------------------------------------
--get imgui.h version--------------------------
local pipe,err = io.open("../imgui/imgui.h","r")
if not pipe then
error("could not open file:"..err)
end
local imgui_version
while true do
local line = pipe:read"*l"
imgui_version = line:match([[#define%s+IMGUI_VERSION%s+(".+")]])
if imgui_version then break end
end
pipe:close()
cimgui_header = cimgui_header:gsub("XXX",imgui_version)
--first without gcc
print"------------------generation without precompiler------------------------"
local pipe,err = io.open("../imgui/imgui.h","r")