forked from Mirrors/wine-wine
extrac32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>stable
parent
b5e2f767b6
commit
7cbae6b62c
|
@ -1,6 +1,7 @@
|
||||||
MODULE = extrac32.exe
|
MODULE = extrac32.exe
|
||||||
APPMODE = -mwindows -municode
|
|
||||||
IMPORTS = shell32 setupapi shlwapi user32
|
IMPORTS = shell32 setupapi shlwapi user32
|
||||||
|
|
||||||
|
EXTRADLLFLAGS = -mwindows -municode -mno-cygwin
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
extrac32.c
|
extrac32.c
|
||||||
|
|
|
@ -19,13 +19,13 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
#include <setupapi.h>
|
#include <setupapi.h>
|
||||||
#include <shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
|
||||||
#include "wine/unicode.h"
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(extrac32);
|
WINE_DEFAULT_DEBUG_CHANNEL(extrac32);
|
||||||
|
@ -38,7 +38,7 @@ static void create_target_directory(LPWSTR Target)
|
||||||
WCHAR dir[MAX_PATH];
|
WCHAR dir[MAX_PATH];
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
strcpyW(dir, Target);
|
lstrcpyW(dir, Target);
|
||||||
*PathFindFileNameW(dir) = 0; /* Truncate file name */
|
*PathFindFileNameW(dir) = 0; /* Truncate file name */
|
||||||
if(!PathIsDirectoryW(dir))
|
if(!PathIsDirectoryW(dir))
|
||||||
{
|
{
|
||||||
|
@ -118,7 +118,7 @@ static void copy_file(LPCWSTR source, LPCWSTR destination)
|
||||||
static const WCHAR overwriteMsg[] = {'O','v','e','r','w','r','i','t','e',' ','"','%','s','"','?',0};
|
static const WCHAR overwriteMsg[] = {'O','v','e','r','w','r','i','t','e',' ','"','%','s','"','?',0};
|
||||||
static const WCHAR titleMsg[] = {'E','x','t','r','a','c','t',0};
|
static const WCHAR titleMsg[] = {'E','x','t','r','a','c','t',0};
|
||||||
WCHAR msg[MAX_PATH+100];
|
WCHAR msg[MAX_PATH+100];
|
||||||
snprintfW(msg, ARRAY_SIZE(msg), overwriteMsg, destination);
|
swprintf(msg, ARRAY_SIZE(msg), overwriteMsg, destination);
|
||||||
if (MessageBoxW(NULL, msg, titleMsg, MB_YESNO | MB_ICONWARNING) != IDYES)
|
if (MessageBoxW(NULL, msg, titleMsg, MB_YESNO | MB_ICONWARNING) != IDYES)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -137,9 +137,9 @@ static LPWSTR *get_extrac_args(LPWSTR cmdline, int *pargc)
|
||||||
BOOL new_arg;
|
BOOL new_arg;
|
||||||
|
|
||||||
WINE_TRACE("cmdline: %s\n", wine_dbgstr_w(cmdline));
|
WINE_TRACE("cmdline: %s\n", wine_dbgstr_w(cmdline));
|
||||||
str = HeapAlloc(GetProcessHeap(), 0, (strlenW(cmdline) + 1) * sizeof(WCHAR));
|
str = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(cmdline) + 1) * sizeof(WCHAR));
|
||||||
if(!str) return NULL;
|
if(!str) return NULL;
|
||||||
strcpyW(str, cmdline);
|
lstrcpyW(str, cmdline);
|
||||||
argv = HeapAlloc(GetProcessHeap(), 0, (max_argc + 1) * sizeof(LPWSTR));
|
argv = HeapAlloc(GetProcessHeap(), 0, (max_argc + 1) * sizeof(LPWSTR));
|
||||||
if(!argv)
|
if(!argv)
|
||||||
{
|
{
|
||||||
|
@ -154,7 +154,7 @@ static LPWSTR *get_extrac_args(LPWSTR cmdline, int *pargc)
|
||||||
{
|
{
|
||||||
new_arg = FALSE;
|
new_arg = FALSE;
|
||||||
/* Check character */
|
/* Check character */
|
||||||
if(isspaceW(*str)) /* white space */
|
if(iswspace(*str)) /* white space */
|
||||||
{
|
{
|
||||||
if(state == INSIDE_ARG)
|
if(state == INSIDE_ARG)
|
||||||
{
|
{
|
||||||
|
@ -257,7 +257,7 @@ int PASCAL wWinMain(HINSTANCE hInstance, HINSTANCE prev, LPWSTR cmdline, int sho
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Get parameters for commands */
|
/* Get parameters for commands */
|
||||||
check = toupperW( argv[i][1] );
|
check = towupper( argv[i][1] );
|
||||||
switch(check)
|
switch(check)
|
||||||
{
|
{
|
||||||
case 'A':
|
case 'A':
|
||||||
|
|
Loading…
Reference in New Issue