Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
[EMAIL PROTECTED] ~/detours/samples/bin $ withdll /d:peacehook.dll winmine withdll.exe: Starting: `winmine' 139 [main] winmine 1980 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 12226 [main] winmine 1980 open_stackdumpfile: Dumping stack trace to winmine.exe.stackdump Segmentation fault (core dumped) On Thu, 10 Feb 2005 09:41:33 +0200, David Fraser [EMAIL PROTECTED] wrote: Probably best to test it using a local cygwin X server and a local application. Other than that I don't really understand cygpeace so I probably can't help, but you could always try contact the author though I'm not sure he intends to maintain it Karl Bowden wrote: Hmm. I have got it compiled ok, and installed ok, but it does not seem to have any effect. If I run the 'withdll -d:peacehook.dll winmine' from a remote linux session (with the env vars setup), withdll just sits there. No seg fault, nothing. I just have to end up hitting Ctrl-C. On Tue, 08 Feb 2005 13:57:11 +0200, David Fraser [EMAIL PROTECTED] wrote: Alexander Gottwald wrote: On Tue, 8 Feb 2005, Karl Bowden wrote: Has any body made any more progress on compiling and getting the CygPeace project working? This seems like a very worthwile project if somebody could supply binaries. The only other application I have seen to offer this feature of exporting applications, is the Citrix product. Not compiling is the big issue but running. It constantly crashed with cygwin 1.5.* but was reported to run with cygwin 1.3.* Afair there were some definitions which needed to be changed in order to get cygpeace to work, but these were quite simple changes. Below is error I get to do with inttypes.h that is included by a lot of files. $ make gcc -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C= -c -o ../common/handle.o ../common/handle.c g++ -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C=extern \C\ -c -o ../ui.so/BitmapBlock.o ../ui.so/BitmapBlock.cc In file included from ../ui.so/BitmapBlock.h:33, from ../ui.so/BitmapBlock.cc:29: include/sys/inttypes.h:6: error: conflicting types for `typedef unsigned int uint32_t' /usr/include/stdint.h:28: error: previous declaration as `typedef long unsigned int uint32_t' make: *** [../ui.so/BitmapBlock.o] Error 1 Maybe removing #inlude sys/inttypes.h helps Confirmed that I got it running fine on cygwin 1.3.x If you do make any progress on 1.5.x please report back to the list! David
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Yip i got the segfault now. Oh well. If anybody has some good ideas, just let me know, - Karl On Tue, 15 Feb 2005 11:00:34 +1100, Karl Bowden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] ~/detours/samples/bin $ withdll /d:peacehook.dll winmine withdll.exe: Starting: `winmine' 139 [main] winmine 1980 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 12226 [main] winmine 1980 open_stackdumpfile: Dumping stack trace to winmine.exe.stackdump Segmentation fault (core dumped) On Thu, 10 Feb 2005 09:41:33 +0200, David Fraser [EMAIL PROTECTED] wrote: Probably best to test it using a local cygwin X server and a local application. Other than that I don't really understand cygpeace so I probably can't help, but you could always try contact the author though I'm not sure he intends to maintain it Karl Bowden wrote: Hmm. I have got it compiled ok, and installed ok, but it does not seem to have any effect. If I run the 'withdll -d:peacehook.dll winmine' from a remote linux session (with the env vars setup), withdll just sits there. No seg fault, nothing. I just have to end up hitting Ctrl-C. On Tue, 08 Feb 2005 13:57:11 +0200, David Fraser [EMAIL PROTECTED] wrote: Alexander Gottwald wrote: On Tue, 8 Feb 2005, Karl Bowden wrote: Has any body made any more progress on compiling and getting the CygPeace project working? This seems like a very worthwile project if somebody could supply binaries. The only other application I have seen to offer this feature of exporting applications, is the Citrix product. Not compiling is the big issue but running. It constantly crashed with cygwin 1.5.* but was reported to run with cygwin 1.3.* Afair there were some definitions which needed to be changed in order to get cygpeace to work, but these were quite simple changes. Below is error I get to do with inttypes.h that is included by a lot of files. $ make gcc -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C= -c -o ../common/handle.o ../common/handle.c g++ -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C=extern \C\ -c -o ../ui.so/BitmapBlock.o ../ui.so/BitmapBlock.cc In file included from ../ui.so/BitmapBlock.h:33, from ../ui.so/BitmapBlock.cc:29: include/sys/inttypes.h:6: error: conflicting types for `typedef unsigned int uint32_t' /usr/include/stdint.h:28: error: previous declaration as `typedef long unsigned int uint32_t' make: *** [../ui.so/BitmapBlock.o] Error 1 Maybe removing #inlude sys/inttypes.h helps Confirmed that I got it running fine on cygwin 1.3.x If you do make any progress on 1.5.x please report back to the list! David
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Hmm. I have got it compiled ok, and installed ok, but it does not seem to have any effect. If I run the 'withdll -d:peacehook.dll winmine' from a remote linux session (with the env vars setup), withdll just sits there. No seg fault, nothing. I just have to end up hitting Ctrl-C. On Tue, 08 Feb 2005 13:57:11 +0200, David Fraser [EMAIL PROTECTED] wrote: Alexander Gottwald wrote: On Tue, 8 Feb 2005, Karl Bowden wrote: Has any body made any more progress on compiling and getting the CygPeace project working? This seems like a very worthwile project if somebody could supply binaries. The only other application I have seen to offer this feature of exporting applications, is the Citrix product. Not compiling is the big issue but running. It constantly crashed with cygwin 1.5.* but was reported to run with cygwin 1.3.* Afair there were some definitions which needed to be changed in order to get cygpeace to work, but these were quite simple changes. Below is error I get to do with inttypes.h that is included by a lot of files. $ make gcc -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C= -c -o ../common/handle.o ../common/handle.c g++ -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C=extern \C\ -c -o ../ui.so/BitmapBlock.o ../ui.so/BitmapBlock.cc In file included from ../ui.so/BitmapBlock.h:33, from ../ui.so/BitmapBlock.cc:29: include/sys/inttypes.h:6: error: conflicting types for `typedef unsigned int uint32_t' /usr/include/stdint.h:28: error: previous declaration as `typedef long unsigned int uint32_t' make: *** [../ui.so/BitmapBlock.o] Error 1 Maybe removing #inlude sys/inttypes.h helps Confirmed that I got it running fine on cygwin 1.3.x If you do make any progress on 1.5.x please report back to the list! David
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Probably best to test it using a local cygwin X server and a local application. Other than that I don't really understand cygpeace so I probably can't help, but you could always try contact the author though I'm not sure he intends to maintain it Karl Bowden wrote: Hmm. I have got it compiled ok, and installed ok, but it does not seem to have any effect. If I run the 'withdll -d:peacehook.dll winmine' from a remote linux session (with the env vars setup), withdll just sits there. No seg fault, nothing. I just have to end up hitting Ctrl-C. On Tue, 08 Feb 2005 13:57:11 +0200, David Fraser [EMAIL PROTECTED] wrote: Alexander Gottwald wrote: On Tue, 8 Feb 2005, Karl Bowden wrote: Has any body made any more progress on compiling and getting the CygPeace project working? This seems like a very worthwile project if somebody could supply binaries. The only other application I have seen to offer this feature of exporting applications, is the Citrix product. Not compiling is the big issue but running. It constantly crashed with cygwin 1.5.* but was reported to run with cygwin 1.3.* Afair there were some definitions which needed to be changed in order to get cygpeace to work, but these were quite simple changes. Below is error I get to do with inttypes.h that is included by a lot of files. $ make gcc -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C= -c -o ../common/handle.o ../common/handle.c g++ -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C=extern \C\ -c -o ../ui.so/BitmapBlock.o ../ui.so/BitmapBlock.cc In file included from ../ui.so/BitmapBlock.h:33, from ../ui.so/BitmapBlock.cc:29: include/sys/inttypes.h:6: error: conflicting types for `typedef unsigned int uint32_t' /usr/include/stdint.h:28: error: previous declaration as `typedef long unsigned int uint32_t' make: *** [../ui.so/BitmapBlock.o] Error 1 Maybe removing #inlude sys/inttypes.h helps Confirmed that I got it running fine on cygwin 1.3.x If you do make any progress on 1.5.x please report back to the list! David
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
On Tue, 8 Feb 2005, Karl Bowden wrote: Has any body made any more progress on compiling and getting the CygPeace project working? This seems like a very worthwile project if somebody could supply binaries. The only other application I have seen to offer this feature of exporting applications, is the Citrix product. Not compiling is the big issue but running. It constantly crashed with cygwin 1.5.* but was reported to run with cygwin 1.3.* Afair there were some definitions which needed to be changed in order to get cygpeace to work, but these were quite simple changes. Below is error I get to do with inttypes.h that is included by a lot of files. $ make gcc -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C= -c -o ../common/handle.o ../common/handle.c g++ -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C=extern \C\ -c -o ../ui.so/BitmapBlock.o ../ui.so/BitmapBlock.cc In file included from ../ui.so/BitmapBlock.h:33, from ../ui.so/BitmapBlock.cc:29: include/sys/inttypes.h:6: error: conflicting types for `typedef unsigned int uint32_t' /usr/include/stdint.h:28: error: previous declaration as `typedef long unsigned int uint32_t' make: *** [../ui.so/BitmapBlock.o] Error 1 Maybe removing #inlude sys/inttypes.h helps bye ago -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Alexander Gottwald wrote: On Tue, 8 Feb 2005, Karl Bowden wrote: Has any body made any more progress on compiling and getting the CygPeace project working? This seems like a very worthwile project if somebody could supply binaries. The only other application I have seen to offer this feature of exporting applications, is the Citrix product. Not compiling is the big issue but running. It constantly crashed with cygwin 1.5.* but was reported to run with cygwin 1.3.* Afair there were some definitions which needed to be changed in order to get cygpeace to work, but these were quite simple changes. Below is error I get to do with inttypes.h that is included by a lot of files. $ make gcc -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C= -c -o ../common/handle.o ../common/handle.c g++ -g -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I../common -I./include -DDLLMAIN -D__aconst= -DEXTERN_C=extern \C\ -c -o ../ui.so/BitmapBlock.o ../ui.so/BitmapBlock.cc In file included from ../ui.so/BitmapBlock.h:33, from ../ui.so/BitmapBlock.cc:29: include/sys/inttypes.h:6: error: conflicting types for `typedef unsigned int uint32_t' /usr/include/stdint.h:28: error: previous declaration as `typedef long unsigned int uint32_t' make: *** [../ui.so/BitmapBlock.o] Error 1 Maybe removing #inlude sys/inttypes.h helps Confirmed that I got it running fine on cygwin 1.3.x If you do make any progress on 1.5.x please report back to the list! David
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Kensuke Matsuzaki wrote: Hi, On Sun, 30 May 2004, Ariel Burbaickij wrote: I guess the topic says it all, gentlemen ;-) No. There is currently no possibility to do this. The windows application uses GDI to draw to the screen. There is of course the possibility to catch the GDI calls at some point in the windows layers and translate them to X11 but there is currently no project which has managed to create at least code in alpha stage. Sawanaka did that. He ported PEACE on BSD to Cygwin, it seems to be called Cygpeace. His site is wrote in Japanese. Please use online translation :) http://www.d1.dion.ne.jp/~sawanaka/peace/ Screenshot of 'Mine Sweeper' on X http://www.d1.dion.ne.jp/~sawanaka/peace/winmine.jpg It has not been update since March 16, 2003. Kensuke Matsuzaki Wow! This is amazing! I wish I had known about it before ... Still works, I only had to patch it to set the DEFAULT_CHARSET to Ansi (see ttfont.cc, line 1140 or so for where to patch this) Basic instructions for those not wanting to do the translation (actually this is all in the page): Download detours.exe from http://research.microsoft.com/sn/detours/ wget http://www.d1.dion.ne.jp/~sawanaka/peace/cygpeace-030316.tar.gz Then make cygpeace: tar zxvf cygpeace-030316.tar.gz cd peace/dll/cygpeace make make install Note that you make it in the cygpeace directory, don't try make in the ui.so.dll directory To extract and make detours (requires Visual C++) $ ./detours.exe ([unzip to folder:] ./detours) $ cd detours $ rm lib/detours.pdb $ nmake $ cp samples/bin/withdll.exe /usr/local/bin/ To run a standard windows program using the hook to display in XWindows: $ export PEACE_FONTPATH=`cygpath -u $WINDIR/Fonts` $ export DISPLAY=:0.0 $ XWin -rootless $ openbox # this is just to run a window manager $ withdll -d:peacehook.dll winmine To compile a program to use the hook interface directly: $ cat msgbox.c #include windows.h int main() { MessageBox(NULL, test, NULL, MB_OK); return 0; } $ gcc msgbox.c -o msgbox -L/usr/local/lib -lui.so $ export DISPLAY=:0.0 $ ./msgbox Voila. It even works on a remote X session from Linux :-) David
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
On Tue, 1 Jun 2004, David Fraser wrote: Wow! This is amazing! I wish I had known about it before ... Still works, I only had to patch it to set the DEFAULT_CHARSET to Ansi (see ttfont.cc, line 1140 or so for where to patch this) I got some errors with stdint.h vs sys/inttypes.h and LocalAlloc and two other functions had SIZE_T instead of UINT arguments. But I'm still getting segfaults. The msgbox example segfaults in cygwin1!aclcheck. Are you using the latest packages or some older ones? Are the debug symbols for the cygwin1.dll still available? bye ago -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Alexander Gottwald wrote: On Tue, 1 Jun 2004, David Fraser wrote: Wow! This is amazing! I wish I had known about it before ... Still works, I only had to patch it to set the DEFAULT_CHARSET to Ansi (see ttfont.cc, line 1140 or so for where to patch this) I got some errors with stdint.h vs sys/inttypes.h and LocalAlloc and two other functions had SIZE_T instead of UINT arguments. Yes, I actually forgot another fix I had to make... my full patch attached But I'm still getting segfaults. The msgbox example segfaults in cygwin1!aclcheck. Are you using the latest packages or some older ones? Probably a bit older but not too old ... attached my packages list cygwin 1.3.22 I haven't tried it on a clean install. It is worthwhile checking out previous error messages or using gdb for a backtrace ... in my case the segfault was a font encoding issue, might be different for you Are the debug symbols for the cygwin1.dll still available? Others would know better than me... bye ago Cheers David diff -ur peace.orig/dll/ui.so/keyboard.cc peace/dll/ui.so/keyboard.cc --- peace.orig/dll/ui.so/keyboard.cc 2003-03-12 14:38:37.0 +0200 +++ peace/dll/ui.so/keyboard.cc 2004-06-01 11:38:46.0 +0200 @@ -402,7 +402,7 @@ * @since Windows 98, Windows NT4 SP3 */ EXTERN_C UINT WINAPI -SendInput(UINT nInputs, /* INPUT* */void* pInputs, int size) +SendInput(UINT nInputs, INPUT* pInputs, int size) { ADPRF2(USER32DEBUG, (SendInput [not implemented] ninputs=%u, size=%d\n, nInputs, size)); diff -ur peace.orig/dll/ui.so/ttfont.cc peace/dll/ui.so/ttfont.cc --- peace.orig/dll/ui.so/ttfont.cc 2003-03-12 14:38:37.0 +0200 +++ peace/dll/ui.so/ttfont.cc 2004-06-01 12:39:51.0 +0200 @@ -1178,6 +1178,7 @@ /* Search for matching font */ int facenamelen = strlen(logfont-lfFaceName); + charset = ANSI_CHARSET; for (int i = 0; i fontfiles_num; i++) { FontFileInfo *ffi = fontfiles[i]; diff -ur peace.orig/dll/ui.so/wingdi.cc peace/dll/ui.so/wingdi.cc --- peace.orig/dll/ui.so/wingdi.cc 2003-03-12 14:38:37.0 +0200 +++ peace/dll/ui.so/wingdi.cc 2004-06-01 11:54:59.0 +0200 @@ -210,7 +210,8 @@ guiFont = CreateFontA(12, 0, 0, 0, 0, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, default_font_name); - gdiobj_block_free(guiFont); + if (guiFont) +gdiobj_block_free(guiFont); } return guiFont; cygwin-packages.txt.gz Description: GNU Zip compressed data
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Alexander Gottwald wrote: On Tue, 1 Jun 2004, David Fraser wrote: Alexander Gottwald wrote: But I'm still getting segfaults. The msgbox example segfaults in cygwin1!aclcheck. Are you using the latest packages or some older ones? Probably a bit older but not too old ... attached my packages list cygwin 1.3.22 I guess that's the main difference. I've updated to cygwin 1.5.9 now, and reproduced your bug I haven't tried it on a clean install. It is worthwhile checking out previous error messages or using gdb for a backtrace ... in my case the segfault was a font encoding issue, might be different for you The backtrace ended in cygwin1.dll. I'll try a debug build later. I found that commenting out the add_uithread calls as in the following patch got the msgbox example to work. But the withdll still doesn't work. Will be interested to hear the debug build result. BTW what mailing list should we discuss this on? David diff -ur peace.orig/dll/ui.so/winuser.cc peace/dll/ui.so/winuser.cc --- peace.orig/dll/ui.so/winuser.cc 2003-03-12 14:38:37.0 +0200 +++ peace/dll/ui.so/winuser.cc 2004-06-01 17:32:28.912746295 +0200 @@ -215,13 +215,13 @@ case DLL_THREAD_ATTACH: #ifdef __CYGWIN__ - add_uithread(GetCurrentThreadId()); + // add_uithread(GetCurrentThreadId()); #endif break; case DLL_THREAD_DETACH: #ifdef __CYGWIN__ - del_uithread(GetCurrentThreadId()); + // del_uithread(GetCurrentThreadId()); #endif break; }
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
On Tue, Jun 01, 2004 at 05:38:52PM +0200, David Fraser wrote: BTW what mailing list should we discuss this on? cygwin-xfree cgf
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
On Sun, 30 May 2004, Ariel Burbaickij wrote: I guess the topic says it all, gentlemen ;-) No. There is currently no possibility to do this. The windows application uses GDI to draw to the screen. There is of course the possibility to catch the GDI calls at some point in the windows layers and translate them to X11 but there is currently no project which has managed to create at least code in alpha stage. bye ago -- [EMAIL PROTECTED] http://www.gotti.org ICQ: 126018723
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Hi, On Sun, 30 May 2004, Ariel Burbaickij wrote: I guess the topic says it all, gentlemen ;-) No. There is currently no possibility to do this. The windows application uses GDI to draw to the screen. There is of course the possibility to catch the GDI calls at some point in the windows layers and translate them to X11 but there is currently no project which has managed to create at least code in alpha stage. Sawanaka did that. He ported PEACE on BSD to Cygwin, it seems to be called Cygpeace. His site is wrote in Japanese. Please use online translation :) http://www.d1.dion.ne.jp/~sawanaka/peace/ Screenshot of 'Mine Sweeper' on X http://www.d1.dion.ne.jp/~sawanaka/peace/winmine.jpg It has not been update since March 16, 2003. Kensuke Matsuzaki
Re: Is it somehow possible to start Windows applications from xterm so that they remain in X-Server area?
Ariel Burbaickij [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I guess the topic says it all, gentlemen ;-) With Best Regards Ariel Burbaickij Do you really need that? Have you tried -multiwindow or -rootless? These options will allow you to still see your Windows desktop and other Windows apps behind your X apps. Use -multiwindow if you are not using a separate window manager Use -rootless if you are using a separate window manager If you are using XDM it usually starts a separate window manager for you, so try it with -rootless. Cary