Skip to content

stop updating while running from source - #540

Merged
manuelcortez merged 2 commits into
MCV-Software:next-genfrom
Arfs6:stop_update_running_source
Oct 10, 2023
Merged

stop updating while running from source#540
manuelcortez merged 2 commits into
MCV-Software:next-genfrom
Arfs6:stop_update_running_source

Conversation

@Arfs6

@Arfs6 Arfs6 commented May 30, 2023

Copy link
Copy Markdown
Contributor

I edited main.py to check if tw blue is running from source before calling do_update.

@ChrisDuffley

Copy link
Copy Markdown

May I please ask why this should not be called when it could be easier to pull the latest source this way? I get that you can do a git pull etc but sometimes I'm not in the mood to recompile if I don't want to.

@Arfs6

Arfs6 commented May 31, 2023

Copy link
Copy Markdown
Contributor Author

"May I please ask why this should not be called when it could be easier to pull the latest source this way? "

If i understand your question, you're asking why do_update will not be called if we're running from source right?
It is because do_update downloads the compiled source code and more.
You can of course add a git pull as your update but that is going to be only to your source code. This is because most people's setup is different. It will require the user to know which remote branch is the right branch to pull from.

@manuelcortez

Copy link
Copy Markdown
Member

Could you apply it in the updater package itself? if someone checks for updates from the menu bar, updates will still be offered. It would be best to remove this check from main.py and patch the do_update function to perform the check for source distribution.

@Arfs6

Arfs6 commented Jun 2, 2023

Copy link
Copy Markdown
Contributor Author

ok. I have pushed a new commit that tackles that.

  1. edited: main.py - removed the check if we're running from source part.
  2. edited: update/updater.py - checks if twblue is running from source and returns without updating
  3. edited: controller/mainController.py - In check_for_updates method - Added check if twblue is running from source and inform the user that he / she can't update.
  4. edited: wxUI/commonMessageDialogs.py - Created a dialog that tells a user he / she can't update while running from source.

@Arfs6

Arfs6 commented Aug 27, 2023

Copy link
Copy Markdown
Contributor Author

This PR hasn't been merged.

@manuelcortez
manuelcortez merged commit b3e0b21 into MCV-Software:next-gen Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants