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
922 stars 205 forks source link

build cannot correct handle '-' on the project name like: axmol new -p org.axmol.hellocpp -d D:\dev\projects\ -l cpp --portrait My-Game #1498

Closed aismann closed 11 months ago

aismann commented 11 months ago

My-Game will be changed to: My_Game and error is raising: MSBUILD : error MSB1009: Project file does not exist.

Same with "My-Game" axmol new -p org.axmol.hellocpp -d D:\dev\projects\ -l cpp --portrait "My-Game"

Build output:

-- Enabled axmol extensions:JSONDefault;cocostudio;SDFGen;Inspector;ImGui;fairygui;DragonBones;spine;physics-nodes;particle3d;assets-manager;GUI; -- No shader found in D:/dev/projects/My-Game/Source/shaders -- Configuring done (30.1s) -- Generating done (2.2s) -- Build files have been written to: D:/dev/projects/My-Game/build_x64 build1k: BUILD_ALL_OPTIONS=--target My_Game --config Release --parallel, Count=5 MSBuild version 17.8.3+195e7f5a3 for .NET Framework MSBUILD : error MSB1009: Project file does not exist. Switch: My_Game.vcxproj build1k: Build done

aismann commented 11 months ago

@halx99 can you have a closer look agaain plz:

D:__GIT\axmol>axmol new -p org.axmol.test -d D:\dev\projects\ -l cpp --portrait test-t

InvalidOperation: D:\__GIT\axmol\tools\console\axmol_new.ps1:31
Line |
  31 |  if ($pname.IndexOf('-') -ne -1) {
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~
     | You cannot call a method on a null-valued expression.

Creating project test-t, is_portrait=True ... Create project test-t done.

halx99 commented 11 months ago

fixed, and rebased