How to package GUI program with image and NLS in Exe

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

How to package GUI program with image and NLS in Exe

Postby PhotonDemon » Thu Jan 27, 2011 1:31 pm

Hi,

Is it possible to package a GUI program (Windows) with the image and maybe the NLS strings included in the Exe file? I think it might be as I seem to be able to use the manual packaging to make an Exe file that looks like the image is in it but when I try to run the Exe, it doesn't open the main window. If I try to run the program from a command window I get "Program too big to fit in memory". I think this normally means the Exe file is corrupt, the header info that states how much memory is needed is bad.

Anyway does anyone have any experience with this kind of packaging?

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: How to package GUI program with image and NLS in Exe

Postby wembley » Thu Jan 27, 2011 4:26 pm

Lou -

You cannot create an .EXE containing the image with the VA Smalltalk packager.

You can include the NLS strings in the packaged image so you don't need .CATs or .MPRs.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: How to package GUI program with image and NLS in Exe

Postby PhotonDemon » Fri Jan 28, 2011 10:54 am

Hi John,

You cannot create an .EXE containing the image with the VA Smalltalk packager.


I will take your word for this but after experimenting I get an executable file of about 2.4MB which is the size of the image plus about 0.2MB enough for the normal executable (made with the "Make Executable" button) and a little more. If I look at the executable, it looks like it has image data in it.

That gives me some hope that it can be done or at least was intended to be an option that no longer works?

Here's part of the packaging instructions.

Code: Select all
dumperOptions

^((EpDumperOptions basicNew)
   instVarAt: 1 put: ((Set new)
   add: EpMakeCatalogsResident;
   add: EpRemoveCategories;
   add: EpOptimizeAssociations;
   add: EpRemoveSourcePointers;
   add: EpUniqueEmptyMethodDictionary;
   yourself);
   instVarAt: 2 put: EsRomerImageDumper;
   instVarAt: 3 put: 'InstallService.Exe';
   instVarAt: 4 put: 'C:\KSCVAST\InstallService\Build';
   instVarAt: 5 put: ((OrderedCollection new)
   add: EpCorrectManagerStructures;
   add: EpMakeCatalogsResident;
   add: EpOptimizeAssociations;
   add: EpRemoveCategories;
   add: EpRemoveSourcePointers;
   add: EpRemoveUnusedMetaclasses;
   add: EpUniqueEmptyMethodDictionary;
   add: EpAllStatistics;
   add: EpCreateSnapshot;
   yourself);
   yourself)


You can include the NLS strings in the packaged image so you don't need .CATs or .MPRs.


This I thought was true because I use it when packaging NT services. I think it is one of the "Dumper" options.

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: How to package GUI program with image and NLS in Exe

Postby wembley » Fri Jan 28, 2011 11:25 am

PhotonDemon wrote:
You cannot create an .EXE containing the image with the VA Smalltalk packager.


I will take your word for this but after experimenting I get an executable file of about 2.4MB which is the size of the image plus about 0.2MB enough for the normal executable (made with the "Make Executable" button) and a little more. If I look at the executable, it looks like it has image data in it.

That gives me some hope that it can be done or at least was intended to be an option that no longer works?

I've been around since before VisualAge Smalltalk V1.0 and packaging into an executable has never been an option (working or not working) to the best of my knowledge. What you should get out of Make Executable (on Windows) is this set of files:
  • several different .es files
  • yourPackageName.icx
  • yourPackageName.ini
  • yourPackageName.exe
  • RGB.TXT
  • CURSORS.OBJ
The last 2 files on the list are copied from the <varoot>\pkgsupt subdirectory. yourPackageName.exe is a copy of <varoot>\bin\nodialog.exe that has simply been renamed. It should be about 84KB (+/- depending on what release you are running). You can verify this by right-clicking on it, selecting Properties from the context menu, then selecting the Version tab and looking at the various fields.

I am curious about what steps you did that you think gave you a merged .exe/.icx.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: How to package GUI program with image and NLS in Exe

Postby PhotonDemon » Fri Jan 28, 2011 11:57 am

Hi John,

Sorry to have waisted your time. It turns out that some how I ended the image file name with .exe.

I think there are ways of embedding data (resources) in an executable and wishful thinking must have lead me to believe one could package an image in an executable as a resource. One would naturally name it as an executable and the result is an image named with .exe that doesn't run.

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: How to package GUI program with image and NLS in Exe

Postby koschate » Fri Jan 28, 2011 12:21 pm

PhotonDemon wrote:I think there are ways of embedding data (resources) in an executable and wishful thinking must have lead me to believe one could package an image in an executable as a resource.

Lou, perhaps you were remembering a different vendor's Smalltalk offering. There's a product from a Cincinnati-based company that allows one to do what you want. :)
koschate
[|]
 
Posts: 102
Joined: Thu Feb 01, 2007 7:24 am

Re: How to package GUI program with image and NLS in Exe

Postby PhotonDemon » Fri Jan 28, 2011 12:35 pm

Thanks,

Lou, perhaps you were remembering a different vendor's Smalltalk offering. There's a product from a Cincinnati-based company that allows one to do what you want.


Perhaps I read something somewhere :?

Anyway, I am able to package the image with the NLS stuff embedded and that means we just need the exe, icx and an html file I'm writing as a help file. Assuming the RGB.TXT, CURSORS.OBJ and .Ini files aren't really needed as my tests seem to show.

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


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: No registered users and 1 guest

cron