Issue 470 in winetricks: Verb mspaint should install later version

38 views
Skip to first unread message

winet...@googlecode.com

unread,
Jan 27, 2015, 4:05:50 AM1/27/15
to winetri...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 470 by lanti...@gmail.com: Verb mspaint should install later
version
https://code.google.com/p/winetricks/issues/detail?id=470

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-84C33B34AC98/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

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

winet...@googlecode.com

unread,
Feb 6, 2015, 7:56:26 PM2/6/15
to winetri...@googlegroups.com

Comment #1 on issue 470 by Shannon....@gmail.com: Verb mspaint should
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!

winet...@googlecode.com

unread,
Feb 8, 2015, 10:54:56 AM2/8/15
to winetri...@googlegroups.com

Comment #2 on issue 470 by lanti...@gmail.com: Verb mspaint should install
Here is how I do it...

It should work in either 32-bit or 64-bit prefixes as the copying of the
EXE is handled by wine (so will use system32 or syswow64 as appropriate),
it also creates the proper icon and launcher required (comment if from the
comment the original shortcut has).

p.s. I've *not* needed to install GDI, seems to work for me without having
to get this from winetricks.

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-84C33B34AC98/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*

winet...@googlecode.com

unread,
Feb 8, 2015, 10:59:17 AM2/8/15
to winetri...@googlegroups.com

Comment #3 on issue 470 by lanti...@gmail.com: Verb mspaint should install
later version
https://code.google.com/p/winetricks/issues/detail?id=470

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

winet...@googlecode.com

unread,
Feb 18, 2015, 9:24:03 PM2/18/15
to winetri...@googlegroups.com

Comment #4 on issue 470 by Shannon....@gmail.com: Verb mspaint should
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!

Attachments:
winetricksmspaint21815.gitdiff 1.3 KB
winetricksmspaint21815 633 KB

winet...@googlecode.com

unread,
Feb 19, 2015, 3:14:35 AM2/19/15
to winetri...@googlegroups.com

Comment #5 on issue 470 by lanti...@gmail.com: Verb mspaint should install
later version
https://code.google.com/p/winetricks/issues/detail?id=470

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.

winet...@googlecode.com

unread,
Feb 19, 2015, 6:29:02 AM2/19/15
to winetri...@googlegroups.com

Comment #6 on issue 470 by Shannon....@gmail.com: Verb mspaint should
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!

winet...@googlecode.com

unread,
Feb 19, 2015, 6:45:17 AM2/19/15
to winetri...@googlegroups.com

Comment #7 on issue 470 by Shannon....@gmail.com: Verb mspaint should
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.html#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/*

winet...@googlecode.com

unread,
Feb 19, 2015, 7:08:36 AM2/19/15
to winetri...@googlegroups.com

Comment #8 on issue 470 by lanti...@gmail.com: Verb mspaint should install
later version
https://code.google.com/p/winetricks/issues/detail?id=470

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

winet...@googlecode.com

unread,
Feb 19, 2015, 8:22:17 AM2/19/15
to winetri...@googlegroups.com

Comment #9 on issue 470 by Shannon....@gmail.com: Verb mspaint should
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..

winet...@googlecode.com

unread,
Feb 19, 2015, 4:04:21 PM2/19/15
to winetri...@googlegroups.com

Comment #10 on issue 470 by aus...@gaikai.com: Verb mspaint should install
later version
https://code.google.com/p/winetricks/issues/detail?id=470

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.

winet...@googlecode.com

unread,
Feb 19, 2015, 4:06:52 PM2/19/15
to winetri...@googlegroups.com
Updates:
Status: Fixed

Comment #11 on issue 470 by austin...@gmail.com: Verb mspaint should
install later version
https://code.google.com/p/winetricks/issues/detail?id=470

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=02ed4c98395f786e2279f81142e2f76508535793
Reply all
Reply to author
Forward
0 new messages