Re: Packages - Replace File if it is newer
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=disneyanimation-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Yxy7ihePbq8lqpiYL6pG8EXfKBxS8kqvxxpzDK3JIvI=; b=QXk9Yi4+AP6R8/fqpCqygopQJVjOxBPLjgBjhUlky3zmBg2gNOdAzP+3DNR/CNhMeE MLm6Pxr1JfqP3FFgGw5siI64zzhvq/PcJAcCfgHM3cbj5i4gN6nhFUeu1nrLcP0HAKdu Q60ydVly4CrvPYFWNeDrT16my8VtyI1M/BZX9h6K84lcUqp/cDVUnjggNqpXlbv4x8ZI yRqDqd5kEFl/Oqp3Z2i1cMQOYrQD3r+tOF8wjJQeqNUq/Qr8weyvOlz9SPglZC10XVIz aBBL5uQtnQdDgG0EcRoCuZ48m4dIgxl6/xYbfFVoDZ21+1G7mHiHRH16IIBxIV/GO7wn 9ogA== I think it would be far better to quit trying to do this in the installer, and instead do it in the application. You essentially have a prefs/config file at /Users/Shared/Test.txt. On launch, the app should try to read that file, and if it doesn't exist, write out a default version. This removes all the logic from the installer and puts it in the application where it belongs. -Greg
On Oct 24, 2017, at 7:54 AM, Matthias Schroeder <Matthias.Schroder@cern.ch> wrote:
Hi,
I see two possible solutions for your issue:
- you install the file in question in a post install script that does the checking whether or no the existing file is older - you install the file in question as separate package and run a pre-install check whether or not the existing file is older.
I always use pre-install scripts to check whether the same or a newer version of the package is installed already. The dependencies can nicely be handle by Packages.
Hope this helps,
Matthias
On 24 Oct 2017, at 16:29, Hanspeter Harpf <hanspeterharpf@mac.com <mailto:hanspeterharpf@mac.com>> wrote:
Dear all,
I created with the Packages Installer my installation application. So far everything works fine but I have one issue which is bothering me for some days.
My previous installer v2.6.0 installs for example following file: /Users/Shared/Test.txt
Now the issue is that within that file the main application stores information which has been created during the use of the software.
My „new“ installer installs now again the file mentioned above and overwrites that file. So the custom data of the user is gone.
Is there a method / way in Packages to avoid the overwriting of that file?
Several years ago I used the software from MindVision VISE X and I could define within that installation application when a file should be replaced. I had there these options for example: - Only replace file if it is newer (compare modification dates) - Never replace file - Always replace file (this option seems to be the default option in Packages as it always replaces the files and deletes those files which are not anymore in the installer)
Can this behaviour also reached with Packages?
Thank you very much for any comment on this issue! Best Regards, Hanspeter Harpf _______________________________________________ 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: https://lists.apple.com/mailman/options/installer-dev/matthias.schroder%40ce...
<https://lists.apple.com/mailman/options/installer-dev/matthias.schroder%40cern.ch>
This email sent to matthias.schroder@cern.ch <mailto:matthias.schroder@cern.ch>
_______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com <mailto:Installer-dev@lists.apple.com>) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/installer-dev/greg.neagle%40disneyan...
<https://lists.apple.com/mailman/options/installer-dev/greg.neagle%40disneyanimation.com>
This email sent to greg.neagle@disneyanimation.com <mailto:greg.neagle@disneyanimation.com>
_______________________________________________ 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: https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Greg Neagle