rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: pierissimo on February 08, 2009, 01:10:27 PM

Title: wine+hfs+arguments
Post by: pierissimo on February 08, 2009, 01:10:27 PM
Hi!
I am an old user of hfs software!I use it on ubuntu linux with wine.
My question is, there is a way to pass arguments to hfs on linux?
for example, in windows,from the prompt the command:
hfs file1 file2
works, on linux, with wine, I do not manage to make it works.
on bash, I create a simple script:
Code: [Select]
#!/bin/bash
wine /home/piero/programmi/hfs/hfs.exe "$@"
but do not works, then I modified the script, passing as arguments, the full path of a file,keep in mind that wine assigns "z:/" letters to my home partition.
Code: [Select]
#!/bin/bash

function abspath() {
DIR=`dirname "$1"`
NAM=`basename "$1" | sed "s: :\ :g"`
FDIR=`cd "$DIR"; pwd`
echo $FDIR/$NAM
}

finalString="";
for word in $@;
do
finalString=$finalString" z:"$(abspath "$word");
done
wine /home/piero/programmi/hfs/hfs.exe "$finalString"

so the script will pass on hfs a line similar to this:
Code: [Select]
wine /home/piero/programmi/hfs/hfs.exe "z:/home/piero/Desktop/file1 z:/home/piero/Desktop/file2"
but it do not works...
some suggestions?
Title: Re: wine+hfs+arguments
Post by: Mars on February 08, 2009, 02:36:05 PM
Quote
Passing command line parameters to Xilinx tools under Linux/WINE

If you are using WINE and invoke Xilinx command line parameters without modification, the switches will be interpreted as WINE command line parameters. WINE uses a double dash (--) to signify that the parameters following the double dash are to be interpreted by the program that is being called up by WINE. There are two ways to correctly pass parameters:

1. (Recommended Method) "wine ngdbuild -- -p xcv50-6bg256 top.edf DESIGN_NAME.ngd".

2. (Alternate Method) "wine -- ngdbuild -p xcv50-6bg256 top.edf DESIGN_NAME.ngd".

http://www.xilinx.com/support/answers/14629.htm

take the second solution :
wine -- /home/piero/programmi/hfs/hfs.exe hfs_parameters  
Title: Re: wine+hfs+arguments
Post by: pierissimo on February 08, 2009, 09:24:13 PM
do not works!

Code: [Select]
piero@pnblin:~/Desktop$ wine -- /home/piero/programmi/hfs/hfs.exe Schermata.png
wine: could not load L"C:\\windows\\system32\\--.exe": Module not found
Title: Re: wine+hfs+arguments
Post by: Mars on February 08, 2009, 09:28:45 PM
and with the other?

wine  /home/piero/programmi/hfs/hfs.exe -- hfs_parameters
Title: Re: wine+hfs+arguments
Post by: pierissimo on February 08, 2009, 09:34:48 PM
I tried it, but the path is recognized not correctly(same as before).
The path is recognized not as "Y:/home/piero/Desktop/Schermata.png" but just as "Schermata.png"
Title: Re: wine+hfs+arguments
Post by: Mars on February 08, 2009, 09:58:22 PM
make it with the two full path
wine  /home/piero/programmi/hfs/hfs.exe -- Y:\home\piero\Desktop\Schermata.png

and

wine  /home/piero/programmi/hfs/hfs.exe -- "Y:\home\piero\Desktop\Schermata.png"
don't forget that / is a folder separator under linux and \  under windows
Title: Re: wine+hfs+arguments
Post by: pierissimo on February 08, 2009, 10:03:24 PM
neither... the second one is recognized as "YhomepieroDesktopSchermata.png"
Title: Re: wine+hfs+arguments
Post by: pierissimo on February 08, 2009, 10:10:09 PM
I realized that the path of my home "/home/piero/" is recognized in hfs just as "Y:" !!!
Now is more clear!
thanx mars!
I manage to make an integration of hfs with nautilus contextual menu.

Hi

(sorry for bad english)