Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove installbuilder from macos release artifact #785

Merged
merged 16 commits into from
May 19, 2023

Conversation

umbynos
Copy link
Contributor

@umbynos umbynos commented May 8, 2023

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • Tests for the changes have been added (for bug fixes / features)
  • What kind of change does this PR introduce?

change how the installer is generated

  • What is the current behavior?

Fix #739: Currently, the installer for all the platform is generated using installbuilder.

  • What is the new behavior?

There is an easier way of doing it: Distributing a DMG, which should be only be presented as a window with the ArduinoCreateAgent app to be draggable inside the Application folder.

  • Does this PR introduce a breaking change?

yes, the user before the update process has to manually uninstall the old version of the agent (version <= 1.2.7-ventura). From 1.2.8 onward, the update process should overwrite /Applications/ArduinoCreateAgent

  • Other information:

@umbynos umbynos added type: enhancement Proposed improvement os: macos Specific to macOS operating system labels May 8, 2023
@umbynos umbynos self-assigned this May 8, 2023
@umbynos umbynos force-pushed the umbynos/remove-macos-installbuilder branch 3 times, most recently from 127e4f1 to 2b398a5 Compare May 9, 2023 17:38
@codecov-commenter
Copy link

codecov-commenter commented May 9, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.28 ⚠️

Comparison is base (71e4921) 11.29% compared to head (28c44ac) 11.02%.

❗ Current head 28c44ac differs from pull request most recent head 9b78c5c. Consider uploading reports for the commit 9b78c5c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #785      +/-   ##
==========================================
- Coverage   11.29%   11.02%   -0.28%     
==========================================
  Files          54       55       +1     
  Lines        3948     4046      +98     
==========================================
  Hits          446      446              
- Misses       3447     3545      +98     
  Partials       55       55              
Flag Coverage Δ
unit 11.02% <0.00%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
config/autostart.go 0.00% <0.00%> (ø)
config/config.go 0.00% <0.00%> (ø)
main.go 2.33% <0.00%> (-0.16%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@umbynos umbynos force-pushed the umbynos/remove-macos-installbuilder branch 2 times, most recently from 3b7297a to d4c8b87 Compare May 10, 2023 15:18
@umbynos
Copy link
Contributor Author

umbynos commented May 10, 2023

image

Ta daaaah!
Test build here:
ArduinoCreateAgent-1.2.8-rc11-osx-amd64-installer.tar.gz

@umbynos umbynos marked this pull request as ready for review May 10, 2023 15:46
@umbynos umbynos requested a review from cmaglie May 10, 2023 15:46
@per1234 per1234 added the topic: infrastructure Related to project infrastructure label May 11, 2023
@cmaglie
Copy link
Member

cmaglie commented May 12, 2023

It seems to work fine on vanilla systems, but there are problems if there is an existing installation: previously the Agent was installed in $HOME/Applications, but after dragging the app, it is installed in /Applications, this leaves two installations of the Create Agent that leads to two problems:

  1. The user must remove the old installation manually, but there is no clue this must be done.
  2. The auto-start file is not updated and still tries to run the old version of the Agent (or if the old version is manually removed it runs nothing).

Two possible solutions for these problems:

  1. If a previous installation is in $HOME/Applications/... the new Agent should refuse to run and display a warning asking the user to uninstall the old version first.
  2. The new Agent should check if the auto-start file is up-to-date (instead of just checking if the file is present). If it is not updated, replace it with an updated version.

@umbynos
Copy link
Contributor Author

umbynos commented May 15, 2023

  1. The user must remove the old installation manually, but there is no clue this must be done.
  1. If a previous installation is in $HOME/Applications/... the new Agent should refuse to run and display a warning asking the user to uninstall the old version first.

I will target this suggestion in this PR since it's something installbuilder related

Regarding the second point I created #788 to track the imperfection

@umbynos umbynos force-pushed the umbynos/remove-macos-installbuilder branch 3 times, most recently from 1afa34b to 9b78c5c Compare May 17, 2023 14:08
@umbynos umbynos force-pushed the umbynos/remove-macos-installbuilder branch from e82db34 to fc49266 Compare May 19, 2023 10:34
@umbynos umbynos merged commit a4b266c into main May 19, 2023
@umbynos umbynos deleted the umbynos/remove-macos-installbuilder branch May 19, 2023 12:26
main.go Show resolved Hide resolved
@umbynos
Copy link
Contributor Author

umbynos commented May 22, 2023

This happens when we are upgrading from a version is already using the app bundle format
image
Every macos app works like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: macos Specific to macOS operating system topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove InstallBuilder for the macOS build and generate directly a .dmg
4 participants