I write a Windows application that I want to be useful under Linux & WINE. I want to use xchm to view the help documentation .chm file since WINE doesn't yet properly display this .chm file which was generated with third party tools and includes advanced features. xchm does render the file acceptably and I'll e-mail the .chm file to anyone interested in that.
But for the time being, I want to simply launch xchm from my app whenever my app finds itself being run under WINE. What I have is done so far is system() a command with path names of xchm and my .chm file that seem to basically be trying to outsmart WINE outsmarting Windows. Clearly this is an ugly hack and is not a long term solution.
Is there a supported/recommended manner of launching an X Window System executable with Linux absolute path arguments from a MS Windows application running under Linux & WINE?
--Mike
On Tue, Sep 9, 2008 at 11:24 AM, Mike Engelhardt mike.engelhardt@sbcglobal.net wrote:
Is there a supported/recommended manner of launching an X Window System executable with Linux absolute path arguments from a MS Windows application running under Linux & WINE?
There is a script to invoke native apps that have a windows association. I don't know if this will really work the way you want. If you expect to be able to just click on help and have it invoke xchm for chm files, then no but if there is a windows association set and your application tries to open the file using the association method, like say you have pdf files registered using xpdf and IE tries to Open the pdf, then yes it will work.
Steve,
On Tue, Sep 9, 2008 at 11:24 AM, Mike Engelhardt mike.engelhardt@sbcglobal.net wrote:
Is there a supported/recommended manner of launching an X Window System executable with Linux absolute path arguments from a MS Windows application running under Linux & WINE?
There is a script to invoke native apps that have a windows association. I don't know if this will really work the way you want. If you expect to be able to just click on help and have it invoke xchm for chm files, then no but if there is a windows association set and your application tries to open the file using the association method, like say you have pdf files registered using xpdf and IE tries to Open the pdf, then yes it will work.
I'm do not want to change global associations, I just want a way to launch a Linux executable from a Windows program. Right now, I've written the Windows app to do this:
char XchmViewer[MAX_PATH] = "Z:\usr\bin\xchm"; sprintf(cmd, "%s %s", XchmViewer, helpfilepath); system(cmd);
Where the helpfilepath is computed to outsmart WINE trying to outsmart Windows. I also don't like that I have to use a path like "Z:\usr\bin\xchm" to invoke /usr/bin/xchm since my app should not need to know what the drive letters are.
Since I'm the one writing the Windows app, I would like to be able to launch a better native Linux app to launch than WINE's .chm viewer.
--Mike
2008/9/9 Mike Engelhardt mike.engelhardt@sbcglobal.net:
Steve,
On Tue, Sep 9, 2008 at 11:24 AM, Mike Engelhardt mike.engelhardt@sbcglobal.net wrote:
Is there a supported/recommended manner of launching an X Window System executable with Linux absolute path arguments from a MS Windows application running under Linux & WINE?
There is a script to invoke native apps that have a windows association. I don't know if this will really work the way you want. If you expect to be able to just click on help and have it invoke xchm for chm files, then no but if there is a windows association set and your application tries to open the file using the association method, like say you have pdf files registered using xpdf and IE tries to Open the pdf, then yes it will work.
I'm do not want to change global associations, I just want a way to launch a Linux executable from a Windows program. Right now, I've written the Windows app to do this:
char XchmViewer[MAX_PATH] = "Z:\usr\bin\xchm"; sprintf(cmd, "%s %s", XchmViewer, helpfilepath); system(cmd);
Where the helpfilepath is computed to outsmart WINE trying to outsmart Windows. I also don't like that I have to use a path like "Z:\usr\bin\xchm" to invoke /usr/bin/xchm since my app should not need to know what the drive letters are.
Since I'm the one writing the Windows app, I would like to be able to launch a better native Linux app to launch than WINE's .chm viewer.
Hi Mike,
You should you should just do "ShellExecute(helpfilepath)" and set the default value of HKCR\chm.file\shell\open\command to Z:\usr\bin\xchm on install and the user can change this if he or she wishes.
I think it is safe to assume that Z: will always map to "/" in Wine. You can always not install the association if Z: isn't mapped to anything.