mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-21 18:59:15 +01:00
Make VS Code the recommended editor
This commit is contained in:
parent
0505875787
commit
65d34113aa
20
.devcontainer/devcontainer.json
Normal file
20
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "devkitPPC",
|
||||||
|
"image": "mcr.microsoft.com/devcontainers/base:jammy",
|
||||||
|
"settings": {
|
||||||
|
"workbench.colorTheme": "Default Dark+",
|
||||||
|
"files.exclude": {
|
||||||
|
"Dockerfile": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"onCreateCommand": "bash .devcontainer/on-create.sh",
|
||||||
|
"containerEnv": {
|
||||||
|
"DEVKITPRO": "/opt/devkitpro",
|
||||||
|
"DEVKITPPC": "/opt/devkitpro/devkitPPC",
|
||||||
|
"PATH": "${localEnv:PATH}:/opt/devkitpro/devkitPPC/bin"
|
||||||
|
},
|
||||||
|
"remoteUser": "root",
|
||||||
|
"extensions": [
|
||||||
|
"ms-vscode.cpptools-extension-pack"
|
||||||
|
]
|
||||||
|
}
|
20
.devcontainer/on-create.sh
Normal file
20
.devcontainer/on-create.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install some essentials
|
||||||
|
apt-get update && apt-get install make xz-utils -y
|
||||||
|
|
||||||
|
# Download and extract
|
||||||
|
cd /opt
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitPPC-r39-2-linux_x86_64.pkg.tar.xz"
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/devkitppc-rules-1.1.1-1-any.pkg.tar.xz"
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/libogc-2.3.1-1-any.pkg.tar.xz"
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz"
|
||||||
|
wget "https://wii.leseratte10.de/devkitPro/file.php/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz"
|
||||||
|
for f in *.pkg.tar.xz; do tar xf "$f" --strip-components=1; done
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm *.pkg.tar.xz
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
export DEVKITPRO=/opt/devkitpro
|
||||||
|
export DEVKITPPC=/opt/devkitpro/devkitPPC
|
94
.github/workflows/main.yml
vendored
94
.github/workflows/main.yml
vendored
@ -2,22 +2,36 @@ name: Build binaries
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- '.devcontainer/**'
|
||||||
|
- '.github/ISSUE_TEMPLATE/**'
|
||||||
|
- '.github/FUNDING.yml'
|
||||||
|
- '.github/**/*.md'
|
||||||
|
- '.vscode/**'
|
||||||
- 'HBC/**'
|
- 'HBC/**'
|
||||||
- 'Languages/**'
|
- 'Languages/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- '.devcontainer/**'
|
||||||
|
- '.github/ISSUE_TEMPLATE/**'
|
||||||
|
- '.github/FUNDING.yml'
|
||||||
|
- '.github/**/*.md'
|
||||||
|
- '.vscode/**'
|
||||||
- 'HBC/**'
|
- 'HBC/**'
|
||||||
- 'Languages/**'
|
- 'Languages/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
download-build-tools:
|
download-build-tools:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
id: cache-1
|
id: cache-1
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: cache
|
path: cache
|
||||||
key: ${{ runner.os }}-cache-1
|
key: ${{ runner.os }}-cache-1
|
||||||
@ -45,14 +59,14 @@ jobs:
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
needs: download-build-tools
|
needs: download-build-tools
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
id: cache-1
|
id: cache-1
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: cache
|
path: cache
|
||||||
key: ${{ runner.os }}-cache-1
|
key: ${{ runner.os }}-cache-1
|
||||||
@ -74,81 +88,21 @@ jobs:
|
|||||||
PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make
|
PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
id: pack
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p upload/apps/usbloader_gx
|
mkdir -p upload/apps/usbloader_gx
|
||||||
cp boot.dol upload/apps/usbloader_gx
|
cp boot.dol upload/apps/usbloader_gx
|
||||||
cp HBC/icon.png upload/apps/usbloader_gx
|
cp HBC/icon.png upload/apps/usbloader_gx
|
||||||
cp HBC/meta.xml upload/apps/usbloader_gx
|
cp HBC/meta.xml upload/apps/usbloader_gx
|
||||||
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | head -c 7)"
|
echo "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload binary
|
- name: Upload binary
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: usbloadergx_${{ steps.pack.outputs.sha }}
|
name: usbloadergx_${{ env.sha }}
|
||||||
path: upload
|
path: upload
|
||||||
|
|
||||||
- name: Upload debug binary
|
- name: Upload debug binary
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: usbloadergx_${{ steps.pack.outputs.sha }}_debug
|
name: usbloadergx_${{ env.sha }}_debug
|
||||||
path: boot.elf
|
|
||||||
|
|
||||||
build-latest-libogc:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs: download-build-tools
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Restore cache
|
|
||||||
id: cache-1
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: cache
|
|
||||||
key: ${{ runner.os }}-cache-1
|
|
||||||
|
|
||||||
- name: Check cache
|
|
||||||
if: steps.cache-1.outputs.cache-hit != 'true'
|
|
||||||
run: exit 1
|
|
||||||
|
|
||||||
- name: Extract downloaded files
|
|
||||||
run: |
|
|
||||||
tar -xf cache/devkitPPC-r39-2-linux_x86_64.pkg.tar.xz --strip-components=1
|
|
||||||
tar -xf cache/devkitppc-rules-1.1.1-1-any.pkg.tar.xz --strip-components=1
|
|
||||||
tar -xf cache/general-tools-1.2.0-2-linux_x86_64.pkg.tar.xz --strip-components=1
|
|
||||||
tar -xf cache/gamecube-tools-1.0.3-1-linux_x86_64.pkg.tar.xz --strip-components=1
|
|
||||||
|
|
||||||
- name: Checkout libogc
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: devkitPro/libogc
|
|
||||||
path: libogc
|
|
||||||
|
|
||||||
- name: Compile and install libogc
|
|
||||||
run: PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make install -C libogc
|
|
||||||
|
|
||||||
- name: Compile USB Loader GX
|
|
||||||
run: |
|
|
||||||
rm -r libogc
|
|
||||||
PATH=$(pwd)/devkitpro/devkitPPC/bin:$PATH DEVKITPPC=$(pwd)/devkitpro/devkitPPC DEVKITPRO=$(pwd)/devkitpro make
|
|
||||||
|
|
||||||
- name: Package
|
|
||||||
id: pack
|
|
||||||
run: |
|
|
||||||
mkdir -p upload/apps/usbloader_gx
|
|
||||||
cp boot.dol upload/apps/usbloader_gx
|
|
||||||
cp HBC/icon.png upload/apps/usbloader_gx
|
|
||||||
cp HBC/meta.xml upload/apps/usbloader_gx
|
|
||||||
echo "::set-output name=sha::$(echo ${GITHUB_SHA} | head -c 7)"
|
|
||||||
|
|
||||||
- name: Upload binary
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: usbloadergx_libogc_${{ steps.pack.outputs.sha }}
|
|
||||||
path: upload
|
|
||||||
|
|
||||||
- name: Upload debug binary
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: usbloadergx_libogc_${{ steps.pack.outputs.sha }}_debug
|
|
||||||
path: boot.elf
|
path: boot.elf
|
||||||
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -1,7 +1,13 @@
|
|||||||
*.dol
|
*.dol
|
||||||
*.elf
|
*.elf
|
||||||
/build
|
*.exe
|
||||||
|
*.bat
|
||||||
|
.vscode/
|
||||||
|
build/
|
||||||
|
usbloader_gx/
|
||||||
/HBC/meta.xml
|
/HBC/meta.xml
|
||||||
/source/themes/filelist.h
|
/source/themes/filelist.h
|
||||||
/source/gitver.c
|
/source/gitver.c
|
||||||
/source/svnrev.c
|
/source/svnrev.c
|
||||||
|
/usbloader_gx.zip
|
||||||
|
/wiiload
|
||||||
|
50
.vscode/c_cpp_properties.json
vendored
Normal file
50
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Win32",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"C:/devkitPro/libogc/include/**"
|
||||||
|
],
|
||||||
|
"defines": [
|
||||||
|
"HW_RVL",
|
||||||
|
"GEKKO"
|
||||||
|
],
|
||||||
|
"compilerPath": "C:/devkitPro/devkitPPC/bin/powerpc-eabi-gcc.exe",
|
||||||
|
"cStandard": "gnu17",
|
||||||
|
"cppStandard": "gnu++17",
|
||||||
|
"intelliSenseMode": "linux-gcc-x86"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Linux",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"${env:DEVKITPRO}/libogc/include/**"
|
||||||
|
],
|
||||||
|
"defines": [
|
||||||
|
"HW_RVL",
|
||||||
|
"GEKKO"
|
||||||
|
],
|
||||||
|
"compilerPath": "${env:DEVKITPRO}/devkitPPC/bin/powerpc-eabi-gcc",
|
||||||
|
"cStandard": "gnu17",
|
||||||
|
"cppStandard": "gnu++17",
|
||||||
|
"intelliSenseMode": "linux-gcc-x86"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mac",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"${env:DEVKITPRO}/libogc/include/**"
|
||||||
|
],
|
||||||
|
"defines": [
|
||||||
|
"HW_RVL",
|
||||||
|
"GEKKO"
|
||||||
|
],
|
||||||
|
"compilerPath": "${env:DEVKITPRO}/devkitPPC/bin/powerpc-eabi-gcc",
|
||||||
|
"cStandard": "gnu17",
|
||||||
|
"cppStandard": "gnu++17",
|
||||||
|
"intelliSenseMode": "linux-gcc-x86"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
32
.vscode/tasks.json
vendored
Normal file
32
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"options": {
|
||||||
|
"env": {
|
||||||
|
"WIILOAD": "tcp:192.168.1.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "make",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "make",
|
||||||
|
"problemMatcher": [],
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "clean",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "make clean",
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "deploy",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "make deploy",
|
||||||
|
"problemMatcher": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
23
Makefile
23
Makefile
@ -59,7 +59,7 @@ INCLUDES := source
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
CFLAGS = -g -ggdb -O3 -Wall -Wno-multichar -Wno-unused-parameter -Wextra $(MACHDEP) $(INCLUDE) -D_GNU_SOURCE
|
CFLAGS = -g -ggdb -O2 -Wall -Wno-multichar -Wno-unused-parameter -Wextra $(MACHDEP) $(INCLUDE) -D_GNU_SOURCE
|
||||||
CXXFLAGS = $(CFLAGS)
|
CXXFLAGS = $(CFLAGS)
|
||||||
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80B00000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size,-wrap,time
|
LDFLAGS = -g -ggdb $(MACHDEP) -Wl,-Map,$(notdir $@).map,--section-start,.init=0x80B00000,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,malloc_usable_size,-wrap,time
|
||||||
|
|
||||||
@ -172,15 +172,19 @@ all:
|
|||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
clean:
|
clean:
|
||||||
@echo clean ...
|
@echo Cleaning...
|
||||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
|
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol usbloader_gx.zip usbloader_gx
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
run:
|
|
||||||
$(MAKE)
|
|
||||||
@echo Done building ...
|
|
||||||
@echo Now Run That Shit ...
|
|
||||||
|
|
||||||
wiiload $(OUTPUT).dol
|
#---------------------------------------------------------------------------------
|
||||||
|
deploy:
|
||||||
|
$(MAKE)
|
||||||
|
@echo Deploying...
|
||||||
|
@[ -d usbloader_gx ] || mkdir -p usbloader_gx
|
||||||
|
@cp $(TARGET).dol usbloader_gx/
|
||||||
|
@cp HBC/icon.png usbloader_gx/
|
||||||
|
@cp HBC/meta.xml usbloader_gx/
|
||||||
|
@zip usbloader_gx.zip usbloader_gx/*
|
||||||
|
wiiload usbloader_gx.zip
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
reload:
|
reload:
|
||||||
@ -191,7 +195,6 @@ release:
|
|||||||
$(MAKE)
|
$(MAKE)
|
||||||
cp boot.dol ./hbc/boot.dol
|
cp boot.dol ./hbc/boot.dol
|
||||||
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
else
|
else
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user