The bug:
While playing with packaging an XD image as a Windows NT service, I came upon a small bug. The value for startUpClassName is saved in the package instructions but is lost when the instructions are used again. The selected and saved name:
The value displayed when using the instructions again:
I think the buggy code is here:
- Code: Select all
initializeFor: aPackager
"ACTION
This message is sent to the packaging instructions immediately
after the packager is initialized with the information in the receiver.
The receiver has an opportunity to perform any special initialization
that is required.
For a single image, add all the applications in the image and all of the
feature applications to the list of applications to package. Set the
startUpClassName based on the features in the passive image.
PARAMETERS
aPackager <EpPackager>
"
" aPackager sourceImageBaseApplications do:[:anApp |
aPackager addApplicationNameToPackage: anApp name]. "
(self abtFeatureApplicationNamesFor: aPackager) do:[:anAppName |
aPackager addApplicationNameToPackage: anAppName].
aPackager startUpClassName: (self featureStartUpClassNameFor: aPackager)
The fix:
I think the fix is to change the last line to:
- Code: Select all
aPackager startUpClassName isNil ifTrue: [aPackager startUpClassName: (self featureStartUpClassNameFor: aPackager)].
If there is a saved value for startUpClassName, it is left alone.
There are four (I think) implementations #initializeFor: than have the same last line and therefor I think the same problem. They would all need to be changed or the fix moved into #featureStartUpClassNameFor:.
The gripes:
Both gripes have to do with image size. After loading things into an image, I like to clean things up by using the "Options" menu item "Clean Up Image". I know there are warnings about this but I'm not cleaning up after testing or messing up the image, just after loading things. Right after the clean up, I save the image and all looks fine. The size of the image seems okay, say 13.7MBs. If I repeat the clean up (without doing anything else) and save the image, the size jumps to say 13.9MBs. If I do it again, it jumps another 200KBs to say 14.1MBs.
I know, all I have to do is not clean up twice but it does point out that something funny is going on.
The second gripe has to do with the size of a packaged XD image. If I package one of my apps as an NT service from the main image, I get an image size of about 1MB. When I package the same app as an XD image as an NT service, I get an image size of about 1.7MBs. Both images seem to work fine. This is also not a big deal but I am wondering if there isn't something odd here. Maybe this is normal for XD images or maybe I need to do some work removing more stuff.
Lou