Suggestion: Improve resource distribution...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Suggestion: Improve resource distribution...

Christopher J. Demers
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


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Improve resource distribution...

Steve Alan Waring
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
[hidden email]
http://www.dolphinharbor.org/dh/harbor/steve.html



"Christopher J. Demers" <[hidden email]> wrote in
message news:ak0man$1e8e8p$[hidden email]...
> 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
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Improve resource distribution...

Don Rylander-3
Steve & Chris,
"Steve Waring" <[hidden email]> wrote in message
news:ak4j0l$1fjkot$[hidden email]...
[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.

> And:
>
>    MySessionManager>> main
>       resourceLibrary := nil.
>       "rest of main"
>       ...
>
> Hope this helps,
> Steve
>
> ==========
> Steve Waring
> [hidden email]
> http://www.dolphinharbor.org/dh/harbor/steve.html
>
>
>
> "Christopher J. Demers" <[hidden email]> wrote in
> message news:ak0man$1e8e8p$[hidden email]...
> > 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
> >
> >
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Improve resource distribution...

Christopher J. Demers
In reply to this post by Steve Alan Waring
Steve Waring <[hidden email]> wrote in message
news:ak4j0l$1fjkot$[hidden email]...
> 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


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Improve resource distribution...

Steve Alan Waring
In reply to this post by Don Rylander-3
Hi Don,

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

Thanks,
Steve

==========
Steve Waring
[hidden email]
http://www.dolphinharbor.org/dh/harbor/steve.html



"Don Rylander" <[hidden email]> wrote in
message news:ak5cbn$1fqko0$[hidden email]...

> Steve & Chris,
> "Steve Waring" <[hidden email]> wrote in message
> news:ak4j0l$1fjkot$[hidden email]...
> [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.
>


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Improve resource distribution...

rush
"Steve Waring" <[hidden email]> wrote in message
news:ak9s08$1girve$[hidden email]...
> 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


Reply | Threaded
Open this post in threaded view
|

Re: Suggestion: Improve resource distribution...

Steve Alan Waring
Hi rush,

"rush" <[hidden email]> wrote in message
news:akad12$44u9$[hidden email]...

> 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
[hidden email]
http://www.dolphinharbor.org/dh/harbor/steve.html