From 959562bdcd9d2ce9cb0f9495609276aea76f52ec Mon Sep 17 00:00:00 2001 From: "Dimitrie O. Paun" Date: Thu, 2 Jan 2003 17:48:05 +0000 Subject: [PATCH] Add the -F option to set a DLL's filename. --- tools/winebuild/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c index 7c139af8d7d..bda87fe9780 100644 --- a/tools/winebuild/main.c +++ b/tools/winebuild/main.c @@ -93,6 +93,8 @@ static void set_dll_file_name( const char *name ) { char *p; + if (*DLLFileName) return; + if ((p = strrchr( name, '\\' ))) name = p + 1; if ((p = strrchr( name, '/' ))) name = p + 1; strcpy( DLLFileName, name ); @@ -132,6 +134,7 @@ static void do_exe_mode( const char *arg ); static void do_module( const char *arg ); static void do_heap( const char *arg ); static void do_name( const char *arg ); +static void do_file( const char *arg ); static void do_entry( const char *arg ); static void do_spec( const char *arg ); static void do_def( const char *arg ); @@ -164,6 +167,7 @@ static const struct option_descr option_table[] = { "-d", 1, do_dimport, "-d lib.dll Delay-import the specified library" }, { "-H", 1, do_heap, "-H size Set the heap size for a Win16 dll" }, { "-N", 1, do_name, "-N dllname Set the DLL name (default: set from input file name)" }, + { "-F", 1, do_file, "-F dllfile Set the DLL filename (default: set from input file name)" }, { "-e", 1, do_entry, "-e function Set the DLL entry point function (default: DllMain)" }, { "-r", 1, do_rsrc, "-r rsrc.res Load resources from rsrc.res" }, { "-res", 1, do_rsrc, NULL }, /* for backwards compatibility, will disappear */ @@ -265,6 +269,12 @@ static void do_name( const char *arg ) DLLName[sizeof(DLLName) - 1] = 0; } +static void do_file( const char *arg ) +{ + strncpy( DLLFileName, arg, sizeof(DLLFileName) ); + DLLFileName[sizeof(DLLFileName) - 1] = 0; +} + static void do_entry( const char *arg ) { init_func = xstrdup( arg );