Skip to content
This repository was archived by the owner on May 4, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions .github/workflows/win-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Windows Deploy

env:
PACKAGE_NAME: engine-${{ github.ref_name }}-windows-mingw-x64.zip

on:
push:
branches:
- main
- '**'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
- '**'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -113,19 +116,17 @@ jobs:

- name: Compress artifact
run: |
$zipName = "engine-${{ github.ref_name }}-windows-mingw-x64.zip"
Compress-Archive -Path dist/engine-windows/* -DestinationPath $zipName

Compress-Archive -Path dist/engine-windows/* -DestinationPath $env:PACKAGE_NAME

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: windows-release-artifact
path: engine-v*-windows-mingw-x64.zip
path: ${{ env.PACKAGE_NAME }}
if-no-files-found: error

release-github:
name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [build-windows]

Expand All @@ -134,11 +135,26 @@ jobs:
uses: actions/download-artifact@v4
with:
name: windows-release-artifact
path: windows-release-artifact

- name: Determine release metadata
id: meta
run: |
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
echo "name=Release ${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
else
echo "tag=push-${GITHUB_RUN_ID}" >> "$GITHUB_OUTPUT"
echo "name=Automated release for ${GITHUB_REF_NAME} (run #${GITHUB_RUN_NUMBER})" >> "$GITHUB_OUTPUT"
fi

- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v2
with:
files: engine-v*-windows-mingw-x64.zip
tag_name: ${{ steps.meta.outputs.tag }}
name: ${{ steps.meta.outputs.name }}
files: windows-release-artifact/${{ env.PACKAGE_NAME }}
target_commitish: ${{ github.sha }}
draft: false
generate_release_notes: true
env:
Expand Down
4 changes: 4 additions & 0 deletions cmake/CompileProtobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ function(define_proto_generation_target TARGET_NAME PROTO_SRC_DIR OUT_DIR)
list(APPEND GENERATED_HDRS ${proto_hdr})
endforeach()

# Mark generated sources so CMake does not expect them to exist at configure time
set_source_files_properties(${GENERATED_SRCS} ${GENERATED_HDRS}
PROPERTIES GENERATED TRUE)

add_custom_target(${TARGET_NAME} DEPENDS ${GENERATED_SRCS})

# Export file lists back to parent
Expand Down
29 changes: 8 additions & 21 deletions src/protobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
# Create a library for the Proto files
add_library(protobuf
ssl_vision_detection.pb.cc
ssl_vision_geometry.pb.cc
ssl_vision_wrapper.pb.cc

grSim_Packet.pb.cc
grSim_Replacement.pb.cc
grSim_Commands.pb.cc

ssl_gc_rcon_team.pb.cc
ssl_gc_rcon.pb.cc
ssl_gc_common.pb.cc

ssl_gc_referee_message.pb.cc
ssl_gc_game_event.pb.cc
ssl_gc_geometry.pb.cc
)
# Create a library for the Proto files generated by the top-level target
add_library(protobuf ${generate_protos_SRCS})
add_dependencies(protobuf generate_protos)

# Include the Protobuf generated headers
target_include_directories(protobuf PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(protobuf PUBLIC
${PROTO_GEN_DIR}
${Protobuf_INCLUDE_DIR}
)

# Link Protobuf to the library
#find_package(Protobuf REQUIRED)
target_link_libraries(protobuf PUBLIC protobuf::libprotobuf)
target_link_libraries(protobuf PUBLIC ${Protobuf_LIBRARIES})
Loading