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

How can I update the portable version of Thorium? #98

Closed
driftywinds opened this issue Aug 16, 2023 · 15 comments
Closed

How can I update the portable version of Thorium? #98

driftywinds opened this issue Aug 16, 2023 · 15 comments

Comments

@driftywinds
Copy link

Do I just download the latest release and paste it into the already existing folder? Or is there another method that is reccomended for the portable verison?

@Alex313031
Copy link
Owner

@driftywinds I would reccomend downloading new version, and then moving your user profile into it.

@driftywinds
Copy link
Author

@driftywinds I would reccomend downloading new version, and then moving your user profile into it.

so the "USER_DATA" folder is what I should paste into the new version right?

@gz83
Copy link
Collaborator

gz83 commented Aug 17, 2023

@driftywinds I would reccomend downloading new version, and then moving your user profile into it.

so the "USER_DATA" folder is what I should paste into the new version right?

Yes,you can try

@driftywinds

@ltguillaume
Copy link

ltguillaume commented Aug 19, 2023

@driftywinds I just forked my updater for LibreWolf to help out with Thorium. See https://codeberg.org/ltguillaume/thorium-winupdater

Should work for both installed and portable Thorium.

@Alex313031
Copy link
Owner

@ltguillaume COOL! Can I fork it and make it a submodule of the main repo?

@Alex313031
Copy link
Owner

@gz83 @midzer Look at this.

@gz83
Copy link
Collaborator

gz83 commented Aug 19, 2023

@gz83 @midzer Look at this.

Nice, we should do some testing on them to make sure it works

@Alex313031

@ltguillaume
Copy link

ltguillaume commented Aug 19, 2023

Can I fork it and make it a submodule of the main repo?

Not necessarily against that, but I'm just curious what the benefits for Thorium or WinUpdater would be. Just a more official "flair" or is there more to it?

I'm just asking, because I've gotten the same question for LibreWolf WinUpdater (which is already included in official releases), but I still have to answer 😋

@Alex313031 Some things to do:

  1. In order to keep the codebase of both WinUpdaters as close together as possible, I will change a few search/replace actions with variables, make some code that's unnecessary for Thorium conditional and some inline strings that were changed into global constants.
  2. If there would be a way to distinguish which current build is installed, I can automate the download from the right repo (avx2/win/win7?). So is there something in the .exe that can allow me to identify which build it is? If not (yet), perhaps you could add a field called e.g. Build to the version info when compiling?
  3. I now see that the Win7 repo has 4 different builds, so I think currently it just picks whichever build is first in the release JSON, so that has to be addressed, ideally with what I suggested in (2).
  4. Does the mini installer have any command line arguments?

@Alex313031
Copy link
Owner

Alex313031 commented Aug 20, 2023

@ltguillaume I meant fork it, but make yours a submodule of the repo. I can make PR requests as needed, so they show up in the repo.

Can you put it on github, like the librewolf updater?

And yeah I will look into 2. and 3.

About 4. This file has all the available commandline args.
https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/util/initial_preferences_constants.cc

Of particular use is --do-not-create-taskbar-shortcut and --system-level. System level installs it in program files and makes shortcuts for all users. Running without any arguments installs it in %appdata% and makes shortcuts for the current user.

What about a .json file that I put on the website. Like thorium.rock/win7/dist.json

Which could contain something like

{
  "version": "109.0.x.x.x",
  "sse2": "https://download/path/to/latest/sse2/.exe",
  "sse3": "https://download/path/to/latest/sse3/.exe",
  "avx": "https://download/path/to/latest/avx/.exe",
  "avx2": "https://download/path/to/latest/avx2/.exe"
}

@ltguillaume
Copy link

ltguillaume commented Aug 21, 2023

@ltguillaume I meant fork it, but make yours a submodule of the repo. I can make PR requests as needed, so they show up in the repo.

Can you put it on github, like the librewolf updater?

Will do.

And yeah I will look into 2. and 3.

Great!

About 4. This file has all the available commandline args. https://source.chromium.org/chromium/chromium/src/+/main:chrome/installer/util/initial_preferences_constants.cc

Of particular use is --do-not-create-taskbar-shortcut and --system-level. System level installs it in program files and makes shortcuts for all users. Running without any arguments installs it in %appdata% and makes shortcuts for the current user.

Ahah, so I'll need to take into account the possibility that it's installed in Program Files and would then need admin rights like LibreWolf, good to know.

As for --do-not-create-taskbar-shortcut, I hope it won't remove an existing shortcut, then I could always pass it. If it does, I'll need to check for the existence of a shortcut and pass the switch depending on that. Will check.

What about a .json file that I put on the website. Like thorium.rock/win7/dist.json

Which could contain something like

{
  "version": "109.0.x.x.x",
  "sse2": "https://download/path/to/latest/sse2/.exe",
  "sse3": "https://download/path/to/latest/sse3/.exe",
  "avx": "https://download/path/to/latest/avx/.exe",
  "avx2": "https://download/path/to/latest/avx2/.exe"
}

No, the thing I need to ascertain somehow is which version the user currently has installed. There should be no problem to get the right download URL via the GitHub API after that.

@Alex313031
Copy link
Owner

@ltguillaume Simply running thorium.exe or chrome.exe with --version will print the version to stdout.

@ltguillaume
Copy link

Sorry, I didn't mean the version number, but the build of the version (so AVX2/AVX/Win7AVX2/Win7AVX/Win7SSE3/Win7x86).

@Alex313031
Copy link
Owner

Alex313031 commented Aug 21, 2023

@ltguillaume OOF. It might be possible to edit the .rc file used in thorium.exe to embed the version in the header data.

But what about a simpler approach. Simply a file called thor_ver with a single line in it coressponding to the version

AVX2/AVX/Win7AVX2/Win7AVX/Win7SSE3/Win7x86

I could make a thor_ver for each version, which would be copied into the out/thorium when building, and then I just tell the mini_installer build.gn to include the file. That way, whatever the user has installed can always be checked simply by parsing the one and only line in that file.

Also go see my issue on your new repo.

@ltguillaume
Copy link

ltguillaume commented Aug 21, 2023

That would be fine, too. But ehm, I've had a little accident: earlier today, one of the drives in my PC was actually on fire. Yikes! I'm hoping there's no further damage to the cables, motherboard and that it wasn't caused by the PSU, but I was very happy I was next to it when it happened, could've been a lot worse. The PC seemed to just shake it off, rebooted and resumed work as if it weren't... on fire.

So yeah, that'll cause a bit of a delay.

@Alex313031
Copy link
Owner

@ltguillaume Wowzers! Worst I have had is a secondary PSU let out the magic smoke.

But see > ltguillaume/thorium-winupdater#1

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

No branches or pull requests

4 participants