mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-18 17:25:21 -04:00
Add CI
This commit is contained in:
parent
c9e6b12eaa
commit
bc05b39ccf
10 changed files with 234 additions and 4 deletions
40
.github/workflows/linux.yml
vendored
Normal file
40
.github/workflows/linux.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
name: Linux
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
- name: Docker Layer Caching
|
||||||
|
uses: jpribyl/action-docker-layer-caching@v0.1.1
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
key: wiiudownloader-docker-cache-{hash}
|
||||||
|
restore-keys: |
|
||||||
|
wiiudownloader-docker-cache-
|
||||||
|
- name: Build Docker container
|
||||||
|
run: |
|
||||||
|
docker build . --file Dockerfile.linux --tag builder
|
||||||
|
- name: Build artifacts
|
||||||
|
run: |
|
||||||
|
docker run --rm -v ${PWD}:/project builder python3 grabTitles.py
|
||||||
|
docker run --rm -v ${PWD}:/project builder go build cmd/WiiUDownloader/*.go
|
||||||
|
- name: Deploy WiiUDownloader
|
||||||
|
run: |
|
||||||
|
docker run --privileged --rm -e DEPLOY_GTK_VERSION=3 -e OUTPUT="WiiUDownloader-Linux-x86_64.AppImage" -e UPDATE_INFORMATION="gh-releases-zsync|Xpl0itU|WiiUDownloader|latest|WiiUDownloader-*.AppImage.zsync" -v ${PWD}:/project builder linuxdeploy.AppImage --plugin gtk --plugin checkrt --output=appimage --create-desktop-file --executable=main --appdir dist --icon-file data/WiiUDownloader.png
|
||||||
|
- name: Upload Linux Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: WiiUDownloader-Linux
|
||||||
|
path: WiiUDownloader-*.AppImage
|
||||||
|
if-no-files-found: warn
|
||||||
|
- name: Upload AppImage zsync
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: WiiUDownloader-Linux-zsync
|
||||||
|
path: WiiUDownloader-*.AppImage.zsync
|
||||||
|
if-no-files-found: warn
|
36
.github/workflows/macos.yml
vendored
Normal file
36
.github/workflows/macos.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: macOS
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: macos-11
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
brew install create-dmg dylibbundler gtk+3
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
python3 grabTitles.py
|
||||||
|
go build cmd/WiiUDownloader/*.go
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
python3 data/create_bundle.py
|
||||||
|
create-dmg \
|
||||||
|
--volname "WiiUDownloader" \
|
||||||
|
--window-pos 200 120 \
|
||||||
|
--window-size 800 400 \
|
||||||
|
--icon-size 100 \
|
||||||
|
--icon "WiiUDownloader.app" 200 190 \
|
||||||
|
--hide-extension "WiiUDownloader.app" \
|
||||||
|
--app-drop-link 600 185 \
|
||||||
|
"WiiUDownloader-macOS-Universal.dmg" \
|
||||||
|
"out/"
|
||||||
|
- name: Upload macOS Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: WiiUDownloader-macOS-Universal
|
||||||
|
path: WiiUDownloader-macOS-Universal.dmg
|
46
.github/workflows/windows.yml
vendored
Normal file
46
.github/workflows/windows.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
name: MSYS2
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
msys2-ucrt64:
|
||||||
|
runs-on: windows-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: msys2 {0}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
- uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
msystem: UCRT64
|
||||||
|
release: true
|
||||||
|
update: true
|
||||||
|
install: zip git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-gtk3 mingw-w64-ucrt-x86_64-go mingw-w64-ucrt-x86_64-ntldd-git
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
python3 grabTitles.py
|
||||||
|
go build cmd/WiiUDownloader/*.go
|
||||||
|
- name: Deploy WiiUDownloader
|
||||||
|
run: |
|
||||||
|
mkdir dist
|
||||||
|
mkdir dist/lib
|
||||||
|
mkdir dist/share
|
||||||
|
mkdir dist/share/icons
|
||||||
|
mkdir dist/share/glib-2.0
|
||||||
|
mkdir dist/share/glib-2.0/schemas/
|
||||||
|
for ff in $(${MSYSTEM_PREFIX}/bin/ntldd -R main.exe | tr '\\' '/' | grep -io "$(cygpath -m ${MSYSTEM_PREFIX}).\+\.dll" | sort -u); do
|
||||||
|
cp $(cygpath -u "$ff") dist/
|
||||||
|
done
|
||||||
|
cp -r /ucrt64/lib/gdk-pixbuf-2.0 ./dist/lib/gdk-pixbuf-2.0
|
||||||
|
cp -r /ucrt64/share/icons/* ./dist/share/icons/
|
||||||
|
cp /ucrt64/share/glib-2.0/schemas/* dist/share/glib-2.0/schemas/
|
||||||
|
glib-compile-schemas.exe dist/share/glib-2.0/schemas/
|
||||||
|
cp main.exe dist/WiiUDownloader.exe
|
||||||
|
cd dist && zip -9 -r ../WiiUDownloader-Windows.zip .
|
||||||
|
- name: Upload Windows Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: WiiUDownloader-Windows
|
||||||
|
path: WiiUDownloader-Windows.zip
|
||||||
|
if-no-files-found: warn
|
26
Dockerfile.linux
Normal file
26
Dockerfile.linux
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
FROM debian:bookworm
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/share/man/man1 /usr/share/man/man2 && \
|
||||||
|
apt -y --no-install-recommends update && \
|
||||||
|
apt -y --no-install-recommends install curl wget && \
|
||||||
|
rm -f /etc/ssl/certs/ca-bundle.crt && \
|
||||||
|
apt -y --no-install-recommends reinstall ca-certificates && \
|
||||||
|
update-ca-certificates && \
|
||||||
|
curl -sSL https://raw.githubusercontent.com/Xpl0itU/apt-fast/main/install.sh | bash
|
||||||
|
|
||||||
|
RUN apt-fast -y --no-install-recommends update && \
|
||||||
|
apt-fast -y --no-install-recommends upgrade && \
|
||||||
|
apt-fast install -y --no-install-recommends build-essential libgcrypt20-dev libgtk-3-dev libfuse2 libtool librsvg2-dev golang-go && \
|
||||||
|
LINUXDEPLOY="/usr/bin/linuxdeploy.AppImage" && \
|
||||||
|
LINUXDEPLOY_PLUGIN_GTK="/usr/bin/linuxdeploy-plugin-gtk.sh" && \
|
||||||
|
LINUXDEPLOY_PLUGIN_CHECKRT="/usr/bin/linuxdeploy-plugin-checkrt.sh" && \
|
||||||
|
wget -c "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh" -O "$LINUXDEPLOY_PLUGIN_GTK" && \
|
||||||
|
chmod +x "$LINUXDEPLOY_PLUGIN_GTK" && \
|
||||||
|
wget -c "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" -O "$LINUXDEPLOY" && \
|
||||||
|
chmod +x "$LINUXDEPLOY" && \
|
||||||
|
wget -c "https://github.com/linuxdeploy/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh" -O "$LINUXDEPLOY_PLUGIN_CHECKRT" && \
|
||||||
|
chmod +x "$LINUXDEPLOY_PLUGIN_CHECKRT"
|
||||||
|
|
||||||
|
WORKDIR /project
|
30
data/Info.plist
Normal file
30
data/Info.plist
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>WiiUDownloader</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>1.30, Copyright 2022-2023 Xpl0itU</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>Giggle.icns</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.Xpl0itU.WiiUDownloader</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.30</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.30</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright 2022-2023 Xpl0itU, GNU General Public License.</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>11.0</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
BIN
data/WiiUDownloader.png
Normal file
BIN
data/WiiUDownloader.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
17
data/create_bundle.py
Normal file
17
data/create_bundle.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
# Set the paths to the executable and Info.plist
|
||||||
|
executable_path = 'main'
|
||||||
|
info_plist_path = 'data/Info.plist'
|
||||||
|
|
||||||
|
# Set the path to the .app bundle
|
||||||
|
app_bundle_path = 'out/WiiUDownloader.app'
|
||||||
|
|
||||||
|
# Create the .app bundle
|
||||||
|
os.makedirs(os.path.join(app_bundle_path, 'Contents', 'MacOS'))
|
||||||
|
shutil.copy(info_plist_path, os.path.join(app_bundle_path, 'Contents', 'Info.plist'))
|
||||||
|
shutil.copy(executable_path, os.path.join(app_bundle_path, 'Contents', 'MacOS', 'WiiUDownloader'))
|
||||||
|
|
||||||
|
# Run dylibbundler
|
||||||
|
os.system(f"dylibbundler -od -b -x {os.path.join(app_bundle_path, 'Contents', 'MacOS', 'WiiUDownloader')} -d {os.path.join(app_bundle_path, 'Contents', 'MacOS', 'lib')} -p @executable_path/lib")
|
2
go.mod
2
go.mod
|
@ -8,5 +8,3 @@ require (
|
||||||
github.com/sqweek/dialog v0.0.0-20220809060634-e981b270ebbf
|
github.com/sqweek/dialog v0.0.0-20220809060634-e981b270ebbf
|
||||||
golang.org/x/crypto v0.11.0
|
golang.org/x/crypto v0.11.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require github.com/TheTitanrain/w32 v0.0.0-20180517000239-4f5cfb03fabf // indirect
|
|
||||||
|
|
37
go.sum
37
go.sum
|
@ -6,5 +6,42 @@ github.com/gotk3/gotk3 v0.6.2 h1:sx/PjaKfKULJPTPq8p2kn2ZbcNFxpOJqi4VLzMbEOO8=
|
||||||
github.com/gotk3/gotk3 v0.6.2/go.mod h1:/hqFpkNa9T3JgNAE2fLvCdov7c5bw//FHNZrZ3Uv9/Q=
|
github.com/gotk3/gotk3 v0.6.2/go.mod h1:/hqFpkNa9T3JgNAE2fLvCdov7c5bw//FHNZrZ3Uv9/Q=
|
||||||
github.com/sqweek/dialog v0.0.0-20220809060634-e981b270ebbf h1:pCxn3BCfu8n8VUhYl4zS1BftoZoYY0J4qVF3dqAQ4aU=
|
github.com/sqweek/dialog v0.0.0-20220809060634-e981b270ebbf h1:pCxn3BCfu8n8VUhYl4zS1BftoZoYY0J4qVF3dqAQ4aU=
|
||||||
github.com/sqweek/dialog v0.0.0-20220809060634-e981b270ebbf/go.mod h1:/qNPSY91qTz/8TgHEMioAUc6q7+3SOybeKczHMXFcXw=
|
github.com/sqweek/dialog v0.0.0-20220809060634-e981b270ebbf/go.mod h1:/qNPSY91qTz/8TgHEMioAUc6q7+3SOybeKczHMXFcXw=
|
||||||
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
|
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
|
||||||
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
||||||
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
|
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
|
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||||
|
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||||
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
|
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||||
|
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
||||||
|
golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
|
||||||
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
|
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||||
|
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
|
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||||
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
|
|
@ -21,5 +21,5 @@ os.system("ar rcs libgtitles.a gtitles/gtitles.o")
|
||||||
os.system("gcc -shared -o gtitles/libgtitles.so gtitles/gtitles.o")
|
os.system("gcc -shared -o gtitles/libgtitles.so gtitles/gtitles.o")
|
||||||
|
|
||||||
os.system("gcc -c -Wall -fpic -Icdecrypt cdecrypt/*.c")
|
os.system("gcc -c -Wall -fpic -Icdecrypt cdecrypt/*.c")
|
||||||
os.system("ar rcs libcdecrypt.a cdecrypt/*.o")
|
os.system("ar rcs libcdecrypt.a *.o")
|
||||||
os.system("gcc -shared -o cdecrypt/libcdecrypt.so cdecrypt/*.o")
|
os.system("gcc -shared -o cdecrypt/libcdecrypt.so *.o")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue