AutoUpdate download for Mac

Comments

9 comments

  • Avatar
    michiel

    Hi,

    On OSX to run the installer in unattended mode you can run it in the following way:

        /path/to/installbuilder/bin/builder.app/Contents/MacOS/installbuilder.sh --mode unattended. 

    So you could change your code to something like:

    builder.command("open", AUTO_INSTALLER_FILESPEC+"/Contents/MacOS/installbuilder.sh", "--args", "--mode", "unattended", "--unattendedmodebehavior", "download", "--unattendedmodeui", "minimalWithDialogs", "--update_download_location", tempDirectory.getAbsolutePath());

    Regards,

    Michiel

    0
    Comment actions Permalink
  • Avatar
    Mark Vincellette

    Hi Michiel,

    Thanks for the tip, but that's not my issue.

    On Windows, the code above works like this:

    1. "builder.start()", kicks off the download process (including minimal dialogs)
    2. AutoInstaller runs synchronously
    3. "process.waitFor()" returns the "exitCode" when download has completed

    On Mac, it runs like this:

    1. "builder.start()", kicks off the download process (including minimal dialogs)
    2. AutoInstaller runs asynchronously
    3. "process.waitFor()" returns immediately with "exitCode" = 0 - before download has completed

    So, it's running perfectly on Windows, but it doesn't work on the Mac. Even if there's a problem with the download, it will always return "exitCode" = 0 because it's returning before the download is over.

    0
    Comment actions Permalink
  • Avatar
    Mark Vincellette

    Interestingly, when we run the "check" on the Mac to see if there's an update available, it runs synchronously and returns the correct "exitCode" when it's finished. It only runs asynchronously on the download.

    0
    Comment actions Permalink
  • Avatar
    michiel

    Hi Mark,

    By default the updater when running in unattended mode functions as an update checker, returning 1 if an update is available.  Only with the --download is set it downloads the update if available.

    You can find more information about this subject in the following section of our manual:

    https://clients.bitrock.com/installbuilder/docs/installbuilder-userguide.html#_using_autoupdate_as_a_notifier

    Regards,

    Michiel

     

    0
    Comment actions Permalink
  • Avatar
    michiel

    Hi Mark,

    I sincerely apologize for the miscommunication. We have checked the autoupdate on macOS and it properly downloaded the update on our side so it may be something specific to your current setup. Could you contact us through our private forum so we can provide you with an upload link and try to troubleshoot the issue using your build artifacts?

    Best regards,

    Michiel.

    0
    Comment actions Permalink
  • Avatar
    michiel

    Hi Mark,

    We just realized you are using "open" in your call. The macOS command "open" does not wait for the process to finish by default. That explains the behaviour you are reproducing. To solve it, you could either manually invoke the CFBundleExecutable (also dropping --args):

    builder.command(AUTO_INSTALLER_FILESPEC+"/Contents/MacOS/installbuilder.sh", "--mode", "unattended", "--unattendedmodebehavior", "download", "--unattendedmodeui", "minimalWithDialogs", "--update_download_location", tempDirectory.getAbsolutePath());

    Or to pass the -W flag to open, which will make it wait:

    builder.command("open", "-W", AUTO_INSTALLER_FILESPEC, "--args", "--mode", "unattended", "--unattendedmodebehavior", "download", "--unattendedmodeui", "minimalWithDialogs", "--update_download_location", tempDirectory.getAbsolutePath());

    Could you check if that solves your issue?

    Best regards,

    Michiel.

    0
    Comment actions Permalink
  • Avatar
    Mark Vincellette

    Hi Michiel,

    That is great news!! I apologize for the frustration. We love your platform, and it's been working great up until we ran into this issue. We're close to being able to go live with our new project, and it's been hold us up.

    We'll try your suggestion(s) today and let you know how it goes.

    Thanks again for your help,

    Mark

    0
    Comment actions Permalink
  • Avatar
    Mark Vincellette

    Hi Michiel,

    We went ahead and called the .sh file directly (without --args), and it's working perfectly.

    Thanks so much for your help!

    Mark

    0
    Comment actions Permalink
  • Avatar
    michiel

    Hi Mark,

    I'm glad to hear the issue is solved. :) If you have any further questions please do not hesitate to contact us directly at support@bitrock.com.

    Best regards,

    Michiel

    0
    Comment actions Permalink

Please sign in to leave a comment.