Board index » kylix » View readme file with Kylix 3

View readme file with Kylix 3


2005-04-18 02:22:10 PM
kylix2
I need a way to give the user an option to view a readme file with a
Kylix 3 Delphi application. I have a checkbox that asks the user if they
want to view the readme file. When this checkbox is checked the readme
file is suppose to be launched when the user clicks a finish button. My
intention is for the readme file to be viewed by the user with their
default viewer.
I have been able to do this on my distro using 'ShellExecute' from the
QWindows unit and the following code:
if Libc.system(PChar(Format(SCommand_Readme, [ReadmeFile]))) <>-1 then
where
SCommand_Readme = './kfmclient exec "%s"';
When I tested this on Debian Sarge it failed with an error dialog box.
On Mandrake 10.1 it ignored the option.
Does anyone have a solution to this problem that I could use. I'm also
open to use my own viewer application to view the readme file if necessary.
Corwin
 
 

Re:View readme file with Kylix 3

Corwin Burgess wrote:
Quote
intention is for the readme file to be viewed by the user with their
default viewer.
They may not have a viewer, and there is no standard launch mechanism
because there is no standard environment. I'd just use a TMemo.
 

Re:View readme file with Kylix 3

On 2005-04-18, Forrest < XXXX@XXXXX.COM >wrote:
Quote
Corwin Burgess wrote:

>intention is for the readme file to be viewed by the user with their
>default viewer.

They may not have a viewer, and there is no standard launch mechanism
because there is no standard environment. I'd just use a TMemo.
There is, $PAGER contains the default file. However that is cmdline.
 

{smallsort}

Re:View readme file with Kylix 3

Marco van de Voort wrote:
Quote
$PAGER contains the default file. However that is cmdline.
Over here, 'echo $PAGER' returns nothing...
 

Re:View readme file with Kylix 3

Using TMemo is what I do for my Win32 Apps as well. It guarantees they see
it.
"Forrest" < XXXX@XXXXX.COM >wrote in message
Quote
Corwin Burgess wrote:

>intention is for the readme file to be viewed by the user with their
>default viewer.

They may not have a viewer, and there is no standard launch mechanism
because there is no standard environment. I'd just use a TMemo.
 

Re:View readme file with Kylix 3

Forrest wrote:
Quote
Corwin Burgess wrote:

>intention is for the readme file to be viewed by the user with their
>default viewer.


They may not have a viewer, and there is no standard launch mechanism
because there is no standard environment. I'd just use a TMemo.
Thanks for your suggestion. I've given up on the default viewer idea.
Instead of using TMemo I used TTextViewer.
 

Re:View readme file with Kylix 3

On 2005-04-18, Forrest < XXXX@XXXXX.COM >wrote:
Quote
Marco van de Voort wrote:
>$PAGER contains the default file. However that is cmdline.

Over here, 'echo $PAGER' returns nothing...
Badly configured system :-)
-bash-2.05b$ echo $PAGER
less
-bash-2.05b$ echo $EDITOR
joe
-bash-2.05b$