From 9d3019f8cc76b32392932be1acc1e0cfa9029afa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vincent=20B=C3=A9ron?= Date: Fri, 24 Sep 2004 00:22:29 +0000 Subject: [PATCH] Change the sample app from winemine to notepad for winemaker in the Winelib User Guide. --- documentation/winelib-intro.sgml | 60 ++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/documentation/winelib-intro.sgml b/documentation/winelib-intro.sgml index b890a074b59..e0e41319159 100644 --- a/documentation/winelib-intro.sgml +++ b/documentation/winelib-intro.sgml @@ -87,7 +87,8 @@ then the case of the filenames in your include statements may be - wrong: maybe they include 'Windows.h' instead of 'windows.h'. + wrong: maybe they include Windows.h instead + of windows.h. @@ -119,19 +120,16 @@ Winemaker is a perl script which is designed to help you bootstrap the conversion of your Windows projects to Winelib. In order to do this it will go analyze your code, fixing the issues listed above - and generate autoconf-based Makefiles. + and generate straight Makefiles. - Let's suppose that Wine/Winelib has been installed in the - /usr/local/wine - directory, and that you are already in the top directory of your + Let's suppose that you are already in the top directory of your sources. Then converting your project to Winelib may be as simple as just running the three commands below (note the dot indicating current directory at the end of the first command): $ winemaker --lower-uppercase . - $ ./configure --with-wine=/usr/local/wine $ make @@ -146,28 +144,62 @@ Before starting to work on a big project you may want to try to port a - small application. The winemine application from the Wine source tree + small application. The notepad application from the Wine source tree suits well for testing purposes. It can be found in the programs - subdirectory. winemine is a simple application, but has a few C, + subdirectory. notepad is a simple application, but has a few C, header and resource files. Run make clean in the - winemine source directory if it contains results of previous builds. - Create a separate directory with name winemine2, so it won't conflict - with the Wine copy of the application. Copy the sources of winemine + notepad source directory if it contains results of previous builds. + Create a separate directory with name notepad2, so it won't conflict + with the Wine copy of the application. Copy the sources of notepad (files *.c, *.h, *.rc) to this directory. Now run the commands, - mentioned above from the winemine2 directory: + mentioned above from the notepad2 directory: $ winemaker --lower-uppercase . - $ ./configure --with-wine=/usr/local/wine + $ make + + + + Notice how the build fails in a resource file + (Da.rc at the time this was written). + This is because for the time being, the Wine resource compiler + (windres) can't cope with more than one + resource file ending up in a given executable. To get around + that limitation, the Wine developers have chosen to only have + one master resource file per application, and include the + other ones via #include statements in the + master one. The included files do not + #include the necessary files to be + compilable on their own. You will need to do the same thing + for now in your own Winelib port projects. + + + To fix that problem, you will need to edit the list of + resource files winemaker thought notepad used, and only keep + the master resource file. To do so, open + notepad2/Makefile in a text editor and + search for an assignment to a variable with + RC_SRCS as part of its name. It will likely + be named notepad2_exe_RC_SRCS. There will + be a list of resource files starting on the same line. Remove + them all except rsrc.rc (this is the + master one for notepad). Save your work. + + + Now you're ready to continue at the same point the first + make failed. Return to the notepad2 + directory and type: + + $ make You are done! Now you can start the application as - ./winemine2. + ./notepad2. If you come across problems preparing and building this application -- 2.11.4.GIT