Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Real-Time Software Components (RTSC) » Making "light" package releases
Making "light" package releases [message #245] Fri, 03 October 2008 18:21 Go to next message
Ramsey Harris is currently offline Ramsey Harris
Messages: 22
Registered: July 2009
Junior Member
I have a package which ships with source and build script to enable my
consumer to rebuild the package. I would also like to ship (release) the
package with pre-built executables to improve the out-of-box experience. I
configure my package to export everything.

Pkg.exportAll = true;

Unfortunately, this makes my package release quite large. It seems that
the generated content in the package folder accounts for most of the size.
Significantly more than the executables themselves.

Is there a way I can build my executables and ship them in the release but
not include the large content under the package folder? I know some of the
package folder is required, but those file are quite small.

Thanks
~ Ramsey
Re: Making "light" package releases [message #256 is a reply to message #245] Mon, 06 October 2008 01:38 Go to previous messageGo to next message
Dave Russo is currently offline Dave Russo
Messages: 172
Registered: July 2009
Senior Member
Ramsey Harris wrote:
> I have a package which ships with source and build script to enable my
> consumer to rebuild the package. I would also like to ship (release) the
> package with pre-built executables to improve the out-of-box experience.
> I configure my package to export everything.
>
> Pkg.exportAll = true;
>
> Unfortunately, this makes my package release quite large. It seems that
> the generated content in the package folder accounts for most of the
> size. Significantly more than the executables themselves.
>
> Is there a way I can build my executables and ship them in the release
> but not include the large content under the package folder? I know some
> of the package folder is required, but those file are quite small.
"Pkg.exportAll = true" _should_ only include files that are not known to
be generated. Since _all_ files in the ./package subdirectory are
generated, you should not see any unnecessary files in the released
package's ./package sub-directory.

Perhaps there is a bug. Do you have a small example that includes files
that you don't expect? Although, it should not matter, what version of
XDCtools are you using?
Re: Making "light" package releases [message #264 is a reply to message #256] Tue, 07 October 2008 20:38 Go to previous messageGo to next message
Ramsey Harris is currently offline Ramsey Harris
Messages: 22
Registered: July 2009
Junior Member
When I use Pkg.attrs.exportAll = true; I still get all the generated
libraries built by my package. Since these are known to be generated, I
was not expecting them in the release. I'm using XDCtools 3.10.02.
Re: Making "light" package releases [message #270 is a reply to message #264] Wed, 08 October 2008 11:02 Go to previous messageGo to next message
Dave Russo is currently offline Dave Russo
Messages: 172
Registered: July 2009
Senior Member
Ramsey Harris wrote:
> When I use Pkg.attrs.exportAll = true; I still get all the generated
> libraries built by my package. Since these are known to be generated, I
> was not expecting them in the release. I'm using XDCtools 3.10.02.
>
Right, exportAll only _adds_ files to what has already been specified in
your build script. It's used to pickup "legacy/internal" headers
documentation files, etc.

If you only want sources and no libraries you can create multiple
releases (say src_only and full) and when you add libraries (via
addLibrary()), you need to explicitly exclude the src_only release using
the optional releases array.

Pkg.addLibrary("foo", targ, {releases: [full]});

Another way to eliminate libraries from a release is to supply a
"release script" which simply removes them. In this case, you again
create two releases and the _only_ difference is that one of the
releases has a release script that simply removes some/all libraries.

Although it is possible to get a "source only" release, it's painful;
you need to use fairly advanced features for what should be simple,
especially since it is a fairly common request. We do have an
outstanding feature request to provide yet another optional attribute to
releases, say exportSrcOnly, that would make it easy to create such a
release.
Re: Making "light" package releases [message #279 is a reply to message #270] Wed, 08 October 2008 13:35 Go to previous messageGo to next message
Ramsey Harris is currently offline Ramsey Harris
Messages: 22
Registered: July 2009
Junior Member
I'm trying to use the release script approach. I discovered that when I
add a release script in my package build script, it overrides the default
release script added in my config.bld script. Is there some way to run my
package release script first (to prune the files array) and then run the
default release script (to add copyright header) in config.bld?
Re: Making "light" package releases [message #287 is a reply to message #279] Wed, 08 October 2008 21:09 Go to previous message
Dave Russo is currently offline Dave Russo
Messages: 172
Registered: July 2009
Senior Member
Ramsey Harris wrote:
> I'm trying to use the release script approach. I discovered that when I
> add a release script in my package build script, it overrides the
> default release script added in my config.bld script. Is there some way
> to run my package release script first (to prune the files array) and
> then run the default release script (to add copyright header) in
> config.bld?
>
Since release scripts are scripts and scripts can call other scripts,
you should be able to simply invoke the default script from within your
script.

xdc.loadCapsule("the/default/release/script.rel");
: /* do additional stuff here */

If you don't want to hard code the name of the default release script in
your package, you can reference the default set in your config.bld:
if (Pkg.attrs.relScript != null) {
xdc.loadCapsule(Pkg.attrs.relScript);
}
: /* do additional stuff here */
Previous Topic:RTSC-Pedia (http://rtsc.eclipse.org/docs) wiki accounts are now open
Next Topic:RTSC and POSIX
Goto Forum:
  


Current Time: Wed Aug 27 21:21:25 EDT 2014

Powered by FUDForum. Page generated in 0.02066 seconds