Autosyncing with Wine HEAD

svn path=/trunk/; revision=32903
This commit is contained in:
The Wine Synchronizer 2008-04-10 11:28:55 +00:00
parent 5be6901e7d
commit 3365da5d85
4 changed files with 28 additions and 20 deletions

View file

@ -253,6 +253,7 @@ static DWORD VERSION_GetFileVersionInfo_PE( LPCWSTR filename, DWORD datasize, LP
if(!hModule) if(!hModule)
{ {
WARN("Could not load %s\n", debugstr_w(filename)); WARN("Could not load %s\n", debugstr_w(filename));
return 0; return 0;
} }
hRsrc = FindResourceW(hModule, hRsrc = FindResourceW(hModule,
@ -382,7 +383,10 @@ static DWORD VERSION_GetFileVersionInfo_16( LPCSTR filename, DWORD datasize, LPV
if(hModule < 32) if(hModule < 32)
{ {
WARN("Could not load %s\n", debugstr_a(filename)); WARN("Could not load %s\n", debugstr_a(filename));
return 0; if (hModule == ERROR_BAD_FORMAT)
return 0xFFFFFFFF;
else
return 0x0;
} }
hRsrc = FindResource16(hModule, hRsrc = FindResource16(hModule,
MAKEINTRESOURCEA(VS_VERSION_INFO), MAKEINTRESOURCEA(VS_VERSION_INFO),

View file

@ -367,7 +367,8 @@ DWORD WINAPI VerInstallFileA(
LPCSTR pdest; LPCSTR pdest;
char destfn[260],tmpfn[260],srcfn[260]; char destfn[260],tmpfn[260],srcfn[260];
HFILE hfsrc,hfdst; HFILE hfsrc,hfdst;
DWORD attr,ret,xret,tmplast; DWORD attr,xret,tmplast;
LONG ret;
LPBYTE buf1,buf2; LPBYTE buf1,buf2;
OFSTRUCT ofs; OFSTRUCT ofs;
@ -419,30 +420,31 @@ DWORD WINAPI VerInstallFileA(
} }
ret = LZCopy(hfsrc,hfdst); ret = LZCopy(hfsrc,hfdst);
_lclose(hfdst); _lclose(hfdst);
if (((LONG)ret) < 0) { if (ret < 0) {
/* translate LZ errors into VIF_xxx */ /* translate LZ errors into VIF_xxx */
switch (ret) { switch (ret) {
case LZERROR_BADINHANDLE: case LZERROR_BADINHANDLE:
case LZERROR_READ: case LZERROR_READ:
case LZERROR_BADVALUE: case LZERROR_BADVALUE:
case LZERROR_UNKNOWNALG: case LZERROR_UNKNOWNALG:
ret = VIF_CANNOTREADSRC; xret = VIF_CANNOTREADSRC;
break; break;
case LZERROR_BADOUTHANDLE: case LZERROR_BADOUTHANDLE:
case LZERROR_WRITE: case LZERROR_WRITE:
ret = VIF_OUTOFSPACE; xret = VIF_OUTOFSPACE;
break; break;
case LZERROR_GLOBALLOC: case LZERROR_GLOBALLOC:
case LZERROR_GLOBLOCK: case LZERROR_GLOBLOCK:
ret = VIF_OUTOFMEMORY; xret = VIF_OUTOFMEMORY;
break; break;
default: /* unknown error, should not happen */ default: /* unknown error, should not happen */
ret = 0; FIXME("Unknown LZCopy error %d, ignoring.\n", ret);
xret = 0;
break; break;
} }
if (ret) { if (xret) {
LZClose(hfsrc); LZClose(hfsrc);
return ret; return xret;
} }
} }
} }

View file

@ -1,19 +1,21 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="version" type="win32dll" entrypoint="0" baseaddress="${BASEADDRESS_VERSION}" installbase="system32" installname="version.dll" allowwarnings="true"> <group>
<module name="version" type="win32dll" baseaddress="${BASEADDRESS_VERSION}" installbase="system32" installname="version.dll" allowwarnings="true" entrypoint="0">
<importlibrary definition="version.spec.def" /> <importlibrary definition="version.spec.def" />
<include base="version">.</include> <include base="version">.</include>
<include base="ReactOS">include/reactos/wine</include> <include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" /> <define name="__WINESRC__" />
<define name="WINVER">0x600</define> <define name="WINVER">0x600</define>
<define name="_WIN32_WINNT">0x600</define> <define name="_WIN32_WINNT">0x600</define>
<library>wine</library>
<library>lz32</library>
<library>kernel32</library>
<library>ntdll</library>
<file>info.c</file> <file>info.c</file>
<file>install.c</file> <file>install.c</file>
<file>resource.c</file> <file>resource.c</file>
<file>version.rc</file> <file>version.rc</file>
<file>version.spec</file> <file>version.spec</file>
<library>wine</library>
<library>lz32</library>
<library>kernel32</library>
<library>ntdll</library>
</module> </module>
</group>

View file

@ -10,7 +10,7 @@ Index: info.c
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "winerror.h" #include "winerror.h"
@@ -302,6 +303,7 @@ @@ -303,6 +304,7 @@
return len; return len;
} }
@ -18,7 +18,7 @@ Index: info.c
/*********************************************************************** /***********************************************************************
* VERSION_GetFileVersionInfo_16 [internal] * VERSION_GetFileVersionInfo_16 [internal]
* *
@@ -435,6 +438,7 @@ @@ -439,6 +442,7 @@
return len; return len;
} }
@ -26,7 +26,7 @@ Index: info.c
/*********************************************************************** /***********************************************************************
* GetFileVersionInfoSizeW [VERSION.@] * GetFileVersionInfoSizeW [VERSION.@]
@@ -468,6 +471,10 @@ @@ -472,6 +475,10 @@
if (!len) if (!len)
{ {
@ -37,7 +37,7 @@ Index: info.c
LPSTR filenameA; LPSTR filenameA;
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL ); len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
@@ -499,6 +506,7 @@ @@ -503,6 +510,7 @@
* doesn't seem to be a problem (len is bigger than info->wLength). * doesn't seem to be a problem (len is bigger than info->wLength).
*/ */
len = (len - sizeof(VS_FIXEDFILEINFO)) * 4; len = (len - sizeof(VS_FIXEDFILEINFO)) * 4;
@ -45,7 +45,7 @@ Index: info.c
} }
else else
{ {
@@ -563,6 +571,10 @@ @@ -567,6 +575,10 @@
if (!len) if (!len)
{ {
@ -56,7 +56,7 @@ Index: info.c
LPSTR filenameA; LPSTR filenameA;
len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL ); len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
@@ -578,6 +590,7 @@ @@ -582,6 +594,7 @@
return FALSE; return FALSE;
} }
/* We have a 16bit resource. */ /* We have a 16bit resource. */