- /create-targz-x64.sh - Builds the WLinux custom Linux distro in a WLinux or Debian environment.
- Launcher project - Builds the actual executable that is run when a user launches the app.
- DistroLauncher-Appx project - Builds the distro package with all the assets and other dependencies.
Read more about the components from the upstream template by Microsoft here.
- Visual Studio Community 2017. (Free)
- The "Universal Windows Platform development" Workload is required, along with the following Individual components:
C++ Universal Windows Platform tools
Windows 10 SDK (10.0.15063.0) for UWP: C#, VB, JS
- The "Universal Windows Platform development" Workload is required, along with the following Individual components:
- Developer Mode
- Windows 10 must be in Developer mode, which can be enabled in Start -> Settings -> Update & Security -> For developers.
- Enable WSL
- Enable by:
- Pressing Windows+R, type
C:\Windows\System32\OptionalFeatures.exe
, click OK, find and check Windows Subsystem for Linux, click OK, and restart as required, or - Open PowerShell as Administrator, type
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
, and restart as required.
- Pressing Windows+R, type
- Enable by:
-
Open DistroLauncher.sln in Visual Studio Community 2017.
-
Generate a test certificate:
- In the Solution Explorer, open
DistroLauncher-Appx\MyDistro.appxmanifest
- Select the Packaging tab
- Select "Choose Certificate"
- Click the Configure Certificate drop down and select Create test certificate.
- In the Solution Explorer, open
-
Build install.tar.gz
- You will need access to an existing WLinux or Debian-based distro for this step. If you do not already have WLinux installed, I recommend the following steps:
- Enable WSL on Windows if you have not already.
- Install the Debian for WSL app from the Microsoft Store.
- Run, let it finish installing, configure your username and password.
- Then you will need to update apt, upgrade existing packages, and then install git:
$ sudo apt-get update ; sudo apt-get upgrade -y ; sudo apt-get install git -y
- With your WLinux (or configured/updated Debian) distro in place, execute the following:
$ git clone https://github.com/WhitewaterFoundry/WLinux.git
$ cd WLinux
$ chmod u+x create-targz-x64.sh
$ ./create-targz-x64.sh
- You should find an install.tar.gz in the /x64/ directory of your build directory. (When we get ARM64 support working there will also be an install.tar.gz in a /ARM64/ directory.)
- You will need access to an existing WLinux or Debian-based distro for this step. If you do not already have WLinux installed, I recommend the following steps:
-
Build the solution to make sure you have everything you need. Fix any build dependencies you are missing.
-
Build the Windows UWP package:
- Open a
Developer Command Prompt for VS 2017
as an administrator and change directory to your build directory. - Run
build.bat
- Open a
-
If everything has gone correctly, you should find your app package in a subfolder under the
AppPackages\DistroLauncher-Appx
folder.- First, install the certificate:
- Double-click on the security certificate file.
- Click the "Install Certificate" button.
- Select "Local Machine" for the store location.
- Select "Automatically select the certificate store based on the type of certificate", then click Next. (If you have any certificate issues, try specifying the Root Certificate Authority Trust here.)
- Proceed through the rest of the wizard, clicking Next, Finish, OK, and then OK.
- Once that's done, you should be able to double-click on the .appx package file and install it.
- First, install the certificate:
The launcher app provides the following functionality:
-
wlinux.exe
- Launches the user's default shell in the user's home directory.
-
wlinux.exe install [--root]
- Install the distribution and do not launch the shell when complete.
--root
: Do not create a user account and leave the default user set to root.
- Install the distribution and do not launch the shell when complete.
-
wlinux.exe run <command line>
- Run the provided command line in the current working directory. If no command line is provided, the default shell is launched.
- Everything after
run
is passed to WslLaunchInteractive.
-
wlinux.exe config [setting [value]]
- Configure settings for this distribution.
- Settings:
--default-user <username>
: Sets the default user to . This must be an existing user.
-
wlinux.exe help
- Print usage information.