Skip to content

Commit

Permalink
Adapt to HEMTT (#385)
Browse files Browse the repository at this point in the history
* Replace armake with HEMTT (armake2), Use cmake -A platform generation

* Remove armake2 building on Travis CI

* Remove redundant matrix from Travis CI

* Fix Travis CI configuration and remove unused Slack notification
  • Loading branch information
jonpas authored Jun 19, 2019
1 parent ec647ff commit 31cdc26
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 215 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ Temporary Items
# Project Files
# =========================

# Release
@*
*.zip
# Releases
releases/*
hemtt
hemtt.exe
symbols/*

# Swap
*.swp
Expand Down
58 changes: 21 additions & 37 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,24 @@ branches:
- master
- release

matrix:
include:
- language: python
python:
- "3.6"
before_script:
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
pip install pygithub;
pip install pygithub3;
fi
script:
- python3 tools/sqf_validator.py
- python3 tools/config_style_checker.py
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
python3 tools/deploy.py;
fi
env:
global:
- secure: eK7XIeQ3F2dPCGML0EzKxQkR8o1ekf0GRyJjMmV0U7ZzLlHBqeJKb3cXiN9HtVau0ePxMqXV/zyyV2x02NDsUejqTZwSwOAxu+1+G9zmUNkEw4icRcB+ct9Z++A+QBnPnt5mZP/TKHCniI3e6Va/dHNvFuSkLXqC9eSYb5LYkd2Guj4Xy0lV5XumbONLRqjDvKZyo4J3fRr4yed+JIn5ZsyjekYE89Xf97Tk+SJJ4/afm2F37FxoVYPnFIGDE4vYTffOcBkssRBZCKBRYM0xRSC6rzCe8RiXgPnXjwM1PWjHyhyphWxYmnzK7bCi8Hl8jhSUZFKPT8VVdV3gk5q+Y6I5X1Cgnwy//nRrvXJqSTFpLqbeXmuIBW3M2iAqgpDVtwGgX/tOoeD0aNzPHKtW3xShyu/yYQ2faCReP9A5UT1sPDd9b2kMMsjqx3LIYp6SvN2h4Lrqlc7iVFgdcPVnMMV/KfJDsobXoSBEp9JAAPvxVOUxr+hfgLLfLDwlAeyEQ7LOVg5CoyF6DQX3MikKOXRugLDWO2TbHzrShiPu8z0niIgk7EaFHfeuuHR1z0oUX3vo/BPmcdNCS1ymm0PvynnKuI2I5Nmu4GwCwyRxG5xgDulgoHMMoRYv0K1J4w8swZgTkgiHcp/40a9IywkGQDyVFaKuoG6Z17zF8vMCLVE=
notifications:
email:
on_success: never
on_failure: change
slack:
secure: YlNSW4zvv1XTDrVBL8b5bWC97u6KBDDmOe81gIZNefmQ5A3y4eUSLKNUrzKWvqDwTSKzytmMfpsv/+urE/mFRAyhVb0t0/BlzdjbyA0z9Qn/mjkMQFomB5M+LPZNtq2sMorGBUiMCBQE2YtEZeLu6/sbfLYN6H4iyUxILefcAVReUi1s8VBBhsit0Wk67RoEGuaIdUnKsqynNoA4NctiVkXXx6MyP0+JCQphbGBBK+HtEkjPuWqKxBYfHbQMvIhhi6dbtCf023Up4j44fNpvASPeC+bsxg3XKUw9wSBGT8DF838gbwxL8jL62MlHIHFHi9rikq/f1j+V+ftWTGBnIJ0FElExYbl2Ck1voSkPzfrU7O654Kv7LXf4mWJe9l5IGP1stf+5m5vDfVlXh8VrAQwxNxJMHsL/dyzxiLHrvTXtblKBaquRjUQNAgbR3D2RJDjMUPb5yuR5yw5QrqKYdpJyUKN5b/uWi0TDATQZ4g3j9LEuY3FhHu42xfj74lFLb5KX1UKRUdFN3lyKi7LynuhtPE8ySBtNYjeUlq/mwMv5o1wwmMHTmrKvnLkXBvlJHOxCaKh/G08tkl3RncyPAuxf/7FK3Zf2PS5z9IWENxtanbBpI0CgcXmmfQkkDpRrbU02VqyLA4fehKWwVaiHYO9RltjWkUsPhd1a5sDerQg=
on_success: change
on_failure: always
on_start: never

- language: rust
before_script:
- cargo install --force armake2
- make --version
- armake2 --version
script:
- make -j 3
cache: cargo
language: python
python:
- "3.6"
before_script:
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
pip install pygithub;
pip install pygithub3;
fi
script:
- python3 tools/sqf_validator.py
- python3 tools/config_style_checker.py
- if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
python3 tools/deploy.py;
fi
env:
global:
- secure: eK7XIeQ3F2dPCGML0EzKxQkR8o1ekf0GRyJjMmV0U7ZzLlHBqeJKb3cXiN9HtVau0ePxMqXV/zyyV2x02NDsUejqTZwSwOAxu+1+G9zmUNkEw4icRcB+ct9Z++A+QBnPnt5mZP/TKHCniI3e6Va/dHNvFuSkLXqC9eSYb5LYkd2Guj4Xy0lV5XumbONLRqjDvKZyo4J3fRr4yed+JIn5ZsyjekYE89Xf97Tk+SJJ4/afm2F37FxoVYPnFIGDE4vYTffOcBkssRBZCKBRYM0xRSC6rzCe8RiXgPnXjwM1PWjHyhyphWxYmnzK7bCi8Hl8jhSUZFKPT8VVdV3gk5q+Y6I5X1Cgnwy//nRrvXJqSTFpLqbeXmuIBW3M2iAqgpDVtwGgX/tOoeD0aNzPHKtW3xShyu/yYQ2faCReP9A5UT1sPDd9b2kMMsjqx3LIYp6SvN2h4Lrqlc7iVFgdcPVnMMV/KfJDsobXoSBEp9JAAPvxVOUxr+hfgLLfLDwlAeyEQ7LOVg5CoyF6DQX3MikKOXRugLDWO2TbHzrShiPu8z0niIgk7EaFHfeuuHR1z0oUX3vo/BPmcdNCS1ymm0PvynnKuI2I5Nmu4GwCwyRxG5xgDulgoHMMoRYv0K1J4w8swZgTkgiHcp/40a9IywkGQDyVFaKuoG6Z17zF8vMCLVE=
notifications:
email:
on_success: never
on_failure: change
99 changes: 0 additions & 99 deletions Makefile

This file was deleted.

69 changes: 23 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,59 +24,36 @@ The mod is on the same foundation as the ACE3 mod, using its framework, systems,
Huge appreciation and thanks to [ACE3 Team](http://ace3mod.com/team.html) for their open-source nature and permission to use their systems.


### Setup
## Setup

### Requirements

#### Windows
- Arma 3
- Arma 3 Tools (available on Steam)
- Run Arma 3 and Arma 3 Tools directly from Steam once to install registry entries (and again after every update)
- [HEMTT](https://github.com/synixebrett/HEMTT) (>=v0.7 - unreleased, use [this build](https://ci.appveyor.com/project/synixebrett/hemtt/builds/25392464/job/3ekpo3xk7x5g2isv/artifacts)) binary placed in project root or globally installed
- `hemtt` (Linux) or `hemtt.exe` (Windows) or `setup.exe` (Windows global install)

_Quick build only._
### Procedure

```
$ make.bat
```
_Replace `hemtt` with `hemtt.exe` on Windows._

##### Extensions
- Open terminal (Linux) or command line (Windows)
- Run `$ hemtt build` to create a development build (add `-f` to overwrite already built addons)
- Run `$ hemtt build --relase` to create a release build (add `-f` to overwrite already built release)
- Run `$ hemtt clean` to clean build files (add `-f` to clean releases as well)

_Requires Boost library!_
**Windows Helpers:**
- Double-click `build.bat` to create a development build

32-bit:
```
$ cd extensions/vcproj
$ cmake .. -G "Visual Studio 15 2017" // Or other 32-bit compiler
```
### Extensions

64-bit:
```
$ cd extensions/vcproj64
$ cmake .. -G "Visual Studio 15 2017 Win64" // Or other 64-bit compiler
```
_Only Windows extension builds are currently supported!_

Open `TAC.sln`, change configuration to `RelWithDebInfo` and compile.
**Requirements:**
- Boost library
- [Windows] [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/) (or higher)
- [Linux] `g++-w64-mingw-i686` for 64-bit

#### Linux

```
$ make # Quick build
$ make <component>.pbo # Quick build of specified component
$ make filepatching # Development build (file patching)
$ make release # Clean, update versions, commit release preparation, build, sign and archive
$ make push # Commit and push release preparation
$ make clean # Clean build files
```

##### Extensions

_Requires Boost library!_
_Requires `g++-w64-mingw-i686` for 64-bit!_

```
$ make extensions # Build 32-bit extensions
$ make extensions-win64 # Build 64-bit extensions
```


#### [GitHub Changelog Generator](https://github.com/skywinder/github-changelog-generator) Usage:

```
github_changelog_generator --user Theseus-Aegis --project Mods --token <insert_token> --no-issues --no-pr-wo-labels --unreleased-only --exclude-labels "can't reproduce",duplicate,question,invalid,wontfix --bug-labels bug,"critical bug" --enhancement-labels enhancement,"feature request" --no-author --no-compare-link
```
Extensions builds must be invoked manually, as they do not get rebuild with every release:
- Run `$ hemtt run extensions`
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

3 changes: 3 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
hemtt.exe build
pause
10 changes: 5 additions & 5 deletions extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ else()
endif()

if(USE_STATIC_LINKING)
message("WARNING: Linking statically")
message("INFO: Linking statically")
set(TAC_LINK_TYPE "static")
else()
message("WARNING: Linking dynamically")
message("INFO: Linking dynamically")
set(TAC_LINK_TYPE "dynamic")
endif()

if(CMAKE_GENERATOR MATCHES "Win64")
if(CMAKE_GENERATOR_PLATFORM MATCHES "x64")
set(USE_64BIT_BUILD ON)
endif()

Expand All @@ -39,11 +39,11 @@ message("GENERATOR USED: ${CMAKE_GENERATOR}")
set(CMAKE_CL_64 ${USE_64BIT_BUILD})

if(USE_64BIT_BUILD)
message("WARNING: Building 64-bit projects")
message("INFO: Building 64-bit projects")
set(TAC_ARCH "x64")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/win64/")
else()
message("WARNING: Building 32-bit projects")
message("INFO: Building 32-bit projects")
set(TAC_ARCH "x86")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/build/win32/")
string(REPLACE "/lib64" "/lib32" Boost_LIBRARIES "${Boost_LIBRARIES}")
Expand Down
35 changes: 35 additions & 0 deletions hemtt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name = "TAC Mods"
prefix = "tac"
author = "TAC Mod Team"
files = [
"*.dll",
"*.so",
"mod.cpp",
"README.md",
"AUTHORS.txt",
"LICENSE",
"logo_tac_ca.paa",
"logo_tac_small_ca.paa"
]
headerexts = [
"version={{git \"id 8\"}}"
]
modname = "{{prefix}}_mods"
keyname = "{{prefix}}_{{version}}"
signame = "{{prefix}}_{{version}}"

releasebuild = [
"@zip {{prefix}}_mods_{{version}}"
]

[scripts.extensions]
show_output = true
steps_windows = [
"cd extensions\\vcproj && cmake .. -A Win32 && msbuild TAC.sln /m /p:Configuration=RelWithDebInfo",
"cd extensions\\vcproj64 && cmake .. -A x64 && msbuild TAC.sln /m /p:Configuration=RelWithDebInfo"
]
steps_linux = [
"cd extensions/build && cmake .. && make",
"cd extensions/build && CXX=$(eval $(which g++-w64-mingw-i686)) cmake .. && make",
"find ./extensions/build/ ( -name \"*.so\" -o -name \"*.dll\" ) -exec cp {} ./"
]
24 changes: 0 additions & 24 deletions make.bat

This file was deleted.

Binary file removed tools/armake2_w32.exe
Binary file not shown.
Binary file removed tools/armake2_w64.exe
Binary file not shown.

0 comments on commit 31cdc26

Please sign in to comment.