doc: run install.bat on libvirt

This commit is contained in:
Oskar Manhart 2024-12-13 20:06:30 +01:00
parent 564d28bb7f
commit 8e3a3bfc9c
37 changed files with 59 additions and 314 deletions

View File

@ -1,42 +0,0 @@
on:
pull_request:
push:
branches: [main]
jobs:
lictool:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
if: ${{ github.event_name != 'pull_request' }}
- name: Checkout pull request
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request' }}
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Set git author to @actions
uses: fregante/setup-git-user@v2
- name: Install lictool
run: pip install git+https://github.com/emzeat/mz-lictools@v2.7.0
- name: Run lictool
run: lictool
- name: Commit and push
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "[ci] update license header"
push: true
fetch: false

View File

@ -1,71 +0,0 @@
{
"author": {
"from_git": true,
"latest_year_only": true
},
"title": false,
"style_override_for_suffix": {
".yaml": "POUND_STYLE",
".ps1": "POUND_STYLE",
".nix": "POUND_STYLE",
".bat": "BATCH_STYLE",
"": "POUND_STYLE"
},
"exclude": [
"flake.lock",
"^\\.[^/]+",
"/\\.[^/]+",
"^(.+)\\.(md|svg|png|reg|gif|patch)",
"^(fonts|WinApps-Launcher)(/.*)?",
"apps/access/info",
"apps/access-o365-x86/info",
"apps/access-x86/info",
"apps/acrobat-x-pro/info",
"apps/adobe-cc/info",
"apps/aftereffects-cc/info",
"apps/audition-cc/info",
"apps/bridge-cc/info",
"apps/bridge-cs6/info",
"apps/bridge-cs6-x86/info",
"apps/cmd/info",
"apps/excel/info",
"apps/excel-o365-x86/info",
"apps/excel-x86/info",
"apps/explorer/info",
"apps/iexplorer/info",
"apps/illustrator-cc/info",
"apps/indesign-cc/info",
"apps/lightroom-cc/info",
"apps/onenote/info",
"apps/onenote-o365-x86/info",
"apps/onenote-x86/info",
"apps/outlook/info",
"apps/outlook-o365-x86/info",
"apps/outlook-x86/info",
"apps/photoshop-cc/info",
"apps/photoshop-cs6/info",
"apps/photoshop-cs6-x86/info",
"apps/powerpoint/info",
"apps/powerpoint-o365-x86/info",
"apps/powerpoint-x86/info",
"apps/powershell/info",
"apps/publisher/info",
"apps/publisher-o365-x86/info",
"apps/publisher-x86/info",
"apps/word/info",
"apps/word-o365-x86/info",
"apps/word-x86/info",
"apps/access-o365/info",
"apps/excel-o365/info",
"apps/onenote-o365/info",
"apps/outlook-o365/info",
"apps/powerpoint-o365/info",
"apps/publisher-o365/info",
"apps/word-o365/info",
"install/inquirer.sh"
],
"license": false,
"force_author": false,
"force_license": true,
"custom_license": "SPDX-License-Identifier: AGPL-3.0-or-later"
}

View File

@ -1,6 +1,5 @@
ci:
autoupdate_branch: "rewrite"
skip: [license-tools]
exclude: ^(.+)\.patch$
@ -51,8 +50,3 @@ repos:
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/emzeat/mz-lictools
rev: v2.7.0
hooks:
- id: license-tools

View File

@ -3,9 +3,6 @@
Thank you for contributing to winapps! Before you can contribute, we ask some things of you:
- Please follow our Code of Conduct, the Contributor Covenant. You can find a copy in this repository or under https://www.contributor-covenant.org/
- All Contributors have to sign [a CLA](https://gist.github.com/oskardotglobal/35f0a72eb45fcc7087e535561383dbc5) for legal reasons. When opening a PR, @cla-assitant will prompt you and guide you through the process. However, if you contribute on behalf of a legal entity, we ask of you to sign [a different CLA](https://gist.github.com/oskardotglobal/75a8cc056e56a439fa6a1551129ae47f). In that case, please contact us.
- All Contributors have to sign [a CLA](https://gist.github.com/oskardotglobal/35f0a72eb45fcc7087e535561383dbc5) for legal reasons. When opening a PR, @cla-assistant will prompt you and guide you through the process. However, if you contribute on behalf of a legal entity, we ask of you to sign [a different CLA](https://gist.github.com/oskardotglobal/75a8cc056e56a439fa6a1551129ae47f). In that case, please contact us.
- Please follow code conventions enforced by `pre-commit`. To keep down CI usage, please run it locally before committing too.
See <https://pre-commit.com> for installation, then run `pre-commit install` inside the `winapps` repository you cloned.
All source code files shall have a valid SPDX-Identifier. For more information, see <https://spdx.dev/learn/handling-license-info/>.
This identifier will be generated by a pre-commit hook most of the time.

8
COPYRIGHT.md Normal file
View File

@ -0,0 +1,8 @@
Some of the files are
Copyright (c) 2024 fmstrat
Many files also contain contributions from third parties.
In this case the original copyright of the contributions can be traced through the history of the source version control system.
When that is not the case, the files contain a prominent notice stating the original copyright and applicable license, or come with their own dedicated COPYRIGHT and/or LICENSE file.

View File

@ -1,3 +1,5 @@
For copyright information, please see the [COPYRIGHT.md](./COPYRIGHT.md) file.
This project has files licensed under different licenses.
The original project by Fmstrat <https://github.com/Fmstrat/winapps/> is not free software.

View File

@ -282,7 +282,7 @@ The following guides are available:
- [Creating a Windows VM with `Docker` or `Podman`](docs/docker.md)
- [Creating a Windows VM with `libvirt`](docs/libvirt.md)
If you already have a Windows VM or server you wish to use with WinApps, you will need to merge `install/RDPApps.reg` into the Windows Registry manually.
If you already have a Windows VM or server you wish to use with WinApps, you will still have to follow the [final steps described in the `libvirt` documentation](docs/libvirt.md#final-configuration-steps).
### Step 2: Install Dependencies
Install the required dependencies.
@ -376,10 +376,10 @@ RDP_SCALE="100"
# [ADDITIONAL FREERDP FLAGS & ARGUMENTS]
# NOTES:
# - If you're facing issues, try removing the /network:lan flag.
# DEFAULT VALUE: '/cert:tofu /sound /microphone /network:lan'
# - You can try adding /network:lan to these flags in order to increase performance, however, some users have faced issues with this.
# DEFAULT VALUE: '/cert:tofu /sound /microphone'
# VALID VALUES: See https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown
RDP_FLAGS="/cert:tofu /sound /microphone /network:lan"
RDP_FLAGS="/cert:tofu /sound /microphone"
# [MULTIPLE MONITORS]
# NOTES:

View File

@ -1,8 +1,3 @@
# Copyright (c) 2024 winapps-org
# All rights reserved.
#
# SPDX-License-Identifier: Unlicense
# GNOME shortcut name
NAME="Access"

View File

@ -1,8 +1,3 @@
# Copyright (c) 2024 winapps-org
# All rights reserved.
#
# SPDX-License-Identifier: Unlicense
# GNOME shortcut name
NAME="Access"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Adam
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Acrobat 9"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Adam
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Excel"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Adam
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="LINQPad8"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Adam
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Paint"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Adam
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Powershell"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Project"
# Used for descriptions and window class

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Gordon Cheong
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Project"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Adam
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# GNOME shortcut name
NAME="SQL Server Management Studio"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Gordon Cheong
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Visio"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Gordon Cheong
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Visio"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Gordon Cheong
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Visual Studio Community"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Gordon Cheong
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Visual Studio Enterprise"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Gordon Cheong
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Visual Studio Professional"

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Adam
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# GNOME shortcut name
NAME="Word"

View File

@ -1,12 +1,4 @@
#!/usr/bin/env bash
# Copyright (c) 2024 Felix Bartels
# Copyright (c) 2024 Rhea Barar
# Copyright (c) 2024 Rohan Barar
# Copyright (c) 2024 Oskar Manhart
# Copyright (c) 2024 escapefreeg
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
### GLOBAL CONSTANTS ###
# ERROR CODES
@ -42,7 +34,7 @@ readonly CONTAINER_NAME="WinApps" # FOR 'docker' AND 'podman' ONLY
readonly RDP_PORT=3389
readonly DOCKER_IP="127.0.0.1"
# shellcheck disable=SC2155 # Silence warnings regarding masking return values through simultaneous declaration and assignment.
readonly RUNID="${RANDOM}" #Set a random int for the run ID to assist with logging
readonly RUNID="${RANDOM}"
### GLOBAL VARIABLES ###
# WINAPPS CONFIGURATION FILE

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Oskar Manhart
# Copyright (c) 2024 Rohan Barar
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# For documentation, FAQ, additional configuration options and technical help, visit: https://github.com/dockur/windows
name: "winapps" # Docker Compose Project Name.

View File

@ -1,8 +1,3 @@
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);

View File

@ -12,7 +12,7 @@ Although WinApps supports using `QEMU+KVM+libvirt` as a backend for running Wind
You can find a guide for installing `Docker Engine` [here](https://docs.docker.com/engine/install/).
### Setup `Docker` Container
WinApps utilises `docker compose` to configure Windows VMs. A template [`compose.yaml`](https://github.com/winapps-org/winapps/blob/main/compose.yaml) is provided.
WinApps utilises `docker compose` to configure Windows VMs. A template [`compose.yaml`](../compose.yaml) is provided.
Prior to installing Windows, you can modify the RAM and number of CPU cores available to the Windows VM by changing `RAM_SIZE` and `CPU_CORES` within `compose.yaml`.

View File

@ -650,13 +650,13 @@ You can then test whether the host GNU/Linux system can communicate with Windows
{"return":{"version":"107.0.1","supported_commands":[{"enabled":true,"name":"guest-get-cpustats","success-response":true},{"enabled":true,"name":"guest-get-diskstats","success-response":true},{"enabled":true,"name":"guest-get-devices","success-response":true},{"enabled":true,"name":"guest-get-osinfo","success-response":true},{"enabled":true,"name":"guest-get-timezone","success-response":true},{"enabled":true,"name":"guest-get-users","success-response":true},{"enabled":true,"name":"guest-get-host-name","success-response":true},{"enabled":true,"name":"guest-exec","success-response":true},{"enabled":true,"name":"guest-exec-status","success-response":true},{"enabled":false,"name":"guest-get-memory-block-info","success-response":true},{"enabled":false,"name":"guest-set-memory-blocks","success-response":true},{"enabled":false,"name":"guest-get-memory-blocks","success-response":true},{"enabled":true,"name":"guest-set-user-password","success-response":true},{"enabled":true,"name":"guest-get-fsinfo","success-response":true},{"enabled":true,"name":"guest-get-disks","success-response":true},{"enabled":false,"name":"guest-set-vcpus","success-response":true},{"enabled":true,"name":"guest-get-vcpus","success-response":true},{"enabled":true,"name":"guest-network-get-interfaces","success-response":true},{"enabled":false,"name":"guest-suspend-hybrid","success-response":false},{"enabled":true,"name":"guest-suspend-ram","success-response":false},{"enabled":true,"name":"guest-suspend-disk","success-response":false},{"enabled":true,"name":"guest-fstrim","success-response":true},{"enabled":true,"name":"guest-fsfreeze-thaw","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze-list","success-response":true},{"enabled":true,"name":"guest-fsfreeze-freeze","success-response":true},{"enabled":true,"name":"guest-fsfreeze-status","success-response":true},{"enabled":true,"name":"guest-file-flush","success-response":true},{"enabled":true,"name":"guest-file-seek","success-response":true},{"enabled":true,"name":"guest-file-write","success-response":true},{"enabled":true,"name":"guest-file-read","success-response":true},{"enabled":true,"name":"guest-file-close","success-response":true},{"enabled":true,"name":"guest-file-open","success-response":true},{"enabled":true,"name":"guest-shutdown","success-response":false},{"enabled":true,"name":"guest-info","success-response":true},{"enabled":true,"name":"guest-set-time","success-response":true},{"enabled":true,"name":"guest-get-time","success-response":true},{"enabled":true,"name":"guest-ping","success-response":true},{"enabled":true,"name":"guest-sync","success-response":true},{"enabled":true,"name":"guest-sync-delimited","success-response":true}]}}
```
Next, you will need to make some registry changes to enable RDP Applications to run on the system. Start by downloading the [RDPApps.reg](https://github.com/winapps-org/winapps/blob/main/oem/RDPApps.reg) file, right-clicking on the `Raw` button, and clicking on `Save target as`.
Next, you will need to make some registry changes to enable RDP Applications to run on the system. Start by downloading the [RDPApps.reg](../oem/RDPApps.reg) file, right-clicking on the `Raw` button, and clicking on `Save target as`. Repeat the same thing for the [install.bat](../oem/install.bat) and the [NetProfileCleanup.ps1](../oem/NetProfileCleanup.ps1). **Do not download the Container.reg.**
<p align="center">
<img src="./libvirt_images/26.png" width="700px"/>
</p>
Once you have downloaded the registry file, right-click on it, and choose `Merge`.
Once you have downloaded all three files, right-click the install.bat and select "Run as administrator".
<p align="center">
<img src="./libvirt_images/27.png" width="700px"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -1,8 +1,3 @@
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
{
description = "WinApps Nix packages & NixOS module";

View File

@ -1,9 +1,3 @@
# Copyright (c) 2024 Rohan Barar
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
### FUNCTIONS ###
# Name: 'GetApplicationIcon'
# Role: Extract the icon from a given executable file as a base-64 string.

4
oem/Container.reg Normal file
View File

@ -0,0 +1,4 @@
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001

30
oem/NetProfileCleanup.ps1 Normal file
View File

@ -0,0 +1,30 @@
# Get the current network profile name
$currentProfile = ^(Get-NetConnectionProfile^).Name
# Get all profiles from the registry
$profilesKey = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles"
$profiles = Get-ChildItem -Path $profilesKey
foreach ^($profile in $profiles^) {
$profilePath = "$profilesKey\$($profile.PSChildName)"
$profileName = ^(Get-ItemProperty -Path $profilePath^).ProfileName
# Remove profiles that don't match the current one
if ^($profileName -ne $currentProfile^) {
Remove-Item -Path $profilePath -Recurse
Write-Host "Deleted profile: $profileName"
}
}
# Change the current profile name to "WinApps"
$profiles = Get-ChildItem -Path $profilesKey
foreach ^($profile in $profiles^) {
$profilePath = "$profilesKey\$($profile.PSChildName)"
$profileName = ^(Get-ItemProperty -Path $profilePath^).ProfileName
if ^($profileName -eq $currentProfile^) {
# Update the profile name
Set-ItemProperty -Path $profilePath -Name "ProfileName" -Value "WinApps"
Write-Host "Renamed profile to: WinApps"
}
}

View File

@ -1,47 +1,13 @@
@echo off
REM Copyright (c) 2024 Oskar Manhart
REM Copyright (c) 2024 itiligent
REM All rights reserved.
REM
REM SPDX-License-Identifier: AGPL-3.0-or-later
REG IMPORT C:\OEM\RDPApps.reg
reg import %~dp0\RDPApps.reg
:: Create Powershell network profile cleanup script
(
echo # Get the current network profile name
echo $currentProfile = ^(Get-NetConnectionProfile^).Name
echo.
echo # Get all profiles from the registry
echo $profilesKey = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles"
echo $profiles = Get-ChildItem -Path $profilesKey
echo.
echo foreach ^($profile in $profiles^) {
echo $profilePath = "$profilesKey\$($profile.PSChildName)"
echo $profileName = ^(Get-ItemProperty -Path $profilePath^).ProfileName
echo.
echo # Remove profiles that don't match the current one
echo if ^($profileName -ne $currentProfile^) {
echo Remove-Item -Path $profilePath -Recurse
echo Write-Host "Deleted profile: $profileName"
echo }
echo }
echo.
echo # Change the current profile name to "WinApps"
echo $profiles = Get-ChildItem -Path $profilesKey
echo foreach ^($profile in $profiles^) {
echo $profilePath = "$profilesKey\$($profile.PSChildName)"
echo $profileName = ^(Get-ItemProperty -Path $profilePath^).ProfileName
echo.
echo if ^($profileName -eq $currentProfile^) {
echo # Update the profile name
echo Set-ItemProperty -Path $profilePath -Name "ProfileName" -Value "WinApps"
echo Write-Host "Renamed profile to: WinApps"
echo }
echo }
) > %windir%\NetProfileCleanup.ps1
if exists %~dp0\Container.reg (
reg import %~dp0\Container.reg
)
:: Create network profile cleanup scheduled task
REM Create network profile cleanup scheduled task
copy %~dp0\NetProfileCleanup.ps1 %windir%
set "taskname=NetworkProfileCleanup"
set "command=powershell.exe -ExecutionPolicy Bypass -File "%windir%\NetProfileCleanup.ps1^""

View File

@ -1,8 +1,3 @@
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
{
stdenv,
lib,

View File

@ -1,8 +1,3 @@
# Copyright (c) 2024 Oskar Manhart
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
{
stdenv,
lib,

View File

@ -1,13 +1,4 @@
#!/usr/bin/env bash
# Copyright (c) 2024 Felix Bartels
# Copyright (c) 2024 Coruscant11
# Copyright (c) 2024 escapefreeg
# Copyright (c) 2024 Rohan Barar
# Copyright (c) 2024 Oskar Manhart
# Copyright (c) 2024 Sebastien Bürky
# All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# shellcheck disable=SC2034 # Silence warnings regarding unused variables globally.