Suggestion: Improve resource distribution... 
Author Message
 Suggestion: Improve resource distribution...

I made a standalone application in Dolphin 5.  It ended up being about 1.4
MB when packaged as a "to go" application.  I was quite happy with that
size.  Then I realized that I needed to include DolphinDR005.dll because it
contained the icons for the column sort order in my list views.  This
doubled the size of my application.  I don't think I am using more than a
handful of small resources from that DLL.  I suppose I could edit it to
remove what I know I am not using (but I worry about conflicts down the
road).  There are a few other things I could do, but it all seems like too
much trouble.

It seems as if the DolphinDR005.dll file has quite a few resources that are
not likely to be displayed in a standalone UI.  I wonder if this file could
be broken down into two files.  One file could truly be development
resources (class icons, etc...), and the other could be a smaller UI
resources file.  This would allow people who were only using a few icons to
distribute the smaller file.  As it is now anyone distributing an
application with a sortable enhanced list view has to include the 1.4 MB
DolphinDR005.dll file to avoid having broken link icons in the column
headers.  This seems a bit like swatting a fly with a sledge hammer.

Even better might be a facility for automatically including any required
resources (even user defined icons) in the "to go" exe.  This would be very
cool, but a split in DolphinDR005.dll would be a good start.

Chris



Mon, 07 Feb 2005 02:29:59 GMT  
 Suggestion: Improve resource distribution...
Hi Chris,

I have just added a wiki page about adding icons to ToGo executables at:

   http://www.object-arts.com/wiki/html/Dolphin/IconsToGo.htm

FWIW: The icons for the column sort headers should already be in the ToGo
stub.

To access them, you may need to add the following method to you session
manager:

   MySessionManager>> defaultResLibPath
       "Answer the path of the development resource library."
       ^self argv first

And:

   MySessionManager>> main
      resourceLibrary := nil.
      "rest of main"
      ...

Hope this helps,
Steve

==========
Steve Waring

http://www.dolphinharbor.org/dh/harbor/steve.html



Quote:
> I made a standalone application in Dolphin 5.  It ended up being about 1.4
> MB when packaged as a "to go" application.  I was quite happy with that
> size.  Then I realized that I needed to include DolphinDR005.dll because
it
> contained the icons for the column sort order in my list views.  This
> doubled the size of my application.  I don't think I am using more than a
> handful of small resources from that DLL.  I suppose I could edit it to
> remove what I know I am not using (but I worry about conflicts down the
> road).  There are a few other things I could do, but it all seems like too
> much trouble.

> It seems as if the DolphinDR005.dll file has quite a few resources that
are
> not likely to be displayed in a standalone UI.  I wonder if this file
could
> be broken down into two files.  One file could truly be development
> resources (class icons, etc...), and the other could be a smaller UI
> resources file.  This would allow people who were only using a few icons
to
> distribute the smaller file.  As it is now anyone distributing an
> application with a sortable enhanced list view has to include the 1.4 MB
> DolphinDR005.dll file to avoid having broken link icons in the column
> headers.  This seems a bit like swatting a fly with a sledge hammer.

> Even better might be a facility for automatically including any required
> resources (even user defined icons) in the "to go" exe.  This would be
very
> cool, but a split in DolphinDR005.dll would be a good start.

> Chris



Tue, 08 Feb 2005 13:57:26 GMT  
 Suggestion: Improve resource distribution...
Steve & Chris,

[snip...]

Quote:
>    MySessionManager>> defaultResLibPath
>        "Answer the path of the development resource library."
>        ^self argv first

One caveat regarding that approach: if your app is started from a command
line (kinda retro, but I end up doing it a lot), the first argument may not
include the full path to the executable.  I've taken to using

     SessionManager current imagePath

which seems to work more consistently.

Don

P.S. Steve, many thanks for the new wiki page.  You've described the process
well and concisely.

Quote:
> And:

>    MySessionManager>> main
>       resourceLibrary := nil.
>       "rest of main"
>       ...

> Hope this helps,
> Steve

> ==========
> Steve Waring

> http://www.dolphinharbor.org/dh/harbor/steve.html



> > I made a standalone application in Dolphin 5.  It ended up being about
1.4
> > MB when packaged as a "to go" application.  I was quite happy with that
> > size.  Then I realized that I needed to include DolphinDR005.dll because
> it
> > contained the icons for the column sort order in my list views.  This
> > doubled the size of my application.  I don't think I am using more than
a
> > handful of small resources from that DLL.  I suppose I could edit it to
> > remove what I know I am not using (but I worry about conflicts down the
> > road).  There are a few other things I could do, but it all seems like
too
> > much trouble.

> > It seems as if the DolphinDR005.dll file has quite a few resources that
> are
> > not likely to be displayed in a standalone UI.  I wonder if this file
> could
> > be broken down into two files.  One file could truly be development
> > resources (class icons, etc...), and the other could be a smaller UI
> > resources file.  This would allow people who were only using a few icons
> to
> > distribute the smaller file.  As it is now anyone distributing an
> > application with a sortable enhanced list view has to include the 1.4 MB
> > DolphinDR005.dll file to avoid having broken link icons in the column
> > headers.  This seems a bit like swatting a fly with a sledge hammer.

> > Even better might be a facility for automatically including any required
> > resources (even user defined icons) in the "to go" exe.  This would be
> very
> > cool, but a split in DolphinDR005.dll would be a good start.

> > Chris



Tue, 08 Feb 2005 21:12:54 GMT  
 Suggestion: Improve resource distribution...

Quote:
> Hi Chris,

> I have just added a wiki page about adding icons to ToGo executables at:

>    http://www.object-arts.com/wiki/html/Dolphin/IconsToGo.htm

...

Thank you for this excellent information!  I like your idea about using icon
files for development and icon resources for deployment.

I still think it would be cool for Dolphin to automatically include used
icons in the stub, but your article seems to resolve most of my immediate
concerns.

Thanks,
Chris



Wed, 09 Feb 2005 01:40:04 GMT  
 Suggestion: Improve resource distribution...
Hi Don,

Thanks for this tip! I have added it to the wiki page.

Thanks,
Steve

==========
Steve Waring

http://www.dolphinharbor.org/dh/harbor/steve.html



Quote:
> Steve & Chris,


> [snip...]
> >    MySessionManager>> defaultResLibPath
> >        "Answer the path of the development resource library."
> >        ^self argv first

> One caveat regarding that approach: if your app is started from a command
> line (kinda retro, but I end up doing it a lot), the first argument may
not
> include the full path to the executable.  I've taken to using

>      SessionManager current imagePath

> which seems to work more consistently.

> Don

> P.S. Steve, many thanks for the new wiki page.  You've described the
process
> well and concisely.



Thu, 10 Feb 2005 14:01:27 GMT  
 Suggestion: Improve resource distribution...


Quote:
> Hi Don,

> Thanks for this tip! I have added it to the wiki page.

Steve, thanks for clearly written page, I have changed my program icon in a
snap.

Have you tried, can your strategy (of having icon resurce in fole for
development, and in the exe for deployed) be applied to toolbar bitmaps
also?

rush



Thu, 10 Feb 2005 18:54:32 GMT  
 Suggestion: Improve resource distribution...
Hi rush,


Quote:
> Have you tried, can your strategy (of having icon resurce in fole for
> development, and in the exe for deployed) be applied to toolbar bitmaps
> also?

No, but I have used the FolderRelativeFileLocator for this. For example, set
a bitmap aspect with something like:

 ( DIBSection fromId: 'myBitmap.bmp')
    fileLocator: (FolderRelativeFileLocator basePath:
'c:\myPath\Resources\);
    yourself.

This will firstly attempt to load the bitmap named "MYBITMAP.BMP" from the
defaultResourceLibrary, and if that fails, it will load from the file.

Steve
==========
Steve Waring

http://www.dolphinharbor.org/dh/harbor/steve.html



Thu, 10 Feb 2005 22:33:23 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. suggestion for "improving" prng implementation

2. request for suggestions on how to improve a randomizing block of code

3. suggestion to improve development environment

4. Suggestion to improve TCL 8.0p2 (tmpnam)

5. computing resources -- suggestions

6. IMPLICIT NONE: Wascomputing resources -- suggestions]]

7. Resource Fork has no Resource Fork?

8. Find resources and resource name

9. Extracting Resource String from Resource Table

10. suggestions/questions for improving embedding python - could thes e already exist?

11. Improved keyed files for J

12. Improved J Reference Card 2.0

 

 
Powered by phpBB® Forum Software