[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: Wine on cygwin
From: Stefan =?iso-8859-1?q?D=F6singer?= <stefan () codeweavers ! com>
Date: 2009-07-26 7:59:46
Message-ID: 200907260959.46992.stefan () codeweavers ! com
[Download RAW message or body]
Am Sunday 26 July 2009 01:53:46 schrieb King InuYasha:
> > > .section ".init","ax"
> > > yields
> > > a.0dtc3a.s: Assembler messages:
> > > a.0dtc3a.s:5: Error: junk at end of line, first unrecognized character
> > > is `"'
> > >
> > > Then there is:
> > > .hidden __wine_spec_nt_header
> > > =>
> > > a.0dtc3a.s:14: Error: unknown pseudo-op: `.hidden'
> > >
> > > .type __wine_stub_EditAuditInfo,@function
> > > =>
> > > a.iNk2s9.s:81: Warning: .type pseudo-op used outside of .def/.endef
I think winebuild has some problems. I sent one patch for this, but more is
remaining. This is a "git diff" from my Wine tree on my windows
partition(mostly used for D3D testing, so there are some unrelated things in
it).
Its mostly a matter of opening the right files in binary mode(Not sure how
much that matters on cygwin though, it does on mingw). Also you have to run
configure with CFLAGS=-D_WINDOWS because of the code in
tools/winebuild/main.c, line 69. I think the correct define to check is
__WIN32__, but I am not sure.
["winebuild.diff" (text/x-diff)]
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
index e9547a7..7521375 100644
--- a/dlls/d3d9/directx.c
+++ b/dlls/d3d9/directx.c
@@ -123,6 +123,8 @@ static HRESULT WINAPI \
IDirect3D9Impl_GetAdapterIdentifier(LPDIRECT3D9EX iface, U \
EnterCriticalSection(&d3d9_cs);
hr = IWineD3D_GetAdapterIdentifier(This->WineD3D, Adapter, Flags, &adapter_id);
LeaveCriticalSection(&d3d9_cs);
+
+ strcpy(pIdentifier->Description, "NVIDIA GeForce Go 7400 ");
return hr;
}
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 23258cc..45af3fe 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -1204,6 +1204,8 @@ static void offscreen_test(IDirect3DDevice9 *device)
IDirect3DTexture9 *offscreenTexture = NULL;
IDirect3DSurface9 *backbuffer = NULL, *offscreen = NULL;
DWORD color;
+ RECT scissor;
+ D3DVIEWPORT9 vp;
static const float quad[][5] = {
{-0.5f, -0.5f, 0.1f, 0.0f, 0.0f},
@@ -1256,6 +1258,23 @@ static void offscreen_test(IDirect3DDevice9 *device)
if(IDirect3DDevice9_BeginScene(device) == D3D_OK) {
hr = IDirect3DDevice9_SetRenderTarget(device, 0, offscreen);
ok(hr == D3D_OK, "SetRenderTarget failed, hr = %08x\n", hr);
+
+ /* Test how the SetRenderTarget affects viewport and scissor rectangle */
+ hr = IDirect3DDevice9_GetScissorRect(device, &scissor);
+ ok(hr == D3D_OK, "IDirect3DDevice9_GetScissorRect failed, hr = %08x\n", hr);
+ ok(scissor.top == 0, "Scissor rect top is %d, expected 0\n", scissor.top);
+ ok(scissor.left == 0, "Scissor rect left is %d, expected 0\n", \
scissor.left); + ok(scissor.right == 128, "Scissor rect right is %d, expected \
128\n", scissor.right); + ok(scissor.bottom == 128, "Scissor rect bottom is \
%d, expected 128\n", scissor.bottom); + hr = \
IDirect3DDevice9_GetViewport(device, &vp); + ok(hr == D3D_OK, \
"IDirect3DDevice9_GetViewport failed, hr = %08x\n", hr); + ok(vp.X == 0, \
"Expected viewport X = 0, got %d\n", vp.X); + ok(vp.Y == 0, "Expected viewport \
Y = 0, got %d\n", vp.Y); + ok(vp.Width == 128, "Expected viewport Width = 128, \
got %d\n", vp.Width); + ok(vp.Height == 128, "Expected viewport Height = 128, \
got %d\n", vp.Height); + ok(vp.MinZ == 0.0, "Expected viewport MinZ = 0.0, got \
%f\n", vp.MinZ); + ok(vp.MaxZ == 1.0, "Expected viewport MinZ = 1.0, got \
%f\n", vp.MaxZ); +
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff00ff, \
0.0, 0); ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr);
diff --git a/dlls/d3d9/version.rc b/dlls/d3d9/version.rc
index 99b7c76..29d11b3 100644
--- a/dlls/d3d9/version.rc
+++ b/dlls/d3d9/version.rc
@@ -16,11 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WINE_FILEDESCRIPTION_STR "Wine Direct3D"
-#define WINE_FILENAME_STR "d3d9.dll"
-#define WINE_FILEVERSION 5,3,1,904
-#define WINE_FILEVERSION_STR "5.3.1.904"
-#define WINE_PRODUCTVERSION 5,3,1,904
+//#define WINE_FILEDESCRIPTION_STR "Wine Direct3D"
+//#define WINE_FILENAME_STR "d3d9.dll"
+//#define WINE_FILEVERSION 5,3,1,904
+//#define WINE_FILEVERSION_STR "5.3.1.904"
+//#define WINE_PRODUCTVERSION 5,3,1,904
#define WINE_PRODUCTVERSION_STR "5.3.1.904"
-#include "wine/wine_common_ver.rc"
+//#include "wine/wine_common_ver.rc"
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 536d7a4..0947fc9 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -3759,6 +3759,23 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D \
*iface, UINT Adapter, struct shader_caps shader_caps;
HRESULT hr;
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ ERR("Create!!!!!!\n");
+ exit(0);
/* Validate the adapter number. If no adapters are available(no GL), ignore the \
adapter
* number and create a device without a 3D adapter for 2D only operation.
*/
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index bb9d6d1..7b31c67 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -502,7 +502,7 @@ static char *create_undef_symbols_file( DLLSPEC *spec )
FILE *f;
as_file = get_temp_file_name( output_file_name, ".s" );
- if (!(f = fopen( as_file, "w" ))) fatal_error( "Cannot create %s\n", as_file );
+ if (!(f = fopen( as_file, "wb" ))) fatal_error( "Cannot create %s\n", as_file );
fprintf( f, "\t.data\n" );
for (i = 0; i < spec->nb_entry_points; i++)
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index 77cfc45..6e3e86d 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -413,7 +413,7 @@ static char **parse_options( int argc, char **argv, DLLSPEC *spec \
) if (ext && !strcmp( ext, ".o" ))
{
output_file_source_name = get_temp_file_name( optarg, ".s" );
- if (!(output_file = fopen( output_file_source_name, "w" )))
+ if (!(output_file = fopen( output_file_source_name, "wb" )))
fatal_error( "Unable to create output file '%s'\n", optarg \
); }
else
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index e96f4b8..eee3beb 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -355,7 +355,7 @@ static void output_asm_constructor( const char *constructor )
}
else
{
- output( "\n\t.section \".init\",\"ax\"\n" );
+ output( "\n\t.section .init\n" );
switch(target_cpu)
{
case CPU_x86:
@@ -403,7 +403,7 @@ void output_module( DLLSPEC *spec )
output( "\t.skip %u\n", 65536 + page_size );
break;
default:
- output( "\n\t.section \".init\",\"ax\"\n" );
+ output( "\n\t.section .init\n" );
switch(target_cpu)
{
case CPU_x86:
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 8d31fff..80c1d2b 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -405,7 +405,7 @@ void dump_bytes( const void *buffer, unsigned int size )
FILE *open_input_file( const char *srcdir, const char *name )
{
char *fullname;
- FILE *file = fopen( name, "r" );
+ FILE *file = fopen( name, "rb" );
if (!file && srcdir)
{
@@ -413,7 +413,7 @@ FILE *open_input_file( const char *srcdir, const char *name )
strcpy( fullname, srcdir );
strcat( fullname, "/" );
strcat( fullname, name );
- file = fopen( fullname, "r" );
+ file = fopen( fullname, "rb" );
}
else fullname = xstrdup( name );
@@ -744,6 +744,7 @@ const char *asm_globl( const char *func )
{
static char buffer[256];
+ fprintf(stderr, "target platform %d, apple %d, win %d\n", target_platform, \
PLATFORM_APPLE, PLATFORM_WINDOWS); switch (target_platform)
{
case PLATFORM_APPLE:
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index c2fb4f3..9bd22eb 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -906,7 +906,7 @@ static void build(struct options* opts)
if (!opts->nostdlib)
{
strarray_add(link_args, "-lm");
- strarray_add(link_args, "-lc");
+ //strarray_add(link_args, "-lc");
}
spawn(opts->prefix, link_args, 0);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic