Skip to content

Disable packet tagging on MingW by default, fix TLS qualifier#134

Merged
gafferongames merged 15 commits into
mas-bandwidth:mainfrom
jclc:fix/disable-packet-tagging-on-mingw
Jan 30, 2025
Merged

Disable packet tagging on MingW by default, fix TLS qualifier#134
gafferongames merged 15 commits into
mas-bandwidth:mainfrom
jclc:fix/disable-packet-tagging-on-mingw

Conversation

@jclc

@jclc jclc commented Jan 25, 2025

Copy link
Copy Markdown
Contributor

Added back netcode_enable_packet_tagging() even when NETCODE_PACKET_TAGGING=0 because otherwise code calling it (Yojimbo) would not compile.

@gafferongames

Copy link
Copy Markdown
Contributor

Thank you! ps. To make sure netcode keeps working with MingW do you think you could modify the GitHub actions script to have a build in MingW test? This way the work you have done will get locked in and keep working even when other people make changes.

@jclc

jclc commented Jan 25, 2025

Copy link
Copy Markdown
Contributor Author

I can check that out, but I'm not at all familiar with GitHub actions.

@gafferongames

Copy link
Copy Markdown
Contributor

They're pretty simple. They are defined here:

https://github.com/mas-bandwidth/netcode/tree/main/.github/workflows/ci.yml

@jclc

jclc commented Jan 26, 2025

Copy link
Copy Markdown
Contributor Author

Could you let me know if this makes any sense? Let's say I add the following after the vs2019 steps:

    # Set up msys2/MingW-w64 toolchain
    - name: Setup (msys2)
      if: runner.os == 'Windows'
      uses: msys2/setup-msys2@v2

    - name: Build (msys2)
      if: runner.os == 'Windows'
      run: |
        premake5 gmake
        make config=${{ matrix.configuration }}

    - name: Test (msys2)
      if: runner.os == 'Windows'
      run: "& ./bin/test.exe"

Or should this be made an entirely separate job? Also, can I run the pipelines on my fork to test this?

@gafferongames

gafferongames commented Jan 26, 2025 via email

Copy link
Copy Markdown
Contributor

@gafferongames

Copy link
Copy Markdown
Contributor

Almost there!

@jclc

jclc commented Jan 30, 2025

Copy link
Copy Markdown
Contributor Author

Sorry about the spam. I don't have a local msys2 environment available so I can't really run these locally.

All that's missing is linking to ws2_32 and IPHLPAPI. I've never used premake before, could you tell me how to do this only when compiler is MingW (or target is Windows but compiler is not MSVC)?

@jclc

jclc commented Jan 30, 2025

Copy link
Copy Markdown
Contributor Author

Okay the workflow passes now. Sorry for the spam again.

@gafferongames

Copy link
Copy Markdown
Contributor

No problem at all!

@gafferongames gafferongames merged commit 4398d61 into mas-bandwidth:main Jan 30, 2025
@gafferongames

Copy link
Copy Markdown
Contributor

Woo!

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.

2 participants