mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
OpenCL: fix Windows support
They changed the dll file name in the latest release
This commit is contained in:
@@ -188,22 +188,6 @@ jobs:
|
||||
- name: print msys version
|
||||
run: uname -a
|
||||
|
||||
# https://github.com/msys2/MINGW-packages/issues/13524#event-7555720785
|
||||
- name: create OpenCL.pc
|
||||
run: |
|
||||
cat > /clang64/lib/pkgconfig/OpenCL.pc << EOF
|
||||
prefix=/clang64
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: OpenCL
|
||||
Description: Open Computing Language generic Installable Client Driver Loader
|
||||
Version: 2022.09.30-1
|
||||
Libs: -L${libdir} -lOpenCL.dll
|
||||
Cflags: -I${includedir}
|
||||
EOF
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
@@ -219,7 +203,7 @@ jobs:
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
- name: copy necessary dlls
|
||||
run: cp /clang64/bin/{libcjson,libOpenCL,vulkan-1}.dll .
|
||||
run: cp /clang64/bin/{libcjson,OpenCL,vulkan-1}.dll .
|
||||
|
||||
- name: list features
|
||||
run: ./fastfetch --list-features
|
||||
@@ -265,22 +249,6 @@ jobs:
|
||||
- name: print msys version
|
||||
run: uname -a
|
||||
|
||||
# https://github.com/msys2/MINGW-packages/issues/13524#event-7555720785
|
||||
- name: create OpenCL.pc
|
||||
run: |
|
||||
cat > /clang32/lib/pkgconfig/OpenCL.pc << EOF
|
||||
prefix=/clang32
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: OpenCL
|
||||
Description: Open Computing Language generic Installable Client Driver Loader
|
||||
Version: 2022.09.30-1
|
||||
Libs: -L${libdir} -lOpenCL.dll
|
||||
Cflags: -I${includedir}
|
||||
EOF
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
@@ -296,7 +264,7 @@ jobs:
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
- name: copy necessary dlls
|
||||
run: cp /clang32/bin/{libcjson,libOpenCL,vulkan-1}.dll .
|
||||
run: cp /clang32/bin/{libcjson,OpenCL,vulkan-1}.dll .
|
||||
|
||||
- name: run fastfetch
|
||||
run: time ./fastfetch --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all
|
||||
|
||||
@@ -24,7 +24,7 @@ typedef struct OpenCLData
|
||||
FF_LIBRARY_SYMBOL(clGetDeviceInfo)
|
||||
} OpenCLData;
|
||||
|
||||
static const char* openCLHandelData(FFinstance* instance, OpenCLData* data)
|
||||
static const char* openCLHandleData(FFinstance* instance, OpenCLData* data)
|
||||
{
|
||||
cl_platform_id platformID;
|
||||
cl_uint numPlatforms;
|
||||
@@ -84,12 +84,17 @@ static const char* printOpenCL(FFinstance* instance)
|
||||
{
|
||||
OpenCLData data;
|
||||
|
||||
FF_LIBRARY_LOAD(opencl, &instance->config.libOpenCL, "dlopen libOpenCL"FF_LIBRARY_EXTENSION" failed", "libOpenCL"FF_LIBRARY_EXTENSION, 1);
|
||||
FF_LIBRARY_LOAD(opencl, &instance->config.libOpenCL, "dlopen libOpenCL"FF_LIBRARY_EXTENSION" failed",
|
||||
#ifdef _WIN32
|
||||
"OpenCL"FF_LIBRARY_EXTENSION, -1,
|
||||
#endif
|
||||
"libOpenCL"FF_LIBRARY_EXTENSION, 1
|
||||
);
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE(opencl, data, clGetPlatformIDs);
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE(opencl, data, clGetDeviceIDs);
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE(opencl, data, clGetDeviceInfo);
|
||||
|
||||
const char* error = openCLHandelData(instance, &data);
|
||||
const char* error = openCLHandleData(instance, &data);
|
||||
dlclose(opencl);
|
||||
return error;
|
||||
}
|
||||
@@ -103,7 +108,7 @@ static const char* printOpenCL(FFinstance* instance)
|
||||
data.ffclGetDeviceIDs = clGetDeviceIDs;
|
||||
data.ffclGetDeviceInfo = clGetDeviceInfo;
|
||||
|
||||
return openCLHandelData(instance, &data);
|
||||
return openCLHandleData(instance, &data);
|
||||
}
|
||||
|
||||
#endif // __APPLE__
|
||||
|
||||
Reference in New Issue
Block a user