diff --git a/.gitignore b/.gitignore index 3b3e3493..df3e2998 100644 --- a/.gitignore +++ b/.gitignore @@ -31,8 +31,8 @@ go.work.sum # .idea/ example/ -./altmount -altmount +/altmount +/altmount.exe *.db* *node_modules* .git diff --git a/Makefile b/Makefile index 2b351b12..661d1227 100644 --- a/Makefile +++ b/Makefile @@ -121,5 +121,14 @@ build-cli-windows: build-frontend # WinFsp must be installed on the target machine: https://winfsp.dev/ # WinFsp headers for cgofuse (if building natively): C:\Program Files (x86)\WinFsp\inc\fuse +# Regenerate the Windows resource (.syso) files from versioninfo.json + altmount.exe.manifest. +# The generated cmd/altmount/resource_windows_*.syso files are committed and the Go linker +# picks them up automatically for GOOS=windows builds — embedding the long-path-aware +# manifest. Re-run this target after editing versioninfo.json or altmount.exe.manifest. +# Requires: go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest +.PHONY: windows-resources +windows-resources: + cd cmd/altmount && goversioninfo -platform-specific versioninfo.json + .PHONY: build build: build-cli \ No newline at end of file diff --git a/README.md b/README.md index 1bbea52f..0cfed165 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,33 @@ go install github.com/javi11/altmount@latest altmount serve --config config.yaml ``` +## Windows: Enable Long Path Support + +The Windows AltMount binaries are built with a long-path-aware manifest, which +opts the process in to paths longer than the legacy `MAX_PATH` (260 character) +limit. However, Windows also requires the matching system-wide setting to be +enabled before long paths actually work — without it, you may see errors like +`The filename or extension is too long` when accessing deeply nested releases. + +Enable it once per machine in an **elevated PowerShell** prompt (Run as +administrator), then restart AltMount: + +```powershell +New-ItemProperty ` + -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" ` + -Name "LongPathsEnabled" ` + -Value 1 ` + -PropertyType DWORD ` + -Force +``` + +Equivalent via Group Policy: `Computer Configuration → Administrative Templates +→ System → Filesystem → Enable Win32 long paths`. + +This setting requires Windows 10 version 1607 (build 14393) or newer. A reboot +is not strictly required, but any already-running process — including AltMount +and your file manager — needs to be restarted to pick up the change. + ## Links - 📚 [Documentation](https://altmount.kipsilabs.top) diff --git a/cmd/altmount/altmount.exe.manifest b/cmd/altmount/altmount.exe.manifest new file mode 100644 index 00000000..00e83817 --- /dev/null +++ b/cmd/altmount/altmount.exe.manifest @@ -0,0 +1,20 @@ + + + + + + true + UTF-8 + + + + + + + + + diff --git a/cmd/altmount/resource_windows_386.syso b/cmd/altmount/resource_windows_386.syso new file mode 100644 index 00000000..6fcd4599 Binary files /dev/null and b/cmd/altmount/resource_windows_386.syso differ diff --git a/cmd/altmount/resource_windows_amd64.syso b/cmd/altmount/resource_windows_amd64.syso new file mode 100644 index 00000000..30a53578 Binary files /dev/null and b/cmd/altmount/resource_windows_amd64.syso differ diff --git a/cmd/altmount/resource_windows_arm.syso b/cmd/altmount/resource_windows_arm.syso new file mode 100644 index 00000000..46f20a07 Binary files /dev/null and b/cmd/altmount/resource_windows_arm.syso differ diff --git a/cmd/altmount/resource_windows_arm64.syso b/cmd/altmount/resource_windows_arm64.syso new file mode 100644 index 00000000..4e797151 Binary files /dev/null and b/cmd/altmount/resource_windows_arm64.syso differ diff --git a/cmd/altmount/versioninfo.json b/cmd/altmount/versioninfo.json new file mode 100644 index 00000000..03860ba3 --- /dev/null +++ b/cmd/altmount/versioninfo.json @@ -0,0 +1,42 @@ +{ + "FixedFileInfo": { + "FileVersion": { + "Major": 0, + "Minor": 0, + "Patch": 0, + "Build": 0 + }, + "ProductVersion": { + "Major": 0, + "Minor": 0, + "Patch": 0, + "Build": 0 + }, + "FileFlagsMask": "3f", + "FileFlags ": "00", + "FileOS": "040004", + "FileType": "01", + "FileSubType": "00" + }, + "StringFileInfo": { + "Comments": "AltMount - Usenet content mounting and streaming", + "CompanyName": "AltMount", + "FileDescription": "AltMount CLI", + "FileVersion": "", + "InternalName": "altmount", + "LegalCopyright": "", + "LegalTrademarks": "", + "OriginalFilename": "altmount.exe", + "PrivateBuild": "", + "ProductName": "AltMount", + "ProductVersion": "", + "SpecialBuild": "" + }, + "VarFileInfo": { + "Translation": { + "LangID": "0409", + "CharsetID": "04B0" + } + }, + "ManifestPath": "altmount.exe.manifest" +}