fix(install): prevent windows script parse errors
This commit is contained in:
parent
70e0397e9c
commit
d7ac5b95d5
2
DONE.md
2
DONE.md
|
|
@ -20,6 +20,8 @@
|
|||
- Rewrote commit history to ensure consistent commit attribution.
|
||||
- ✅ **Installer dependency parity**
|
||||
- Ensured pip is installed (Linux/Windows) and skipped Go/pip installs when already present.
|
||||
- ✅ **Windows installer parse fix**
|
||||
- Normalized PowerShell here-strings to prevent parse errors during installation.
|
||||
|
||||
## Version 0.1.0-dev25 (2026-01-22) - Settings Preferences Expansion
|
||||
|
||||
|
|
|
|||
2
TODO.md
2
TODO.md
|
|
@ -6,6 +6,8 @@ This file tracks upcoming features, improvements, and known issues.
|
|||
|
||||
- [X] **Installer dependency parity**
|
||||
- Ensure pip is installed on Linux/Windows and skip Go/pip when already present.
|
||||
- [X] **Windows installer parse fix**
|
||||
- Normalize PowerShell here-strings to prevent parser errors.
|
||||
|
||||
## Documentation: Fix Structural Errors
|
||||
|
||||
|
|
|
|||
|
|
@ -92,5 +92,6 @@ This makes FFmpeg available to all applications on your system.
|
|||
## Troubleshooting
|
||||
|
||||
- **"FFmpeg not found" Error:** This means VideoTools can't locate `ffmpeg.exe`. Ensure it's either in the same folder as `VideoTools.exe` or that the system-wide installation path is correct.
|
||||
- **Installer Parse Errors:** If the setup script reports PowerShell parse errors, update the repository to the latest version and re-run `setup-windows.bat`.
|
||||
- **Application Doesn't Start:** Make sure you have a 64-bit version of Windows 10 or 11 and that your graphics drivers are up to date.
|
||||
- **Antivirus Warnings:** Some antivirus programs may flag the unsigned executable. This is a false positive.
|
||||
|
|
|
|||
|
|
@ -87,21 +87,21 @@ function Get-WindowsDisplayScale {
|
|||
}
|
||||
|
||||
# Fallback: try to detect from system settings
|
||||
Add-Type -TypeDefinition @"
|
||||
Add-Type -TypeDefinition @'
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
public class DisplayScale {
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetDC(IntPtr ptr);
|
||||
|
||||
|
||||
[DllImport("gdi32.dll")]
|
||||
public static extern int GetDeviceCaps(IntPtr hdc, int nIndex);
|
||||
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern int ReleaseDC(IntPtr ptr, IntPtr hdc);
|
||||
|
||||
|
||||
public const int LOGPIXELSX = 88;
|
||||
|
||||
|
||||
public static double GetScale() {
|
||||
IntPtr hdc = GetDC(IntPtr.Zero);
|
||||
int dpi = GetDeviceCaps(hdc, LOGPIXELSX);
|
||||
|
|
@ -109,7 +109,7 @@ public class DisplayScale {
|
|||
return dpi / 96.0;
|
||||
}
|
||||
}
|
||||
"@
|
||||
'@
|
||||
|
||||
return [DisplayScale]::GetScale()
|
||||
} catch {
|
||||
|
|
@ -140,16 +140,16 @@ function Get-WindowsGPUInfo {
|
|||
function Test-DirectX12Support {
|
||||
try {
|
||||
# Check for DirectX 12 support by trying to load d3d12.dll
|
||||
Add-Type -TypeDefinition @"
|
||||
Add-Type -TypeDefinition @'
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
public class DirectXChecker {
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern IntPtr LoadLibrary(string lpFileName);
|
||||
|
||||
|
||||
[DllImport("kernel32.dll")]
|
||||
public static extern bool FreeLibrary(IntPtr hModule);
|
||||
|
||||
|
||||
public static bool IsDirectX12Supported() {
|
||||
IntPtr handle = LoadLibrary("d3d12.dll");
|
||||
bool supported = handle != IntPtr.Zero;
|
||||
|
|
@ -157,7 +157,7 @@ public class DirectXChecker {
|
|||
return supported;
|
||||
}
|
||||
}
|
||||
"@
|
||||
'@
|
||||
return [DirectXChecker]::IsDirectX12Supported()
|
||||
} catch {
|
||||
return $false
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user