Re: Install files having no "installer"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2013-05-09 at 21:44 -0400, Doug wrote:
> Downloaded a zip file having an exe file and an ini file. Put them into 
> .wine/drive_c/Program Files/TXLine subdirectory.
> If I type wine filename.exe, it runs, but how do I get it to appear in 
> the Wine hierarchy, and have an icon for it?
> (I think I used to know and forgot!)
> Thanx for your interest--doug
>
I prefer to use a separate prefix for each app, so I don't use the
default prefix, ".wine". This prevents apps from interfering with each
other. As a result I always launch apps from a simple shell script.
Here's how it would look to run your program, called filename.exe, in
the default prefix, .wine:

================== script ================== 
#!/bin/bash
export WINEPREFIX=$HOME/.wine
cd $WINEPREFIX/drive_c/Program Files/TXLine
wine filename.exe $*
================== script ================== 

Its normal to cd into the directory holding the Windows program before
starting it because Windows programs are written to assume that they are
run from the current working directory.
 
'$*' passes any arguments used when the script is called to your
program. Ignore it if the app never uses command line arguments.

I put the script in a directory called $HOME/bin, make it executable
with chmod and add the line 

	export PATH="$PATH:$HOME/bin"

as the last line in $HOME/.bash_profile (you do this only once, so the
shell can find and any scripts you put in $HOME/bin). The script can
have any legal name except that of an existing command, so its a good
idea to run "whereis scriptname" before you write it. If whereis finds
'scriptname', choose another name. 

Now you can test and run the script with the command 

	script arg1 arg2 ...

To run it from an icon, add a launcher to the desktop menu structure.
Its command should be "script arg1 arg2 ....". Use the icon and title of
your choice. If the app normally runs in a DOS box, select the 'run in
terminal' option when you create its launcher.

No suitable icon? Not all DOS/Windows programs use them. You can make
you own with the GIMP or xfig[1]. It should be 32x32 or 48x48 pixels and
saved somewhere safe (putting it in $HOME/bin is good) as a .JPG or .PNG
image.

All the above is almost easier to do than describe, so get stuck in!

Martin

[1] The GIMP is good for rescaling or modifying an existing image or
    icon, but hopeless for drawing anything with straight lines: use
    xfig or another vector graphics program for that. If you use xfig,
    be aware that it has a very nonstandard GUI, so can be frustrating
    to use at first, but it works well once you get the hang of it. 

    Alternatively, draw your icon on paper, photograph it and then use
    the GIMP to rescale it to icon size.  








[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux