site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com User-agent: Thunderbird 2.0.0.18 (Macintosh/20081105) Hi Kevin, there is a comment in the code I sent you. The manual also gives helpful hints... Check out "Bild1.png". Maybe there is a easier solution using standard radiobuttons or Javascript in PM-App. Check out "Bild2.png". See the standard solution for allowing relocate and downgrade. Maybe thats enough. Greets Gu, Kevin schrieb:
Hi David,
The package version I mean is the "Package Version:" string in "Configuration" tab of the Package's "Contents". I suppose this version info should effect in the way of preventing down-grade. (But, it doesn't work. I searched a.receiptdb, the version sting was recorded, but it seems that the installer won't compare it.)
This script should be put into the preinstall section of your installer or so.
I think I can try this method by installing a file which stores the version info. But what can I do in the bash script to stop/skip the process of installation if I find that I am installing a lower version?
Best Regards, Kevin Gu
-----Original Message----- From: David Schara [mailto:David.Schara@Native-Instruments.de] Sent: 2008年11月26日 19:08 To: Gu, Kevin Cc: installer-dev@lists.apple.com Subject: Re: How to skip the installation when install a lower version. (PackageMaker3.02)
hi Kevin,
there is a file called "My.pkg/Contents/Resources/package_version <cid:part1.07070707.01050206@Native-Instruments.de>" contained in the package. I dont know in which way it differs from the version number of the app, but maybe it helps...
Greets
<cid:part1.07070707.01050206@Native-Instruments.de>
Hi David,
Thank you very much for your reply.
What I really want is to compare the version of install packages. (Not the
version of my application, because I install not only bundle but also other related files.)
Anyway, I have made a small test to try the script and my test result is below: /private/tmp/scripts.IXRi/./preinstall[688] Version_Now(1.49.001) <
Version_Old(1.51.001)
That means I do have installed a low version and replace the higher one.
So, do you have the second suggestion...?
Best Regards, Kevin Gu
-----Original Message----- From: David Schara [mailto:David.Schara@Native-Instruments.de] Sent: 2008年11月26日 17:51 To: Gu, Kevin Cc: installer-dev@lists.apple.com Subject: Re: How to skip the installation when install a lower version. (PackageMaker3.02)
Hi Kevin,
my fist suggestion would be to write a little bash script that compares two version numbers. This script should be put into the preinstall section of your installer or so.
The script should look something like this (it is only example code!!!):
#!/bin/sh #Script is checking if VERSION_B is higher, lower or equal to Version_A
#This is how my Version number looks like: VERSION_A="0.5.0.002"
#Read it out the plist VERSION_B=`defaults read "/Applications/my.app/Contents/Info" "CFBundleShortVersionString"`
echo "echo1:" $VERSION_B echo "echo2:" $VERSION_A
#Reading String VERSION_A to array and writing it to Val_A without "."
V1[1]=${VERSION_A:0:1} echo ${V1[1]} V1[2]=${VERSION_A:2:1} echo ${V1[2]} V1[3]=${VERSION_A:4:1} echo ${V1[3]} V1[4]=${VERSION_A:6:3} echo ${V1[4]}
#put serial back together without dots Val_A=${V1[1]}${V1[2]}${V1[3]}${V1[4]} echo $Val_A
#Reading String VERSION_A to array and writing it to Val_B without "." V2[1]=${VERSION_B:0:1} echo ${V2[1]} V2[2]=${VERSION_B:2:1} echo ${V2[2]} V2[3]=${VERSION_B:4:1} echo ${V2[3]} V2[4]=${VERSION_B:6:3} echo ${V2[4]}
#put serial back together without dots Val_B=${V2[1]}${V2[2]}${V2[3]}${V2[4]} echo $Val_B
#-Comparing here: #-instead of echo there should be something like return 0 in case of success or anything higher starting at 64 #will stop the isntallation.
if [ $Val_A -gt $Val_B ] then echo "V1 > V2" fi
if [ $Val_A -lt $Val_B ] then echo "V1 < V2" fi
if [ $Val_A = $Val_B ] then echo "V1 = V2" fi
Greetings
David
Gu, Kevin schrieb:
Hi all,
I know this might be a very simple question, but I tried and failed many
times
and have to write this mail.
What I want is very simple: 1. Installation runs when install an initial version or install a higher
version.
2. Installation skips when install an lower version.
I have tried the "Package Version", but it doesn't work. I use PackageMaker 3.02 on Leopard.
Any help will be highly appreciated. Thanks in advance.
Best Regards, Kevin
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/installer-dev/david.schara%40native
-instruments.de
This email sent to david.schara@native-instruments.de
-- David Schara Research & Development
David.Schara@native-instruments.de
NATIVE INSTRUMENTS GmbH Schlesische Str. 28 10997 Berlin, Germany http://www.native-instruments.com
***
TRAKTOR PRO - the new benchmark in digital DJing => http://www.listentopro.com
KORE PLAYER - the free instrument with access to the best NI sounds => http://www.native-instruments.com/koreplayer.info
->>>>>> NATIVE INSTRUMENTS - The Future of Sound <<<<<<-
Registergericht: Amtsgericht Charlottenburg Registernummer: HRB 72458 UST.-ID.-Nr. DE 20 374 7747 Geschaeftsfuehrer: Daniel Haver, Stephan Schmitt
------------------------------------------------------------------------
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/installer-dev/david.schara%40native -instruments.de
This email sent to david.schara@native-instruments.de
-- David Schara Research & Development
David.Schara@native-instruments.de
NATIVE INSTRUMENTS GmbH Schlesische Str. 28 10997 Berlin, Germany http://www.native-instruments.com
***
TRAKTOR PRO - the new benchmark in digital DJing => http://www.listentopro.com
KORE PLAYER - the free instrument with access to the best NI sounds => http://www.native-instruments.com/koreplayer.info
->>>>>> NATIVE INSTRUMENTS - The Future of Sound <<<<<<-
Registergericht: Amtsgericht Charlottenburg Registernummer: HRB 72458 UST.-ID.-Nr. DE 20 374 7747 Geschaeftsfuehrer: Daniel Haver, Stephan Schmitt
-- David Schara Research & Development David.Schara@native-instruments.de NATIVE INSTRUMENTS GmbH Schlesische Str. 28 10997 Berlin, Germany http://www.native-instruments.com *** TRAKTOR PRO - the new benchmark in digital DJing => http://www.listentopro.com KORE PLAYER - the free instrument with access to the best NI sounds => http://www.native-instruments.com/koreplayer.info ->>>>>> NATIVE INSTRUMENTS - The Future of Sound <<<<<<- Registergericht: Amtsgericht Charlottenburg Registernummer: HRB 72458 UST.-ID.-Nr. DE 20 374 7747 Geschaeftsfuehrer: Daniel Haver, Stephan Schmitt _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com