Mouse copy/paste support (Windows)

Here you can discuss the development of patches.

Re: Mouse copy/paste support

Postby truth_deleted » 2014-10-26 @ 00:47

Since the clipboard patch requires a 3rd party library, it may be worthwhile to detect that library by the method in a previous post in this thread (edit to the configure.ac file). However, I didn't test it outside mingw. Also, before running configure it would be necessary to run "autogen.sh" (or the analog in VS).

In addition, the above could be accompanied by preprocessor directives so that the patch code is only compiled when the proper library is present:
#if C_CLIPBOARD
// Clipboard code
#endif
truth_deleted
 

Re: Mouse copy/paste support

Postby Wengier » 2014-10-26 @ 02:54

truth5678 wrote:Since the clipboard patch requires a 3rd party library, it may be worthwhile to detect that library by the method in a previous post in this thread (edit to the configure.ac file). However, I didn't test it outside mingw. Also, before running configure it would be necessary to run "autogen.sh" (or the analog in VS).

In addition, the above could be accompanied by preprocessor directives so that the patch code is only compiled when the proper library is present:
#if C_CLIPBOARD
// Clipboard code
#endif


I have added preprocessor directives to the source files related to the clipboard. Source files related to this feature have been zipped and attached. I have also attached in diff format.
You do not have the required permissions to view the files attached to this post.
Wengier
Member
 
Posts: 110
Joined: 2014-9-03 @ 19:56

Re: Mouse copy/paste support

Postby truth_deleted » 2014-10-26 @ 05:08

Thank you! The clipboard support works perfectly.
truth_deleted
 

Re: Mouse copy/paste support

Postby emendelson » 2014-10-26 @ 12:41

On OS X, using a build script supplied by Dominus some years ago, I can build DOSBox with Wengier's new copy/paste code, but I can't figure out how to get the curses library integrated, so the copy/paste function doesn't work.

This is probably the result of my ignorance, so I'll be grateful for any help. I tried compiling PDCurses, but it needs X on the system, and X isn't installed on recent OS X systems. I wasn't able to compile Ncurses, which may be the way to go. Has anyone got any further with this?
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Re: Mouse copy/paste support

Postby Dominus » 2014-10-26 @ 13:20

In the makefile you need to add pdcurses libs a file, but that doesn't matter if it doesn't compile.
Download and install xquartz maybe it will compile with that.
BUT if x is needed for the copy/paste you are not much better off than with gtk ;(
AND you will find yourself in OS X' dll hell if you want to maje your build available ;(
I haven't had time to test this myself yet...
User avatar
Dominus
DOSBox Moderator
 
Posts: 7575
Joined: 2002-10-03 @ 09:54
Location: Vienna or Ludwigsburg

Re: Mouse copy/paste support

Postby emendelson » 2014-10-26 @ 13:35

That's what I was afraid of...! I'm trying to avoid installing xquartz in my main system, in order to stop myself from distributing anything that needs it on the user's system. I'll try to experiment on a VMware setup later on, but will glad to know what you find out when you get a chance to try it.
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Re: Mouse copy/paste support

Postby Wengier » 2014-10-26 @ 13:59

I have re-checked the officially supported platforms of PDCurses, which are DOS, OS/2, Win32, X11 and SDL. Probably you should use PDCurses-SDL instead of PDCurses-X11 on Mac OS X. I don't have OS X to test it personally though.
Wengier
Member
 
Posts: 110
Joined: 2014-9-03 @ 19:56

Re: Mouse copy/paste support

Postby emendelson » 2014-10-26 @ 14:09

That sounds right, Wengier. I'm still trying to figure out how to build (or obtain) PDCurses-SDL for OS X, and will report back if I find anything.
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Re: Mouse copy/paste support

Postby emendelson » 2014-10-26 @ 14:30

I've tried to compile the sdl version of pdcurses under OS X, but get an error message about not finding sdl.h. I've installed sdl-config via Macports, but it didn't help. I hope someone who knows what he or she is doing (as I don't) might be able to help, but I'll keep trying in the meantime.
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Re: Mouse copy/paste support

Postby Wengier » 2014-10-26 @ 17:45

emendelson wrote:I've tried to compile the sdl version of pdcurses under OS X, but get an error message about not finding sdl.h. I've installed sdl-config via Macports, but it didn't help. I hope someone who knows what he or she is doing (as I don't) might be able to help, but I'll keep trying in the meantime.


Maybe try some links relating to the sdl.h not found error below?

http://stackoverflow.com/questions/2027 ... der-in-mac
http://stackoverflow.com/questions/9350 ... -directory
http://www.linuxquestions.org/questions ... re-133384/
Last edited by Wengier on 2014-10-26 @ 18:13, edited 1 time in total.
Wengier
Member
 
Posts: 110
Joined: 2014-9-03 @ 19:56

Re: Mouse copy/paste support

Postby Wengier » 2014-10-26 @ 17:50

For people who prefer a different color style for the mouse selection, I have attached the Windows binary (along with all required DLLs, zipped), and the updated mouse.cpp file.
You do not have the required permissions to view the files attached to this post.
Wengier
Member
 
Posts: 110
Joined: 2014-9-03 @ 19:56

Re: Mouse copy/paste support

Postby emendelson » 2014-10-26 @ 20:23

Wengier wrote:
emendelson wrote:I've tried to compile the sdl version of pdcurses under OS X, but get an error message about not finding sdl.h. I've installed sdl-config via Macports, but it didn't help. I hope someone who knows what he or she is doing (as I don't) might be able to help, but I'll keep trying in the meantime.


Maybe try some links relating to the sdl.h not found error below?

http://stackoverflow.com/questions/2027 ... der-in-mac
http://stackoverflow.com/questions/9350 ... -directory
http://www.linuxquestions.org/questions ... re-133384/


Thank you, Wengier! I should have figured that out for myself, but I didn't. In my case, because I installed SDL via MacPorts, the command line I needed to use was this:

Code: Select all
make -I/opt/local/include/SDL/ -lSDL


Now I have to figure out how to get libpdcurses.a built into DOSBox under OS X...

EDIT: I've attached a copy of libpdcurses.a compiled under Mavericks.
You do not have the required permissions to view the files attached to this post.
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Re: Mouse copy/paste support

Postby Wengier » 2014-10-27 @ 13:59

emendelson wrote:
Wengier wrote:
emendelson wrote:I've tried to compile the sdl version of pdcurses under OS X, but get an error message about not finding sdl.h. I've installed sdl-config via Macports, but it didn't help. I hope someone who knows what he or she is doing (as I don't) might be able to help, but I'll keep trying in the meantime.


Maybe try some links relating to the sdl.h not found error below?

http://stackoverflow.com/questions/2027 ... der-in-mac
http://stackoverflow.com/questions/9350 ... -directory
http://www.linuxquestions.org/questions ... re-133384/


Thank you, Wengier! I should have figured that out for myself, but I didn't. In my case, because I installed SDL via MacPorts, the command line I needed to use was this:

Code: Select all
make -I/opt/local/include/SDL/ -lSDL


Now I have to figure out how to get libpdcurses.a built into DOSBox under OS X...

EDIT: I've attached a copy of libpdcurses.a compiled under Mavericks.


For getting libpdcurses built into DOSBox, have you tried the method in truth5678's earlier post that makes change to the configure file and my earlier post that adds the preprocessor directive?
Wengier
Member
 
Posts: 110
Joined: 2014-9-03 @ 19:56

Re: Mouse copy/paste support

Postby emendelson » 2014-10-28 @ 01:40

Hello Wengier,

I've tried both techniques, but I don't seem to have the syntax correct for modifying the makefile to add libpdcurses.a.

The real expert in this is Dominus, and I'll hope that he'll have time to think about this before long. I'm simply stumbling around, and everything I know about building DOSBox on the Mac is what Dominus told me earlier...

Meanwhile, Wengier, thank you again for your generosity with help and with these terrific patches.
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Re: Mouse copy/paste support

Postby truth_deleted » 2014-10-28 @ 03:32

Wengier is right to suggest trying the configure flags first, since hacking the makefile breaks the autotools build system. It may work to circumvent an issue, but it doesn't help design a cross-platform build.
truth_deleted
 

Re: Mouse copy/paste support

Postby emendelson » 2014-10-28 @ 12:33

I tried both methods, but without success. The OS X build seems to require a set of interlocking kludges that Dominus worked out, and since he understands these things (I don't), I'll hope he gives it a try someday.
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Re: Mouse copy/paste support

Postby truth_deleted » 2014-10-28 @ 18:06

Could you document your methods and steps to help the author in designing his patch?
truth_deleted
 

Re: Mouse copy/paste support

Postby emendelson » 2014-10-28 @ 18:44

OK, please keep in mind that I don't know what I'm doing, and that so far, I have done only what Dominus told me to do, using a build script based on his suggestions. In trying to apply the CopyPaste patch, I did the following:

1. Starting with current SVN, I substituted all of Wengier's "srschanges" files for the SVN files.

2. I built libpcurses.a following suggestions in Wengier's earlier message.

3. I modified the build script that Dominus helped me put together by making these two changes: I added --enable-clipboard to the configure line and added the references to libpdcurses.a to the sed lines that modify the makefiles.

The build script I use is completely non-portable, because it refers to directories on my system. But, thanks to Dominus, it works when building SVN. I've attached it here.

By the way, the reason my script has all these complicated additions is that I want to build an executable that can be used on other people's systems, not only my own, so various libraries have to be built in.
You do not have the required permissions to view the files attached to this post.
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Re: Mouse copy/paste support

Postby Wengier » 2014-10-28 @ 20:06

Hi emendelson, have you seen any error messages after doing these steps?
Wengier
Member
 
Posts: 110
Joined: 2014-9-03 @ 19:56

Re: Mouse copy/paste support

Postby truth_deleted » 2014-10-28 @ 20:12

I don't see where you submitted the library name to the linker: -lpdcurses. Also, did you ensure that curses.h was copied to /opt/local/include?

Did you inspect the config.log file to see if curses.h and pdcurses were detected? This assumes that the configure script was formatted properly for pdcurses detection in osx.

Edit: I inadvertently posted this after Wengier's post. His request for an error message would answer the 2nd question above.
truth_deleted
 

PreviousNext

Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 3 guests