diff --git a/redo/GNUbase.mk b/redo/GNUbase.mk index 67efd094..998fdeca 100644 --- a/redo/GNUbase.mk +++ b/redo/GNUbase.mk @@ -14,7 +14,8 @@ xHFILES = \ OFILES = \ $(baseCFILES:%.c=$(OBJDIR)/%.o) \ - $(baseMFILES:%.m=$(OBJDIR)/%.o) + $(baseMFILES:%.m=$(OBJDIR)/%.o) \ + $(baseRCFILES:%.rc=$(OBJDIR)/%.o) xCFLAGS = \ -g \ @@ -26,6 +27,11 @@ xCFLAGS = \ $(archmflag) \ $(baseCFLAGS) +# windres doesn't support -m +xRCFLAGS = \ + $(RCFLAGS) \ + $(baseRCFLAGS) + xLDFLAGS = \ -g \ $(LDFLAGS) \ @@ -47,6 +53,10 @@ $(OBJDIR)/%.o: %.m $(xHFILES) | $$(dir $$@).phony @$(CC) -o $@ -c $< $(xCFLAGS) @echo ====== Compiled $< +$(OBJDIR)/%.o: %.rc $(xHFILES) | $$(dir $$@).phony + @$(RC) $(xRCFLAGS) $< $@ + @echo ====== Compiled $< + # see http://www.cmcrossroads.com/article/making-directories-gnu-make %/.phony: @mkdir -p $(dir $@) diff --git a/redo/GNUmakefile b/redo/GNUmakefile index 304066a6..98a86c82 100644 --- a/redo/GNUmakefile +++ b/redo/GNUmakefile @@ -36,11 +36,14 @@ baseCFILES = \ baseMFILES = $(osMFILES) +baseRCFILES = $(osRCFILES) + baseCFLAGS = $(osCFLAGS) baseLDFLAGS = \ -shared \ $(osLDWarnUndefinedFlags) \ $(osLDFLAGS) +baseRCFLAGS = $(osRCFLAGS) baseSUFFIX = $(osLIBSUFFIX) include GNUbase.mk diff --git a/redo/windows/GNUmakeinc.mk b/redo/windows/GNUmakeinc.mk index 0b9b3b02..36920ad4 100644 --- a/redo/windows/GNUmakeinc.mk +++ b/redo/windows/GNUmakeinc.mk @@ -33,8 +33,12 @@ osCFILES = \ windows/window.c osHFILES = \ + windows/resources.h \ windows/uipriv_windows.h +osRCFILES = \ + windows/resources.rc + # thanks ebassi in irc.gimp.net/#gtk+ osCFLAGS = \ -D_UI_EXTERN='__declspec(dllexport) extern' diff --git a/redo/windows/resources.h b/redo/windows/resources.h new file mode 100644 index 00000000..f560cca2 --- /dev/null +++ b/redo/windows/resources.h @@ -0,0 +1,3 @@ +// 30 may 2015 + +#define rcTabPageDialog 100 diff --git a/redo/windows/resources.rc b/redo/windows/resources.rc new file mode 100644 index 00000000..64b0e5f1 --- /dev/null +++ b/redo/windows/resources.rc @@ -0,0 +1,14 @@ +// 30 may 2015 +//TODO#include "winapi.h" +#include + +// this is a UTF-8 file +#pragma code_page(65001) + +// this is the dialog template used +rcTabPageDialog DIALOGEX 0, 0, 100, 100 +STYLE WS_CHILD | WS_VISIBLE +// TODO EXSTYLE WS_EX_CONTROLPARENT +BEGIN + // nothing +END diff --git a/redo/windows/uipriv_windows.h b/redo/windows/uipriv_windows.h index 4d1e1878..b404a616 100644 --- a/redo/windows/uipriv_windows.h +++ b/redo/windows/uipriv_windows.h @@ -28,6 +28,7 @@ #include "../out/ui.h" #include "../ui_windows.h" #include "../uipriv.h" +#include "resources.h" // ui internal window messages enum {