axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

NUGET.EXE not being downloaded by setup.ps1 script #1317

Closed rh101 closed 1 year ago

rh101 commented 1 year ago
  1. Generate new project with axmol new -p org.axmol.hellocpp -d . -l cpp --portrait HelloCpp
  2. Run cmake to generate build files inside the HelloCpp project directory: cmake -S . -B build -G "Visual Studio 17 2022" -A x64

This error pops up:

...
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Including Win32 support
-- AX_USE_ALSOFT=ON
CMake axmol target_precompile_headers
NUGET.EXE not found.
CMake Error at G:/axmol/core/CMakeLists.txt:250 (message):
  Please run setup.ps1 again to download NUGET.EXE, and run CMake again.

-- Configuring incomplete, errors occurred!

setup.ps1 has been run multiple times, and it never downloads NUGET:

PS G:\axmol> .\setup.ps1
build1k: PowerShell 5.1.19041.3031
build1k: proj_dir=G:\axmol, prefix=G:\axmol\tools\external
build1k: Using cmake: C:\Program Files\CMake\bin\cmake.exe, version: 3.26.4
build1k: setup successfully, please restart the terminal to make added system variables take effect
PS G:\axmol>

This was previously working with the Python setup.py.

I can't work on any project at the moment because of this unless I roll back to the version of Axmol with the Python scripts.

halx99 commented 1 year ago

do you check branch dev?: image

rh101 commented 1 year ago

do you check branch dev?:

Just tested dev branch now, and it works, so the problem is only with branches 1.0 and 1.x.

PS G:\axmol> git checkout dev
Updating files: 100% (1097/1097), done.
Switched to branch 'dev'
Your branch is up to date with 'origin/dev'.
PS G:\axmol> .\setup.ps1
build1k: PowerShell 5.1.19041.3031
build1k: proj_dir=G:\, prefix=G:\axmol\tools\external
build1k: Downloading https://github.com/axmolengine/glslcc/releases/download/v1.9.3/glslcc-1.9.3-win64.zip to G:\axmol\tools\external/glslcc-win64.zip ...
build1k: Using glslcc: G:\\tools\external\glslcc\glslcc.exe, version: 1.9.3
build1k: Using cmake: C:\Program Files\CMake\bin\cmake.exe, version: 3.26.4
build1k: Downloading https://dist.nuget.org/win-x86-commandline/latest/nuget.exe to G:\axmol\tools\external\nuget\nuget.exe ...
build1k: Using nuget: G:\axmol\tools\external\nuget\nuget.exe, version: latest
build1k: setup successfully, please restart the terminal to make added system variables take effect
PS G:\axmol>
halx99 commented 1 year ago

Fixed

rh101 commented 1 year ago

All good, working now. Thank you!