Added some resources to the Windows DLL.

This commit is contained in:
Pietro Gagliardi 2015-05-30 14:33:23 -04:00
parent f7896848c2
commit d18cd47a4b
6 changed files with 36 additions and 1 deletions

View File

@ -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 $@)

View File

@ -36,11 +36,14 @@ baseCFILES = \
baseMFILES = $(osMFILES)
baseRCFILES = $(osRCFILES)
baseCFLAGS = $(osCFLAGS)
baseLDFLAGS = \
-shared \
$(osLDWarnUndefinedFlags) \
$(osLDFLAGS)
baseRCFLAGS = $(osRCFLAGS)
baseSUFFIX = $(osLIBSUFFIX)
include GNUbase.mk

View File

@ -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'

3
redo/windows/resources.h Normal file
View File

@ -0,0 +1,3 @@
// 30 may 2015
#define rcTabPageDialog 100

14
redo/windows/resources.rc Normal file
View File

@ -0,0 +1,14 @@
// 30 may 2015
//TODO#include "winapi.h"
#include <windows.h>
// 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

View File

@ -28,6 +28,7 @@
#include "../out/ui.h"
#include "../ui_windows.h"
#include "../uipriv.h"
#include "resources.h"
// ui internal window messages
enum {