Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download nuget when it doesn't exist #2386

Open
1 of 2 tasks
frg2089 opened this issue Oct 31, 2024 · 0 comments
Open
1 of 2 tasks

Download nuget when it doesn't exist #2386

frg2089 opened this issue Oct 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@frg2089
Copy link

frg2089 commented Oct 31, 2024

Is there an existing feature request for this?

  • I have searched the existing feature request

Operating System

Windows

Pain

Cannot work without the Nuget program in the system.

Suggested solution

Download nuget when it doesn't exist, just like permission_handler_windows does.

find_program(NUGET nuget)
if(NOT NUGET)
message(NOTICE "Nuget is not installed! The flutter_inappwebview_windows plugin requires it. Check https://inappwebview.dev/docs/intro#setup-windows")
endif()

FetchContent_Declare(nuget
  URL "https://dist.nuget.org/win-x86-commandline/v6.0.0/nuget.exe"
  URL_HASH SHA256=04eb6c4fe4213907e2773e1be1bbbd730e9a655a3c9c58387ce8d4a714a5b9e1
  DOWNLOAD_NO_EXTRACT true
)

find_program(NUGET nuget)
if (NOT NUGET)
    message("Nuget.exe not found, trying to download or use cached version.")
    FetchContent_MakeAvailable(nuget)
    set(NUGET ${nuget_SOURCE_DIR}/nuget.exe)
endif()

Useful resources

https://github.com/Baseflow/flutter-permission-handler/blob/a0ded20761c5a6926d8ef399c78e5ab14dfe12f9/permission_handler_windows/windows/CMakeLists.txt#L11-L22

Additional information

No response

Self grab

  • I'm ready to work on this issue!
@frg2089 frg2089 added the enhancement New feature or request label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant