winemaker: Naming in the wrapper code
Francois Gouget
fgouget at codeweavers.com
Thu Sep 26 19:35:46 CDT 2002
This patch updates the wrapper code to match the new naming of libraries
and executables. Martin, could you test it?
Changelog:
Francois Gouget <fgouget at codeweavers.com>
* tools/winemaker
Update the wrapper code to match the new naming executable and
library conventions
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: tools/winemaker
===================================================================
RCS file: /home/wine/wine/tools/winemaker,v
retrieving revision 1.54
diff -u -r1.54 winemaker
--- tools/winemaker 26 Sep 2002 03:20:59 -0000 1.54
+++ tools/winemaker 26 Sep 2002 21:26:32 -0000
@@ -1653,9 +1653,10 @@
my $path=$_[0];
my $target=$_[1];
my $app_name=@$target[$T_NAME];
+ $app_name=~ s/\.exe$//;
return generate_from_template("$path${app_name}_wrapper.c","wrapper.c",[
- ["APP_NAME",@$target[$T_NAME]],
+ ["APP_NAME",$app_name],
["APP_TYPE",(@$target[$T_TYPE]==$TT_GUIEXE?"GUIEXE":"CUIEXE")],
["APP_INIT",(@$target[$T_TYPE]==$TT_GUIEXE?"\"WinMain\"":"\"main\"")],
["APP_MFC",(@$target[$T_FLAGS] & $TF_MFC?"\"mfc\"":"NULL")]]);
@@ -3215,8 +3229,8 @@
#define APP_TYPE ##WINEMAKER_APP_TYPE##
/**
- * This is the application library's base name, i.e. 'hello' if the
- * library is called 'libhello.so'.
+ * This is the name of the library containing the application,
+ * e.g. 'hello.dll' if the application is called 'hello.exe'.
*/
static char* appName = "##WINEMAKER_APP_NAME##";
@@ -3266,14 +3280,14 @@
int retcode;
/* Load the application's library */
- libName=(char*)malloc(strlen(appName)+5+3+1);
+ libName=(char*)malloc(2+strlen(appName)+3+1);
/* FIXME: we should get the wrapper's path and use that as the base for
* the library
*/
- sprintf(libName,"./lib%s.so",appName);
+ sprintf(libName,"./%s.so",appName);
appLibrary=dlopen(libName,RTLD_NOW);
if (appLibrary==NULL) {
- sprintf(libName,"lib%s.so",appName);
+ sprintf(libName,"%s.so",appName);
appLibrary=dlopen(libName,RTLD_NOW);
}
if (appLibrary==NULL) {
More information about the wine-patches
mailing list