nimui/nimui.cfg
Joey Yakimowich-Payne acc9bb9db0 Make unix builds work
2018-08-21 12:20:27 +09:00

60 lines
1.7 KiB
INI

[n.global]
output = nimui
[n.include]
nimui
nimui/common
[n.prepare]
git = "https://github.com/andlabs/libui"
execute-win = "windres nimui/examples/resources.rc nimui/examples/resources.o"
[ui.h]
preprocess = true
defines = true
recurse = true
compile = "nimui/common/*.c"
compile-win = "nimui/windows/*.cpp"
compile-lin = "nimui/unix/*.c"
pragma-lin.passC = "passC: \"$(pkg-config --cflags-only-I gtk+-3.0) --std=c99\""
pragma-lin.passL = "passL: \"$(pkg-config --libs gtk+-3.0)\""
pragma-win.passC = "passC: \"--std=c++11\""
pragma-win.passL = "passL: \"-luser32 -lkernel32 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -luuid -lwindowscodecs -lstdc++\""
pragma-win.rc = "link: \"nimui/examples/resources.o\""
flags = "--cdecl --nep1"
[ui.nim]
regex.1 = """([u]int[\d]+)T"""
replace.1 = "$1"
regex.2 = """([u]int)ptrT"""
replace.2 = "ptr $1"
regex.3 = """U(.*?)\* = [a-zA-Z]+\n"""
replace.3 = """U$1* = object
"""
regex.4 = """ (?:UiInitOptions|UiControl|UiAreaDrawParams|UiAreaMouseEvent|UiAreaKeyEvent|UiAreaHandler|UiDrawMatrix)+\* = object"""
replace.4 = ""
regex.5 = """ (?:UiDrawBrushGradientStop|UiDrawBrush|UiDrawStrokeParams|UiFontDescriptor|UiDrawTextLayoutParams)+\* = object"""
replace.5 = ""
regex.6 = """ (?:UiTableModelHandler|UiTableTextColumnOptionalParams|UiTableParams)+\* = object"""
replace.6 = ""
regex.7 = """((?s: (?:UiAreaDrawParams|UiAreaMouseEvent|UiModifiers|UiAreaKeyEvent|UiExtKey)+\* .*?\n\n))"""
move.7 = "UiArea* = object\n"
search.8 = "type\nconst\n"
replace.8 = "const\n"
search.9 = "{.compile: \"nimui/common/OLD_table.c\".}"
comment.9 = 1
search.10 = "{.compile: (\"../nimui/unix/OLD_table.c\", \"OLD_table1.o\").}"
comment.10 = 1