Giter VIP home page Giter VIP logo

Comments (7)

RoliSoft avatar RoliSoft commented on June 21, 2024 1

You could pass something like CHROOT_SUPPORT, but imho a more generic WINVER is better, since further down the line new features will be added to WSL which the hook script will need to account for, so it's better if I pass the build number straight to the hook script, and let it deal with it however it wants to.

from wsl-distribution-switcher.

thebitstick avatar thebitstick commented on June 21, 2024

The non-Insider builds won't get this for months, so I don't think he should remove it yet.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on June 21, 2024

The chroot hack won't be removed, since I'm not an Insider either, and as @thebitstick said, we won't see chroot support for a few more months.

The underlying issue here is to update the script to detect Windows's build version or probe for chroot, and apply fix if needed. I'm not yet sure how to do this with the limited tools available at my disposal during a fresh install, but I'll try to whip something up.

from wsl-distribution-switcher.

thebitstick avatar thebitstick commented on June 21, 2024

You could try sys.getwindowsversion()

import sys
sys.getwindowsversion()

Output:
sys.getwindowsversion(major=10, minor=0, build=14393, platform=2, service_pack='')

EDIT:
You can use sys.getwindowsversion().build

import sys
sys.getwindowsversion().build

Output:
14393

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on June 21, 2024

@thebitstick The problem is not getting the Windows version under Windows, but under WSL, since the hook script is a Bash script which is running under WSL.

That being said, I probably could get the Windows build version from Python, and pass it along to the hook scripts as an environmental variable WINVER or something. Seems less intrusive than packaging a statically compiled chroot-prober.

from wsl-distribution-switcher.

thebitstick avatar thebitstick commented on June 21, 2024

You could check for the build number in the install script, and pass a Boolean to the hook.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on June 21, 2024

d8bf12b fixes this.

Took a bit longer to write, since I was busy experimenting with and implementing the native decompression.

from wsl-distribution-switcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.