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

Cannot generate godot.sln for Rider under MacOS #83771

Open
p10tr3k opened this issue Oct 22, 2023 · 7 comments
Open

Cannot generate godot.sln for Rider under MacOS #83771

p10tr3k opened this issue Oct 22, 2023 · 7 comments

Comments

@p10tr3k
Copy link
Contributor

p10tr3k commented Oct 22, 2023

Godot version

4.1

System information

MacOS 14.0 (23A344) (intel)

Issue description

According to documentation, to use Rider IDE I have to run this command:
scons platform=windows arch=x86_64 target=editor vsproj=yes dev_build=yes

And I get this error:
Invalid target platform "windows". The following platforms were detected: ios macOS

Seems reasonable because I am using MacOS, so I tried this:
scons platform=osx arch=x86_64 target=editor vsproj=yes dev_build=yes

and this gives me another error:
'Error: The vsproj option is only usable on Windows with Visual Studio.'

Is there a way to build godot.sln for Rider under MacOS?

Steps to reproduce

See above

Minimal reproduction project

not required

@bruvzg
Copy link
Member

bruvzg commented Oct 23, 2023

vsproj is specifically for MSVC build on Windows. For any other platform/compiler use, you can use compile_commands.json (compiledb=yes in the build command).

@p10tr3k
Copy link
Contributor Author

p10tr3k commented Oct 24, 2023

vsproj is specifically for MSVC build on Windows. For any other platform/compiler use, you can use compile_commands.json (compiledb=yes in the build command).

Rider runs on both Mac and Windows platforms, and it uses solely .sln files from the msbuild system. There has to be a way to generate these files on Mac, as Rider is currently the most preferred option (for me), especially after the gradual discontinuation of Visual Studio for Mac.

@brno32
Copy link
Contributor

brno32 commented Nov 26, 2023

I don't think this is a bug but a feature request. running scons vsproj=yes on MacOS should indeed throw the given error since it's not (yet) supported

@akien-mga
Copy link
Member

Could you test if this works out of the box in the current master branch?

We improved the VS proj generation with #84885.

I suspect the new system may still not support Rider, but it might be possible to implement Rider support using the framework @shana designed, IIUC.

@akien-mga akien-mga moved this from Untriaged to Up for grabs in Buildsystem Issue Triage May 13, 2024
@shana
Copy link
Contributor

shana commented May 14, 2024

So after talking to Jetbrains about this, the conclusion is that Rider doesn't support the vcxproj (C++) project format. It does support .sln, but only for csproj (C#) projects. The alternative is to use a json project format that Rider does support (ubisoft/Sharpmake#248).

@TV4Fun
Copy link
Contributor

TV4Fun commented Jun 27, 2024

@akien-mga I am running a mac with the latest master branch of Godot. I've generated the project files with scons dev_build=yes debug_symbols=yes module_mono_enabled=yes vsproj=yes. Loading in Rider or building with msbuild produces this error:

"/Users/jcroteau/code/godot/godot.sln" (default target) (1) ->
"/Users/jcroteau/code/godot/godot.vcxproj" (default target) (2) ->
  /Users/jcroteau/code/godot/godot.vcxproj(59,3): error MSB4019: The imported project "/Microsoft.Cpp.Default.props" was not found. Confirm that the expression in the Import declaration "/Microsoft.Cpp.Default.props" is correct, and that the file exists on disk.

Rider also completely fails to find any of the standard or project include files, so none of its code analysis tools work. See this screenshot from variant_utility.cpp:
Screenshot 2024-06-27 at 3 26 31 PM

@citizenmatt
Copy link

Just to clarify, Rider does support .vcxproj files, but not on Mac, because it requires the appropriate Visual C++ target files, and the VC++ toolchain isn't available for Mac. Rider works with Unreal Engine on Mac by loading the .uproject files directly, and using them to generate an internal project model. To work with other C++ projects on Mac and Linux, the only option right now is to use CLion, which is designed to work with CMake and compilation database.

(It might seem odd to have two products here, but it's a result of evolution. Rider was initially designed to work with dotnet solutions, which is a Visual Studio project model, and is powered by the ReSharper engine, a Visual Studio plugin. ReSharper C++ had better support for Unreal than CLion, so it was easier to integrate ReSharper C++ than teach CLion the VS project model as well as Unreal features. Plus, Unreal solutions are described with C#, which is again a better fit for Rider)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Up for grabs
Development

No branches or pull requests

8 participants