Skip to content

Commit 56a4f40

Browse files
committed
Add root archive packaging, weapon sound shaders
Introduce root package archive support and weapon sound shader handling, plus release tooling enhancements. Adds Makefile targets and scripts to build a FnQuake3-pkg.fnz root archive and includes many pkg assets (.azb maps, sound shader). Integrates a SoundShaderLibrary that parses sound/fnq3-weapon-sounds.sndshd and applies per-sample settings (gain, distance/range scales, wet/pitch) throughout the OpenAL audio pipeline; SoundSample now carries shader settings and spatial/gain computations and OpenAL source configuration are scaled accordingly. Update qcommon file handling to recognize and enumerate allowed root-archive entries and search candidate paths. CI and dev tools updated: GitHub Actions now verify release layout and optionally generate Copilot highlights, release notes workflow saves/consumes highlights and clears pending changelog; VSCode build/release script and tasks support producing and verifying the root archive. Also add related scripts and tests, and update documentation links to the Releases page.
1 parent cb6f3a8 commit 56a4f40

70 files changed

Lines changed: 3765 additions & 227 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# FnQuake3 Release Notes Instructions
2+
3+
Use `docs/fnquake3/CHANGELOG.md`, merged PRs, commit messages, and relevant diffs as raw material. Write for players, server operators, mod users, and testers.
4+
5+
## Categories
6+
7+
Use third-level Markdown headings and omit empty categories:
8+
9+
- `### Highlights` for the most important user-facing changes.
10+
- `### Compatibility` for retail Quake III Arena, demo, protocol, VM, pak, or asset-loading behavior.
11+
- `### Rendering and Display` for renderer, display, screenshot, texture, lighting, shader, GLx, OpenGL, or Vulkan changes.
12+
- `### Audio` for audio backend, device, codec, HRTF, EFX, or streaming changes.
13+
- `### Builds and Packaging` for release archives, platform builds, dependencies, CI outputs, and install layout.
14+
- `### Fixes` for bugs, crashes, regressions, and stability work.
15+
- `### Documentation and Tooling` only for user-visible docs or tools.
16+
17+
## Cleanup Rules
18+
19+
- Remove duplicates and merge near-duplicates.
20+
- Prefer the changelog entry when it is clearer than the raw commit or PR title.
21+
- Keep the final notes under 12 bullets unless the release genuinely needs more.
22+
- Skip internal-only refactors, test reshuffling, generated-file churn, and maintainer planning docs unless they change a player-visible result or release package.
23+
- Do not invent features, fixes, platforms, compatibility claims, or performance claims.
24+
- Use concise present-tense bullets with no author attributions.
25+
- Do not include a top-level release title; the release workflow adds build details separately.

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ jobs:
9696
meson compile -C meson/build-${{ matrix.arch }}
9797
meson install -C meson/build-${{ matrix.arch }} --no-rebuild
9898
99+
- name: Verify release layout
100+
shell: msys2 {0}
101+
run: python scripts/verify_release_layout.py bin
102+
99103
- uses: actions/upload-artifact@v7
100104
with:
101105
name: windows-mingw-${{ matrix.arch }}
@@ -151,6 +155,9 @@ jobs:
151155
meson compile -C meson\build-${{ matrix.arch }} || exit /b
152156
meson install -C meson\build-${{ matrix.arch }} --no-rebuild || exit /b
153157
158+
- name: Verify release layout
159+
run: python scripts/verify_release_layout.py bin
160+
154161
- uses: actions/upload-artifact@v7
155162
with:
156163
name: windows-msvc-${{ matrix.pkg_suffix }}
@@ -237,6 +244,9 @@ jobs:
237244
- name: Check glibc baseline
238245
run: python3 scripts/check_elf_glibc.py --max-glibc "$FNQ3_LINUX_GLIBC_MAX" --require-elf bin
239246

247+
- name: Verify release layout
248+
run: python3 scripts/verify_release_layout.py bin
249+
240250
- uses: actions/upload-artifact@v7
241251
with:
242252
name: linux-${{ matrix.arch }}
@@ -273,6 +283,9 @@ jobs:
273283
- name: Check glibc baseline
274284
run: python3 scripts/check_elf_glibc.py --max-glibc "$FNQ3_LINUX_GLIBC_MAX" --require-elf bin
275285

286+
- name: Verify release layout
287+
run: python3 scripts/verify_release_layout.py bin
288+
276289
- uses: actions/upload-artifact@v7
277290
with:
278291
name: linux-arm64
@@ -326,6 +339,9 @@ jobs:
326339
VORBIS_LIBS="$(pkg-config --libs vorbisfile)" \
327340
gmake install -j$(sysctl -n hw.logicalcpu) ARCH=${{ matrix.arch }} CC=clang DESTDIR=bin INSTALL=ginstall USE_LOCAL_HEADERS=0 USE_SYSTEM_JPEG=1 USE_SYSTEM_OGG=1 USE_SYSTEM_VORBIS=1 USE_RENDERER_DLOPEN=1 USE_OPENGL=1 USE_GLX=1 USE_VULKAN=1 STRIP=echo
328341
342+
- name: Verify release layout
343+
run: python3 scripts/verify_release_layout.py bin
344+
329345
- uses: actions/upload-artifact@v7
330346
with:
331347
name: macos-${{ matrix.arch }}
@@ -369,6 +385,9 @@ jobs:
369385
permissions:
370386
contents: write
371387
models: read
388+
pull-requests: read
389+
env:
390+
HAS_COPILOT_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN != '' }}
372391
steps:
373392
- uses: actions/checkout@v6
374393
with:
@@ -394,6 +413,25 @@ jobs:
394413
run: |
395414
python scripts/release.py --channel manual --artifact-root artifacts --build-number "${{ needs.prepare.outputs.build_number }}" --build-date "${{ needs.prepare.outputs.build_date }}" --commit "${{ needs.prepare.outputs.head_commit }}"
396415
416+
- name: Build Copilot changelog cleanup
417+
id: copilot_notes
418+
if: ${{ env.HAS_COPILOT_TOKEN == 'true' && needs.prepare.outputs.previous_release_commit != '' }}
419+
uses: github/copilot-release-notes@v1.0.1
420+
with:
421+
base-ref: ${{ needs.prepare.outputs.previous_release_commit }}
422+
head-ref: ${{ needs.prepare.outputs.head_commit }}
423+
instructions: .github/release-notes-instructions.md
424+
env:
425+
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
426+
427+
- name: Save Copilot highlights
428+
if: ${{ steps.copilot_notes.outputs.release-notes != '' }}
429+
env:
430+
COPILOT_RELEASE_NOTES: ${{ steps.copilot_notes.outputs.release-notes }}
431+
run: |
432+
mkdir -p .tmp
433+
printf '%s\n' "$COPILOT_RELEASE_NOTES" > .tmp/copilot-release-notes.md
434+
397435
- name: Build release notes
398436
env:
399437
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -402,11 +440,16 @@ jobs:
402440
if [ -n "${{ needs.prepare.outputs.previous_release_commit }}" ]; then
403441
FROM_ARGS+=(--from-commit "${{ needs.prepare.outputs.previous_release_commit }}")
404442
fi
443+
HIGHLIGHTS_ARGS=()
444+
if [ -s .tmp/copilot-release-notes.md ]; then
445+
HIGHLIGHTS_ARGS+=(--highlights-file .tmp/copilot-release-notes.md)
446+
fi
405447
python scripts/manual_release.py release-notes \
406448
--build-number "${{ needs.prepare.outputs.build_number }}" \
407449
--build-date "${{ needs.prepare.outputs.build_date }}" \
408450
--to-commit "${{ needs.prepare.outputs.head_commit }}" \
409451
"${FROM_ARGS[@]}" \
452+
"${HIGHLIGHTS_ARGS[@]}" \
410453
--output .tmp/release-notes.md
411454
412455
- name: Create release
@@ -420,3 +463,17 @@ jobs:
420463
--target "${{ needs.prepare.outputs.head_commit }}" \
421464
--title "${FNQ3_RELEASE_TITLE}" \
422465
--notes-file .tmp/release-notes.md
466+
467+
- name: Clear pending changelog
468+
if: ${{ github.ref_type == 'branch' }}
469+
run: |
470+
python scripts/changelog.py clear-unreleased
471+
if git diff --quiet -- docs/fnquake3/CHANGELOG.md; then
472+
echo "Pending changelog already clean."
473+
exit 0
474+
fi
475+
git config user.name "github-actions[bot]"
476+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
477+
git add docs/fnquake3/CHANGELOG.md
478+
git commit -m "Reset pending changelog after release"
479+
git push origin "HEAD:${GITHUB_REF_NAME}"

.install/README.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h3>Player guides</h3>
374374
<li><a href="https://github.com/themuffinator/FnQ3/blob/main/docs/AUDIO.md">Audio Guide</a> for backend selection, devices, HRTF, fallback behavior, and troubleshooting.</li>
375375
<li><a href="https://github.com/themuffinator/FnQ3/blob/main/docs/CONSOLE.md">Console Guide</a> for console layout, scaling, completion, and interaction.</li>
376376
<li><a href="https://github.com/themuffinator/FnQ3/blob/main/docs/SCREENSHOTS.md">Screenshot Guide</a> for capture commands, naming, metadata sidecars, watermarks, and cube-map export.</li>
377-
<li><a href="https://github.com/themuffinator/FnQ3/blob/main/docs/fnquake3/CHANGELOG.md">Changelog</a> for release-facing change history.</li>
377+
<li><a href="https://github.com/themuffinator/FnQ3/releases">Release History</a> for published changelogs and downloads.</li>
378378
</ul>
379379
</article>
380380
<article class="doc-column">

.vscode/build-release.ps1

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ param(
1919
[switch]$SetupOnly,
2020
[switch]$RunTests,
2121
[switch]$Install,
22-
[string]$DestDir = $(if ($env:FNQ3_MESON_DESTDIR) { $env:FNQ3_MESON_DESTDIR } else { '' })
22+
[string]$DestDir = $(if ($env:FNQ3_MESON_DESTDIR) { $env:FNQ3_MESON_DESTDIR } else { '' }),
23+
[switch]$Archive,
24+
[string]$RootArchiveName = $(if ($env:FNQ3_MESON_ROOT_ARCHIVE_NAME) { $env:FNQ3_MESON_ROOT_ARCHIVE_NAME } else { 'FnQuake3-pkg.fnz' })
2325
)
2426

2527
$ErrorActionPreference = 'Stop'
@@ -181,6 +183,28 @@ function Clear-StaleMesonArchive {
181183
}
182184
}
183185

186+
function Invoke-MesonInstall {
187+
param(
188+
[string]$MesonPath,
189+
[string]$BuildPath,
190+
[string]$SelectedDestDir,
191+
[string]$InstallTags = ''
192+
)
193+
194+
$installArgs = @('install', '-C', $BuildPath, '--no-rebuild')
195+
if ($SelectedDestDir) {
196+
$installArgs += @('--destdir', $SelectedDestDir)
197+
}
198+
if ($InstallTags) {
199+
$installArgs += @('--tags', $InstallTags)
200+
}
201+
Write-Host "==> $MesonPath $($installArgs -join ' ')"
202+
& $MesonPath @installArgs
203+
if ($LASTEXITCODE -ne 0) {
204+
throw 'Meson install failed.'
205+
}
206+
}
207+
184208
$workspaceRoot = Split-Path -Parent $PSScriptRoot
185209
$buildPath = Resolve-BuildPath -WorkspaceRoot $workspaceRoot -SelectedBuildDir $BuildDir
186210
$buildType = Convert-BuildType -SelectedConfiguration $Configuration
@@ -197,6 +221,9 @@ Write-Host "Target: $Target"
197221
Write-Host "Build directory: $buildPath"
198222
Write-Host "Renderer modules: $rendererCsv"
199223
Write-Host "Renderer default: $RendererDefault"
224+
if ($Archive) {
225+
Write-Host "Root package archive: $(Join-Path $buildPath $RootArchiveName)"
226+
}
200227

201228
$coreDataPath = Join-Path $buildPath 'meson-private\coredata.dat'
202229
$setupArgs = @(
@@ -233,6 +260,7 @@ if ($SetupOnly) {
233260
}
234261

235262
Clear-StaleMesonArchive -BuildPath $buildPath -ArchiveName 'libbotlib.a'
263+
Clear-StaleMesonArchive -BuildPath $buildPath -ArchiveName $RootArchiveName
236264

237265
$compileArgs = @('compile', '-C', $buildPath)
238266
Write-Host "==> $mesonPath $($compileArgs -join ' ')"
@@ -253,15 +281,22 @@ if ($RunTests) {
253281
}
254282

255283
if ($Install) {
256-
$installArgs = @('install', '-C', $buildPath)
257-
if ($DestDir) {
258-
$installArgs += @('--destdir', $DestDir)
284+
Invoke-MesonInstall -MesonPath $mesonPath -BuildPath $buildPath -SelectedDestDir $DestDir
285+
}
286+
287+
if ($Archive) {
288+
$archivePath = Join-Path $buildPath $RootArchiveName
289+
if (-not (Test-Path $archivePath)) {
290+
throw "Root package archive was not produced: $archivePath"
259291
}
260-
Write-Host "==> $mesonPath $($installArgs -join ' ')"
261-
& $mesonPath @installArgs
292+
$verifyScript = Join-Path $workspaceRoot 'scripts\verify_release_layout.py'
293+
Write-Host "==> python $verifyScript $archivePath"
294+
& python $verifyScript $archivePath
262295
if ($LASTEXITCODE -ne 0) {
263-
throw 'Meson install failed.'
296+
throw 'Root package archive verification failed.'
264297
}
298+
299+
Write-Host "Root package archive ready: $archivePath"
265300
}
266301

267302
Write-Host 'Meson release build completed.'

.vscode/tasks.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"-Target",
3232
"both",
3333
"-Renderers",
34-
"opengl,glx,vulkan,opengl2"
34+
"opengl,glx,vulkan,opengl2",
35+
"-Archive"
3536
],
3637
"problemMatcher": [
3738
"$gcc",

Makefile

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ ifndef BUILD_DIR
139139
BUILD_DIR=build
140140
endif
141141

142+
ifndef PYTHON
143+
PYTHON=python3
144+
endif
145+
142146
ifndef GENERATE_DEPENDENCIES
143147
GENERATE_DEPENDENCIES=1
144148
endif
@@ -729,6 +733,47 @@ TARGET_RENDV = $(RENDERER_PREFIX)_vulkan_$(SHLIBNAME)
729733

730734
TARGET_SERVER = $(DNAME)$(ARCHEXT)$(BINEXT)
731735

736+
STANDARD_AUDIO_ZONE_MAPS = \
737+
pro-q3dm13 \
738+
pro-q3dm6 \
739+
pro-q3tourney2 \
740+
pro-q3tourney4 \
741+
q3ctf1 \
742+
q3ctf2 \
743+
q3ctf3 \
744+
q3ctf4 \
745+
q3dm0 \
746+
q3dm1 \
747+
q3dm10 \
748+
q3dm11 \
749+
q3dm12 \
750+
q3dm13 \
751+
q3dm14 \
752+
q3dm15 \
753+
q3dm16 \
754+
q3dm17 \
755+
q3dm18 \
756+
q3dm19 \
757+
q3dm2 \
758+
q3dm3 \
759+
q3dm4 \
760+
q3dm5 \
761+
q3dm6 \
762+
q3dm7 \
763+
q3dm8 \
764+
q3dm9 \
765+
q3tourney1 \
766+
q3tourney2 \
767+
q3tourney3 \
768+
q3tourney4 \
769+
q3tourney5 \
770+
q3tourney6 \
771+
q3tourney6_ctf
772+
PKG_ROOT = pkg
773+
STANDARD_AUDIO_ZONE_FILES = $(addprefix $(PKG_ROOT)/baseq3/maps/,$(addsuffix .azb,$(STANDARD_AUDIO_ZONE_MAPS)))
774+
PKG_FILES = $(shell find $(PKG_ROOT) -type f 2>/dev/null)
775+
ROOT_ARCHIVE = FnQuake3-pkg.fnz
776+
732777
STRINGIFY = $(B)/rend2/stringify$(BINEXT)
733778

734779
TARGETS =
@@ -921,10 +966,9 @@ endif
921966
do \
922967
echo " $$i"; \
923968
done
969+
@echo " $(B)/$(ROOT_ARCHIVE)"
924970
@echo ""
925-
ifneq ($(TARGETS),)
926-
+@$(RECURSIVE_MAKE) $(TARGETS) V=$(V)
927-
endif
971+
+@$(RECURSIVE_MAKE) $(TARGETS) $(B)/$(ROOT_ARCHIVE) V=$(V)
928972

929973
makedirs:
930974
@if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
@@ -1766,6 +1810,10 @@ $(B)/ded/%.o: $(W32DIR)/%.cpp
17661810
$(B)/ded/%.o: $(W32DIR)/%.rc
17671811
$(DO_WINDRES)
17681812

1813+
$(B)/$(ROOT_ARCHIVE): $(TARGETS) $(PKG_FILES) scripts/build_root_archive.py scripts/root_archive.py scripts/fnq3_meta.py
1814+
$(echo_cmd) "ROOTARCHIVE $@"
1815+
$(Q)$(PYTHON) scripts/build_root_archive.py --package-root "$(PKG_ROOT)" --output "$@"
1816+
17691817
#############################################################################
17701818
# MISC
17711819
#############################################################################
@@ -1777,6 +1825,7 @@ install: release
17771825
$(STRIP) "$(DESTDIR)$$i"; \
17781826
fi \
17791827
done
1828+
$(INSTALL) -D -m 0644 "$(BR)/$(ROOT_ARCHIVE)" "$(DESTDIR)/$(ROOT_ARCHIVE)"
17801829

17811830
clean: clean-debug clean-release
17821831

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ If you want to compile FnQuake3 yourself instead, start with the [Build Guide](B
6767
- [Audio Guide](docs/AUDIO.md) for backend selection, devices, HRTF, fallback behavior, and troubleshooting.
6868
- [Console Guide](docs/CONSOLE.md) for console layout, scaling, completion, and interaction.
6969
- [Screenshot Guide](docs/SCREENSHOTS.md) for capture commands, naming, metadata sidecars, watermarks, and cube-map export.
70-
- [Changelog](docs/fnquake3/CHANGELOG.md) for release-facing change history.
70+
- [Release History](https://github.com/themuffinator/FnQ3/releases) for published changelogs and downloads.
7171

7272
### Technical and build docs
7373

0 commit comments

Comments
 (0)