generic wine wrapper

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: sheep, Hacker, Stefan2, white

seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

generic wine wrapper

Post by *seb »

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 2007-09-23, 18:43 UTC, edited 3 times in total.
seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

v0.02

Post by *seb »

ok, here is an update: wine_wrapper v0.02

changes:

Code: Select all

- '(', ')', ''' 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?!
strug
New Member
New Member
Posts: 1
Joined: 2007-12-30, 15:41 UTC

Post by *strug »

hello seb,

did you still using your wrapper?

i tried to get it working but receive the following:

Code: Select all

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
seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

Post by *seb »

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??
Astevon
Junior Member
Junior Member
Posts: 2
Joined: 2008-02-18, 12:44 UTC
Location: Norway
Contact:

Thanks a lot! =)

Post by *Astevon »

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! :D

Thanks a lot! =)
Buggen
Junior Member
Junior Member
Posts: 4
Joined: 2008-03-15, 23:22 UTC

Post by *Buggen »

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?
seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

Post by *seb »

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
Buggen
Junior Member
Junior Member
Posts: 4
Joined: 2008-03-15, 23:22 UTC

Post by *Buggen »

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 :D

*edit
Never mind my previously post :oops:
seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

Post by *seb »

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
seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

Post by *seb »

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: Select all

- '[' 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?!
seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

Post by *seb »

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: Select all

- winepath is used now
- all special chars in filenames should work now
seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

Post by *seb »

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
ChristianGruen
Junior Member
Junior Member
Posts: 8
Joined: 2008-09-14, 15:45 UTC

Possible Simplification

Post by *ChristianGruen »

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
seb
Member
Member
Posts: 131
Joined: 2003-03-04, 07:41 UTC

Post by *seb »

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: Select all

- 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..... 
tsepati
New Member
New Member
Posts: 1
Joined: 2008-09-18, 04:00 UTC
Location: Belém

Error starting program!

Post by *tsepati »

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
Post Reply