添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hello fellow devs.

I’m facing a small hurdle and hoped to get some advice from you.

Here’s the setup :

  • Monogame 3.8
  • DesktopGL
  • .net core 6
  • self contained publishing, from Linux
  • Things are working fine on Linux and Windows, it’s almost perfect.

    However, I noticed that when running the build result under Windows, the game is launched with a command console , and that’s not what i want.

    In order to solve that, I published the game from Windows, and it works as expected, no console displayed.

    I’m not very keen on having to boot on Windows in order to publish my game, so I was wondering if there were a better and easiest way to proceed.

    Thanks in advance.

    Edit : clarifying

    Thanks for your answer.
    It’s already the case.

    As I stated, publishing for Win from Win gives the expected result, where publishing for Win from Linux, leads to a console window displayed.

    As a matter of fact, I tested the official monogame cornflower blue template, .net3.1 and the results are the same.

    Why dotnet publish -r win-x64 -c release /p:PublishSingleFile=true produce different exe files on Windows and macOS? It is strange that behavior of...

    untriaged

    Thanks for tracking this down :slight_smile:
    Indeed I was sure it was a dotnet issue, but i was expecting someone to have a workaround.

    Looks like I’ll have to publish using windows until then.

    There might be another workaround using rcedit . You can see this dirty hack I did here to add an icon to my app under Linux:

    github.com

    Apostolique/Mitten/blob/0a4a37bcb1ef85cbd0de5bd878d0effedb08aebd/.github/workflows/release.yml#L48-L55

  • - name: rcedit icon fix
  • run: |
  • mkdir dep
  • cd dep
  • npm init -y
  • npm i rcedit
  • cd ..
  • wine dep/node_modules/rcedit/bin/rcedit-x64.exe ./artifacts/windows/Mitten.exe --set-icon ./Platforms/DesktopGL/Icon.ico
  •