Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Timi007 committed Feb 28, 2022
2 parents 989bf4e + e59ae66 commit 6ffb31b
Show file tree
Hide file tree
Showing 773 changed files with 2,681 additions and 312 deletions.
22 changes: 0 additions & 22 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Version information:**
Arma 3: `2.xx` (stable/rc/dev)
Metis Marker: `1.x.x` (stable/dev + commit hash)
CBA: `3.x.x` (stable/dev + commit hash)

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Where did the issue occur?**
Dedicated / Self-Hosted Multiplayer / Singleplayer / Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal

**RPT log file:**
Add the file to the client and/or server RPT file.

**Additional context**
Add any other context about the problem here.

**Screenshots**
If applicable, add screenshots to help explain your problem.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
39 changes: 39 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Based on the drafter of ACRE (https://github.com/IDI-Systems/acre2/blob/master/.github/release-drafter.yml)

commitish: 'release'

name-template: 'Version $NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'

categories:
- title: '**ADDED:**'
labels:
- 'enhancement'
- title: '**FIXED:**'
labels:
- 'bug fix'
- title: '**IMPROVED:**'
labels:
- 'optimization'
- title: '**CHANGED:**'
labels:
- 'cleanup'
- title: '**TRANSLATIONS:**'
labels:
- 'localization'

exclude-labels:
- 'ignore changelog'
- 'invalid'
- 'tools'

change-template: '- $TITLE (#$NUMBER) **$AUTHOR**'
template: |
## Change Log Summary
$CHANGES
replacers:
# Category titles
- search: '/\#\# (\*\*(ADDED|FIXED|IMPROVED|CHANGED|TRANSLATIONS):\*\*)/g'
replace: '$1'
23 changes: 23 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
changelog:
exclude:
labels:
- 'ignore changelog'
- 'invalid'
- 'tools'

categories:
- title: '**ADDED:**'
labels:
- 'enhancement'
- title: '**FIXED:**'
labels:
- 'bug fix'
- title: '**IMPROVED:**'
labels:
- 'optimization'
- title: '**CHANGED:**'
labels:
- 'cleanup'
- title: '**TRANSLATIONS:**'
labels:
- 'localization'
105 changes: 105 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Based on the workflow of ACRE (https://github.com/IDI-Systems/acre2/blob/master/.github/workflows/release.yml)

name: Release

on:
push:
branches:
- release

jobs:
build:
if: github.repository == 'Metis-Team/mts_marker' && ! contains(github.event.head_commit.message, '[ci skip]')
runs-on: windows-latest
outputs:
NAME: ${{ env.NAME }}
MOD_NAME: ${{ env.MOD_NAME }}
PREFIX: ${{ env.PREFIX }}
MAIN_PREFIX: ${{ env.MAIN_PREFIX }}
VERSION: ${{ env.VERSION }}
VERSION_SHORT: ${{ env.VERSION_SHORT }}
SHA_SHORT: ${{ env.SHA_SHORT }}
steps:
- name: Checkout the source code
uses: actions/checkout@v2

- name: Setup Tools
run: |
C:\msys64\usr\bin\wget.exe ${{ secrets.FTP_SERVER }}/arma_tools.zip --user ${{ secrets.FTP_USERNAME }} --password ${{ secrets.FTP_PASSWORD }} -q
Expand-Archive arma_tools.zip -DestinationPath ci
echo "Check HEMTT: $(Test-Path .\\ci\\hemtt.exe)"
echo "Check Binarize: $(Test-Path .\\ci\\binarize\\binarize_x64.exe)"
echo "Check ArmaScriptCompiler: $(Test-Path .\\ci\\ArmaScriptCompiler.exe)"
.\ci\hemtt.exe --version
echo "Install Binarize dependencies"
cp .\ci\binarize\X3DAudio1_7.dll,.\ci\binarize\XAPOFX1_5.dll C:\Windows\System32\
echo "::group::Set Binarize registry path"
New-Item "HKCU:\\Software\\Bohemia Interactive\\binarize" -Force | New-ItemProperty -Name path -Value "${{ github.workspace }}\ci\binarize"
echo "::endgroup::"
echo "Set env variables"
echo "NAME=$(.\\ci\\hemtt.exe var name)" >> $env:GITHUB_ENV
echo "MOD_NAME=$(.\\ci\\hemtt.exe var modname)" >> $env:GITHUB_ENV
echo "PREFIX=$(.\\ci\\hemtt.exe var prefix)" >> $env:GITHUB_ENV
echo "MAIN_PREFIX=$(.\\ci\\hemtt.exe var mainprefix)" >> $env:GITHUB_ENV
echo "VERSION=$(.\\ci\\hemtt.exe var version)" >> $env:GITHUB_ENV
echo "VERSION_SHORT=$(($(.\\ci\\hemtt.exe var version) | Select-String -Pattern '^\d+\.\d+\.\d+').Matches.Value)" >> $env:GITHUB_ENV
echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $env:GITHUB_ENV
- name: Setup P-Drive for ArmaScriptCompiler
run: |
echo "Creating P: and linking ${{ env.MAIN_PREFIX }}\${{ env.PREFIX }}\addons"
subst p: include
New-Item -ItemType Junction -Path "p:${{ env.MAIN_PREFIX }}\${{ env.PREFIX }}\addons" -Target "addons"
- name: Test Binarize
run: |
echo "::group::Run Binarize without arguments (look for missing DLLs)"
./ci/binarize/binarize_x64.exe || true # binarize exits with 1 if no file given
echo "::endgroup::"
shell: bash # outputs missing dll information

- name: Build (HEMTT)
run: |
echo "${{ env.NAME }} v${{ env.VERSION_SHORT }} (${{ env.VERSION }}; ${{ env.SHA_SHORT }})"
.\ci\hemtt.exe build --release --ci --time
env:
BIOUTPUT: 1 # output binarize log

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.MOD_NAME }}
path: releases/${{ env.VERSION }}/* # Upload folder to avoid double-zip artifacts
retention-days: 1

publish-release:
needs: build
if: github.ref == 'refs/heads/release'
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
- name: Prepare Archives
run: |
mv ${{ needs.build.outputs.MOD_NAME }}/* .
echo "::group::Archive build"
zip -r ${{ needs.build.outputs.MOD_NAME }}_${{ needs.build.outputs.VERSION_SHORT }}.zip @${{ needs.build.outputs.MOD_NAME }}
echo "::endgroup::"
- name: Prepare GitHub
id: release_drafter
uses: release-drafter/release-drafter@v5
with:
name: Version ${{ needs.build.outputs.VERSION_SHORT }}
tag: v${{ needs.build.outputs.VERSION }}
version: ${{ needs.build.outputs.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload to GitHub
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.release_drafter.outputs.upload_url }}
asset_path: ./${{ needs.build.outputs.MOD_NAME }}_${{ needs.build.outputs.VERSION_SHORT }}.zip
asset_name: ${{ needs.build.outputs.MOD_NAME }}_${{ needs.build.outputs.VERSION_SHORT }}.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ texHeaders.bin
*.swo
*.biprivatekey
Thumbs.db
*.sqfc
*.exe

## Added by HEMTT
hemtt
hemtt.exe
releases/*
keys/*
.hemtt/local
####
30 changes: 30 additions & 0 deletions .hemtt/template/scripts/get_version.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function file_exists(file)
local f = io.open(file, "rb")
if f then f:close() end
return f ~= nil
end

function split_by_space(string)
local groups = {}
for match in string.gmatch(string, "%S+") do
groups[#groups + 1] = match
end
return groups
end

local file = './addons/markers/script_version.hpp'
if not file_exists(file) then
return "0.0.0"
end

local version = {}
for line in io.lines(file) do
local split = split_by_space(line)
local last = split[#split]

version[#version + 1] = last
end

local version_str = table.concat(version, ".")

return version_str
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="https://github.com/Metis-Team/mts_marker/releases/latest">
<img src="https://img.shields.io/badge/Version-1.3.0-blue.svg?style=flat-square" alt="Metis Marker Version">
<img src="https://img.shields.io/badge/Version-1.4.0-blue.svg?style=flat-square" alt="Metis Marker Version">
</a>
<a href="https://github.com/Metis-Team/mts_marker/releases/latest">
<img src="https://img.shields.io/github/downloads/Metis-Team/mts_marker/total.svg?style=flat-square&label=Downloads" alt="Metis Marker Downloads">
Expand Down
13 changes: 4 additions & 9 deletions addons/markers/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};

class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};

class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
};
};

//add cba keybind events to mission briefing display
class Extended_DisplayLoad_EventHandlers {
class RscDiary {
GVAR(briefingDisplayOpened) = QUOTE(\
params ['_display'];\
if ((ctrlIDD _display) in [ARR_2(MAP_BRIEFING_CLIENT_DISPLAY, MAP_BRIEFING_SERVER_DISPLAY)]) then {\
_display call (uiNamespace getVariable 'cba_events_fnc_initDisplayCurator');\
};\
);
GVAR(briefingDisplayOpened) = QUOTE(call FUNC(onBriefingDisplayOpened));
};
};
Loading

0 comments on commit 6ffb31b

Please sign in to comment.