8 Commits

Author SHA1 Message Date
dd9a85aae1 winapps: 0-unstable-2025-06-05 -> 0-unstable-2025-06-10
Diff: 2b2f4cea69...e2e9fd9b7b
2025-06-15 10:04:14 +00:00
e2e9fd9b7b Merge pull request #509 from egvrl/main
Add protocol handler for Microsoft Office links (e.g. ms-office://)
2025-06-10 16:13:25 +02:00
5594a23298 feat: don't hardcode winapps path 2025-06-10 16:12:53 +02:00
5946444c63 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-05-15 14:26:58 +00:00
afb333ab4f small README.md fixes 2025-05-15 16:19:14 +02:00
97a3889ecc return to original link to be able to merge + readme update 2025-05-15 16:13:39 +02:00
c06ae550bc fix for application loop 2025-05-15 14:09:17 +02:00
bac0d08cf2 testing ms-office-protocol install 2025-05-15 14:01:17 +02:00
4 changed files with 42 additions and 4 deletions

View File

@ -17,6 +17,7 @@ WinApps works by:
- The GNU/Linux `/home` directory is accessible within Windows via the `\\tsclient\home` mount.
- Integration with `Nautilus`, allowing you to right-click files to open them with specific Windows applications based on the file MIME type.
- The [official taskbar widget](https://github.com/winapps-org/WinApps-Launcher) enables seamless administration of the Windows subsystem and offers an easy way to launch Windows applications.
- Microsoft Office links (e.g. ms-word://) from the host system are automatically opened in the Windows subsystem. (Note: You may need to use an [User Agent switcher](https://github.com/ray-lothian/UserAgent-Switcher/) Browser Extension and set the User-Agent to Windows, as as the Office webapps typically hide the "Open in Desktop App" option for Linux users.)
## Supported Applications
**WinApps supports <u>*ALL*</u> Windows applications.**

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Name=Microsoft Office Protocol Handler
Comment=Handle Microsoft Office URI schemes via WinApps
Exec=winapps manual %u
Terminal=false
Type=Application
MimeType=x-scheme-handler/ms-word;x-scheme-handler/ms-excel;x-scheme-handler/ms-powerpoint;x-scheme-handler/ms-outlook;x-scheme-handler/ms-access;x-scheme-handler/ms-visio;x-scheme-handler/ms-project;x-scheme-handler/ms-teams;x-scheme-handler/ms-whiteboard;x-scheme-handler/ms-officeapp;
NoDisplay=true
Categories=Office;Utility;

View File

@ -11,12 +11,12 @@
...
}:
let
rev = "2b2f4cea698096829fbd1c3c15970034a6f53261";
hash = "sha256-km8q3IL5sETbFsscNy4dDxYTytuKPJQJY81p7tSk63A=";
rev = "e2e9fd9b7b66bd1432c2a7186017da5c281d5b9e";
hash = "sha256-N6ArgdiJyhWNALqpRxLR6RDDMsiqEf2RxWLQ2z7T23Y=";
in
stdenv.mkDerivation rec {
pname = "winapps";
version = "0-unstable-2025-06-05";
version = "0-unstable-2025-06-10";
src = fetchFromGitHub {
owner = "winapps-org";

View File

@ -1142,6 +1142,10 @@ function waFindInstalled() {
# Extract the name of the application from the absolute path of the folder.
APPLICATION="$(basename "$APPLICATION")"
if [[ "$APPLICATION" == "ms-office-protocol-handler.desktop" ]]; then
continue
fi
# Source 'Info' File Containing:
# - The Application Name (FULL_NAME)
# - The Shortcut Name (NAME)
@ -1326,9 +1330,9 @@ MimeType=${MIME_TYPES}"
function waConfigureOfficiallySupported() {
# Declare variables.
local OSA_LIST=() # Stores a list of all officially supported applications installed on Windows.
local OFFICE_APPS=("access" "access-o365" "access-o365-x86" "access-x86" "adobe-cc" "acrobat9" "acrobat-x-pro" "aftereffects-cc" "audition-cc" "bridge-cc" "bridge-cc-x86" "bridge-cs6" "bridge-cs6-x86" "cmd" "dymo-connect" "excel" "excel-o365" "excel-o365-x86" "excel-x86" "excel-x86-2010" "explorer" "iexplorer" "illustrator-cc" "lightroom-cc" "linqpad8" "mirc" "mspaint" "onenote" "onenote-o365" "onenote-o365-x86" "onenote-x86" "outlook" "outlook-o365" "outlook-o365-x86" "powerpoint" "powerpoint-o365" "powerpoint-o365-x86" "powerpoint-x86" "publisher" "publisher-o365" "publisher-o365-x86" "publisher-x86" "project" "project-x86" "remarkable-desktop" "ssms20" "visual-studio-comm" "visual-studio-ent" "visual-studio-pro" "visio" "visio-x86" "word" "word-o365" "word-o365-x86" "word-x86" "word-x86-2010")
# Read the list of officially supported applications that are installed on Windows into an array, returning an empty array if no such files exist.
# This will remove leading and trailing whitespace characters as well as ignore empty lines.
readarray -t OSA_LIST < <(grep -v '^[[:space:]]*$' "$INST_FILE_PATH" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' 2>/dev/null || true)
# Create application entries for each officially supported application.
@ -1342,6 +1346,19 @@ function waConfigureOfficiallySupported() {
# Configure the application.
waConfigureApp "$OSA" svg
# Check if the application is an Office app and copy the protocol handler.
if [[ " ${OFFICE_APPS[*]} " == *" $OSA "* ]]; then
# Determine the target directory based on whether the installation is for the system or user.
if [[ "$OPT_SYSTEM" -eq 1 ]]; then
TARGET_DIR="$SYS_APP_PATH"
else
TARGET_DIR="$USER_APP_PATH"
fi
# Copy the protocol handler to the appropriate directory.
$SUDO cp "./apps/ms-office-protocol-handler.desktop" "$TARGET_DIR/ms-office-protocol-handler.desktop"
fi
# Print feedback.
echo -e "${DONE_TEXT}Done!${CLEAR_TEXT}"
done
@ -1673,10 +1690,21 @@ function waEnsureOnPath() {
# Name: 'waUninstall'
# Role: Uninstalls WinApps.
function waUninstall() {
# Print feedback.
[ "$OPT_SYSTEM" -eq 1 ] && echo -e "${BOLD_TEXT}REMOVING SYSTEM INSTALLATION.${CLEAR_TEXT}"
[ "$OPT_USER" -eq 1 ] && echo -e "${BOLD_TEXT}REMOVING USER INSTALLATION.${CLEAR_TEXT}"
# Determine the target directory for the protocol handler based on the installation type.
if [[ "$OPT_SYSTEM" -eq 1 ]]; then
TARGET_DIR="$SYS_APP_PATH"
else
TARGET_DIR="$USER_APP_PATH"
fi
# Remove the 'ms-office-protocol-handler.desktop' file if it exists.
$SUDO rm -f "$TARGET_DIR/ms-office-protocol-handler.desktop"
# Declare variables.
local WINAPPS_DESKTOP_FILES=() # Stores a list of '.desktop' file paths.
local WINAPPS_APP_BASH_SCRIPTS=() # Stores a list of bash script paths.