robb0wen / synthwave-vscode

Synthwave inspired colour theme for VS Code 🌅🕶
MIT License
5.17k stars 1.18k forks source link

Add latest vscodeinsiders fix to admin privileges #264

Closed navincodesalot closed 2 years ago

navincodesalot commented 2 years ago

As shown in #263 the fix by @mcpads is fixed with the addition of electron-sandbox instead of electron-browser. electron-browser was removed in commit https://github.com/microsoft/vscode/tree/f4f1b04d872a2b94d9a5105a1eefb81a213c07f2 and was renamed.

These lines need to be changed: https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L30-L40

https://github.com/robb0wen/synthwave-vscode/blob/07273cd1e1fb6d0873dd96ab9f2e291eb136bee5/src/extension.js#L109-L113

pulberg commented 2 years ago

This will break users on older versions of vscode, shouldn't the fix test the paths, then pick the correct var based on which path exists?

navincodesalot commented 2 years ago

This will break users on older versions of vscode, shouldn't the fix test the paths, then pick the correct var based on which path exists?

So then could we provide this as a different version?

navincodesalot commented 2 years ago

Ye. Ill work on testing the paths

navincodesalot commented 2 years ago

This will break users on older versions of vscode, shouldn't the fix test the paths, then pick the correct var based on which path exists?

How would you think we could go about verifying what version of vs they are using? Only VSCode Insiders has this fix

woelmer commented 2 years ago

Can we get this PR merged? The latest VSCode update needs this fix.

amlcodes commented 2 years ago

bump

diXrom commented 2 years ago

bump

hmmhmmhm commented 2 years ago

@robb0wen we hope to merge it

robb0wen commented 2 years ago

I couldn't merge this as-is because, as @pulberg pointed out, it would break the extension for older versions of VS code. I've made a tweak to the PR to run a check for the user's current VS code version which should prevent any issues.

I've tested this as working on Mac. Could someone running windows please check that this latest update works? Once we're happy it is, I'll merge this in

navincodesalot commented 2 years ago

I couldn't merge this as-is because, as @pulberg pointed out, it would break the extension for older versions of VS code. I've made a tweak to the PR to run a check for the user's current VS code version which should prevent any issues.

I've tested this as working on Mac. Could someone running windows please check that this latest update works? Once we're happy it is, I'll merge this in

Where is this? I can test just cant find lmao

cheestudio commented 2 years ago

@navincodesalot It's in the commit history for the PR: https://github.com/robb0wen/synthwave-vscode/pull/264/commits/9f05676efa92763d0be8f06f3475cb20a1283e15

Here is a direct link to the file that you would replace your extension.js with:

https://raw.githubusercontent.com/robb0wen/synthwave-vscode/9f05676efa92763d0be8f06f3475cb20a1283e15/src/extension.js

cheestudio commented 2 years ago

@robb0wen Windows11 user here, seemed to work great!

mcpads commented 2 years ago

I couldn't merge this as-is because, as @pulberg pointed out, it would break the extension for older versions of VS code. I've made a tweak to the PR to run a check for the user's current VS code version which should prevent any issues.

I've tested this as working on Mac. Could someone running windows please check that this latest update works? Once we're happy it is, I'll merge this in

electron-sandbox and it's files was added in Aug 2020 first. If we have to cover the older version of VSCode, checking the existance of electron-sandbox might not be right way.

I think checking sandbox-only by this would be better.

const browserWorkbenchPath = base + (isWin ? "\\electron-browser\\workbench" : "/electron-browser/workbench");
const usesSandbox = !fs.existsSync(browserWorkbenchPath);
ChristianWare commented 2 years ago

Hey Guys, for mac users, this is what I did:

  1. Open your terminal, and type the following: "cd .vscode/extensions"
  2. Then type "ls" to get a list view of all the files. you are looking for this file: "robbowen.synthwave-vscode-0.1.11"
  3. Once you confirm you have this file, type the following: "cd robbowen.synthwave-vscode-0.1.11"
  4. Type: "code ." Wait about 20seconds, and VS code will appear.
  5. Look in the src folder, and find the extension.js file. Open it.
  6. Delete everything in this file, and replace with everything in this link: "https://raw.githubusercontent.com/robb0wen/synthwave-vscode/9f05676efa92763d0be8f06f3475cb20a1283e15/src/extension.js"
  7. Save file, and quit VS code.
  8. Open VS code again, with whatever project you are working on. Reactivate Synthwave '84, Cmd Shift P + Enable Neon Dreams.
  9. Done
  10. You're Welcome
st0302 commented 2 years ago

Hey Guys, for mac users, this is what I did:

  1. Open your terminal, and type the following: "cd .vscode/extensions"
  2. Then type "ls" to get a list view of all the files. you are looking for this file: "robbowen.synthwave-vscode-0.1.11"
  3. Once you confirm you have this file, type the following: "cd robbowen.synthwave-vscode-0.1.11"
  4. Type: "code ." Wait about 20seconds, and VS code will appear.
  5. Look in the src folder, and find the extension.js file. Open it.
  6. Delete everything in this file, and replace with everything in this link: "https://raw.githubusercontent.com/robb0wen/synthwave-vscode/9f05676efa92763d0be8f06f3475cb20a1283e15/src/extension.js"
  7. Save file, and quit VS code.
  8. Open VS code again, with whatever project you are working on. Reactivate Synthwave '84, Cmd Shift P + Enable Neon Dreams.
  9. Done
  10. You're Welcome
  1. sudo chmod -R ugo+rw /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/out/vs/code/electron-sandbox
cfz commented 2 years ago

win11 with latest(Aug 2022) vscode works~

robb0wen commented 2 years ago

@mcpads You're absolute right. I missed that it had been in previous versions.

There's another PR which fixes the issue and includes a better, version-based check for the electron version. Simply for ease of it all being in one place, I'll merge that one and close this PR.

Thanks all for your input and testing on this one