forked from kyx0r/FA_Patcher
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
KionX
committed
Mar 26, 2022
0 parents
commit afacc3a
Showing
6 changed files
with
430 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Release Version' | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MINGW32 | ||
|
||
- name: Install MinGW | ||
run: | | ||
pacman --noconfirm -S mingw-w64-i686-gcc | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build Patcher | ||
run: ./make.sh | ||
|
||
- name: Create Draft Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ github.event.inputs.version }} | ||
release_name: v${{ github.event.inputs.version }} | ||
draft: true | ||
prerelease: true | ||
|
||
- name: Upload Patcher exe | ||
id: upload-exe | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: FaP.exe | ||
asset_name: FaP.exe | ||
asset_content_type: application/vnd.microsoft.portable-executable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
!*/ | ||
!.gitignore | ||
!make.sh | ||
!section.ld | ||
!README.md | ||
!*.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# What is this project? | ||
A tool for patching binary files(.exe) | ||
|
||
FAF's patches are contained at: https://github.com/FAForever/FA-Binary-Patches | ||
|
||
# How To Build | ||
|
||
- To build patcher: | ||
- Cd into patcher directory and `target make` or `mingw32-make` | ||
|
||
- To build patch: | ||
- Run `FaP.exe` to be create default `config.txt`. | ||
- If necessary, correct the config file. | ||
- Put patch files into patcher dir(hooks, section) | ||
- Put base file(the copy will be patched) into patcher dir. | ||
- Run `FaP.exe` | ||
|
||
- Config file options: | ||
- `oldfile` specifies the file to be patched(base file) | ||
- `newfile` specifies the file to be make. | ||
- `newsect` the name of the section to be created(begins with `.`, max 8 chars) | ||
- `sectsize` the size(hex) of `newsect`(to disable it, set 0) | ||
|
||
# How make patches | ||
- Make `hooks` & `section` dirs. | ||
- `hooks` for patches putting into existing sections. | ||
- `section` for putting into new section. | ||
- Put .cpp files. | ||
- For `section` no special rules. | ||
- Hooks rules: | ||
- In each hook file may be several hooks. | ||
- For each hook need header: `asm(".section h*; .set h*,**;")` | ||
- `*` is hook name(max 7 chars), `**` virtual address to be placed. | ||
- For using symbols of `section` from asm need use macro `QU`. | ||
- Example: `"JMP "QU(BuildUnit)";"` |
Oops, something went wrong.