We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Thewads
Posts: 8
Joined: Thu Jul 18, 2013 3:49 pm

Reset Sync Folders

I am currently working out how best to go about syncing files in my folders which will be included in my installer.

It works fine through the interface, but doesn't seem to work out well when doing it through the command line.

My folder structure is essentially:
  • Root
    • Installer Config
    • My code 1
    • My code 2
My installer is to set up my two code folders when installed. Like I mentioned, I have this set up working for building the installer through the interface.
In my project, I have My code 1 and My code 2 folders set as sync folders in the Files and Folders section.

In the Installer Config folder, I am running a couple of scripts which essentially boil down to a batch file which does:

Code: Select all

"AdvancedInstaller.com" /loadpathvars PathVariables.xml
"AdvancedInstaller.com" /execute myproject.aip commands.txt
and my commands.txt which does

Code: Select all

;aic
ResetSync APPDIR\mycode1
ResetSync APPDIR\mycode2
Save
Rebuild
When the ResetSync calls are made, I get the error: Folder not synchronized: APPDIR\mycode1. but when I just hit refresh in the Files and Folders section in interface, it works fine.

Am I missing something obvious, and is what I am trying possible?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Reset Sync Folders

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

I'm not sure why you encountered this behavior. I've tested your scenario and it works as expected, although you might get this error if your .aip(project file) is not saved before proceeding with the file of commands. Can you please try to save your project and then execute the file of commands and see if the behavior persist?

Let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Thewads
Posts: 8
Joined: Thu Jul 18, 2013 3:49 pm

Re: Reset Sync Folders

Hi,

I am still getting this problem. I will try and explain how I have reached the issue.

I add a new file to the 'My code 1' folder. Run the scripts, and I get the 'Folder not synchronized' error.

Do I have to manually re-save the project before syncing?

To add to this, in my interface in the Files and Folders section, I set up synchronised folders by right clicking on the folder - properties - synchronize.
If I then exit the interface, run my scripts and they fail, and then re-open the project in the interface, this setting seems to have been cleared. Could this be the source of the problem?
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Reset Sync Folders

Hello,

I'm not sure what is your scenario but keep in mind these:

ResetSync APPDIR\mycode1 command resets the synchronized folder(in your case mycode1 folder) from the project. That means: if the folder is marked as synchronized in your application(in the “Files and Folders” page) then the synchronization operation is reset(delete). As consequence you can not use this command if your folder is not marked as a synchronized one in the "Files and Folders" page. Notice that if you have a synchronized folder, after you execute the “ResetSync” command then in the “Files and Folders” page your folder is marked as an regular folder.

NewSync command is the oposite of ResetSync operation. This operation synchronizes a folder from the project with one from the disk. Similar rules must be followed. You can not use NewSync operation for a folder which is already marked as a synchronized one.

Please notice that a folder which is marked as synchronized the synchronization is refreshed when you open the project(the .aip), when you use the [Refresh ] button in the "Files and Folders" page or when you build the project.
Please take a look on our Synchronized Folder article which may be useful to you.

Please let me know if that is your scenario otherwise give us more details.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Thewads
Posts: 8
Joined: Thu Jul 18, 2013 3:49 pm

Re: Reset Sync Folders

So am I reading this right: there is no way to refresh the Files via command line, I have to use ResetSync and then NewSync to resync all the files in the folder?

If this is correct, I guess I will have to manually add in the file exclusion filters as well?

EDIT: Ok, so it turns out I was just using it wrong. :D Just doing the rebuild has synced the files. Thanks
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Reset Sync Folders

You're welcome. I'm glad you got this working.

If you have any questions please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”