Pragramatically updating version number for package...

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

Pragramatically updating version number for package...

talios@gmail.com
Anyone know why when I update the file/product version number with:

((PackageManager current packageNamed: 'SMSComposer') imageStripper
versionResource)
    productVersion: '1.0.0.5';
     fileVersion: '1.0.0.4'.

the updated version numbers don't seem to be there when I right-click on
the package, view its properties and drill down to the version resource?

amrk


Reply | Threaded
Open this post in threaded view
|

Re: Pragramatically updating version number for package...

David Gorisek-5
To update package version number use:

(PackageManager current packageNamed: 'SMSComposer')
        packageVersion: '1.0.0.5'

I guess what you are doing below is not updating the package version but
  setting the executable file version which is displayed in Windows file
explorer when you select the deployed executable file and click on
properties. I haven't tried this though.

Best regards,

David Gorisek
http://wiki.gorisek.com



Mark Derricutt wrote:

> Anyone know why when I update the file/product version number with:
>
> ((PackageManager current packageNamed: 'SMSComposer') imageStripper
> versionResource)
>    productVersion: '1.0.0.5';
>     fileVersion: '1.0.0.4'.
>
> the updated version numbers don't seem to be there when I right-click on
> the package, view its properties and drill down to the version resource?
>
> amrk


Reply | Threaded
Open this post in threaded view
|

Re: Pragramatically updating version number for package...

Chris Uppal-3
In reply to this post by talios@gmail.com
Mark Derricutt wrote:

> ((PackageManager current packageNamed: 'SMSComposer') imageStripper
> versionResource)
>     productVersion: '1.0.0.5';
>      fileVersion: '1.0.0.4'.
>
> the updated version numbers don't seem to be there when I right-click on
> the package, view its properties and drill down to the version resource?

I think you need code like:

    p := PackageManager current packageNamed: 'TEST'.
    is := p imageStripper.
    is versionResource
        productVersion: '1.0.0.5';
        fileVersion: '1.0.0.4'.
    p imageStripper: is.

The reason is that the #imageStripper of a package isn't stored as a reference
to an image stripper object, but as an STB-ed representation of that object
(#imageStripperBytes, iirc).  The image stripper object is re-constituted from
the STB byte array on demand, but since the package doesn't hold onto a
reference to it, the package won't reflect any changes you make to it.

I believe that, rather non-obvious, behaviour is so that packages which have
been created in the 'pro' edition of Dolphin (and which therefore may have
non-nil #imageStrippers) can be loaded into "lesser" editions of Dolphin where
the image stripper class is missing.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Pragramatically updating version number for package...

talios@gmail.com
In reply to this post by David Gorisek-5
David Gorisek wrote:

> To update package version number use:
>
> (PackageManager current packageNamed: 'SMSComposer')
>     packageVersion: '1.0.0.5'

Cool - that works nicely.  Now if I can get my image building up from
raw packages/base image I'll be set and totally happy.


Reply | Threaded
Open this post in threaded view
|

Re: Pragramatically updating version number for package...

talios@gmail.com
Mark Derricutt wrote:

> Cool - that works nicely.  Now if I can get my image building up from
> raw packages/base image I'll be set and totally happy.

Actualy, had to use Chris Uppals version for it to be exposed down to
the .exe, nicely working thou.