<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">We don't have a meaningful "diff" between images. You could compare the list of package versions etc. but it's not foolproof as there might be modifications outside the packages.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">Maybe it would help if you gave us a broader picture - are you just trying to update an application with a new image? That is, do you control what the new image is, or are users supposed to upload their own / arbitrary images?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">If you control the image then I would simply do a checksum and verify that before replacing.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:#000000">- Bert -</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 25, 2017 at 9:24 PM, Louis LaBrunda <span dir="ltr"><<a href="mailto:Lou@keystone-software.com" target="_blank">Lou@keystone-software.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Dave, I got it now.  Don't beat yourself up, I appreciate the help even if it is slow in<br>
coming.  After all, beggars can't be choosers.  Hopefully one last question.  Is there some<br>
method or methods, I can send the running image and the image file that allow me to conclude<br>
they are close in nature?<br>
<br>
Lou<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Tue, 25 Jul 2017 15:06:49 -0400 (EDT), "David T. Lewis" <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>
<br>
>Lou,<br>
><br>
>So sorry, I think I need a new brain today. The repository is on<br>
><a href="http://source.squeak.org" rel="noreferrer" target="_blank">source.squeak.org</a>, not on <a href="http://squeaksource.com" rel="noreferrer" target="_blank">squeaksource.com</a> as I said in my earlier mail.<br>
>The stuff on <a href="http://squeaksource.com" rel="noreferrer" target="_blank">squeaksource.com</a> is ancient, and all recent VM related work<br>
>was moved to <a href="http://source.squeak.org" rel="noreferrer" target="_blank">source.squeak.org</a> a long time ago.<br>
><br>
>My apologies again!<br>
><br>
>Dave<br>
><br>
>> Hey Dave,<br>
>><br>
>> I'm sure I'm messing something up but I can't find ImageFormat-dtl.26,<br>
>> they only go up to<br>
>> ImageFormat-dtl.12.  Am I looking in the wrong place?<br>
>><br>
>> Lou<br>
>><br>
>><br>
>> On Tue, 25 Jul 2017 14:06:30 -0400, "David T. Lewis" <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>><br>
>> wrote:<br>
>><br>
>>>I guess I just forgot to upload it from my package-cache. Please try<br>
>>> again<br>
>>>with the ImageFormat-dtl.26 that I just uploaded, it should work now.<br>
>>> Sorry<br>
>>>for the confusion.<br>
>>><br>
>>>Dave<br>
>>><br>
>>><br>
>>>On Tue, Jul 25, 2017 at 01:54:43PM -0400, Louis LaBrunda wrote:<br>
>>>> Hi Dave,<br>
>>>><br>
>>>> Thanks Dave.  I will check tomorrow.  For now I will assume it will get<br>
>>>> fixed and work around<br>
>>>> it.<br>
>>>><br>
>>>> Lou<br>
>>>><br>
>>>> On Tue, 25 Jul 2017 13:47:12 -0400 (EDT), "David T. Lewis"<br>
>>>> <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>
>>>><br>
>>>> >Hi Lou,<br>
>>>> ><br>
>>>> >Ugh, I think that was due to a bug that I fixed not too long ago (some<br>
>>>> >missing methods for the latest Spur formats IIRC). I thought I had<br>
>>>> >uploaded the fix but I do not see it in the repository. My apologies,<br>
>>>> I<br>
>>>> >will address it as quickly as I can, but it might not be until<br>
>>>> tomorrow.<br>
>>>> ><br>
>>>> >Sorry,<br>
>>>> >Dave<br>
>>>> ><br>
>>>> ><br>
>>>> >> Hi Dave,<br>
>>>> >><br>
>>>> >> Thanks you very much for the prompt reply.  I loaded the ImageFormat<br>
>>>> >> package as you suggested<br>
>>>> >> into a fairly new 32 bit image.  But when I try ImageFormat<br>
>>>> fromFile: to<br>
>>>> >> that image of the<br>
>>>> >> image with my program, I get an "unrecognized image format" error.<br>
>>>> I will<br>
>>>> >> keep trying more<br>
>>>> >> after lunch but for now I don't get it?<br>
>>>> >><br>
>>>> >> Lou<br>
>>>> >><br>
>>>> >><br>
>>>> >> On Tue, 25 Jul 2017 11:18:05 -0400 (EDT), "David T. Lewis"<br>
>>>> >> <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br>
>>>> >><br>
>>>> >>>Hi Lou,<br>
>>>> >>><br>
>>>> >>>A simple check is to look at the first bytes of the image file,<br>
>>>> which<br>
>>>> >>>define the image format number. If the image format is something<br>
>>>> >>>reasonable (presumably the same as whatever image you are replacing<br>
>>>> in<br>
>>>> >>>most cases), then you know that it is a Squeak image file, although<br>
>>>> this<br>
>>>> >>>will not tell you if the actual image is valid.<br>
>>>> >>><br>
>>>> >>>To do this from a running Squeak image, try loading the ImageFormat<br>
>>>> >>>package from the VMMaker repository on <a href="http://squeaksource.com" rel="noreferrer" target="_blank">squeaksource.com</a>. Look at the<br>
>>>> >>> class<br>
>>>> >>>comments, and you will find methods for reading the image format<br>
>>>> number<br>
>>>> >>>from a file stream.<br>
>>>> >>><br>
>>>> >>>There is also a C program called ckformat.c at<br>
>>>> >>><a href="http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/src/" rel="noreferrer" target="_blank">http://squeakvm.org/cgi-<wbr>bin/viewvc.cgi/squeak/trunk/<wbr>src/</a>. The C code<br>
>>>> is<br>
>>>> >>>automatically generated from the ImageFormat package, so they the do<br>
>>>> the<br>
>>>> >>>same thing. If you want to do the test from a shell script, as<br>
>>>> opposed to<br>
>>>> >>>doing it from the running image, then you can use this C program.<br>
>>>> >>><br>
>>>> >>>Of course in theory you can load an entire image file into a VM<br>
>>>> simulator<br>
>>>> >>>with the VMMaker package, but that would not be a practical test for<br>
>>>> what<br>
>>>> >>>you are trying to accomplish.<br>
>>>> >>><br>
>>>> >>>If you need a better test of "valid" then you might consider using<br>
>>>> >>>OSProcess/CommandShell to actually run the image file and see if it<br>
>>>> >>> works.<br>
>>>> >>>Probably you would do something like run it with a PipeableOSProcess<br>
>>>> >>>connected to your main Squeak image, and just kill the image under<br>
>>>> test<br>
>>>> >>>once you have confirmed that it runs.<br>
>>>> >>><br>
>>>> >>>Dave<br>
>>>> >>><br>
>>>> >>>> Hi All,<br>
>>>> >>>><br>
>>>> >>>> Can a running Squeak program look at a Squeak image file and know<br>
>>>> if it<br>
>>>> >>>> is<br>
>>>> >>>> a good image?  I'm<br>
>>>> >>>> working on a program that the user won't have easy access to.  I<br>
>>>> would<br>
>>>> >>>> like to allow its<br>
>>>> >>>> replacement with a new version.  I think I know how to do that but<br>
>>>> >>>> would<br>
>>>> >>>> like to see if I can<br>
>>>> >>>> program in some protection from the user replacing the image with<br>
>>>> a bad<br>
>>>> >>>> or<br>
>>>> >>>> completely wrong<br>
>>>> >>>> file.  Any ideas?<br>
>>>> >>>><br>
>>>> >>>><br>
>>>> >>>> Lou<br>
>>>> >>>> --<br>
>>>> >>>> Louis LaBrunda<br>
>>>> >>>> Keystone Software Corp.<br>
>>>> >>>> SkypeMe callto://PhotonDemon<br>
>>>> >>>><br>
>>>> >>>><br>
>>>> >>>><br>
>>>> >>><br>
>>>> >>><br>
>>>> >>><br>
>>>> >> --<br>
>>>> >> Louis LaBrunda<br>
>>>> >> Keystone Software Corp.<br>
>>>> >> SkypeMe callto://PhotonDemon<br>
>>>> >><br>
>>>> >><br>
>>>> >><br>
>>>> ><br>
>>>> ><br>
>>>> ><br>
>>>> --<br>
>>>> Louis LaBrunda<br>
>>>> Keystone Software Corp.<br>
>>>> SkypeMe callto://PhotonDemon<br>
>>>><br>
>>>><br>
>>><br>
>> --<br>
>> Louis LaBrunda<br>
>> Keystone Software Corp.<br>
>> SkypeMe callto://PhotonDemon<br>
>><br>
>><br>
>><br>
><br>
><br>
><br>
--<br>
Louis LaBrunda<br>
Keystone Software Corp.<br>
SkypeMe callto://PhotonDemon<br>
<br>
<br>
</div></div></blockquote></div><br></div></div>