Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Suggestion: Improve resource distribution...

3 views
Skip to first unread message

Christopher J. Demers

unread,
Aug 21, 2002, 2:29:59 PM8/21/02
to
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


Steve Waring

unread,
Aug 23, 2002, 1:57:26 AM8/23/02
to
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
swa...@ozemail.com.au
http://www.dolphinharbor.org/dh/harbor/steve.html

"Christopher J. Demers" <cdeme...@mitchellscientific.com> wrote in
message news:ak0man$1e8e8p$1...@ID-50880.news.dfncis.de...

Don Rylander

unread,
Aug 23, 2002, 9:12:54 AM8/23/02
to
Steve & Chris,
"Steve Waring" <swa...@ozemail.com.au> wrote in message
news:ak4j0l$1fjkot$1...@ID-65212.news.dfncis.de...
[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.

Christopher J. Demers

unread,
Aug 23, 2002, 1:40:04 PM8/23/02
to
Steve Waring <swa...@ozemail.com.au> wrote in message
news:ak4j0l$1fjkot$1...@ID-65212.news.dfncis.de...
> 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

Steve Waring

unread,
Aug 25, 2002, 2:01:27 AM8/25/02
to
Hi Don,

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

Thanks,
Steve

"Don Rylander" <don.ry...@NOSPAM.FordConsultingGroup.com> wrote in
message news:ak5cbn$1fqko0$1...@ID-57705.news.dfncis.de...

rush

unread,
Aug 25, 2002, 6:54:32 AM8/25/02
to

"Steve Waring" <swa...@ozemail.com.au> wrote in message
news:ak9s08$1girve$1...@ID-65212.news.dfncis.de...

> 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

Steve Waring

unread,
Aug 25, 2002, 10:33:23 AM8/25/02
to
Hi rush,

"rush" <pi...@rush.avalon.hr> wrote in message
news:akad12$44u9$1...@as201.hinet.hr...

> 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.

0 new messages