mirror of
https://github.com/jamesstringer90/appsandbox.git
synced 2026-10-19 01:31:28 -05:00
Use lowercase NVIDIA shim filenames
This commit is contained in:
1 parent
66095f03e7
commit
0d9069dd98
8 files changed
+19
-19
No files matched your search
@@ -604,8 +604,8 @@ BOOL gpu_append_nvidia_graphics_shim_share(const GpuList *gpu_list, GpuDriverSha
|
||||
{
|
||||
#if defined(_M_X64)
|
||||
static const wchar_t *const additional[] = {
|
||||
L"AppSandbox-NVIDIA-VK-GL-shim32.dll",
|
||||
L"AppSandbox-NVIDIA-DLSS-shim.dll"
|
||||
L"appsandbox-nvidia-vk-gl-shim32.dll",
|
||||
L"appsandbox-nvidia-dlss-shim.dll"
|
||||
};
|
||||
wchar_t exe[MAX_PATH], path[MAX_PATH], file[MAX_PATH], *slash;
|
||||
GpuDriverShare *share;
|
||||
@@ -629,14 +629,14 @@ BOOL gpu_append_nvidia_graphics_shim_share(const GpuList *gpu_list, GpuDriverSha
|
||||
slash = wcsrchr(exe, L'\\');
|
||||
if (!slash) return FALSE;
|
||||
*slash = 0;
|
||||
if (wcslen(exe) + wcslen(L"\\resources\\nvidia\\AppSandbox-NVIDIA-VK-GL-shim32.dll") >= MAX_PATH)
|
||||
if (wcslen(exe) + wcslen(L"\\resources\\nvidia\\appsandbox-nvidia-vk-gl-shim32.dll") >= MAX_PATH)
|
||||
return FALSE;
|
||||
swprintf_s(path, MAX_PATH, L"%s\\resources\\nvidia", exe);
|
||||
swprintf_s(file, MAX_PATH, L"%s\\AppSandbox-NVIDIA-VK-GL-shim.dll", path);
|
||||
swprintf_s(file, MAX_PATH, L"%s\\appsandbox-nvidia-vk-gl-shim.dll", path);
|
||||
attributes = GetFileAttributesW(file);
|
||||
if (attributes == INVALID_FILE_ATTRIBUTES || (attributes & FILE_ATTRIBUTE_DIRECTORY)) {
|
||||
swprintf_s(path, MAX_PATH, L"%s\\nvidia", exe);
|
||||
swprintf_s(file, MAX_PATH, L"%s\\AppSandbox-NVIDIA-VK-GL-shim.dll", path);
|
||||
swprintf_s(file, MAX_PATH, L"%s\\appsandbox-nvidia-vk-gl-shim.dll", path);
|
||||
attributes = GetFileAttributesW(file);
|
||||
}
|
||||
if (attributes == INVALID_FILE_ATTRIBUTES || (attributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
@@ -646,7 +646,7 @@ BOOL gpu_append_nvidia_graphics_shim_share(const GpuList *gpu_list, GpuDriverSha
|
||||
wcscpy_s(share->share_name, 128, L"AppSandbox.Nvidia");
|
||||
wcscpy_s(share->host_path, MAX_PATH, path);
|
||||
wcscpy_s(share->guest_path, MAX_PATH, L"C:\\Windows\\AppSandbox\\nvidia");
|
||||
wcscpy_s(share->file_filter, 4096, L"AppSandbox-NVIDIA-VK-GL-shim.dll");
|
||||
wcscpy_s(share->file_filter, 4096, L"appsandbox-nvidia-vk-gl-shim.dll");
|
||||
for (i = 0; i < ARRAYSIZE(additional); i++) {
|
||||
swprintf_s(file, MAX_PATH, L"%s\\%s", path, additional[i]);
|
||||
attributes = GetFileAttributesW(file);
|
||||
|
||||
+2
-2
@@ -613,8 +613,8 @@ static DWORD WINAPI gpu_copy_thread(LPVOID param)
|
||||
rc = P9_ERR_IO;
|
||||
} else if (strcmp(si->share_name, "AppSandbox.Nvidia") == 0) {
|
||||
const P9CopyOptions options = {
|
||||
FALSE, NULL, "AppSandbox-NVIDIA-VK-GL-shim.dll;AppSandbox-NVIDIA-VK-GL-shim32.dll;"
|
||||
"AppSandbox-NVIDIA-DLSS-shim.dll"
|
||||
FALSE, NULL, "appsandbox-nvidia-vk-gl-shim.dll;appsandbox-nvidia-vk-gl-shim32.dll;"
|
||||
"appsandbox-nvidia-dlss-shim.dll"
|
||||
};
|
||||
rc = p9_copy_share_ex(50001, si->share_name, dest_wide,
|
||||
si->filter[0] ? si->filter : NULL,
|
||||
|
||||
@@ -576,7 +576,7 @@ static BOOL provision_nvapi(const wchar_t *native_dir, const wchar_t *sys,
|
||||
wchar_t payload[MAX_PATH], original[MAX_PATH], other[MAX_PATH], backup[MAX_PATH], runtime[MAX_PATH];
|
||||
UINT i;
|
||||
|
||||
if (!count || swprintf_s(payload, MAX_PATH, L"%s\\AppSandbox-NVIDIA-DLSS-shim.dll", native_dir) < 0 ||
|
||||
if (!count || swprintf_s(payload, MAX_PATH, L"%s\\appsandbox-nvidia-dlss-shim.dll", native_dir) < 0 ||
|
||||
swprintf_s(original, MAX_PATH, L"%s\\nvapi64.dll", packages[0]) < 0 ||
|
||||
swprintf_s(runtime, MAX_PATH, L"%s\\nvapi64.dll", sys) < 0 ||
|
||||
swprintf_s(backup, MAX_PATH, L"%s\\appsandbox-nvapi64.dll", sys) < 0)
|
||||
@@ -838,7 +838,7 @@ static BOOL provision_gl_vk_for_arch(const wchar_t *dir, const wchar_t *native_d
|
||||
{
|
||||
wchar_t manifests[32][MAX_PATH], backend[MAX_PATH], previous[MAX_PATH];
|
||||
const wchar_t *payload = machine == IMAGE_FILE_MACHINE_I386 ?
|
||||
L"AppSandbox-NVIDIA-VK-GL-shim32.dll" : L"AppSandbox-NVIDIA-VK-GL-shim.dll";
|
||||
L"appsandbox-nvidia-vk-gl-shim32.dll" : L"appsandbox-nvidia-vk-gl-shim.dll";
|
||||
const wchar_t *manifest = machine == IMAGE_FILE_MACHINE_I386 ?
|
||||
L"nv-vk32.json" : L"nv-vk64.json";
|
||||
UINT count = 0, i;
|
||||
@@ -922,7 +922,7 @@ BOOL gl_vk_provision_runtime(const wchar_t *dir, const wchar_t *native_dir,
|
||||
if (GetSystemWow64DirectoryW(wow, MAX_PATH)) {
|
||||
payload[0] = 0;
|
||||
if (native_dir && native_dir[0])
|
||||
swprintf_s(payload, MAX_PATH, L"%s\\AppSandbox-NVIDIA-VK-GL-shim32.dll", native_dir);
|
||||
swprintf_s(payload, MAX_PATH, L"%s\\appsandbox-nvidia-vk-gl-shim32.dll", native_dir);
|
||||
swprintf_s(runtime, MAX_PATH, L"%s\\opengl32.dll", wow);
|
||||
if (system_runtime ||
|
||||
(payload[0] && GetFileAttributesW(payload) != INVALID_FILE_ATTRIBUTES) ||
|
||||
@@ -946,7 +946,7 @@ BOOL nvidia_dlss_provision(const wchar_t *native_dir)
|
||||
UINT count, i, length;
|
||||
|
||||
if (!native_dir || !native_dir[0]) return TRUE;
|
||||
if (swprintf_s(payload, MAX_PATH, L"%s\\AppSandbox-NVIDIA-DLSS-shim.dll", native_dir) < 0)
|
||||
if (swprintf_s(payload, MAX_PATH, L"%s\\appsandbox-nvidia-dlss-shim.dll", native_dir) < 0)
|
||||
return FALSE;
|
||||
if (GetFileAttributesW(payload) == INVALID_FILE_ATTRIBUTES) return TRUE;
|
||||
length = GetSystemDirectoryW(sys, MAX_PATH);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<PropertyGroup>
|
||||
<SolutionDir Condition="'$(SolutionDir)'=='' Or '$(SolutionDir)'=='*Undefined*'">$(MSBuildThisFileDirectory)..\..\</SolutionDir>
|
||||
<TargetName>AppSandbox-NVIDIA-DLSS-shim</TargetName>
|
||||
<TargetName>appsandbox-nvidia-dlss-shim</TargetName>
|
||||
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='x64'">
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<PropertyGroup>
|
||||
<SolutionDir Condition="'$(SolutionDir)'=='' Or '$(SolutionDir)'=='*Undefined*'">$(MSBuildThisFileDirectory)..\..\</SolutionDir>
|
||||
<TargetName>AppSandbox-NVIDIA-VK-GL-shim</TargetName>
|
||||
<TargetName>appsandbox-nvidia-vk-gl-shim</TargetName>
|
||||
<NvidiaMachine>$(Platform)</NvidiaMachine>
|
||||
<NvidiaExports>shim_exports.def</NvidiaExports>
|
||||
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
||||
@@ -62,7 +62,7 @@
|
||||
<IntDir>$(SolutionDir)obj\nvidia\$(Configuration)-ARM64\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Platform)'=='Win32'">
|
||||
<TargetName>AppSandbox-NVIDIA-VK-GL-shim32</TargetName>
|
||||
<TargetName>appsandbox-nvidia-vk-gl-shim32</TargetName>
|
||||
<NvidiaMachine>X86</NvidiaMachine>
|
||||
<NvidiaExports>shim_exports_x86.def</NvidiaExports>
|
||||
<OutDir>$(SolutionDir)bin\$(Configuration)\nvidia\</OutDir>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
LIBRARY AppSandbox-NVIDIA-VK-GL-shim
|
||||
LIBRARY appsandbox-nvidia-vk-gl-shim
|
||||
EXPORTS
|
||||
GlmfBeginGlsBlock=appsandbox-opengl32.GlmfBeginGlsBlock @1
|
||||
GlmfCloseMetaFile=appsandbox-opengl32.GlmfCloseMetaFile @2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
LIBRARY AppSandbox-NVIDIA-VK-GL-shim32
|
||||
LIBRARY appsandbox-nvidia-vk-gl-shim32
|
||||
EXPORTS
|
||||
GlmfBeginGlsBlock=appsandbox-opengl32.GlmfBeginGlsBlock @1
|
||||
GlmfCloseMetaFile=appsandbox-opengl32.GlmfCloseMetaFile @2
|
||||
|
||||
@@ -407,8 +407,8 @@ $required = @(
|
||||
'headless-api\asb.py', 'headless-api\README.md', 'headless-api\examples', 'headless-api\tests'
|
||||
)
|
||||
if ($Platform -eq 'x64') {
|
||||
$required += 'resources\nvidia\AppSandbox-NVIDIA-VK-GL-shim.dll', 'resources\nvidia\AppSandbox-NVIDIA-VK-GL-shim32.dll'
|
||||
$required += 'resources\nvidia\AppSandbox-NVIDIA-DLSS-shim.dll'
|
||||
$required += 'resources\nvidia\appsandbox-nvidia-vk-gl-shim.dll', 'resources\nvidia\appsandbox-nvidia-vk-gl-shim32.dll'
|
||||
$required += 'resources\nvidia\appsandbox-nvidia-dlss-shim.dll'
|
||||
}
|
||||
$missing = @($required | Where-Object { -not (Test-Path (Join-Path $stage $_)) })
|
||||
if ($missing.Count) { throw "Refusing to package - missing expected artifacts: $($missing -join ', ')" }
|
||||
|
||||
Reference in new issue
Block a user