Making programs windres compatible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

This patch allows to compile most Wine programs using this script:
http://www.red-bean.com/~proski/wine/mkwine

The problem is that windres doesn't like some constructs.  It doesn't like
embedded resources.  The framework for handling this already exists, and
my patch converts remaining programs.

Also, windres doesn't like missing commands in menu definitions, as well as
keyboard modifiers in wrong positions in the accelerator tables.

Fixes for uninstaller have been submitted already, so I'm excluding them.

ChangeLog
	* programs/cmdlgtst/Makefile.in, programs/wcmd/Makefile.in,
	programs/winefile/Makefile.in, programs/winemine/Makefile.in:
	Define RC_BINSRC and RC_BINARIES.
	* programs/cmdlgtst/cmdlgr.rc, programs/wcmd/wcmdrc.rc,
	programs/winefile/resource.rc, programs/winemine/rsrc.rc:
	Convert to standard format without embedded binary data.
	* programs/regedit/Makefile.in:
	Don't define __WINE__ in the resource compiler, it's not needed
	now.
	* programs/notepad/Nl.rc:
	Add missing comma.
	* programs/progman/Pt.rc, programs/wcmd/*.rc:
	Remove useless backslashes.
	* programs/view/*.rc:
	Fix accelerator table to be compatible with windres.

-- 
Regards,
Pavel Roskin
--- programs/cmdlgtst/Makefile.in
+++ programs/cmdlgtst/Makefile.in
@@ -10,6 +10,8 @@
 	cmdlgtst.c
 
 RC_SRCS = cmdlgr.rc
+RC_BINSRC = cmdlgr.rc
+RC_BINARIES = about.ico
 
 @MAKE_PROG_RULES@
 
--- programs/cmdlgtst/cmdlgr.rc
+++ programs/cmdlgtst/cmdlgr.rc
@@ -31,8 +31,9 @@
 
 LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
 
-AboutIcon ICON
-{
+/* BINRES about.ico */
+AboutIcon ICON about.ico
+/* {
  '00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02'
  '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
  '00 00 01 00 04 00 00 00 00 00 80 02 00 00 00 00'
@@ -81,4 +82,4 @@
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-}
+} */
--- programs/notepad/Nl.rc
+++ programs/notepad/Nl.rc
@@ -38,7 +38,7 @@
   MENUITEM "&Ongedaan maken\tCtrl+Z",    CMD_UNDO
   MENUITEM SEPARATOR
   MENUITEM "K&nippen\tCtrl+X",           CMD_CUT
-  MENUITEM "&Kopiц╚ren\tCtrl+C"           CMD_COPY
+  MENUITEM "&Kopiц╚ren\tCtrl+C",         CMD_COPY
   MENUITEM "&Plakken\tCtrl+V",           CMD_PASTE
   MENUITEM "&Verwijderen\tDel",          CMD_DELETE
   MENUITEM SEPARATOR
--- programs/progman/Pt.rc
+++ programs/progman/Pt.rc
@@ -199,7 +199,8 @@
 IDS_NOT_IMPLEMENTED,		"NЦo implementado"
 IDS_FILE_READ_ERROR_s,		"Erro lendo '%s'."
 IDS_FILE_WRITE_ERROR_s,		"Erro escrevendo '%s'."
-IDS_GRPFILE_READ_ERROR_s,	"O arquivo de grupo '%s' nЦo pode ser aberto.\n\DeverА ser tentado outras vezes?"
+IDS_GRPFILE_READ_ERROR_s,	"O arquivo de grupo '%s' nЦo pode ser aberto.\n\
+DeverА ser tentado outras vezes?"
 IDS_OUT_OF_MEMORY,		"Sem memСria."
 IDS_WINHELP_ERROR,		"Ajuda nЦo disponМvel."
 IDS_UNKNOWN_FEATURE_s,		"Recurso desconhecido em %s"
--- programs/regedit/Makefile.in
+++ programs/regedit/Makefile.in
@@ -25,8 +25,6 @@
 	folder2.bmp \
 	folder3.bmp 
 
-EXTRARCFLAGS = -D__WINE__
-
 PLTESTS = \
 	tests/regedit.pl
 
--- programs/view/En.rc
+++ programs/view/En.rc
@@ -59,7 +59,7 @@
 
 VIEW ACCELERATORS
 BEGIN
-    "Q",            IDM_EXIT,                CONTROL
+    "Q", IDM_EXIT, VIRTKEY, CONTROL
 END
 
 
--- programs/view/Es.rc
+++ programs/view/Es.rc
@@ -58,7 +58,7 @@
 
 VIEW ACCELERATORS
 BEGIN
-    "Q",            IDM_EXIT,                CONTROL
+    "Q", IDM_EXIT, VIRTKEY, CONTROL
 END
 
 
--- programs/view/Fr.rc
+++ programs/view/Fr.rc
@@ -60,7 +60,7 @@
 
 VIEW ACCELERATORS
 BEGIN
-    "Q",            IDM_EXIT,                CONTROL
+    "Q", IDM_EXIT, VIRTKEY, CONTROL
 END
 
 
--- programs/view/It.rc
+++ programs/view/It.rc
@@ -60,7 +60,7 @@
 
 VIEW ACCELERATORS
 BEGIN
-    "Q",            IDM_EXIT,                CONTROL
+    "Q", IDM_EXIT, VIRTKEY, CONTROL
 END
 
 
--- programs/view/Pt.rc
+++ programs/view/Pt.rc
@@ -58,7 +58,7 @@
 
 VIEW ACCELERATORS
 BEGIN
-    "Q",            IDM_EXIT,                CONTROL
+    "Q", IDM_EXIT, VIRTKEY, CONTROL
 END
 
 
--- programs/view/Ru.rc
+++ programs/view/Ru.rc
@@ -57,7 +57,7 @@
 
 VIEW ACCELERATORS
 BEGIN
-    "Q",            IDM_EXIT,                CONTROL
+    "Q", IDM_EXIT, VIRTKEY, CONTROL
 END
 
 
--- programs/view/Si.rc
+++ programs/view/Si.rc
@@ -58,7 +58,7 @@
 
 VIEW ACCELERATORS
 BEGIN
-    "Q",            IDM_EXIT,                CONTROL
+    "Q", IDM_EXIT, VIRTKEY, CONTROL
 END
 
 
--- programs/wcmd/En.rc
+++ programs/wcmd/En.rc
@@ -61,7 +61,7 @@
 \n\
 Syntax: FOR %variable IN (set) DO command\n\
 \n\
-The requirement to double the \% sign when using FOR in a batch file does\n\
+The requirement to double the % sign when using FOR in a batch file does\n\
 not exist in wcmd.\n"
 
   WCMD_GOTO,
--- programs/wcmd/Fr.rc
+++ programs/wcmd/Fr.rc
@@ -200,7 +200,7 @@
 
   1000, "Les commandes internes WCMD sont:\n\
 ATTRIB\t\tAffiche ou change les attributs de fichiers DOS\n\
-CALL\t\t\Invoque un fichier batch Ю l'intИrieur d'un autre\n\
+CALL\t\tInvoque un fichier batch Ю l'intИrieur d'un autre\n\
 CD (CHDIR)\tChange le rИpertoire courant par dИfaut\n\
 CLS\t\tEfface l'Иcran\n\
 COPY\t\tCopie un ou plusieurs fichiers\n\
--- programs/wcmd/Makefile.in
+++ programs/wcmd/Makefile.in
@@ -13,6 +13,8 @@
 	wcmdmain.c
 
 RC_SRCS = wcmdrc.rc
+RC_BINSRC = wcmdrc.rc
+RC_BINARIES = wcmd.ico
 
 @MAKE_PROG_RULES@
 
--- programs/wcmd/Pt.rc
+++ programs/wcmd/Pt.rc
@@ -57,11 +57,11 @@
   WCMD_ERASE,  "Ajuda do comando ERASE\n"
 
   WCMD_FOR,
-"O comando FOR И usado para executar um comando a cada vez em\n\um conjunto de arquivos.\n\
+"O comando FOR И usado para executar um comando a cada vez em\num conjunto de arquivos.\n\
 \n\
 Sintaxe: FOR %variАvel IN (conjunto) DO comando\n\
 \n\
-No wcmd, nЦo existe a necessidade de usar dois sinais \% no \n\
+No wcmd, nЦo existe a necessidade de usar dois sinais % no \n\
 comando FOR nos arquivos de lote.\n"
 
   WCMD_GOTO,
--- programs/wcmd/Ru.rc
+++ programs/wcmd/Ru.rc
@@ -60,7 +60,7 @@
 \n\
 Syntax: FOR %variable IN (set) DO command\n\
 \n\
-The requirement to double the \% sign when using FOR in a batch file does\n\
+The requirement to double the % sign when using FOR in a batch file does\n\
 not exist in wcmd.\n"
 
   WCMD_GOTO,
--- programs/wcmd/Si.rc
+++ programs/wcmd/Si.rc
@@ -61,7 +61,7 @@
 \n\
 Syntax: FOR %variable IN (set) DO command\n\
 \n\
-The requirement to double the \% sign when using FOR in a batch file does\n\
+The requirement to double the % sign when using FOR in a batch file does\n\
 not exist in wcmd.\n"
 
   WCMD_GOTO,
--- programs/wcmd/wcmdrc.rc
+++ programs/wcmd/wcmdrc.rc
@@ -26,8 +26,9 @@
 
 LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
 
-IDI_ICON1 ICON
-{
+/* BINRES wcmd.ico */
+IDI_ICON1 ICON wcmd.ico
+/* {
  '00 00 01 00 01 00 20 20 00 01 00 00 00 00 A8 08'
  '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
  '00 00 01 00 08 00 00 00 00 00 80 04 00 00 00 00'
@@ -168,4 +169,4 @@
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-}
+} */
--- programs/winefile/Makefile.in
+++ programs/winefile/Makefile.in
@@ -5,7 +5,6 @@
 MODULE    = winefile.exe
 APPMODE   = gui
 IMPORTS   = shell32 comctl32 ole32 user32 gdi32 kernel32
-EXTRADEFS = -D__WINE__
 EXTRALIBS = $(LIBUUID)
 
 C_SRCS = \
@@ -14,7 +13,8 @@
 	winefile.c
 
 RC_SRCS = rsrc.rc
-EXTRARCFLAGS = -D__WINE__
+RC_BINSRC = resource.rc
+RC_BINARIES = drivebar.bmp images.bmp toolbar.bmp winefile.ico
 
 @MAKE_PROG_RULES@
 
--- programs/winefile/resource.rc
+++ programs/winefile/resource.rc
@@ -28,11 +28,9 @@
 #endif
 }
 
-IDI_WINEFILE ICON DISCARDABLE
-#ifndef __WINE__
- "winefile.ico"
-#else
-{
+/* BINRES winefile.ico */
+IDI_WINEFILE ICON DISCARDABLE winefile.ico
+/* {
  '00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02'
  '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
  '00 00 01 00 04 00 00 00 00 00 80 02 00 00 00 00'
@@ -81,14 +79,11 @@
  '01 FF 80 00 01 FF 80 00 01 FF 80 00 01 FF 80 00'
  '01 FF 80 00 01 FF C0 00 01 FF E0 00 01 FF F0 00'
  '01 FF F8 00 01 FF FF FF FF FF FF FF FF FF'
-}
-#endif
+} */
 
-IDB_TOOLBAR BITMAP DISCARDABLE
-#ifndef __WINE__
- "toolbar.bmp"
-#else
-{
+/* BINRES toolbar.bmp */
+IDB_TOOLBAR BITMAP DISCARDABLE toolbar.bmp
+/* {
  '42 4D BE 03 00 00 00 00 00 00 76 00 00 00 28 00'
  '00 00 70 00 00 00 0F 00 00 00 01 00 04 00 00 00'
  '00 00 48 03 00 00 00 00 00 00 00 00 00 00 00 00'
@@ -149,14 +144,11 @@
  '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77'
  '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77'
  '77 77 7C 77 77 77 08 77 70 00 70 70 70 77'
-}
-#endif
+} */
 
-IDB_DRIVEBAR BITMAP DISCARDABLE
-#ifndef __WINE__
- "drivebar.bmp"
-#else
-{
+/* BINRES drivebar.bmp */
+IDB_DRIVEBAR BITMAP DISCARDABLE drivebar.bmp
+/* {
  '42 4D E6 02 00 00 00 00 00 00 76 00 00 00 28 00'
  '00 00 60 00 00 00 0D 00 00 00 01 00 04 00 00 00'
  '00 00 70 02 00 00 00 00 00 00 00 00 00 00 00 00'
@@ -204,14 +196,11 @@
  '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77'
  '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77'
  '77 77 77 77 77 77'
-}
-#endif
+} */
 
-IDB_IMAGES BITMAP DISCARDABLE
-#ifndef __WINE__
- "images.bmp"
-#else
-{
+/* BINRES images.bmp */
+IDB_IMAGES BITMAP DISCARDABLE images.bmp
+/* {
  '42 4D 86 04 00 00 00 00 00 00 76 00 00 00 28 00'
  '00 00 A0 00 00 00 0D 00 00 00 01 00 04 00 00 00'
  '00 00 10 04 00 00 00 00 00 00 00 00 00 00 00 00'
@@ -285,5 +274,4 @@
  '77 77 AA AA AA AA AA A7 77 77 AA AA AA AA AA A7'
  '77 77 AA AA AA AA AA AA AA AA AA AA AA AA AA AA'
  'AA AA AA AA AA AA'
-}
-#endif
+} */
--- programs/winemine/Makefile.in
+++ programs/winemine/Makefile.in
@@ -11,6 +11,8 @@
 	main.c
 
 RC_SRCS = rsrc.rc
+RC_BINSRC = rsrc.rc
+RC_BINARIES = faces.bmp leds.bmp mines.bmp winemine.ico
 
 @MAKE_PROG_RULES@
 
--- programs/winemine/rsrc.rc
+++ programs/winemine/rsrc.rc
@@ -31,8 +31,9 @@
 
 LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
 
-WINEMINE ICON MOVEABLE
-{
+/* BINRES winemine.ico */
+WINEMINE ICON MOVEABLE winemine.ico
+/* {
  '00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02'
  '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
  '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00'
@@ -81,10 +82,11 @@
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
  '00 00 00 00 00 00 00 00 00 00 00 00 00 00'
-}
+} */
 
-FACES BITMAP MOVEABLE
-{
+/* BINRES faces.bmp */
+FACES BITMAP MOVEABLE faces.bmp
+/* {
  '42 4D 16 06 00 00 00 00 00 00 76 00 00 00 28 00'
  '00 00 18 00 00 00 78 00 00 00 01 00 04 00 00 00'
  '00 00 A0 05 00 00 C4 0E 00 00 C4 0E 00 00 00 00'
@@ -183,10 +185,11 @@
  '00 FF 77 00 00 00 00 00 00 00 00 00 00 FF 77 77'
  '77 77 77 77 77 77 77 77 77 7F 77 77 77 77 77 77'
  '77 77 77 77 77 77'
-}
+} */
 
-LEDS BITMAP MOVEABLE
-{
+/* BINRES leds.bmp */
+LEDS BITMAP MOVEABLE leds.bmp
+/* {
  '42 4D 16 09 00 00 00 00 00 00 76 00 00 00 28 00'
  '00 00 0D 00 00 00 14 01 00 00 01 00 04 00 00 00'
  '00 00 A0 08 00 00 C4 0E 00 00 C4 0E 00 00 00 00'
@@ -333,10 +336,11 @@
  '00 00 00 AA 00 00 0A 00 00 00 00 0A 00 00 00 0A'
  'AA AA AA 00 00 00 00 AA AA AA AA A0 00 00 00 00'
  '00 00 00 00 00 00'
-}
+} */
 
-MINES BITMAP MOVEABLE
-{
+/* BINRES mines.bmp */
+MINES BITMAP MOVEABLE mines.bmp
+/* {
  '42 4D 76 08 00 00 00 00 00 00 76 00 00 00 28 00'
  '00 00 10 00 00 00 00 01 00 00 01 00 04 00 00 00'
  '00 00 00 08 00 00 CE 0E 00 00 D8 0E 00 00 00 00'
@@ -473,4 +477,4 @@
  '00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
  '00 00 00 00 00 0F 00 00 00 00 00 00 00 0F 00 00'
  '00 00 00 00 00 0F'
-}
+} */

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux