Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 16 Sep 2019, 08:33
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to Externalize Wine (Partially-Mostly)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
mikeslr


Joined: 16 Jun 2008
Posts: 3314
Location: 500 seconds from Sol

PostPosted: Fri 10 May 2019, 15:38    Post subject:  How to Externalize Wine (Partially-Mostly)  

What do you have to do? Nothing. If it ain’t broke, don’t fix it. With the variety of top-notch Linux applications, you may not have any need for Wine. But there are many great applications which run under Wine; some you may have already be familiar with if you ran Windows. If you already use Wine, there’s probably no reason to change your version. But WineHQ continues to publish new and superior versions, and version2013 continues provide new and superior pets. Someday making a change may be worth the effort.

Acknowledgments and Excuses: Externalization of Wine has been mentioned before. Perhaps first by mikeb. But, I don't think details were previously published. Frankly, I would prefer the full externalization that Wine-portable provides. However, either I can't follow the instructions elsewhere provided, or the Series 4 Wine involves some significant change as I have been unable to produce a functional Wine-portable based on any series 4 pet.

The primary advantages of partial-externalization of Wine is that Window Programs you use will be in a folder which can be copied/transferred to other computers and/or used by other Puppies without your having to reinstall them. Outside of “Puppy-Space” the size-limitation of that folder is the available space on the drive/partition on which it is located. Windows applications which would be installed would otherwise occupy a folder which, being in root, will (a) take up space in your SaveFile; (b) require the use of RAM even if not in use; and (c) require the execution of a Save to preserve any new installs or configuration changes. An additional benefit is that, if you use SaveFiles, over 200 mbs of the files required by Wine will also reside outside your SaveFile.

Starting with any wine pet*, partial externalization can be accomplished in under 15 minutes. It has almost all the benefits of portable-wine. Best of all, I don't have to do it. Laughing And the procedure is so simple that a bash-script can probably be written to perform it in a couple minutes. But I don’t write bash-scripts. See the next post. So, here’s the recipe:

(1) Have a network connection before this through Step 3. Download the wine pet of your choice. [Optional, recommended – Convert it into an SFS either by (1) using PaDS or (2) using UExtract to decompress the pet, copying the contents from the window which appeared into an appropriately named – e.g wine-something-- folder and then dir2sfs that folder. Converting a wine pet to an SFS isn’t actually necessary; but doing so reduces the amount of space used in a SaveFile/Folder and the extent of RAM always being used by wine]. Install the wine pet or load the SFS.

(2) Create two folders on /mnt/home; one named WindowApps, the other named WindowPortables.

In order to limit the amount of space occupied in the SaveFile, the following should be done before executing a Save.

(3) Install the attached Wine_Menu.pet, and then run Menu>Utility>Wine Config or open a terminal and type, without the quotes, “wine winecfg”. [Footnote 1].

(4) Open two file-manager windows: One to /mnt/home/WindowApps, the other to /root. Turn on “Show hidden files” in both windows so that you can see and work with hidden folders & files. In root you will see a folder named .wine. Left-Click it to open and you’ll see a folder named drive_c.

(5) Left-PRESS, hold, then drag the drive_c folder into WindowApps and select Move. Then Left-PRESS, hold, then drag the drive_c folder back into /root/.wine and select Link(relative). With that arrangement, Windows applications will be installed to mnt/home/WindowApps/drive_c.

(6) You will also find in the hidden /root./cache folder one named wine. Within it are the mono and gecko msis. As far as I know, wine’s cache may never hold anything else. Still the .cache/wine can be moved to a cache folder you create --i.e /WindowApps/cache/.wine-- symlinked back.

(7) In /usr/lib32 you’ll find a folder named wine. Within it are over 1000 ‘dlls’ which would take up a considerable amount of space in a SaveFile. The entire /usr/lib32/wine folder can be moved to WindowApps –where it will use about 200 Mbs of storage-- and symlinked back.

You can now execute a Save to preserve this arrangement.

Transporting the WindowApps and WindowPortables Folders. Adding/Changing Puppies.

The WindowApps and WindowPortable Folders can be copied to other partitions and transported to other computers. The programs they contain do not have to be ‘reinstalled’. However, in order for any Puppy to make use of the programs in the WindowPortable Folder some form of wine must be installed or loaded. In order for a Puppy to make use of the programs in the WindowApps folder, it may be necessary to install into that Puppy the same version of Wine you previously used or load a copy of the wine.sfs you created, Use of other versions may be possible, but this is untested.

After installing a wine pet or loading the wine.sfs you created, repeat Steps 1 thru 7, except it is no longer necessary to move the drive_c, .cache and /usr/lib32/wine folders into /mnt/home/WindowApps. Just delete those folders; then drag the ones from /mnt/home/WindowApps into the locations ‘vacated’ and select Link(relative).

Note for future explorers. My attempt to create a WOW version of Wine-portable was unsuccessful. Perhaps someone more experienced, especially with bash-scripting, may be able to. My ‘gut feeling’ is that the technique for ‘partial externalizing’ an installed wine described in this post may prove easier than the full externalization in wine-portable.

The Pets in this Post:

If you installed the wine-menu pet, you’ll find a number of listing on the Utility and File-system submenus. These are all applications built into the Wine Application, itself; not to Window applications which run under the Wine environment. The Menu>File-system>Windows Programs will, however open a Window to /drive_c/Program Files where the executable of any program you install will only be a couple of clicks away. Hint: Bookmarking that location is at least as fast.

One Window Application I often use is avidemux. [Having several Puppies, it’s just more efficient to have one Windows version they share than each Puppy having its own version]. If you install avidemux, the attached Avidemux_Wine-External.pet will create a menu entry. Even if you don’t, you can use it as a template for creating menu entries for the Window applications you do install. Just UExtract the pet to examine it. [The menu will work with any version. Just make certain the path to avidemux.exe is correct].

The pet has three files: an executable at /root/my-applications/bin, an icon at /usr/share/pixmaps/ and a desktop file at /usr/share/applications which identifies the icon at /usr/share/pixmaps as the one to appear on the Menu and the executable in /root/my-applications/bin as the program to start. There are other ways this can be done, other folders which could be used. More important than how you do it is that you do it the same way each time so that you can use what you’ve done as a template for what you want to do. The one tricky part in creating a menu entry is getting the command in the Linux executable correct. In the attached pet it reads:

#!/bin/sh
wine /mnt/home/WindowApps/drive_c/'Program Files'/Avidemux/avidemux.exe

“wine /mnt/home/WindowApps/drive_c/'Program Files'/” includes part-of the path you’re telling Wine to follow to reach the Window’s executable. Note the hard-quotes bracketing Program Files. These are necessary because the name of that folder is more than one word. The program’s folder within ‘Program Files’ and the name of the Window’s executable will vary depending on which program you install. That may even be the case if you install Avidemux from a website other than the one I used; and which I don’t remember. Crying or Very sad

A great many useful Window applications are published as a ‘portable’: that is they do not write to Windows’ registry and can be started from wherever they are located. However, many (most?) ‘portables’ can not be located in /drive_c/’Program Files’. The /mnt/home/WindowPortables folder can serve as a location for all such ‘portables’.

The attached PhotoScape_portable-3.7.pet will create a menu entry for the version of PhotoScape I downloaded from here: http://www.photoscape.org/ps/main/index.php. PhotoScape is a graphic ‘Swiss Army Knife”.

It is almost identical to the Avidemux_Wine-External.pet. It’s Linux executable reads:
#!/bin/sh
wine /mnt/home/WindowPortables/PhotoScapePortable/PhotoScapePortable.exe

You can use this pet as a template for other Window Portables.

The transportability of the WindowApps folder and the programs it holds gives Partial Externalization some advantages to simply installing wine when a SaveFolder is used.

* Re "Starting with any wine pet" --take into consideration Mike Walsh's experience. http://www.murga-linux.com/puppy/viewtopic.php?p=1033089#1033089. Unless you are ONLY running one of the newer Puppies, you'll probably want a wine version compiled under racy.

Fn1. As part of the config protocol, Wine will offer to download and install mono –which I recommend be accepted as some Window applications require it; and offers to download gecko needed to run Web-browsers under Wine. I am uncertain if it is required by Wine-tricks. So I allow the install of gecko, but never run Web-browsers under Wine. I doubt they are functional with today’s website, know they lack the today’s security features and aren’t needed by Linux OSes.
Wine_Menu-0.9.pet
Description  Creates Menu Entries for Wine's Builtin Programs
pet

 Download 
Filename  Wine_Menu-0.9.pet 
Filesize  58.45 KB 
Downloaded  103 Time(s) 
PhotoScape_portable-3.7.pet
Description  Creates Menu listing for Windows portable programs in /mnt/home/WindowPortables
Where Programs which can't be installed would be located
pet

 Download 
Filename  PhotoScape_portable-3.7.pet 
Filesize  21.66 KB 
Downloaded  85 Time(s) 
Avidemux_Wine-External.pet
Description  Creates Menu listing for program installed into /mnt/home/WindowApps
Where installed Window Applications would be located
pet

 Download 
Filename  Avidemux_Wine-External.pet 
Filesize  18.31 KB 
Downloaded  88 Time(s) 

Last edited by mikeslr on Sat 27 Jul 2019, 11:17; edited 7 times in total
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3314
Location: 500 seconds from Sol

PostPosted: Fri 10 May 2019, 15:47    Post subject: Reserved for Bash Script  

Sorry. I had some ideas regarding writing a bash-script together with references to some code I thought would be useful in that endeavor. But I didn't get to write it up before it became a blur. Really, it shouldn't be difficult for someone who codes. Essentially, all that would be involved after installing a wine pet (or loading a wine pet) is to run a script which would, in the following order:

create the folders mentioned in Step 2
execute wine winecfg
copy the folders mentioned in Step 3 thru Step 7 into the folders created in Step2;
Remove the original /root/.wine, /root/.cache/wine and /usr/lib32/wine folders; and
create symlinks to the .wine, .cache and /usr/lib32/wine folder in /mnt/home/WindowApps in /root for the 1st two removed, and in /usr/lib32 for the last removed.

Last edited by mikeslr on Fri 26 Jul 2019, 21:12; edited 1 time in total
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5374
Location: King's Lynn, UK.

PostPosted: Fri 26 Jul 2019, 12:28    Post subject:  

Mike:-

Coupla questions for you (if I may?)

If you're going to share stuff in this way between Puppies (and I'm pretty sure my WINE 'drive_c' accounts for a big chunk of all my save-files), am I right in thinking you would need to utilise the same version of WINE in each one?

I only ask, because surely, if you're using different versions of WINE, then won't the 'registry' stuff all be different, too? Like you, I use a lot of 'portables' (for that very reason - no registry stuff to worry about) but some things, like PhotoScape (which I use a lot) need to be fully installed. My desktops are all designed in PhotoScape, so it's an important part of my 'work-flow', y'see.

As things stand, some Pups use v1.7.51, while other, newer Pups use v3.3. I've also been experimenting with your 'portable' v3.3 on an external drive, but the snag with it is that I can't use my custom Menu entries; everything has to be started with the Windows Program Loader. And the Menu entries will no longer start the portables, either; I have to click on the .exe files directly, because with the portable WINE, Puppy doesn't find an installed WINE environment, does it?

Or could I (this has just occurred to me, in fact) sym-link the equivalent stuff across from the 'portable' WINE so that Puppy does find it? What d'you think?

----------------

(Edit:- Nope, can't see how that would work, 'cos the DLL's in /usr/lib/wine are all packed away in the SFS, aren't they? How does WINE-portable work; does it 'load' the SFS into /tmp, then, every time you start a Windows app from it?

I think my best .bet would be to 'externalize' the entire WINE install. Standardize on one version of WINE - v3.3 is a good choice - set it up in one Puppy, install everything I need, then copy over/sym-link back the whole thing; /root/.wine, /root/.cache/wine, /usr/lib/wine/, and /usr/share/wine......plus all the WINE executables in /usr/bin & /usr/sbin. (Don't forget, space is not an issue for me, so far as external storage goes - I have terabytes of the stuff to spare!) What I don't wish to do is to expand my already over-sized save-files any further...)

Comments/thoughts, please? And then finish up with building a sym-links .pet, to simplify 'installing' it to other Pups after that. I can't see why it shouldn't work.....


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5374
Location: King's Lynn, UK.

PostPosted: Fri 26 Jul 2019, 14:50    Post subject:  

Works beautifully, Michael. As I hoped it would.....

I've fully 'externalized' the WINE 3.3_v2.1 install from Bionicpup 32.....including the /root/.wine & /root/.cache/wine & winetricks directories. Performed a re-boot to make sure everything was saved & registered, etc, and......it all works as it should. Including Menu entries..!

The main reason I wanted to do this is because I've recently got interested in the Windows TTS (text-to-speech) stuff. Mouldy started a thread on the TTS Reader/Balabolka TTS apps running under WINE, which I joined in on later. I've got a whole bunch of e-books I downloaded some years ago to replace a hardback book set I mislaid about 20 years ago. Long story short, rather than reading them on screen, via Calibre, or using the on-screen teleprompter thing Geoffrey unearthed 2 or 3 years ago, I hit on the idea of listening to them. Except I couldn't quite figure out how I was going to do it..!

Then I found mouldy's thread.

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

Jake29 got in on the thread toward the end; he has a lot of experience running this TTS stuff under WINE. In his view, TTS Reader and Balabolka are 'lower-quality' applications, and the SAPI 4/5 'voices' they use are pretty awful, if I'm honest. He put me onto an app called TextAloud!, and recommended the AT&T 'natural' voices as the best ones to use.

I visited WizzardSoft's website, and had a listen to the demo voices. The difference is like that between night & day, clarity & quality-wise.

Anyway, I visited a 'resource' I have, where I downloaded not only TextAloud, but several of the AT&T 'natural' voices. I now have TextAloud installed (& registered), plus half-a-dozen of those voices. But they're enormous files, Mike; anywhere from 450-600MB apiece. Half-a-dozen of those quickly takes up a humungous amount of space.....which I don't want to inflict on my already over-sized save-files, y'see. And so....

.....hence the interest in 'externalizing' WINE in this manner. Which, as it turns out, appears to function flawlessly.....all thanks to Pup's very powerful, and extremely easy-to-use sym-link function.

I think it's one of Puppy's best features, myself; I make liberal use of it!! Very Happy


T'other Mike. Wink

_________________
MY 'PUPPY' PACKAGES


Last edited by Mike Walsh on Sat 27 Jul 2019, 07:54; edited 2 times in total
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3314
Location: 500 seconds from Sol

PostPosted: Fri 26 Jul 2019, 19:14    Post subject:  

Hi Mike,

Glad it's working. Running multiple puppies using the same portable-wine (not wine-externalized) I created "menu pets" for each installed application. Then I could just install the pet into any new puppy. The pets used a desktop file such as:

[Desktop Entry]
Encoding=UTF-8
Name=InfoCentral
Icon=/usr/share/pixmaps/info.png
Comment=Relational Database
Exec=wine.sh /mnt/home/wine-portable/wine-data//drive_c/'Program Files'/ICWin7/ICWIN.EXE
Terminal=false
Type=Application
Categories=X-Personal
GenericName=InfoCental

A trick I picked up from you. Alternatively, with windows portables (all located within the same "xp-apps" folder on /mnt/home), I usually create a bash script in /root/my-applications/bin such as:

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

with the desktop file's Exec argument calling it. Again, a menu pet --those two files plus an icon-- installs the most commonly used. With rarely used I'll just browse to the exe.

trlkly seems to have overcome the problem I encountered in creating a Series 4 Wine portable. http://murga-linux.com/puppy/viewtopic.php?p=1030483#1030483. Especially impressive as he used the 64-bit WOW version. I've read the posts about it several times but am still uncertain whether as packaged by WineHQ or created by version2013 (except for the server of limited use to me) I still can't figure out if WOW will run 32-bit windows programs. Someday I'll try to create a Wine-portable 4x so I can make it generally available.

Haven't had the chance to really play with "Wine external" which I wrote about only because there may have been others stumped by series 4. Nor have I actually used Wine external. All the programs I want still run under Wine-portable 3.3.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5374
Location: King's Lynn, UK.

PostPosted: Sat 27 Jul 2019, 08:04    Post subject:  

Morning, Mike.

So far, I've got Bionicpup32, Slacko 560 and Precise 571 all running the same WINE install.....though I've had to perform a wee bit of major surgery! Initially, I started off with the version from Bionic, which is 3.3_v3.1. And then I realised that probably wouldn't work for the older Pups, since 3.1 is compiled under Tahrpup, apparently (or so version2013's notes say.)

So, I opened up the WINE_EXTERNAL directory I created for this. I used UExtract to unzip the 3.3_v2.1 .pet (compiled under Racy), and swapped everything over. Went back into Bionic to check everything was still working - it appears quite happy with the same version compiled under an older Puppy - Bob's yr Uncle!

Sorted.

3 Pups down, 7 more to go.... Laughing


Mike. Wink

_________________
MY 'PUPPY' PACKAGES


Last edited by Mike Walsh on Sat 27 Jul 2019, 12:14; edited 1 time in total
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3314
Location: 500 seconds from Sol

PostPosted: Sat 27 Jul 2019, 11:19    Post subject:  

Hi Mike,

Good point regarding choosing which wine pet. Have edited the OP to reflect it.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5374
Location: King's Lynn, UK.

PostPosted: Sat 27 Jul 2019, 12:51    Post subject:  

Mike:-

I'll see if I can knock together a script for what you want. But I would also strongly suggest that instead of running winecfg as part of the script, it really ought to be executed first, before running the script.

Reason? Download speeds vary, not only from location to location, but also depending on the time of day. Point being, you would have to halt the script at that point, to allow time for mono and gecko to be downloaded & installed, and for winecfg to finish setting everything up. You couldn't halt it with a 'sleep' statement, or anything like that, because there's no telling just how long the previously-mentioned operations would take.. You'd need to physically halt the script, then restart it dependent on input from the user.

Times will also vary from one machine to another, depending on available processing power.

Creating the rest of the script, apart from that, should be fairly simple.....even by my appalling standards..!


T'other Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5374
Location: King's Lynn, UK.

PostPosted: Sat 27 Jul 2019, 15:40    Post subject:  

Mike:-

Try this for size, and see if it does what you want. I haven't tried this out myself, but it's only file manipulation stuff, which is within my capabilities. Remove the fake .gz to use it.

I've also included my WINE-CFG Menu entry .pet. Install this, and on the first use, it runs through the set-up routine. Second and subsequent uses, it brings up the WINE Control Panel. As I suggested, run this through first, then run the 'externalization' script.

Let me know if it works for you, please.

[Edit:- Older items now removed; please use those from the following post.]


Mike. Wink

_________________
MY 'PUPPY' PACKAGES


Last edited by Mike Walsh on Sun 28 Jul 2019, 09:49; edited 1 time in total
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5374
Location: King's Lynn, UK.

PostPosted: Sun 28 Jul 2019, 09:31    Post subject:  

@ Mike:-

Okay; further modifications, and.....some testing.

The Wine-CFG menuentry .pet will now also install Pupmessage, required for the script to work. This adds all of 2 kb to the overall size, which is small to begin with; it's a useful addition.....many older Pups and applications use it. Newer Pups now use gxmessage, but the two are sym-linked together anyway.

I've tidied up some of the file-manipulation operations, using the '*' wildcard in a couple of places to only copy directory contents as opposed to the whole thing. Some Puppies, again newer ones, and, I think, some of the Slackos? use lib32 for other stuff, so it doesn't all want copying over, just the WINE items.

Running the script now pops up an initial message, advising that the operation CAN take a little while, especially on a flash drive - it's copying all those 1000+ .dlls across that takes the time, of course..!



.....followed by this when finished:-



Tested in a pristine install of Tahr 606, using version2013's Wine 3.3_v2.1. Installed this first, followed by the Wine-CFG Menuentry, and placing the script in /root for the duration (after removing the fake .gz).

All works nicely, and, I think, does just what you wanted.....as explained in your OP. Updated items attached below, and previous items removed from the post above.


Mike. Wink
Externalize_WINE.sh.gz
Description  Version 3 - further 'tarting-up'....
gz

 Download 
Filename  Externalize_WINE.sh.gz 
Filesize  1.21 KB 
Downloaded  33 Time(s) 
WineCFG-MenuEntry.pet
Description  Now adds Pupmessage as well.....only 2kb extra
pet

 Download 
Filename  WineCFG-MenuEntry.pet 
Filesize  6.58 KB 
Downloaded  32 Time(s) 

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 3314
Location: 500 seconds from Sol

PostPosted: Sun 28 Jul 2019, 18:56    Post subject:  

Hi Mike,

Just wanted to say "Thanks".
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 5374
Location: King's Lynn, UK.

PostPosted: Sun 28 Jul 2019, 19:32    Post subject:  

mikeslr wrote:
Hi Mike,

Just wanted to say "Thanks".


Ah, hell, you're very welcome, mate. Anything for 'the cause', y'know? Laughing

Just be thankful I was in a scripting frame of mind this last coupla days. At least it was easy stuff.....and something I, too, can see a positive use for.


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0698s ][ Queries: 12 (0.0059s) ][ GZIP on ]