Julius-Ky / winetricks

Automatically exported from code.google.com/p/winetricks
0 stars 0 forks source link

Verb mspaint should install later version #470

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Verb 'mspaint' results in a very old version from NT 4.0

What is the expected output? What do you see instead?

Nothing unexpected, would just like a later version :)

What version of the product are you using? On what operating system?
Ubuntu 12.04

Please provide any additional information below.

I think this verb can be improved, it appears a newer version of MS Paint (from 
Windows XP) can be found in this Microsoft update... (and yup it works in Wine)

http://www.microsoft.com/en-gb/download/details.aspx?id=14128

http://download.microsoft.com/download/0/A/4/0A40DF5C-2BAE-4C63-802A-84C33B34AC9
8/WindowsXP-KB978706-x86-ENU.exe

I'd love to get the version from Vista (the last version of this which doesn't 
have the ribbon interface) as it has slightly better features (see wikipedia 
link below).  Unfortunately I can find no Vista update that provides it (yet).

http://en.wikipedia.org/wiki/Microsoft_Paint#Windows_Vista

Original issue reported on code.google.com by lanti...@gmail.com on 27 Jan 2015 at 9:05

GoogleCodeExporter commented 8 years ago
Hi, could you elaborate on how you were able to get this working in wine? I 
tested a few things and it seems to fail on startup so far... If you can 
describe how to make it work, I could make an updated verb. Cheers!

Original comment by Shannon....@gmail.com on 7 Feb 2015 at 12:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This works for me, things to note...

- I let wine handle copying the exe so it'll go in to system32/syswow64 where 
appropriate for a 32/64-bit prefix
- It extracts the best (highest resolution) icon and makes a launcher that uses 
the same comment that the original shortcut does
- I did not need to install GDI from winetricks to make this work

Installing Microsoft Paint
--------------------------
# Requires Wine to be installed first (tested on version 1.7.34)
# This is Paint 5.1 from Windows XP as no later non-ribbon version is available 
in a standalone package
export WINEPREFIX=~/.wine-mspaint
winetricks -q vcrun6
wget 
http://download.microsoft.com/download/0/A/4/0A40DF5C-2BAE-4C63-802A-84C33B34AC9
8/WindowsXP-KB978706-x86-ENU.exe
wine WindowsXP-KB978706-x86-ENU.exe /q /x:WindowsXP-KB978706-x86-ENU
wine cmd /c copy /y "WindowsXP-KB978706-x86-ENU\SP3GDR\mspaint.exe" %winsysdir%
wrestool -x -t14 -n2 WindowsXP-KB978706-x86-ENU/SP3GDR/mspaint.exe | icotool -x 
- -i 7 -o ~/.local/share/icons/mspaint.png
echo -e '[Desktop Entry]\nName=Paint\nComment=Creates and edits drawings, and 
displays and edits scanned photos.\nExec=env WINEPREFIX='$HOME'/.wine-mspaint 
wine mspaint\nIcon=mspaint.png\nType=Application\nCategories=Graphics' | tee 
~/.local/share/applications/mspaint.desktop
rm -Rf WindowsXP-KB978706-x86-ENU*

Original comment by lanti...@gmail.com on 8 Feb 2015 at 3:59

GoogleCodeExporter commented 8 years ago
Hi, the instructions you provided worked perfectly, thanks for detailing it!

After some testing, I found the mspaint from XP needs only mfc42 verb in lieu 
of the entire vcrun verb. There is currently a wine bug (#657) open for 
programs that need mfc42, the workaround is part of the verb.

I've created a verb to update mspaint based on your instructions, although no 
fancy Desktop is provided from winetricks at this point..

Hopefully the new verb can be considered for merge into winetricks? If so, 
please the attached git diff output.

I've also attached a modified copy of the current winetricks in case you want 
to use it. 

To install/use the new mspaint with the modified winetricksmspaint, run the 
following:
#Download winetricksmspaint21815 to current directory
#Install mspaint with:
chmod +x ./winetricksmspaint21815 && ./winetricksmspaint21815 -q mspaint 

#Run mspaint with:
cd $HOME/.local/share/wineprefixes/mspaint/drive_c && 
WINEPREFIX="$HOME/.local/share/wineprefixes/mspaint" wine cmd /c run-mspaint.bat

Cheers!

Original comment by Shannon....@gmail.com on 19 Feb 2015 at 2:23

Attachments:

GoogleCodeExporter commented 8 years ago
What do you mean by 'no fancy Desktop is provided' ?  Do you mean winetricks 
doesn't create icons and launchers?

I thought the verb mfc42 and vcrun6 did the same thing (an alias of one 
another), so I went with vcrun6 in case the verb mfc42 was retired in the 
future - does mfc42 do something different?

I'm trying to find a way I can associate the mspaint launcher with mime types 
for png, bmp, gif, tiff so that it'll at least show when right clicking those 
files in a normal file manager.  So far not much luck, but I'm no expert in 
those matters.

Original comment by lanti...@gmail.com on 19 Feb 2015 at 8:14

GoogleCodeExporter commented 8 years ago
Yes, I meant no Desktop Icons are created. IMHO - I definitely like the 
approach you have for doing that.

As for mfc42/vcrun6 - yes, look at that... I learn something new everyday. 
Thanks. When I was testing the program, it said it lacked mfc42.dll, so that's 
why I went with that one. I dunno of a plan to retire mfc42, but maybe I 
haven't heard.

As for the mime types, that would be an area for new exploration for me - I'm 
no expert on that either. Seems interesting though.

Thanks for sharing ideas on this stuff! 

Cheers!

Original comment by Shannon....@gmail.com on 19 Feb 2015 at 11:29

GoogleCodeExporter commented 8 years ago
For the mime types, is it a simple matter of adding that key to the Desktop 
launcher? Looking at 
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.ht
ml#mime-types

Does it work to just add something like this in the launcher?
MimeType=image/bmp;image/gif;image/tiff;image/jpeg;image/png;

There seem to be some other ideas for me on my Ubuntu GNU/linux system, like in 
the GIMP launcher I have installed at..
$ grep MimeType *|grep bmp /usr/share/applications/*

Original comment by Shannon....@gmail.com on 19 Feb 2015 at 11:45

GoogleCodeExporter commented 8 years ago
Hi, yeah I looked at just adding MimeType to the launcher already, sadly this 
doesn't seem to do the trick - however 'Eye of MATE' on my system seems to work 
like this just fine - it's as though I'm missing something :S

Original comment by lanti...@gmail.com on 19 Feb 2015 at 12:08

GoogleCodeExporter commented 8 years ago
So I was able to make the mspaint the default open program for a .bmp file by 
formulating a wine-extension-bmp.desktop file in ~/.local/share/applications 
and adding a matching entry in mimeapps.list there.. But now I have to go back 
and configure wine registry to associate mspaint.exe with .bmp. heh..
I double click the .bmp and it says windows does not have an associated program 
to open this type of file.

I'll check it out later to see if I can get it working..

Original comment by Shannon....@gmail.com on 19 Feb 2015 at 1:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Shannon,

The patch mostly looks fine, though one comment, the w_workaround_bug()'s last 
argument is a message about the workaround, so no need to make a comment there:

+    if w_workaround_wine_bug 657 #mspaint.exe from XP won't run without mfc42

instead, something like:
+    if w_workaround_wine_bug 657 "Native mspaint.exe from XP requires 
mfc42.dll"

Regarding mfc42, it's a subset of vcrun6 (only getting mfc42/mfc42u), there are 
no plans to deprecate it, given that wine is unlikely to implement it soon, if 
ever.

Committed:
https://code.google.com/p/winetricks/source/detail?r=02ed4c98395f786e2279f81142e
2f76508535793

Original comment by austinenglish@gmail.com on 19 Feb 2015 at 9:06