Script to compile Wine programs on Windows

Pavel Roskin proski at gnu.org
Wed Sep 24 02:47:42 CDT 2003


On Wed, 24 Sep 2003, Dimitrie O. Paun wrote:

> On September 23, 2003 11:59 pm, Pavel Roskin wrote:
> > For example, winefile.exe needs "-luuid" in MinGW because it provides
> > IID_IDataObject.  In Wine, IID_IDataObject is defined in
> > include/objidl.h and a constant number.  Wine doesn't have uuid
> > library.
>
> We have one, and it's called wine_uuid (libs/uuid). If we switch over to
> winegcc at least for the apps, it will take care of it, you just need to
> pass it -luuid just like in Windows.

I have looked at winegcc source and it seems it will greatly improve
portability.  I think it's a good idea to switch to winegcc first.

Thoose who compile large projects with Wine are not likely to abandon the
Windows version, so it's helpful to minimize differences in the code for
different platforms.  If we consider Wine programs as test examples, they
should compile for Windows cleanly and use winegcc when compiled in Wine
if we are to recommend winegcc for outside projects.

> > Some resource files refer to icons if __WINE__ is not defined.  The
> > icons are missing.  Perhaps those references can be removed.
> > Alternatively, icon resources should be converted to the binary format
> > in Wine.  I don't know if the reason to use text representations was
> > because of wrc limitations or to avoid binaries in Wine CVS.
>
> Yes, to avoid binaries in CVS. But what is the problem, icons can't be
> in text format? If no, we'll just have to use wrc, not a problem I guess
> (even though would be nice to be able to build using windres).

I just don't like defining __WINE__ in wrc when not compiling for Wine.
But it's not a big deal.  I'm attaching a patch that shows what I mean.
Apply it if you like it.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- programs/regedit/resource.rc
+++ programs/regedit/resource.rc
@@ -19,9 +19,6 @@
  */
 
 IDB_OPEN_FILE BITMAP  DISCARDABLE
-#ifndef __WINE__
-"res/folder3.bmp"
-#else
 /* BINRES folder3.bmp */
 {
  '42 4D F6 00 00 00 00 00 00 00 76 00 00 00 28 00'
@@ -41,12 +38,8 @@
  '00 88 88 88 88 88 88 88 88 88 88 88 88 88 88 88'
  '88 88 88 88 88 88'
 }
-#endif
 
 IDB_CLOSED_FILE BITMAP  DISCARDABLE
-#ifndef __WINE__
-"res/folder2.bmp"
-#else
 /* BINRES folder2.bmp */
 {
  '42 4D F6 00 00 00 00 00 00 00 76 00 00 00 28 00'
@@ -66,12 +59,8 @@
  '7B 7B 8F FF FF FF FF F8 88 88 FF FF FF FF FF FF'
  'FF FF FF FF FF FF'
 }
-#endif
 
 IDB_ROOT BITMAP DISCARDABLE
-#ifndef __WINE__
-"res/folder1.bmp"
-#else
 /* BINRES folder1.bmp */
 {
  '42 4D F6 00 00 00 00 00 00 00 76 00 00 00 28 00'
@@ -91,6 +80,5 @@
  '7B 7B 8F FF FF FF FF F8 88 88 FF FF FF FF FF FF'
  'FF FF FF FF FF FF'
 }
-#endif
 
 #include "wine/wine_common_ver.rc"
--- programs/winefile/resource.rc
+++ programs/winefile/resource.rc
@@ -29,9 +29,6 @@
 }
 
 IDI_WINEFILE ICON DISCARDABLE
-#ifndef __WINE__
- "winefile.ico"
-#else
 {
  '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'
@@ -82,12 +79,8 @@
  '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
 {
  '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'
@@ -150,12 +143,8 @@
  '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
 {
  '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'
@@ -205,12 +194,8 @@
  '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
 {
  '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'
@@ -286,4 +271,3 @@
  '77 77 AA AA AA AA AA AA AA AA AA AA AA AA AA AA'
  'AA AA AA AA AA AA'
 }
-#endif


More information about the wine-devel mailing list