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

Update README.md #4434

Closed
wants to merge 2 commits into from
Closed

Update README.md #4434

wants to merge 2 commits into from

Conversation

lucicam
Copy link

@lucicam lucicam commented Feb 16, 2023

Added note that the path should not contain spaces in order for the build to succeed. Seems like more people had this issue so it should at least be written in the readme. Related to #4428

Added note that the path should not contain spaces in order for the build to succeed
@gdkchan
Copy link
Member

gdkchan commented Feb 16, 2023

Is having spaces really a problem when using dotnet build? I thought it was an issue with the macOS build script.

@siegmund-heiss-ich
Copy link
Contributor

siegmund-heiss-ich commented Feb 16, 2023

There is a problem at command execution codesign --entitlements <Path>.
(tested it on macOS)
I think it would be better to implement a solution for this directly in the code rather than telling the user how a working path should look like.

I think a path with backspaces would work if we had a backslash in front of every space.
We could check the path before command execution.

@EliEron
Copy link
Contributor

EliEron commented Feb 16, 2023

Is having spaces really a problem when using dotnet build? I thought it was an issue with the macOS build script.

Building with spaces works fine on Windows & Linux, however while verifying this I did discover that there is one issue with the command in the readme. The -o option is no longer supported for building or publishing in the newest SDK (#15607) so that option should be removed from the readme.

@lucicam
Copy link
Author

lucicam commented Feb 16, 2023

Actually, it's not the shell script which fails (at least not initially)

  Ryujinx.Ava -> /private/tmp/test build/Ryujinx/build/Ryujinx.Ava.dll
  /private/tmp/test: No such file or directory
/private/tmp/test build/Ryujinx/Ryujinx.Ava/Ryujinx.Ava.csproj(16,5): error MSB3073: The command "codesign --entitlements '/private/tmp/test build/Ryujinx/Ryujinx.Ava/../distribution/macos/entitlements.xml/' -f --deep -s - /private/tmp/test build/Ryujinx/build/Ryujinx.Ava" exited with code 1.

Build FAILED.

It fails because the command replaces the path but it contains spaces. I tried adding """ before and after the path, but doesn't seem to work

@lucicam
Copy link
Author

lucicam commented Feb 16, 2023

Is having spaces really a problem when using dotnet build? I thought it was an issue with the macOS build script.

Building with spaces works fine on Windows & Linux, however while verifying this I did discover that there is one issue with the command in the readme. The -o option is no longer supported for building or publishing in the newest SDK (#15607) so that option should be removed from the readme.

This should be a problem in linux also, but probably it's not because there is no command which has spaces in the .csproj files

@lucicam
Copy link
Author

lucicam commented Feb 21, 2023

I looked a bit into it and it seems to be some problem on linux/macos with msbuild, because I tried replacing the spaces with '\ ' (escaping the space) but it replaces it with '/ ' ... dotnet/msbuild#3468. I also tried to use with "%5C" instead of the backslash but it still replaces it with '/'.
I'm not too experienced with msbuild but it also seems like I can't really run shell scripts or command with pipe in them, so I'm not sure how we can fix this unless this issue is actually fixed on msbuild side.

@TimeZlicer
Copy link
Contributor

<Exec Command="codesign --entitlements '$(ProjectDir)..\distribution\macos\entitlements.xml' -f --deep -s $(SigningCertificate) '$(TargetDir)$(TargetName)'" />

In Ryujinx.Ava.csproj, both paths need to be in single quote(')
This should resolve the error for dotnet build -c Release


create_app_bundle.sh
create_macos_release.sh
The paths in these scripts should be in double quote("), for example

dotnet publish -c Release -r osx-arm64 -o "$TEMP_DIRECTORY"/publish_arm64 $DOTNET_COMMON_ARGS Ryujinx.Ava  
dotnet publish -c Release -r osx-x64 -o "$TEMP_DIRECTORY"/publish_x64 $DOTNET_COMMON_ARGS Ryujinx.Ava

Hope the above helps

@lucicam lucicam closed this Feb 21, 2023
@lucicam
Copy link
Author

lucicam commented Feb 21, 2023

Closed because @TimeZlicer made a PR fixing in multiple places. I can confirm it works with single quotes... I could have sworn I tried this exact thing but I probably put them in the wrong places -_-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants