Re: Packages - Replace File if it is newer
Re: Packages - Replace File if it is newer
- Subject: Re: Packages - Replace File if it is newer
- From: Greg Neagle <email@hidden>
- Date: Tue, 24 Oct 2017 08:12:38 -0700
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 <email@hidden>
> 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 <email@hidden
>> <mailto:email@hidden>> 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 (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>>
>> This email sent to email@hidden
>> <mailto:email@hidden>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Installer-dev mailing list (email@hidden
> <mailto:email@hidden>)
> Help/Unsubscribe/Update your Subscription:
>
>
> This email sent to email@hidden
> <mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden