Jump to content











Photo
- - - - -

Paint Plugin for LiveXP?


  • Please log in to reply
26 replies to this topic

#1 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 03 September 2008 - 03:27 PM

Greetings!

Wanted to include the "Paint" accessory applet from XP in my final build of 074; and didn't see anything which might be presently available to do the job ;o)

I'm getting familiar with plugin creation using MakeScript (great app!). I need to have the plugin associated with all of the common image filetypes from boot, if possible.

Any ideas?

Thanks a bunch . . .

#2 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 03 September 2008 - 09:42 PM

look apps section
http://www.boot-land...hp?showforum=65
intead of paint, you can find gimp, photoshop55, opencanvas and others there

and dont forget to use search option of bootland :whistling: .

Also follow "lancelot tips" in my signature ;) which will be helpful i guess

#3 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 03 September 2008 - 09:56 PM

@Lancelot:

Our posts crossed on the 'net! Thanks for the input: Here's what I did --

Answering my own question here (for anyone who might come this way again ;o)

Copy "mspaint.exe" from C:\Windows\System32 to a convenient folder.

Get "MakeScript" (google the forums to track it down) and unzip it into its own folder.

Begin:

>> Run MakeScript.exe.
>> Pane 1: Drill through to find your copy of "mspaint.exe" for the "Program Source" field.
>> Pane 1: Select "Auto name by Program Name"
>> Pane 2: Select "Associations" from the customization tree. Fill in the three-letter associations with which "mspaint.exe" is to be associated in your build: NO PERIODS BEFORE EXTENSIONS. Add any other customizations which you would like while working at this pane.
>> Pane 3: Make It!

Collect your booty in the automatically-generated script folder located on the same dir with MakeScript. Place the new script in some folder on the "\Projects\LiveXP\Apps" dir in your WinBuilder XP project. The program will now be included in your build.

This type of approach should work with other Windows applets as well: YMMV :whistling:

#4 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 03 September 2008 - 10:20 PM

Or, you can just use the paint.script. :whistling:

;)

#5 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 03 September 2008 - 10:26 PM

@MedEvil:

Do you have a quick link for that? I seem to have missed it --


Thanks.

#6 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 03 September 2008 - 10:26 PM

Or, you can just use the paint.script. :whistling:

;)


where is it, i couldnt find?? (i am still bad in searching in bootland i guess)
i just started to write a paint.script, if exists no need to write again ;) .

#7 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 03 September 2008 - 10:31 PM

Here
and
also here

#8 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 03 September 2008 - 10:41 PM

Or here.
It used to be included in LiveXP, if it's not anymore, you will have to ask Galapo, why.

:whistling:

edit:
Hey dera, fixing posts while others are typing is against the rules! ;)

#9 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 03 September 2008 - 10:56 PM

@MedEvil, @dera
Thanks
there will be a 3rd version on the way :whistling: as i couldnt find it, now no need.

What would i use to make searches?? to find ;) ,
searching in bootland + google with site:winbuilder.net ?? , what is your method?

dera:
thanks to put all in one message

Galapo:
why? ;)

#10 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 03 September 2008 - 11:04 PM

To the best of my knowledge, MSPaint hasn't been included in LiveXP before.

I'll add it shortly.

Regards,
Galapo.

#11 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 15 September 2008 - 06:10 PM

An update:

After working directly with the community's script here; I have once again returned to this post to distill my findings for whoever wishes to incorporate the MSPaint applet into their build with full image file view/edit capability. Despite the finest efforts, I have not yet been able to successfully associate Paint with any format using the community build; and, furthermore, I needed to find a solution to the issues which surround opening/editing of anything more than native bitmaps in a LiveXP deployment of the applet.

So, recalling a previous post of mine in this thread; we were taking the core mspaint.exe file directly from the build system's installation of XP:

Copy "mspaint.exe" from C:\Windows\System32 to a convenient folder.

Good enough.

Now, in order for us to have full image file functionality in the end build, we need two more files in this folder before using MakeScript: Add copies of both GdiPlus.dll and mfc42u.dll from the System32 directory (GdiPlus will be found in an obscure subfolder of this directory -- do a find on it) to the folder which contains your new copy of mspaint.exe.

Next, associate the following formats (in accord with my previous post) with your new script:

bmp
dib
jpg
jpeg
jpe
jfif
gif
tif
tiff
png

(Yes, Paint will open and edit all 10 of these core filetypes)

Lastly, simply make the script and incorporate it into your build.

Simple!

:huh:

#12 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 15 September 2008 - 06:22 PM

mfc42u.dll
is already in paint.script if you it by using download option of livexp

i am not sure about GdiPlus.dll

also
as you couldnt suceed with association, why not put paint to 'send to'?
Add-Shortcut,"ST","#$pSystemRoot#$p\system32\mspaint.exe","MSpaint","-SW:#$pSystemRoot#$p\system32"

#13 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 15 September 2008 - 07:22 PM

@Lancelot:

I know that mfc42u.dll is included in the community build. However, I had forgotten to incorporate it into the script project which I provided in this posting. And, again, since I was unable to successfully fix the broken file association and truncated filetype compatibility with the community script; I simply solved the problem myself over the span of a few posts with MakeScript, a dependency walker, and the WINE community :huh:

also
as you couldnt suceed with association, why not put paint to 'send to'?
Add-Shortcut,"ST","#$pSystemRoot#$p\system32\mspaint.exe","MSpaint","-SW:#$pSystemRoot#$p\system32"

Putting Paint in the "SendTo" folder could be really helpful for some people. I simply wanted to show how someone could quickly have full image file association and functionality with mspaint in a build of LiveXP.

I'd have posted this whole work as a script for the ready taking; but, since it incorporates MS files directly, that would not have been allowable from a legal standpoint.

Finally, I'm sure that someone will eventually take these ideas and modify/improve the community script to provide all the necessary functions for this applet. In the meantime, it's all here in this post for anyone who has an immediate need...

#14 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 15 September 2008 - 10:15 PM

No need to include MS files, you can copy them over from the source CD.

Which files do you need? :huh:

We can help with the rest of the script if you need.

:huh:

#15 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 17 September 2008 - 04:01 PM

@Nuno Brito:

Thanks for coming over to this thread!

The problem seems to surround the acquisition of mspaint.exe, mfc42u.dll, and GdiPlus.dll from the source disk; and the successful association of the following filetypes with the program in the resulting build:

bmp
dib
jpg
jpeg
jpe
jfif
gif
tif
tiff
png

I've tried to implement the file association syntax which Pedro provided (here) into the community's MSPaint script (which takes the mspaint.exe and mfc42u.dll files from the source CD already) without success. The only way in which I have been able to provide my personal build with a bug-free, fully-functional implementation of Paint has been to directly include the necessary Microsoft files into the script via MakeScript (here).

That's the full scoop.

Anyway, I don't know how to proceed from this point with a redistributable script which "fixes" the problems which I have solved in my build. Doing so is probably nothing more than having knowledge of a simple tweak...

Thanks again --

#16 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 17 September 2008 - 05:38 PM

mfc42u.dll, and GdiPlus.dll are used in other scripts (as i can remember), search in existend scripts (which is a very advicable way) to see how.

for association, in your trial disable xnview script first (in case), and look in notepad script, there are lots of association examples you can find there.

try harder, good luck

#17 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 17 September 2008 - 06:20 PM

@Lancelot:

Thanks for the information.

I don't use any other image viewers/editors in my build; ergo no association conflicts.

And, for the record, I have looked for examples in other scripts, but I didn't seem to be able to get any of it to translate into this one; and, like many in the community, I haven't the time to "cut and try" on an unlimited basis...

So, in a nutshell, I have no problems with the script which I built: It works flawlessly; it just isn't redistributable. And, I am happy to provide the community with the information which is presented in this post; thereby enabling others to have this functionality, if desired.

As for the rest, maybe one of the script gurus at the forum can help figure out the secret "syntax handshake" to fix the redistributable community script (using my work here) in the default LiveXP build...

#18 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 17 September 2008 - 06:25 PM

I hope you learn more in time to make redistributable scripts when available.
:huh:

#19 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 17 September 2008 - 06:34 PM

I don't use any other image viewers/editors in my build; ergo no association conflicts.

If you don't have any other viewer installed, with what do the picture files open upon double click?

:huh:

#20 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 17 September 2008 - 06:37 PM

As for the rest, maybe one of the script gurus at the forum can help figure out the secret "syntax handshake" to fix the redistributable community script (using my work here) in the default LiveXP build...

Post your script here.
Or, if it contains non-distributable copyrighted stuff, PM it to me.

Peter

#21 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 17 September 2008 - 06:40 PM

@Lancelot:

I'm sure that I will. No more time to do this right now, though . . .

@MedEvil:

Everything is associated with and opens now (fully editable) with Paint.

Again, MSPaint works with all of the following formats:

bmp
dib
jpg
jpeg
jpe
jfif
gif
tif
tiff
png

I don't use anything else because Paint is light and simple enough for a tool like LiveXP.

:huh:

#22 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 17 September 2008 - 06:47 PM

I have later to do some tests of my own. I can't remember anyone ever having problems with Paint. And it should also be the default association for all supported file types, if no other viewer is installed.

:huh:

#23 Squid

Squid

    Frequent Member

  • Advanced user
  • 105 posts
  •  
    United States

Posted 17 September 2008 - 06:48 PM

@psc:

Here's the script which works for me (as generated by MakeScript; without the MS code):
[Main]

Title=MSPaint

Description=This script will include MSPaint in your PE build.

Selected=True

Level=5

Version=001

Date=9/15/2008

Author=Microsoft

Credit=Squid



[Variables]

%ProgramEXE%=mspaint.exe

%ProgramFolder%=MSPaint

%ProgramTitle%=MSPaint



[Process]

RunFromRam,%CheckBoxRAM%

If,%CheckBoxSM%,Equal,True,Add_Shortcut,StartMenu

If,%CheckBoxDE%,Equal,True,Add_Shortcut,Desktop

associate_file,bmp

associate_file,dib

associate_file,jpg

associate_file,jpeg

associate_file,jpe

associate_file,jfif

associate_file,gif

associate_file,tif

associate_file,tiff

associate_file,png

Unpack,MSPaint

Process_log



[Interface]

Bevel_1=,1,12,21,12,171,39

CheckBoxRAM="Run from ram (boot.wim)",1,3,33,23,168,18,False

Bevel_2=,1,12,21,67,171,81

TextLabel_Shortcut="Create shortcuts in :",1,1,27,75,117,18,8,Normal

CheckBoxSM="StartMenu",1,3,30,94,129,18,True

CheckBoxDE="Desktop",1,3,30,115,96,18,False



[EncodedFolders]

MSPaint



[EncodedFile-MSPaint-GdiPlus.dll]

{file code here}



[MSPaint]

GdiPlus.dll=879301,1172974

mfc42u.dll=463350,618102

mspaint.exe=154817,206523



[EncodedFile-MSPaint-mfc42u.dll]

{file code here}



[EncodedFile-MSPaint-mspaint.exe]

{file code here}
Hope this helps point the script formatting in the right direction . . .

#24 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 17 September 2008 - 06:57 PM

@psc:

Here's the script which works for me (as generated by MakeScript; without the MS code):

[Main]

 Title=MSPaint

 Description=This script will include MSPaint in your PE build.

 Selected=True

 Level=5

 Version=001

 Date=9/15/2008

 Author=Microsoft

 Credit=Squid

 

 [Variables]

 %ProgramEXE%=mspaint.exe

 %ProgramFolder%=MSPaint

 %ProgramTitle%=MSPaint

 

 [Process]

 RunFromRam,%CheckBoxRAM%

 If,%CheckBoxSM%,Equal,True,Add_Shortcut,StartMenu

 If,%CheckBoxDE%,Equal,True,Add_Shortcut,Desktop

 associate_file,bmp

 associate_file,dib

 associate_file,jpg

 associate_file,jpeg

 associate_file,jpe

 associate_file,jfif

 associate_file,gif

 associate_file,tif

 associate_file,tiff

 associate_file,png

 Unpack,MSPaint

 Process_log

 

 [Interface]

 Bevel_1=,1,12,21,12,171,39

 CheckBoxRAM="Run from ram (boot.wim)",1,3,33,23,168,18,False

 Bevel_2=,1,12,21,67,171,81

 TextLabel_Shortcut="Create shortcuts in :",1,1,27,75,117,18,8,Normal

 CheckBoxSM="StartMenu",1,3,30,94,129,18,True

 CheckBoxDE="Desktop",1,3,30,115,96,18,False

 

 [EncodedFolders]

 MSPaint

 

 [EncodedFile-MSPaint-GdiPlus.dll]

 {file code here}

 

 [MSPaint]

 GdiPlus.dll=879301,1172974

 mfc42u.dll=463350,618102

 mspaint.exe=154817,206523

 

 [EncodedFile-MSPaint-mfc42u.dll]

 {file code here}

 

 [EncodedFile-MSPaint-mspaint.exe]

 {file code here}
Hope this helps point the script formatting in the right direction . . .


Thanks!
I'll look at it tomorrow. Here it is late now (and time to watch TV ...)

Peter

#25 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 17 September 2008 - 07:35 PM

TV is not so interesting tonight.
So let me start with some 'rules'

#1: NEVER change the system genereated name of an interface component by an external editor!
When loading the script, Winbuilder uses the name to detect the type of the component.
(I know, for me as a programmer that is 'unacceptable', but it is the current state of art...)
#2: Try to avoid attached files.
Imagine (independent from legality) you attach your mspaint.exe.
When I (German) use your script, I suddenly have an English Paint app!
If possible, attach only files you personally have created.
And never attach copyrighted files.
If a file (in your case all 3 attached ones) is contained on the source CD, copy from there:
FileCopy,%Source_sys%\mspaint.exe,%target_sys% or similar
or -if the file is in System32- use the API style: require_file,mspaint.exe
If a file is for download anywhere:
Offer a download, perhaps with storage in the project. If it is already there, no download is necessary.
#3: Do not make 'fixed' associations.
That can overwrite an necessary association made by a previous script.
Better is:
Add check boxes to the interface: Associate with '.bmp' etc.
In [process]: If,%pCheckBox1%,Equal,True,associate_file,bmp

Enough of theory now.
Tomorrow a 'new' script.

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users