shqke / sourcetvsupport

Fixes broadcasting/demo recording features in Left 4 Dead
GNU General Public License v3.0
49 stars 10 forks source link

How to compile this extension? #38

Closed ChitoseRaame closed 1 year ago

ChitoseRaame commented 1 year ago

The GLIBC library automatically compiled in Github Action is too new, so I want to compile one myself. But when I was compiling, I noticed the following code in workflow.


        name: Prepare Steamworks SDK   
        uses: actions/checkout@v2    
        with:    
          repository: shqke/steamworks-sdk    
          ref: v1.41    
          path: steamworks-sdk    
          token: ${{ secrets.STEAMWORKS_REPO_ACCESS_TOKEN }}````
I don't have access to this repo.
I tried to download the SteamWorks SDK directly, but that didn't help much.
```     name: Prepare Steamworks SDK (Linux)    
        if: runner.os == 'Linux'    
        run: |    
          mkdir /home/runner/work/sourcetvsupport/sourcetvsupport/steamworks-sdk    
          wget --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36" -O /home/runner/work/sourcetvsupport/sourcetvsupport/steamworks-sdk/sdk.zip https://partner.steamgames.com/downloads/steamworks_sdk_141.zip     
          unzip -d /home/runner/work/sourcetvsupport/sourcetvsupport/steamworks-sdk/ /home/runner/work/sourcetvsupport/sourcetvsupport/steamworks-sdk/sdk.zip      
          mv /home/runner/work/sourcetvsupport/sourcetvsupport/steamworks-sdk/sdk/public/steam /home/runner/work/sourcetvsupport/sourcetvsupport/steamworks-sdk/```
Do you have any suggestions to help me solve the problem? Or can I send a pull request to modify Workflow?

Sorry, I don't use Github very often and I am not very familiar with English, thank you for your understanding.
shqke commented 1 year ago

Pulling steamworks sdk directly like that wouldn't work as it's behind the authentication layer, and the reason for my personal steamworks repository to be private is to comply with steamworks sdk access agreement.

Options:

ChitoseRaame commented 1 year ago

Thank you for your guidance. I have tried creating my own repo, uploading the uncompressed steamworks sdk v1.44 and adding the key, and also tried downloading the corresponding SDK package directly from GitHub action and uncompressing it to the corresponding path, but it still compiles with errors. I tried to search for steamworks sdk compile, but I didn't find any useful information. Do I need any additional actions? Like running one of the .sh scripts inside the sdk?

shqke commented 1 year ago

Don't need any additional scripts, just to have your own repository, and a token key added to the secrets.

Show the error.

ChitoseRaame commented 1 year ago

` [4104] clang -m32 -pipe -fno-strict-aliasing -Wall -Werror -Wno-unused -Wno-switch -Wno-array-bounds -msse -fvisibility=hidden -Wno-narrowing -Wno-sometimes-uninitialized -Wno-implicit-int-float-conversion -Wno-tautological-overlap-compare -O3 -fno-omit-frame-pointer -g3 -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -DHAVE_STDINT_H -DHAVE_STRING_H -DGNUC -DNDEBUG -D_LINUX -DPOSIX -D_FILE_OFFSET_BITS=64 -DSE_LEFT4DEAD=12 -DSE_LEFT4DEAD2=15 -DSOURCE_ENGINE=12 -DCOMPILER_GCC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE -I /home/runner/work/sourcetvsupport/sourcetvsupport/sourcemod-1.10/public -MD -MF _home_runner_work_sourcetvsupport_sourcetvsupport_sourcemod_1_10_public_libudis86_itab.d -c /home/runner/work/sourcetvsupport/sourcetvsupport/sourcemod-1.10/public/libudis86/itab.c -o _home_runner_work_sourcetvsupport_sourcetvsupport_sourcemod_1_10_public_libudis86_itab.o In file included from /home/runner/work/sourcetvsupport/sourcetvsupport/src/extension/extension.cpp:2: [4105] clang++ -m32 -pipe -fno-strict-aliasing -Wall -Werror -Wno-unused -Wno-switch -Wno-array-bounds -msse -fvisibility=hidden -Wno-narrowing -Wno-sometimes-uninitialized -Wno-implicit-int-float-conversion -Wno-tautological-overlap-compare -O3 -fno-omit-frame-pointer -g3 -std=c++14 -fno-threadsafe-statics -Wno-non-virtual-dtor -Wno-overloaded-virtual -fvisibility-inlines-hidden -Wno-expansion-to-defined -Wno-inconsistent-missing-override -Wno-null-dereference -Wno-delete-non-virtual-dtor -Wno-implicit-exception-spec-mismatch -Wno-deprecated-register -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -DHAVE_STDINT_H -DHAVE_STRING_H -DGNUC -DNDEBUG -D_LINUX -DPOSIX -D_FILE_OFFSET_BITS=64 -DSE_LEFT4DEAD=12 -DSE_LEFT4DEAD2=15 -DSOURCE_ENGINE=15 -DCOMPILER_GCC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE -I /home/runner/work/sourcetvsupport/sourcetvsupport/sourcemod-1.10/public -I /home/runner/work/sourcetvsupport/sourcetvsupport/metamod-1.10/core -I /home/runner/work/sourcetvsupport/sourcetvsupport/metamod-1.10/core/sourcehook -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/public -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/public/engine -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/public/mathlib -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/public/vstdlib -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/public/tier0 -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/public/tier1 -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/public/game/server -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/public/toolframework -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/game/shared -I /home/runner/work/sourcetvsupport/sourcetvsupport/hl2sdk-l4d2/common -I /home/runner/work/sourcetvsupport/sourcetvsupport/src/extension -I /home/runner/work/sourcetvsupport/sourcetvsupport/src/extension/sdk -I /home/runner/work/sourcetvsupport/sourcetvsupport/sourcemod-1.10/public/extensions -I /home/runner/work/sourcetvsupport/sourcetvsupport/sourcemod-1.10/sourcepawn/include -I /home/runner/work/sourcetvsupport/sourcetvsupport/sourcemod-1.10/public/amtl/amtl -I /home/runner/work/sourcetvsupport/sourcetvsupport/sourcemod-1.10/public/amtl -I /home/runner/work/sourcetvsupport/sourcetvsupport/steamworks-sdk/public -MD -MF extension.d -c /home/runner/work/sourcetvsupport/sourcetvsupport/src/extension/extension.cpp -o extension.o /home/runner/work/sourcetvsupport/sourcetvsupport/src/extension/wrappers.h:23:10: fatal error: 'steam/steam_gameserver.h' file not found

include "steam/steam_gameserver.h"

     ^~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated. Build failed: extension/sourcetvsupport.ext.2.l4d2/linux-x86/extension.d Error: Process completed with exit code 1. ` I don't know how to set the key to access the private repo, so I prepared a public one directly, but the compilation prompted these errors. I checked the file, but it exists.

shqke commented 1 year ago

Either remove this: https://github.com/ChitoseRaame/sourcetvsupport/blob/master/.github/workflows/main.yml#L82 (to point to a master branch where pathing seem consistent)

or change this: https://github.com/ChitoseRaame/sourcetvsupport/blob/master/.github/workflows/main.yml#L123 to

--swsdk-path="${{ github.workspace }}/steamworks-sdk/sdk"

(to select a subfolder that you have in your 1.41 branch root directory)

Setting up a token:

ChitoseRaame commented 1 year ago

Thank you for your guidance! I used the first method and it compiled successfully.

I tried adding the repo token before, but I only got 403. I will try to change the method to get the Steamworks SDK in workflow to the Linux command line for others to use

Thank you very much for your help!