Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add preference to set a custom update url #865

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

Merged
AlbyIanna merged 1 commit into main from custom-update-url
Feb 28, 2022
Merged

Conversation

Copy link
Contributor

@AlbyIanna AlbyIanna commented Feb 25, 2022

Motivation

We want to have a way to test the automatic update feature when downloading a build from a PR.

Change description

Add the possibility to change the URL the updater uses to know if there are updates and to download them. This way, anyone could start a local server that serves the files needed for the automatic update and fool the updater to make them think there is a new update to download.

Other information

This is necessary because a PR build of the Arduino IDE will generally be a newer version than the current latest version, so it's difficult to test before merging.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

per1234 reacted with thumbs up emoji
@per1234 per1234 added topic: code Related to content of the project itself type: enhancement Proposed improvement labels Feb 25, 2022
Copy link
Contributor Author

Here's some instructions to test this PR:

  1. download the channel file. This differs based on the OS and the channel you're getting updates from, but now only the nightly channel is available:
  2. download the latest nightly from https://downloads.arduino.cc/arduino-ide/nightly/[NAME_OF_LATEST_BUILD] and replace NAME_OF_LATEST_BUILD with the value of the property path inside of your channel file (e.g.: https://downloads.arduino.cc/arduino-ide/nightly/arduino-ide_nightly-20220225_Windows_64bit.exe)
  3. create a folder called test-updater
  4. inside test-updater, create another folder called nightly
  5. move the channel file and the build file you've just downloaded inside the nightly folder
  6. serve content of test updater with whater local server you want. For example
cd test-updater 
python3 -m http.server
  1. Download and open the PR build of the Arduino IDE you want to test
  2. Open the User Preferences from the command palette (CTRL/CMD + SHIFT + P)
  3. Search for the "Update Channel" preference and set it to "nightly"
  4. Search for the "Update Base URL" preference and set it to the ip address your local server is running on (e.g.: http://0.0.0.0:8000)
  5. Close the Arduino IDE and reopen it. You should now see the update dialog

(Hint: after making your tests, make sure to reset the update URL to the default or your Arduino IDE will keep looking for updates from your custom URL)

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using this new feature a lot on Windows and Linux. It works perfectly and really improves the ability to test the update capability.

Thanks Alberto!

AlbyIanna reacted with rocket emoji
Reviewers

@per1234 per1234 per1234 approved these changes

+1 more reviewer

@fstasi fstasi fstasi approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /