Wine menu entries question

Using applications, configuring, problems
Post Reply
Message
Author
babule
Posts: 13
Joined: Tue 21 Feb 2017, 16:56

Wine menu entries question

#1 Post by babule »

Is possible to create a menu entries for windows executables?
With wine sfs installed?
I use the wine portable and precise 5.7
At the portable wine thread help is only for the default wine programs

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#2 Post by nic007 »

Yes, you can but it's a bit of a mission. I have done so BUT have also made a little script (which I have on desktop)with a list of wine programs I can choose from. Works better for me. Attached an example.
Attachments
WineProgs.zip
(670 Bytes) Downloaded 66 times

babule
Posts: 13
Joined: Tue 21 Feb 2017, 16:56

#3 Post by babule »

Thanks I will test it

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#4 Post by Mike Walsh »

Hi, babule.

Nic's method is one way of doing it. Or, you can try the method I use.

I make up a MenuEntry .pet for every Windows app I run. Since I run the same apps in every Pup, I install WINE, followed by the apps, followed by the MenuEntries.

Here's an example of how I do mine. This is extracted from the .pet, so you can see the structure. I use UExtract for unzipping stuff:-

http://www.murga-linux.com/puppy/viewtopic.php?t=87864

To make up your own .pet packages, I find it's easiest to use Trio's 'PetMaker':-

http://www.murga-linux.com/puppy/viewtopic.php?p=290171

An extremely useful & easy-to-use utility.

[Nic's method is probably easier, but I find this is more technically satisfying..!]


Mike. :wink:
Attachments
PhotoScape-MenuEntry.zip
Unzip, and examine the structure.
(4.43 KiB) Downloaded 92 times

babule
Posts: 13
Joined: Tue 21 Feb 2017, 16:56

#5 Post by babule »

Thanks this is better.
To use the pet maker to make the entry.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#6 Post by nic007 »

He probably prefers using SFS-addons (as his wine install is sfs). Anyways I wouldn't install anything but place all my wine progs in one sfs (or seperate if you wish). I've made regular menu entries for my wine progs (just edit existing wine desktop files in user/share/applications for new programs) but it takes time. Also, if you have a lot of wine progs my little script works best for quick navigation and launching.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#7 Post by nic007 »

babule wrote:Thanks this is better.
To use the pet maker to make the entry.
How many wine programs do you have and how do you want to install it. Making pets takes time.

babule
Posts: 13
Joined: Tue 21 Feb 2017, 16:56

#8 Post by babule »

I want to re-master with windows programs incluted.
I want 4-5 windows executables to apear at right click and start menu.
Is possible to use the wine default programs?
By replace the executables?At the same path?
Anyway thanks all.
If something work I will post again here.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#9 Post by mikeslr »

Hi babule,

As a user of portable-wine myself, I wanted to make sure you knew that you'll need to use a different command than if you were using the 'regular' wine. In the latter, you call programs with the command 'wine'. But you'll have to use the command 'wine.sh'. Long discussion here, if you're interested. http://murga-linux.com/puppy/viewtopic.php?p=814296.

I create pets because I may want to use them in other/later Puppies, rather than having to start from scratch. But you should be able to just create desktop files as, in general, illustrated here: http://murga-linux.com/puppy/viewtopic. ... 255#882255

Puppies use the desktop files located at /usr/share/applications to generate Menu entries. A desktop file should have a unique name (so as not to overwrite or be overwritten by other desktop files) and the argument following "Name=" should be unique so its display on the Menu won't cause confusion.

Other than that, there are only three important arguments in a desktop file.
"Categories=" should be followed by a category Puppies recognize. Open the desktop file of an application which appears where you want your application to appear and copy/paste the argument it used. [Openbox window managers require that the argument end with a ";"/semicolon. [In creating pets, I always include it, just in case].

"Icon=" must point to a icon. You'll find existent icons in, and within folders in, /usr/share/pixmaps, /usr/share/icons, and /usr/local/lib/x11/. As I may reuse my 'creation' on a different Puppy, I generally create or download an icon and place it in /usr/share/pixmaps, after formatting it as 'png'. Not every Puppy recognizes all other formats. I also spell out the exact path to the icon.

"Exec=" points to the executable. Using portable wine, your executable is "wine.sh". From the 2nd link above, you can see that after the command --in that case 'wine'-- you can include an argument as to what you want it to do. You can do the same with 'wine.sh', identifying the program you want wine.sh to open. So, while the initial post I linked to made use of a bash-script, called from the desktop file, to do that, you should be able to just spell it out in the Exec=argment. By spelling it out, I mean providing the full path details to the program's 'exe'. That will take two forms, whether your program was installed to the wine container, or being a portable had to be located elsewhere.

There are two XP programs I always make use of. One is InfoCentral, which is installed; the other is a portable and is located in a folder on /mnt/home. These are the arguments I would use if I were spelling it out in the Exec argument:

Exec=wine.sh /mnt/home/wine-portable/wine-data/drive_c/'Program Files'/ICWin7/ICWIN.EXE

Exec=wine.sh /mnt/home/xp-apps/AvidemuxXP/avidemux.exe

mikesLr
Last edited by mikeslr on Thu 27 Jul 2017, 17:43, edited 1 time in total.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#10 Post by mikeslr »

babule wrote:I want to re-master with windows programs incluted.
I want 4-5 windows executables to apear at right click and start menu.
Is possible to use the wine default programs?
By replace the executables?At the same path?
Anyway thanks all.
If something work I will post again here.
I'm not sure what you mean by 'By replace the executables? At the same path?'

When you registered portable-wine, it wrote an executable (wine.sh script at /usr/bin), and desktop files at /usr/share/applications. Whether you installed "menu-pets" or just created desktop files at /usr/share/desktop, those also became part of your system. When you remaster -- remembering to replace /root (and maybe /etc) in remaster's work folder with /root (and /etc) from your system-- those files will be included in your remaster.

What won't automatically be included in your remaster is the wine-portable folder --with all the programs you installed into it-- and any other folder where you unpacked/installed any XP portable applications. [For example, avidemux-portable discussed in my prior post. If you're using a Puppy's builtin remaster, towards its end there's a question regarding if you want to include anything else in the ISO. So it may be possible to include those folders. But there are several problems.

Wine-portable, alone with nothing installed, will exceed a CD's capacity.

If your intent is to run your remaster from a DVD, I don't think portable-wine can be run that way. When in use, it write to its location. But, it may be possible to use such DVD to install to a USB-Key or Hard-drive, and maybe a Multi-session DVD. (The latter is a guess).

XP programs are 'unpacked/decompressed' when you install them whether to wine-portable's data folder or elsewhere on your hard-drive. Avidemux, a relatively small program, required 65 Mb. Dragon Naturally Speaking (which didn't work) required 10 Gbs. So, depending on which programs you want to include, including them may exceed the capacity of an DVD.

Of course, if your intention is to just copy the ISO to a USB-Key, or install the remastered Puppy to one, the size of the Key may be sufficient to overcome those problems. But if you're going to employ a USB-Key anyway, rather than include portable-wine, its contents and any other folders containing xp programs in the remaster, its easier just to copy them to the USB-Key (and later, if that's not the final location, to whatever is your Puppy's /mnt/home). That's, in fact, what I do.

What I don't do, is (a) remaster at all; and wouldn't do (b) remaster with wine-portable registered. I wouldn't include wine-portable since that would lock in programs I may not want, or may later want to upgrade. But I don't remaster because (1) its easier to just copy a Puppy's essential files and SaveFile/Folder to a USB-Key and (2) I haven't made a major restructuring of the original puppy. That is, I haven't replaced rox with a different file-manager or jwm with a different window-manager. The only other reason for remastering is to remove builtin programs. But with today's large USB-keys and very large hard-drives, spending hours to get rid of a couple of Mbs of applications I don't intend to use isn't worth the effort. On newer Puppies, there's an application to remove unwanted applications from the Menu. On older Puppies, you can just change the Category argument in desktop files to something Puppy doesn't recognize so won't generate a display. For example, adding a "z" to 'Text Editor' resulting in zText editor creates a category Puppy won't display.

Of course, if your only using a couple of small XP programs which install, what you want to do is better handled by not using portable wine but using "regular" wine instead. With regular wine, it and the programs you install are entirely within your system and will be included in your remaster without any difficulty. Portable programs, those which refuse to install to wine's container, will still have to be handled separately.

mikesLr

babule
Posts: 13
Joined: Tue 21 Feb 2017, 16:56

#11 Post by babule »

I mean replace but keep the same name by re-naming.
Im not so fast to read and understand english
Many problems for this and maybe too much for me to make and then remaster.
I wiil try..

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#12 Post by mikeslr »

Hi babule,

I'll try to keep this short and simple. First figure out if the window programs you want are small. Right-click each downloaded setup.exe and from the popup menu, select properties. That will tell you its compressed size. Uncompressed it will be 2 to 3 times as large, but when you remaster it will get compressed again. This calculation does not work if the program only uses an installer which fetches files from the internet while installing. It has to be a setup file you can download then install while offline.

Don't use portable wine. Use regular wine since then the setup program will install it into a container within your Puppy’s SaveFile/Folder. The contents of the SaveFile/Folder will be included in your remaster. All you have to do before remastering is figure out where that container is, and write desktop files which create menu entries for your programs.

Older versions of wine used to place window programs files in .wine/drive_c/Program Files/FOLDER_CREATED_BY_SETUP_PROGRAM/ --the "."/dot indicates it's a hidden folder. You can see it if you Left-click /root. I’m not sure where recent wine versions place the folder into which programs will be installed. If the .wine folder is not at /root, you can find it by starting Menu>Filesystem>pFind file finder and use “.wine

babule
Posts: 13
Joined: Tue 21 Feb 2017, 16:56

#13 Post by babule »

I can make the menu entries but cant call the exe.Nothing happent
I test with wine portable.
Open as text show.
[Desktop Entry]
Encoding=UTF-8
Name=aaaiia
Icon=ballorange16.xpm
Comment=aaaiia
Exec=wine/root/.wine/drive_c/users/root/phone_twin/phone_twin.exe
Terminal=false
Type=Application
Categories=Utility
GenericName=aaaiia

I will make my remaster with normal wine and lock the wine programs icons at desktop if not work correctly.Is possible to lock the desktop icons permanantly.Or refresh at rebuting?

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#14 Post by nic007 »

babule wrote:I can make the menu entries but cant call the exe.Nothing happent
I test with wine portable.
Open as text show.
[Desktop Entry]
Encoding=UTF-8
Name=aaaiia
Icon=ballorange16.xpm
Comment=aaaiia
Exec=wine/root/.wine/drive_c/users/root/phone_twin/phone_twin.exe
Terminal=false
Type=Application
Categories=Utility
GenericName=aaaiia

I will make my remaster with normal wine and lock the wine programs icons at desktop if not work correctly.Is possible to lock the desktop icons permanantly.Or refresh at rebuting?
Try a space between wine and the path for the executable

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#15 Post by Mike Walsh »

Yep, Nic's right.

Babule, your Exec line should read :-

Code: Select all

wine(space)/root/.wine/drive_c/.....
...instead of :-

Code: Select all

wine/root/.wine/drive_c/......
Give that a try & let us know what happens, please.


Mike. :wink:

babule
Posts: 13
Joined: Tue 21 Feb 2017, 16:56

#16 Post by babule »

Yes the space after wine was the problem.
Now works.
Thanks all.

Post Reply