Skip to content

Commit

Permalink
fix no GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenny4 committed Oct 21, 2024
1 parent 6803227 commit 33f14a2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@

### Removed

## [0.4.3] - 2024-10-21

### Fixed

- Fix GPU not showing up on Windows, thanks to [Lumerica](https://github.com/Lenny4/DeepFaceLabClient/issues/73#issuecomment-2424318499).

## [0.4.2] - 2023-09-16

### Fixed
Expand Down
3 changes: 2 additions & 1 deletion lib/service/python_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class PythonService {
if (Platform.isWindows) {
// https://stackoverflow.com/a/35651859/6824121
result =
await Process.run(pythonExec, ['-c', 'exec(r"""$pythonScript""")']);
await Process.run(pythonExec, ['-c', 'exec(r"""$pythonScript""")'],
environment: await ProcessService().getCondaEnvironment(workspace));
} else {
// https://stackoverflow.com/a/2043499/6824121
result = await Process.run("bash", [
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 0.4.2
version: 0.4.3

environment:
sdk: '>=2.19.4 <3.0.0'
Expand Down
7 changes: 6 additions & 1 deletion windows/flutter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
# https://github.com/flutter/flutter/issues/57146.
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")

# Set fallback configurations for older versions of the flutter tool.
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
set(FLUTTER_TARGET_PLATFORM "windows-x64")
endif()

# === Flutter Library ===
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")

Expand Down Expand Up @@ -92,7 +97,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
windows-x64 $<CONFIG>
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
Expand Down

0 comments on commit 33f14a2

Please sign in to comment.