Skip to content

Commit

Permalink
Add patcher release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikah45 authored Sep 29, 2021
2 parents fd49dec + 059b27d commit e77a474
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 21 deletions.
41 changes: 33 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,39 @@ jobs:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
shell: bash
env:
MINGW_VERSION: 8.1.0
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain
- name: CI-Build

- name: Check MinGW Version
run: |
mingw32-make all
if ! g++ --version | grep $MINGW_VERSION; then
choco install mingw --version $MINGW_VERSION -y -f;
fi
- name: Build Patcher
run: mingw32-make all

- 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
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ ifeq ($(detected_OS),Linux)
LOCAL_LIBS += -ldl
endif
#-oformat -Ttext=0x006B8FB9
#echo align_size = $(align_size)';' > Env.ld
#echo align_size = '$(align_size);' > Env.ld

align:
echo align_size = $(align_size)';' > Env.ld
echo align_size = '$(align_size);' > Env.ld

peLib:
$(MAKE) all -C ./pe_lib
Expand Down Expand Up @@ -111,19 +111,19 @@ _fast_hooks:
$(MAKE) fast_compile -C ./hooks

ext_gpp_link:
$(call echo, align_data = $(align_data)';' > Env.ld)
$(call echo, align_rdata = $(align_rdata)';' >> Env.ld)
$(call echo, align_bss = $(align_bss)';' >> Env.ld)
$(call echo, align_idata = $(align_idata)';' >> Env.ld)
echo align_data = $(align_data)';' > Env.ld
echo align_rdata = $(align_rdata)';' >> Env.ld
echo align_bss = $(align_bss)';' >> Env.ld
echo align_idata = $(align_idata)';' >> Env.ld
$(call echo, align_data = '$(align_data);' > Env.ld)
$(call echo, align_rdata = '$(align_rdata);' >> Env.ld)
$(call echo, align_bss = '$(align_bss);' >> Env.ld)
$(call echo, align_idata = '$(align_idata);' >> Env.ld)
echo align_data = '$(align_data);' > Env.ld
echo align_rdata = '$(align_rdata);' >> Env.ld
echo align_bss = '$(align_bss);' >> Env.ld
echo align_idata = '$(align_idata);' >> Env.ld
ld -T ./linker/sectionLinker.ld -static -m $(obj_type) $(PRIME_NAME) -o $(TMP_NAME)

hook_gpp_link:
$(call echo, align_size = $(align_size)';' > Env.ld)
echo align_size = $(align_size)';' > Env.ld
$(call echo, align_size = '$(align_size);' > Env.ld)
echo align_size = '$(align_size);' > Env.ld
ld -T ./linker/hookLinker.ld -static -m $(obj_type) $(PRIME_NAME) -o $(TMP_NAME)

rip_out_binary:
Expand Down
5 changes: 4 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ int main (int argc, char* argv[])
}

cout<<"Done."<<endl;
goto ret;
if(reply.at(0)!='6')
{
goto ret;
}

return 0;
}

0 comments on commit e77a474

Please sign in to comment.