diff --git a/README.md b/README.md index 13952cc..a28176c 100644 --- a/README.md +++ b/README.md @@ -66,4 +66,33 @@ If you installed a 32bits VM, use the 32bits build command. ### Build the app -In a dart file (e.g. `lib/main.dart`), type the `F5` key to build the code. The app should open automatically in your VM which is running. \ No newline at end of file +In a dart file (e.g. `lib/main.dart`), type the `F5` key to build the code. The app should open automatically in your VM which is running. + +### Build your app for Desktop + +#### Linux + +Install dependancies: + +`sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev` + +Then build debug for linux: + +`flutter run -d linux` + +If you get this error: + +``` +flutter /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal) +``` + +Please try: + +`sudo apt install liblzma-dev` + +then + +`flutter clean && flutter run -d linux` + + + diff --git a/linux/flutter/CMakeLists.txt b/linux/flutter/CMakeLists.txt index a1da1b9..6dc9705 100644 --- a/linux/flutter/CMakeLists.txt +++ b/linux/flutter/CMakeLists.txt @@ -82,7 +82,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" - linux-x64 ${CMAKE_BUILD_TYPE} + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} VERBATIM ) add_custom_target(flutter_assemble DEPENDS