Fun Wine Project -- Configure Some Default Registry Entries

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
User avatar
FatButtLarry
Level 3
Level 3
Posts: 70
Joined: Sat Feb 23, 2008 1:08 pm

Fun Wine Project -- Configure Some Default Registry Entries

Post by FatButtLarry »

On Thu, Jan 31, 2008 at 3:37 PM, A. Tres Finocchiaro
<[email protected]> wrote:
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 <[email protected]> wrote:
A. Tres Finocchiaro skrev:
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...)


--
- [email protected]
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;



--
- [email protected]
-------------- 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
User avatar
FatButtLarry
Level 3
Level 3
Posts: 70
Joined: Sat Feb 23, 2008 1:08 pm

Fun Wine Project -- Configure Some Default Registry Entries

Post by FatButtLarry »

Thank you Ove, this will make it much easier!!

On Mon, Jun 9, 2008 at 12:20 PM, Ove Kaaven <[email protected]> wrote:
A. Tres Finocchiaro skrev:
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

--
- [email protected]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-us ... chment.htm
Locked