mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-31 07:18:25 -04:00
Fix macOS builds
This commit is contained in:
parent
fff0948034
commit
4bb0066714
4 changed files with 11 additions and 4 deletions
2
.github/workflows/macos.yml
vendored
2
.github/workflows/macos.yml
vendored
|
@ -25,6 +25,8 @@ jobs:
|
|||
- name: Package
|
||||
run: |
|
||||
python3 data/create_bundle.py
|
||||
mkdir -p out/WiiUDownloader.app/Contents/MacOS/lib/share/glib-2.0/schemas
|
||||
cp /opt/homebrew/share/glib-2.0/schemas/* out/WiiUDownloader.app/Contents/MacOS/lib/share/glib-2.0/schemas
|
||||
create-dmg \
|
||||
--volname "WiiUDownloader" \
|
||||
--window-pos 200 120 \
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -7,3 +7,4 @@ gtitles.c
|
|||
output/
|
||||
main
|
||||
*.a
|
||||
out/
|
||||
|
|
|
@ -3,6 +3,7 @@ package wiiudownloader
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/cavaliergopher/grab/v3"
|
||||
)
|
||||
|
@ -30,15 +31,16 @@ func getDefaultCert(progressWindow *ProgressWindow, client *grab.Client) ([]byte
|
|||
if len(cetkData) >= 0x350+0x300 {
|
||||
return cetkData[0x350 : 0x350+0x300], nil
|
||||
}
|
||||
if err := downloadFile(progressWindow, client, "http://ccs.cdn.c.shop.nintendowifi.net/ccs/download/000500101000400a/cetk", "cetk"); err != nil {
|
||||
cetkDir := path.Join(os.TempDir(), "cetk")
|
||||
if err := downloadFile(progressWindow, client, "http://ccs.cdn.c.shop.nintendowifi.net/ccs/download/000500101000400a/cetk", cetkDir); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cetkData, err := os.ReadFile("cetk")
|
||||
cetkData, err := os.ReadFile(cetkDir)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := os.Remove("cetk"); err != nil {
|
||||
if err := os.Remove(cetkDir); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,9 @@ func DownloadTitle(titleID string, outputDirectory string, doDecryption bool, pr
|
|||
return err
|
||||
}
|
||||
if err := checkContentHashes(outputDirectory, content, &cipherHashTree); err != nil {
|
||||
fmt.Println(err)
|
||||
if progressWindow.cancelled {
|
||||
break
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue