Packaging an XD image questions

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Packaging an XD image questions

Postby PhotonDemon » Wed Feb 23, 2011 8:40 am

Hi,

I'm migrating all my applications to V8.0.3. While doing so, I'm taking the opportunity to learn about and use configuration maps and XD images. So far the config maps are working well. I can start with a bare image and load a config map with its prerequisite maps and have a good development image. I can use my existing packaging instructions to build NT service images that are the expected size and work just fine.

When I try to create an XD image the process seems to go okay but there are some oddities.

1) The saved development image with the XD image is much larger than without it, 20MB vs 13MB.
2) I can't see my existing packaging instructions from the XD image.
3) Of the packaging instructions I can see from the XD image, I'm not sure which to choose for an NT service.
4) Whatever packaging instructions I choose from the XD image, the result is larger than expected, 1.8MB vs 1MB and the image crashes when I try to run it.

I think I am loading too much into the XD image, so I will keep looking at that. If anyone has an hints, I will appreciate them. Thanks.

Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Packaging an XD image questions

Postby koschate » Wed Feb 23, 2011 10:10 am

PhotonDemon wrote:1) The saved development image with the XD image is much larger than without it, 20MB vs 13MB.

This is to be expected. You're actually creating an image within an image when you're doing XD. You have to load all the code necessary to support XD development, and then the XD image itself contains all the code necessary for your application.
PhotonDemon wrote:2) I can't see my existing packaging instructions from the XD image.

Again, this is expected. Your packaging instructions should be loaded into the "normal" image, and versioned there after successful packaging.
PhotonDemon wrote:3) Of the packaging instructions I can see from the XD image, I'm not sure which to choose for an NT service.

This issue may resolve itself based on the previous response.
PhotonDemon wrote:4) Whatever packaging instructions I choose from the XD image, the result is larger than expected, 1.8MB vs 1MB and the image crashes when I try to run it.

You're probably missing something in the image, but you knew that... :D
koschate
[|]
 
Posts: 102
Joined: Thu Feb 01, 2007 7:24 am

Re: Packaging an XD image questions

Postby PhotonDemon » Wed Feb 23, 2011 11:02 am

Hi koschate,

Thanks for the reply. Please don't take any of my following comments or questions as my disagreeing with your answers, I just want to understand as much as I can. If you are answering from experience, than that is the way things are.

1)... It still seems to me that 20MB vs 13MB for an image with in an image is large. The code to support XD images and server workbench is already in the 13MB image. The XD image should be my code and the code it is built upon (objects it uses) unreduced, 7MB seems high. But I am more interested in knowing I didn't put too much in the XD image than worrying about how large it is.

2)... It is odd that I can't see the packaging instructions that are in the "normal" (my development) image but I expect the "new" packaging instructions will reside in the main image after I save them. So, that will be fine.

3)... I need to choose some packaging instructions as a place to start, this is what I see:
XDPackage.gif
Packaging instructions I can see, which do I start with?
XDPackage.gif (4.57 KiB) Viewed 176 times


4)... I could be missing something but my question is why is the image packaged from the XD image 80% larger? My normal image that works fine is 1MB the packaged XD image that doesn't work is 1.8MB.

Thanks again, Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Packaging an XD image questions

Postby koschate » Wed Feb 23, 2011 11:43 am

Lou, let me start by saying that my experience is with packaging headless images for Unix, not Windows service images, so I have no great feel for sizes. Our server image comes in at around 7.6 MB, and the XD image, prior to loading our own code, is almost 17 MB. I'll have to see what it is after loading, but I don't generally keep that image around.

The XD image code isn't executable, which is why the packaging instructions don't live in there. It's a lot easier to deal with mentally if you're packaging for a different operating system. You'll be especially confused when it comes time to debug and you get an SDF file, which is essentially a static debugger.

Of the options I see in your image, I'd say you want to start with AbtXDSingleImagePackagingInstructions, but I'd have to play a bit to be sure.

Tom
koschate
[|]
 
Posts: 102
Joined: Thu Feb 01, 2007 7:24 am

Re: Packaging an XD image questions

Postby PhotonDemon » Wed Feb 23, 2011 12:23 pm

Hi Tom,

Thanks for the help.

Based upon your experience, my sizes (at least for the development image) seem normal. At any rate they don't help in deciding if I have too much or too little in the XD image.

I understand that the XD image code isn't executable and that the packaging instructions shouldn't and don't live in there. What was odd is that the packaging instructions created from the XD image and saved in the main image will be visible after that, but packaging instructions that are already saved in the main image aren't usable for the XD image.

This is what I see when packaging from the main image:

PackageOptions.gif
Packaging options from main image
PackageOptions.gif (3.08 KiB) Viewed 171 times


The instructions at the bottom are mine. They were created from the "AbtNTServiceImagePackagingInstructions". If I could start from "AbtNTServiceImagePackagingInstructions" in the XD image, I think I would be fine but they don't exist and I'm not sure why. Obviously, I can't add packaging instructions to the XD image, so how do I get to "see" them?

Since you don't have experience packaging Windows NT services, I don't expect an answer but maybe someone else will be able to help.

Many thanks, Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Packaging an XD image questions

Postby koschate » Thu Feb 24, 2011 6:14 am

Lou, just for grins I did a quick NT service packaging exercise using the config map AbtNtServiceRuntime. With the XD image created, the total image size was almost 26 MB. On the development side, I created a new app to hold the packaging instructions, and prereqed it with AbtServerRuntimePackagingApp. Within the XD image, I created new instructions, choosing XD Single Image. I chose AbtNtServiceExampleApp, set the startup code as "AbtNtServiceExampleApp starting", set a file name, and packaged away, saving the instructions as a new class in my new app at the end. The resulting runtime image was 1,123,372 bytes in size, but I don't know if it works. The actual included subapps look reasonable compared to the ones in AbtNtServicePackagingApp.

Tom
koschate
[|]
 
Posts: 102
Joined: Thu Feb 01, 2007 7:24 am

Re: Packaging an XD image questions

Postby PhotonDemon » Thu Feb 24, 2011 3:13 pm

Hi Tom,

I was just about to give up on this for awhile when I read your last post this morning. I added AbtServerRuntimePackagingApp to the prerequisites of the app where I store the packaging instructions that I use when I package from the main image (I'm not sure why it wasn't already there nor if it is needed as packaging an NT service works without it).

I repeated your test with AbtNtServiceExampleApp and got the same size packaged image you did. I was able to test it and it worked. At least I think it did, as it doesn't seem to do much but it didn't go boom.

I then then went back and packaged my stuff, got about the same size image as before. It still had problems running so I looked more closely into them. I had to change the way I was finding objects to initializeOnLoad. That got me past the errors. The packaged image size is still about 70% larger than when I package from the main image so for now I'm going to stick with the non XD image.

Thanks for all the help. At least I know how to package an XD image as a Windows NT service. I should be able to get Seaside to work when I get back to it and I want to try to package a Seaside program for Linux eventually.

I did find what seems to be a small VA Smalltalk bug. One of the settings of the saved packaging instructions gets lost, at least it looks like it is lost. I will explain more and include some screen shots in another post.

Thanks again, Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou@Keystone-Software.com http://www.Keystone-Software.com
PhotonDemon
[|]
 
Posts: 176
Joined: Thu Dec 20, 2007 1:45 pm

Re: Packaging an XD image questions

Postby koschate » Thu Feb 24, 2011 5:30 pm

PhotonDemon wrote:The packaged image size is still about 70% larger than when I package from the main image so for now I'm going to stick with the non XD image.

To really get a handle on the size difference, you're going to have to dig into the contents of the .es files that each packaging method produces, but you'll want to at least start with the actual included subapplications.

Glad it worked out for you!

Tom
koschate
[|]
 
Posts: 102
Joined: Thu Feb 01, 2007 7:24 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron