Kallex
Posts: 25
Joined: Thu Aug 07, 2008 4:11 pm

Dynamic/changing sync folder source name?

Mon Jun 16, 2014 1:50 pm

Hi,

I have a process where I want to be able to parametrize the sync folder source. The case is as following:

1. We have consistently named automatic build artifacts, on folders such as:

BuildName_20140610.1
BuildName_20140612.1
BuildName_20140616.1
BuildName_20140616.2

Within each build there is identical folder structure, however the amount of files (and their names) may change over time.

When I check the .aip file I can clearly see the SynchronizedFolderComponent with fixed name for my initial creation. Now I'd like that "BuildName" part to be based on property and/or alternatively just have some command line command to change it.

How should I proceed with this? On worst-case scenario I can have the .aip modified by custom program, but I'd rather not go that way if I can have it done Advanced Installer supported way.

Bogdan
Posts: 2788
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: Dynamic/changing sync folder source name?

Tue Jun 17, 2014 9:27 am

Hi,

You cannot parametrize the synch folder source, the best option for you is to use an additional step where you call a script to copy (and overwrite )all the contents
from your artifacts new folder in a stable location (its path never changes).

This way Advanced Installer will always look for the source files in the same location, no matter the build name, and you don't have to manually edit the project or do other dirty tricks.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Kallex
Posts: 25
Joined: Thu Aug 07, 2008 4:11 pm

Re: Dynamic/changing sync folder source name?

Tue Jun 17, 2014 12:20 pm

Thanks for confirming this :-).

The thing is, if I perform following:

- Checkout AIP file from version control
- Perform ANY dirty tricks to fix the path to be known build drop location
- Perform versioning and other tweaks
- Checkin AIP file to version control
=> Perform setup build...

I have consistent and auditable history where my concern is limited to build-drop-folder consistency (which is tracked out OK with existing processes). Creating temporary folder is trickier to manage when I need to support possibly later the build-agents running on non-monitored workstations, where the working directory may or may not change.

This is no problem to do... would just have simplified the above, if there was command-line command to set the sync folder (actually it doesn't even have to be property bound)...

Bogdan
Posts: 2788
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: Dynamic/changing sync folder source name?

Tue Jun 17, 2014 12:37 pm

Hi,

There is a command line to set and reset the synch-ed folder source. I did not specified this in my first post because using this command line can have side effects.

For example, if you have the project configured to install service, and the EXE source for that service is in the synchronized folder, the service installation will be deleted the moment you reset the synchronization (because reseting the synchronization means deleting all the files from the project, thus all their references too). There is a command line to add the service back, but its configuration options are limited. (or you might have an installed custom action for which there is no command line)

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Kallex
Posts: 25
Joined: Thu Aug 07, 2008 4:11 pm

Re: Dynamic/changing sync folder source name?

Wed Jun 18, 2014 6:22 am

Hi,

Thanks for pointing this out!

I hear you about the syncing side-effects. I carefully tested that they do not cause issues with our case (so far). However we do have VSTO registration, so there is/was valid concern of whether the VSTO manifest gets "unbound" from any registration activities that it goes through.

So currently our process survived me replacing all statically defined files with sync folder, and dealing with VSTO manifest component properly. Now given that I have AIP file that is working, I have ways to track down any anomalities if the command line set/reset should break something.

I understand the tradeoffs here - it seems that when going for "fully automated" builds there is always something one has to rely. And nothing will replace the reference functionality testing/verifying in the end...

Bogdan
Posts: 2788
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: Dynamic/changing sync folder source name?

Wed Jun 18, 2014 7:50 am

Glad I could help.
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”