WineHQ
Wine Forums

Board index » WineHQ » Wine Help




 Page 1 of 1 [ 2 posts ] 



 
Author Message
 Post Posted: Mon Jun 09, 2008 8:22 am 
Offline
Level 3
Level 3
User avatar

Joined: Sat Feb 23, 2008 1:08 pm
Posts: 70
Location: 13032
On Thu, Jan 31, 2008 at 3:37 PM, A. Tres Finocchiaro
<tres.finocchiaro@gmail.com> wrote:
Quote:
You are completely correct. How about something like this? Just right click >> open with >> winestart. (attached)

-Tres


#!/bin/bash
#
# /usr/bin/winestart
#
# Appends "Z:" to native linux paths, such as /home/jsmit/Desktop/test.txt
# so that wine can launch "Z:/home/jsmit/Desktop/test.xt" with its native
# program.
#
wine start "Z:$@";


On Thu, Jan 31, 2008 at 10:43 AM, Ove Kaaven <ovek@arcticnet.no> wrote:
Quote:
A. Tres Finocchiaro skrev:
Quote:
As far as going in the other direction, simply using "wine start
/path/to/file" in theory would launch wine's default app for that
association. Should be a one-liner.

From what I know, that won't work because Wine's start.exe (like
Windows's) interprets a leading slash as an option, not as a path.
(Debian bug #420207 told me. So I suggested "wine start `winepath -w
/path/to/file`" instead...)





--
- Tres.Finocchiaro@gmail.com


Newer version: Thanks to Hilary BH Wright.


#!/bin/sh
# /usr/bin/winenative
#
# Liscense: GPL >= V3
# Author: A. Tres Finocchiaro
# Modified: May 2008 Hilary BH Wright
#
# Used to call on the native linux OS to launch a filetype in Wine.
# For example, if you have a Microsoft Word document, but want to
# use the Linux version of OpenOffice Writer to open it, simply call:
# @="/usr/bin/winenative "%1""
# in
# HKEY_CLASSES_ROOT\linuxnative\shell\open\command
#
# This assumes you've already added:
# @="linuxnative"
# to
# HKEY_CLASSES_ROOT\.doc --> "Content Type"
#

# The native command to open the file. This can be changed to $1, $2
# if you'd like to set up input variables, or you can type "openoffice"
# or something similar if you'd like to statically map it.
#
# If you don't use gnome, change it to your desktop's equivelant, and
# update this comment!
cmd_open="gnome-open";

# The url of the file. Change to $2, etc if you want to take the 2nd
# input variable in your call.

win_file=$1;

# Transform the windows path to the linux path with the 'winpath' command
# (i.e. C:\Windows\Temp\1.doc to /home/tfino/.wine/drive_c/etc)
# NOTE1: The ticks are (` = tilde key) NOT (' = quote key).
# NOTE2: You need the "" here in order to allow for spaces in the path
and file names.
# NOTE3: the -u parameter is there just to be sure that you are
chnaging from windows paths to linux paths: it is the default.

lin_file=`winepath -u "$win_file"`;

# Call the native command passing the linux path enclosed in ""

$cmd_open "$lin_file";

# Exit status 1? Manipulate this value to work with errors.
exit 1;



--
- Tres.Finocchiaro@gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winenative
Type: application/octet-stream
Size: 1590 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-us ... chment.obj


Top 
 Post Posted: Tue Jun 10, 2008 9:07 am 
Offline
Level 3
Level 3
User avatar

Joined: Sat Feb 23, 2008 1:08 pm
Posts: 70
Location: 13032
Thank you Ove, this will make it much easier!!

On Mon, Jun 9, 2008 at 12:20 PM, Ove Kaaven <ovek@arcticnet.no> wrote:

Quote:
A. Tres Finocchiaro skrev:

Quote:
Newer version: Thanks to Hilary BH Wright.


You might want to know that the status of Debian bug #420207 (which I
originally referred to) has changed since this thread started; wine start
*can* now be used, by simply using the new /unix option introduced in Wine
0.9.60. Hence, wine start /unix /path/to/file




--
- Tres.Finocchiaro@gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-us ... chment.htm


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 2 posts ] 




Board index » WineHQ » Wine Help


Who is online

Users browsing this forum: Google [Bot] and 10 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: