diff --git a/CHANGELOG.md b/CHANGELOG.md index fdb2c02..15b56ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/service/python_service.dart b/lib/service/python_service.dart index 4ae71ea..801dd30 100644 --- a/lib/service/python_service.dart +++ b/lib/service/python_service.dart @@ -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", [ diff --git a/pubspec.yaml b/pubspec.yaml index f95e563..0c10f57 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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' diff --git a/windows/flutter/CMakeLists.txt b/windows/flutter/CMakeLists.txt index 930d207..903f489 100644 --- a/windows/flutter/CMakeLists.txt +++ b/windows/flutter/CMakeLists.txt @@ -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") @@ -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 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS