Move english resources into l10n directory, and change build so that

any of the languges can be the one built-in and english can be in a
.dll.  English can now serve as a template for translation.
This commit is contained in:
ehouse 2009-09-19 04:16:19 +00:00
parent 45bdccd4e8
commit f1b355b1ce
5 changed files with 95 additions and 112 deletions

View file

@ -143,14 +143,16 @@ endif
BUILTDIR=$(OBJDIR)/built
TARGET = $(BUILTDIR)/xwords4_$(SVNREV).exe
DLL_SRCS = $(shell ls ./l10n/*.rc)
BASE_LANG_SRC = l10n/xwords4_english.rc
BASE_LANG_OBJ = $(OBJDIR$)/$(patsubst %.rc,%.rc.o,$(notdir $(BASE_LANG_SRC)))
#DLLS = $(patsubst %.rc,%.dll,$(addprefix $(OBJDIR)/l10n/,$(notdir $(DLL_SRCS))))
DLLS = \
$(BUILTDIR)/xwords4_french.dll \
$(BUILTDIR)/xwords4_caps.dll \
$(BUILTDIR)/xwords4_polish.dll \
RESOBJS = \
$(OBJDIR)/xwords4.rc.o \
$(BUILTDIR)/xwords4_english.dll \
WINCESRC = \
ceaskpwd.c \
@ -214,7 +216,7 @@ all : $(TARGET) $(DLLS)
memdebug:
$(MAKE) DEBUG=TRUE all
$(TARGET) : $(OBJS) $(RESOBJS)
$(TARGET) : $(OBJS) $(BASE_LANG_OBJ)
mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(LFLAGS) -mwindows $^ $(CELIBS) -o $@
$(STRIP) $@
@ -227,8 +229,8 @@ $(OBJDIR)/%.o : ../common/%.c $(INCLUDES)
mkdir -p $(dir $@)
$(CC) -c $(CFLAGS) -o $@ $<
$(OBJDIR)/xwords4.rc.o : xwords4.rc $(INCLUDES) xwords4.ico
$(WINDRES) -v $(MINGW_INC_PATH) $(RESFLAGS) -o $@ $<
$(BASE_LANG_OBJ) : $(BASE_LANG_SRC) $(INCLUDES) xwords4.ico
$(WINDRES) -v $(MINGW_INC_PATH) $(RESFLAGS) -DAM_BASE_LANGUAGE -o $@ $<
$(OBJDIR)/l10n/%.rc.o : l10n/%.rc $(WINCE_INCLUDES)
mkdir -p $(dir $@)

View file

@ -0,0 +1,70 @@
// -*- mode: c; -*-
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_XWORDS4 ICON DISCARDABLE "xwords4.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_RIGHTARROW BITMAP DISCARDABLE "bmps/rightarrow.bmp"
IDB_DOWNARROW BITMAP DISCARDABLE "bmps/downarro.bmp"
IDB_ORIGIN BITMAP DISCARDABLE "bmps/origin.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// CLRS
//
ID_COLORS_RES CLRS MOVEABLE PURE
BEGIN
0xAF, 0xAF, 0x00, /* bonus 1 */
0x00, 0xAF, 0xAF,
0xAF, 0x00, 0xAF,
0xAF, 0xAF, 0xAF,
0xFF, 0xFF, 0xFF, /* empty cells/CE_BKG_COLOR */
0xFF, 0xFF, 0x99, /* tile background */
0x70, 0x70, 0xFF, /* focus */
0x00, 0x00, 0x00, /* player 1 */
0xFF, 0x00, 0x00,
0x00, 0x00, 0xFF,
0x00, 0x8F, 0x00, /* 8F: full-green contrasts badly with background */
0x00, 0x00, 0x00, /* black */
0xFF, 0xFF, 0xFF /* white */
END
/////////////////////////////////////////////////////////////////////////////
//
// BONS: bonus square values.
//
// Butts' board
ID_BONUS_RES BONS MOVEABLE PURE
BEGIN
0x4001, 0x0004,
0x0200, 0x0300,
0x0020, 0x0010,
0x1002, 0x0001,
0x0000, 0x2000,
0x0300, 0x0300,
0x0010, 0x0010,
0x4001, 0x0002
END
STRINGTABLE DISCARDABLE
BEGIN
#ifdef DEBUG
IDS_APP_TITLE "Crossw_dbg"
IDC_XWORDS4 "XWORDS4_DBG"
#else
IDS_APP_TITLE "Crosswords"
IDC_XWORDS4 "XWORDS4"
#endif
END

View file

@ -1,16 +1,16 @@
// -*- mode: c; compile-command: "make TARGET_OS=wince DEBUG=TRUE"; -*-
// -*- mode: c; compile-command: "cd ../ && make TARGET_OS=wince DEBUG=TRUE"; -*-
//
// Microsoft Developer Studio generated resource script. But now I'm
// editing it. :-)
//
#include "resource.h"
#include "../resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "newres.h"
#include "../newres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@ -25,15 +25,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_XWORDS4 ICON DISCARDABLE "xwords4.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
@ -171,7 +162,11 @@ BEGIN
END
#endif
#include "rc_incs.h"
#include "../rc_incs.h"
#ifndef AM_BASE_LANGUAGE
DLL_VERS_RESOURCE
#endif
/////////////////////////////////////////////////////////////////////////////
//
@ -849,55 +844,6 @@ BEGIN
# endif
END
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_RIGHTARROW BITMAP DISCARDABLE "bmps/rightarrow.bmp"
IDB_DOWNARROW BITMAP DISCARDABLE "bmps/downarro.bmp"
IDB_ORIGIN BITMAP DISCARDABLE "bmps/origin.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// CLRS
//
ID_COLORS_RES CLRS MOVEABLE PURE
BEGIN
0xAF, 0xAF, 0x00, /* bonus 1 */
0x00, 0xAF, 0xAF,
0xAF, 0x00, 0xAF,
0xAF, 0xAF, 0xAF,
0xFF, 0xFF, 0xFF, /* empty cells/CE_BKG_COLOR */
0xFF, 0xFF, 0x99, /* tile background */
0x70, 0x70, 0xFF, /* focus */
0x00, 0x00, 0x00, /* player 1 */
0xFF, 0x00, 0x00,
0x00, 0x00, 0xFF,
0x00, 0x8F, 0x00, /* 8F: full-green contrasts badly with background */
0x00, 0x00, 0x00, /* black */
0xFF, 0xFF, 0xFF /* white */
END
/////////////////////////////////////////////////////////////////////////////
//
// BONS: bonus square values.
//
// Butts' board
ID_BONUS_RES BONS MOVEABLE PURE
BEGIN
0x4001, 0x0004,
0x0200, 0x0300,
0x0020, 0x0010,
0x1002, 0x0001,
0x0000, 0x2000,
0x0300, 0x0300,
0x0010, 0x0010,
0x4001, 0x0002
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
@ -905,13 +851,6 @@ END
STRINGTABLE DISCARDABLE
BEGIN
#ifdef DEBUG
IDS_APP_TITLE "Crossw_dbg"
IDC_XWORDS4 "XWORDS4_DBG"
#else
IDS_APP_TITLE "Crosswords"
IDC_XWORDS4 "XWORDS4"
#endif
IDS_MENU "Menu"
IDS_DUMMY "--"
IDS_CANCEL "Cancel"
@ -1049,29 +988,8 @@ BEGIN
END
#ifdef _WIN32_WCE
// from http://msdn.microsoft.com/en-us/library/ms838191.aspx: don't
// let WinMo draw 320x320 as 240x240
HI_RES_AWARE CEUX {1}
#ifdef AM_BASE_LANGUAGE
# include "../common_rsrc.rc"
#endif
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/* This is supposed to keep the OS from running us in "emulation mode", but it
isn't working. Changing the versions as reported by objdump does work */
/* #ifdef _WIN32_WCE */
/* HI_RES_AWARE CEUX {1} */
/* #endif */
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
#endif

View file

@ -164,7 +164,11 @@ END
#include "../rc_incs.h"
#include "../rc_incs.h"
#ifndef AM_BASE_LANGUAGE
DLL_VERS_RESOURCE
#endif
/////////////////////////////////////////////////////////////////////////////
//
@ -832,11 +836,6 @@ END
STRINGTABLE DISCARDABLE
BEGIN
#ifdef DEBUG
IDS_APP_TITLE "Crossw_dbg"
#else
IDS_APP_TITLE "Crosswords"
#endif
IDS_MENU "Menu"
IDS_DUMMY "--"
IDS_CANCEL "Annuler"

View file

@ -164,8 +164,9 @@ END
#include "../rc_incs.h"
#ifndef AM_BASE_LANGUAGE
DLL_VERS_RESOURCE
#endif
/////////////////////////////////////////////////////////////////////////////
//
@ -838,13 +839,6 @@ END
STRINGTABLE DISCARDABLE
BEGIN
#ifdef DEBUG
IDS_APP_TITLE "Crossw_dbg"
IDC_XWORDS4 "XWORDS4_DBG"
#else
IDS_APP_TITLE "Crosswords"
IDC_XWORDS4 "XWORDS4"
#endif
IDS_MENU "Menu"
IDS_DUMMY "--"
IDS_CANCEL "Anuluj"