| View previous topic :: View next topic |
| Author |
Message |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Sat Sep 22, 2007 1:06 pm Post subject: generic wine wrapper |
|
|
i had this idea of an easy to handle/use wrapper, so TC (or any other programs) running under wine would be able to start native linux apps according to the file extension assigned through the wine registry.
you can set file associations under wine now just as you want them to be!
so i wrote this little fella: <outdated>
it's written in PERL, so i guess you wont have to install that
it was on my system i guess, so its 'better' than having to install php as a prerequsite as well...
...
please test the whole setup, and if it works or even breaks: give some feedback here 
Last edited by seb on Sun Sep 23, 2007 12:43 pm; edited 3 times in total |
|
| Back to top |
|
 |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Sun Sep 23, 2007 5:25 am Post subject: v0.02 |
|
|
ok, here is an update: wine_wrapper v0.02
changes: | Code: | - '(', ')', ''' and '&' now working, complain here if there's more missing
- logging to console with different DEBUG levels of verbosity
- ini file layout has changed, do not try to use your old:
extensions are given a group
that group is given an app to be started with |
three easy steps and you're done:
1. put all files into '~/.wine/drive_c'
2. edit the .ini-file so it fits your needs
3a. run the wrapper with REGCREATE argument, check the output file, start regedit and import the created .reg-file
(OR)
3b. run the wrapper with REGADJUST argument, you better be sure of what you do, cleaning the registry afterwards could be much work
please test the whole setup, and if it works or even breaks: give feedback
ATTENTION:
1. you cannot start files via TC if a part of the dir has prepended spaces, the wrapper isnt even called in those cases, WORKS THOUGH when you copy the name to the command line...
2. you cannot start this wrapper itself, works on a copy of it in another directory
anyone has an idea?! |
|
| Back to top |
|
 |
strug New Member

Joined: 30 Dec 2007 Posts: 1
|
Posted: Sun Dec 30, 2007 9:49 am Post subject: |
|
|
hello seb,
did you still using your wrapper?
i tried to get it working but receive the following:
| Code: | fixme:exec:SHELL_execute flags ignored: 0x00000500
Can't exec "/home/strug/Desktop/strug_backup/mindmap.mm": Permission denied at /home/strug/.wine/dosdevices/c:/wine_wrapper_002.pl line 263, <$config> line 89.
|
which permissions are ment?
it tried to give your files wine_wrapper_002.pl and wine_wrapper_002.pl.ini more rights but that did not changed anything.
do you have an idea?
thanks in advance, leif |
|
| Back to top |
|
 |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Tue Feb 05, 2008 9:40 am Post subject: |
|
|
just read this, will of course have a look and investigate a bit...
did you change anything in the .pl-script??
cause the line the error is referencing doesn't make any sense to me...
which settings did you try?? aka 'pls paste the config'
my idea would as well have been giving the files more rights, did you even try 777 ?!
btw, why is it "/home/strug/.wine/dosdevices/c:/wine_wrapper_002.pl" ?? my dir is drive_c
do you use the latest version of wine?? |
|
| Back to top |
|
 |
Astevon Junior Member

Joined: 18 Feb 2008 Posts: 2 Location: Norway
|
Posted: Mon Feb 18, 2008 6:51 am Post subject: Thanks a lot! =) |
|
|
I just got this to work, and its great! I'm pretty new to linux and wine, so I had to get a little help with how to do the 3 steps, but now its just amazing that TC works this great under Linux!
Thanks a lot! =) |
|
| Back to top |
|
 |
Buggen Junior Member

Joined: 15 Mar 2008 Posts: 4
|
Posted: Sat Mar 15, 2008 5:27 pm Post subject: |
|
|
Hey, I've been trying to get this to work..
But when I try to execute wine_wrapper_002.pl
I get this
"no argument passed at wine_wrapper_002.pl line 114."
Any idea whats wrong? |
|
| Back to top |
|
 |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Thu Mar 20, 2008 11:34 am Post subject: |
|
|
did you follow the installation steps?!
this error sounds like you did not follow step 3
did you edit the ini-file?!
if yes, try with the original one
if it does work with the original one, post your changed to pastebin or so |
|
| Back to top |
|
 |
Buggen Junior Member

Joined: 15 Mar 2008 Posts: 4
|
Posted: Thu Mar 20, 2008 5:38 pm Post subject: |
|
|
Thanks for reply, I'm running Ubuntu 7.10
with latest Wine if thats make any difference.
I've followed the steps with default ini-file
and tryed both REGCREATE/REGADJUST.
Everything seems find,
but when I try to run an avi-file totalcmd says "File not found"
Vlc is installed, and the directory has no spaces.
I'm clueless, would be really great to get this to work.. pls help
*edit
Never mind my previously post  |
|
| Back to top |
|
 |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Thu Mar 20, 2008 11:16 pm Post subject: |
|
|
i am using 7.10 as well and the latest wine, via 'Adding the WineHQ APT Repository' ( http://www.winehq.org/site/download-deb )
1. pls paste the output of "./wine_wrapper_00x.pl REGADJUST"
2. try it with CONTROL+RETURN to copy the filename to the command line in TC, then pressing RETURN to actually start it
i sometime get an error even if, theres no space, but mine here is 'error executing program'
3. try renaming the .avi to test.avi and move to c:\ to lower dir or filename issues!
4. try changing the DEBUG-level
a. search for my $DEBUG=0; in wine_wrapper_00x.pl
b. change it from 0 to 9
c. start TC in a terminal ( seb@ubuntu:~$ wine .wine/drive_c/totalcmd/TOTALCMD.EXE )
d. watch the output after you tried to start files...
maybe paste the output here, if it looks buggy |
|
| Back to top |
|
 |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Sat Aug 09, 2008 12:59 am Post subject: |
|
|
hi
i updated my system to ubuntu 8.04 and wine-1.1.2
(just to let you know all still works pretty well)
here is an update: wine_wrapper v0.03
only minor changes: | Code: | - '[' and ']' now working
- enhanced logging to console
- extended ini-file
- my $DEBUG=9; per default, change it to get rid of output |
ATTENTION:
1. you cannot start files via TC if a part of the dir has prepended spaces, the wrapper isnt even called in those cases, WORKS THOUGH when you copy the name to the command line...
2. you cannot start this wrapper itself, works on a copy of it in another directory
anyone has an idea?! |
|
| Back to top |
|
 |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Sun Aug 10, 2008 3:35 am Post subject: |
|
|
oh well
i just found out about this winepath
i guess, this will make the wrapper less error-prone
here is the update: wine_wrapper v0.04
latest changes: | Code: | - winepath is used now
- all special chars in filenames should work now |
|
|
| Back to top |
|
 |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Tue Aug 19, 2008 1:26 am Post subject: |
|
|
i just found a possible error-source:
DO NOT RUN THE WRAPPER FROM ANOTHER DIR
you have to change into '~/.wine/drive_c' and run it from there!!
this might solve Buggen's problem |
|
| Back to top |
|
 |
ChristianGruen Junior Member

Joined: 14 Sep 2008 Posts: 7
|
Posted: Sun Sep 14, 2008 9:48 am Post subject: Possible Simplification |
|
|
Hi there,
Thank you for the great wrapper script! A possible simplification: with "xdg-open", you can open files with the default applications in Ubuntu. e.g., the command
xdg-open bla.png
opens the specified png image with your default image viewer. This is why you (or at least I) can replace all applications in the .ini script with "xdg-open".
Hope this helps,
Christian |
|
| Back to top |
|
 |
seb Member

Joined: 04 Mar 2003 Posts: 129
|
Posted: Sun Sep 14, 2008 12:13 pm Post subject: |
|
|
good idea!
i just added this small default-entry and released the new version
i also added something useful:
you can now adjust the app-calls with parameters and so on, just as you like
good that i did not release this earlier, else you would perhaps have not suggested this
here is the update: wine_wrapper v0.05
latest changes: | Code: | - added default-entry (for example xdg-open)
- extended format in ini-file
(just prepend '.' to all extensions and add ' %1' to program calls)
this was neccesary for me due to some problems with
"vlc and ':' in the filepath" which occurs often now
due to the use of winepath..... |
|
|
| Back to top |
|
 |
tsepati New Member

Joined: 17 Sep 2008 Posts: 1 Location: Belém
|
Posted: Wed Sep 17, 2008 10:24 pm Post subject: Error starting program! |
|
|
Hi there,
thank you for the script! Would be so nice if it worked also for me...
I am new to WINE, but TC works apparently fine so far.
I am using SUSE 11.0 and Wine 1.0-rc3, and TC 7.02.
I started from your default ~\.wine\drive_c\wine_wrapper_005.pl.ini file, except that I changed "emacs" for "gedit" as my preferred editor.
I had to explicitly start the script by
cd ~\.wine\drive_c
perl wine_wrapper_005.pl REGCREATE
as the bash insists in opening the script as a bash script despite its first line.
Then I started "regedit" from the command line of TC, and imported the resulting .reg-file C:\wine_wrapper_005.pl.reg = ~\.wine\drive_c\wine_wrapper_005.pl.reg .
However, whichever file I try to launch, I get the error message "Error executing program!", be it an editable file (...*.txt) or any other I tried.
CAN YOU HELP?
Also, it would be very nice if I could assign F4 to the real (linux) emacs instead of the wine-internal notepad.
Grateful for any ideas...
Thanks
Sebastian |
|
| Back to top |
|
 |
|