Problem with synchronized folders, installer breaks when folders are not in place. - Advanced Installer Community
r.bissels
Posts: 7
Joined: Tue Aug 20, 2019 9:46 am

Problem with synchronized folders, installer breaks when folders are not in place.

In our project we use a jenkins job to build the files and folder needed in the installer. We use the synchronized folders function, because the contents may grow or change over time.

When a team member opens our Advanced Installer project without the correct files and folders build from jenkins in place, some files within the synchronized folders will be decoupled from its component, and will be automatically coupled to the main component "sunec.dll" (which is the java feature). Because of this, for example, the decoupled files (from its original component) will still be installed ,though in the wrong folder and even without the original component not selected as a feature during installation. Some files will also disappear.

All of this happens during the synchronization while opening the project. It gives no clear visible warning, only a small notification (and only if you have the notification view open). During a commit it is not really visible what you are checking in because of the many changes to "Installer.aip". Also all the Jenkins jobs will continue working, and the publish will likely also succeed because all the features are installed.

We encounter these problems with files under one feature.The files within another feature seems to not have this problem, and will still be coupled to their own component.

Is it possible to fix the hard coupling between the files and the feature/component. So if opened without the synchronized folders the installer.aip will still work, when the CI will build an installer with the synchronized folders.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem with synchronized folders, installer breaks when folders are not in place.

Hi,

I apologize for the delayed reply.

The files that are added to the project during the synchronization are automatically added to the feature that is set as current ("Set as Current" option from its context menu).

If some files from a feature that is not set as current are missing when the synchronization is refreshed, but they are added later, they will be automatically added to the feature that is set as current. I'm afraid that their previous parent component cannot not be remembered.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
r.bissels
Posts: 7
Joined: Tue Aug 20, 2019 9:46 am

Re: Problem with synchronized folders, installer breaks when folders are not in place.

Hi,

Maybe I explained the problem not good enough.

The biggest problem is that we have some operations, like TXT UPDATE, on configuration files. The files itself are deleted after a refresh when the files are not available. The parent folder still has the link to the right feature. Although the TXT Update on the file is decoupled from its Component. If the TXT update itself is kept in the Installer.aip, why can't the link to its original component be kept?

It seems more user friendly to me to give the user a error, or warning, and give it the possibility to fix the error.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem with synchronized folders, installer breaks when folders are not in place.

Hi,

I'm afraid that a file operation cannot have its own component, it is always added to the component of a regular file. So, when a synchronized file does not exist on the local drive, its component is removed and the file operation it contained is automatically moved to another component.

In this case, the message below is displayed in the "Notification" area:

The following move file operations: APPDIR\Sync\YourFile.exe were moved in component YourFile.txt because their component YourFile.exe_1 was deleted.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
r.bissels
Posts: 7
Joined: Tue Aug 20, 2019 9:46 am

Re: Problem with synchronized folders, installer breaks when folders are not in place.

Is it possible to give the file operation the component of a feature?

For example
We have a feature called "Feature 1", with a synced folder called "feature_1_config" which is tied to "Feature 1". Normally this folder contains all the files and we configured some Text-Update operations on them. For this TextUpdate operations we fill in as Component : "Feature 1". In this case, if the installer.aip is openend and the synced folders are again in place, the text-update should still work, because the component is still right, and it is tied to the file by its "Include property".

Do you think this approach will work?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem with synchronized folders, installer breaks when folders are not in place.

Hi,

I'm afraid that assigning a file operation to a feature is not possible, it must be assigned to a component. You can assign it to the parent folder's component (I suppose that it is not removed from the project). If it does not have its own component, you can select the "Create folder on target machine" option from its "Properties" tab and a component will be automatically generated.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”