Skip to content

Commit 267c75e

Browse files
committed
Merge remote-tracking branch 'upstream/development' into pre-production-building
2 parents b70f9cd + 5862bdc commit 267c75e

22 files changed

Lines changed: 1533 additions & 429 deletions

.github/workflows/actions.yml

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: 'Build NSO-RPC'
1+
name: 'Build NSO-RPC - x86_64'
22
on:
33
release:
44
types: [published]
55

66
jobs:
7-
build:
8-
name: 'Build NSO-RPC'
7+
build-x86_64:
8+
name: 'Build NSO-RPC - x86_64'
99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
fail-fast: false
@@ -15,12 +15,15 @@ jobs:
1515
- uses: actions/checkout@v3
1616
- uses: actions/setup-python@v3
1717
with:
18-
python-version: 3.10.11
18+
python-version: 3.11.4
1919

2020
# Windows Build
2121
- name: "Build"
2222
if: matrix.os == 'windows-latest'
23-
run: cd scripts && ./build.bat
23+
run: |
24+
cd scripts &&
25+
python -m pip install pyqt6 &&
26+
./build.bat
2427
2528
- name: "Upload Build"
2629
if: matrix.os == 'windows-latest'
@@ -35,13 +38,13 @@ jobs:
3538
with:
3639
files: scripts/linux.sh
3740

38-
3941
# MacOS Build
4042
- name: "Build"
4143
if: matrix.os == 'macos-latest'
4244
run: |
4345
cd scripts &&
44-
./build.sh &&
46+
python -m pip install pyqt6 &&
47+
bash ./build.sh &&
4548
cd ../client/dist &&
4649
ln -s /Applications "Applications (admin)" &&
4750
hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-installer.dmg &&
@@ -53,3 +56,43 @@ jobs:
5356
files: |
5457
client/dist/mac-installer.dmg
5558
client/dist/mac-portable.zip
59+
60+
build-universal2:
61+
name: 'Build NSO-RPC - Universal2'
62+
runs-on: macos-latest
63+
steps:
64+
- uses: actions/checkout@v3
65+
66+
# MacOS Universal Build
67+
- name: "Install Python 3.11.4 and build NSO-RPC"
68+
run: |
69+
curl https://www.python.org/ftp/python/3.11.4/python-3.11.4-macos11.pkg -o python-3.11.4-macos11.pkg
70+
sudo installer -verbose -pkg python-3.11.4-macos11.pkg -target / &&
71+
alias python3=python3.11
72+
cd scripts/macos-universal2 &&
73+
bash ./build.sh &&
74+
cd ../../client/dist &&
75+
ln -s /Applications "Applications (admin)" &&
76+
hdiutil create -fs HFS+ -srcfolder . -volname NSO-RPC mac-universal2-installer.dmg &&
77+
zip -yr mac-universal2-portable.zip NSO-RPC.app/
78+
79+
- name: "Upload NSO-RPC Universal2 Build"
80+
uses: softprops/action-gh-release@v0.1.15
81+
with:
82+
files: |
83+
client/dist/mac-universal2-installer.dmg
84+
client/dist/mac-universal2-portable.zip
85+
86+
get-hashes:
87+
runs-on: "ubuntu-latest"
88+
needs: ["build-x86_64", "build-universal2"]
89+
steps:
90+
- name: "Generate checksums.txt"
91+
uses: MCJack123/ghaction-generate-release-hashes@v4
92+
with:
93+
hash-type: sha256
94+
file-name: checksums.txt
95+
get-assets: true
96+
- uses: softprops/action-gh-release@v0.1.15
97+
with:
98+
files: checksums.txt

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,25 @@ tempToken.*
55
# App
66
settings.*
77
logs.*
8+
NSO-RPC_Data/
89

910
# Python
1011
venv/
1112
__pycache__/
1213

1314
# Qt
1415
*.autosave
16+
arm64/
17+
PyQt6_Qt6*.whl
18+
universal/
19+
x86_64/
1520

1621
# Compilation
1722
build/
1823
dist/
1924
setup.py
2025
*.spec
26+
client/version.txt
2127

2228
# Tests
2329
test*.*

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/mirrors-autopep8
3+
rev: v2.0.2
4+
hooks:
5+
- id: autopep8
6+
exclude:
7+
client/layout/

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ Once ran, the app will ask for you to log into your Nintendo account on a web br
6767
***Q: I can't link my Nintendo Account. What do I do?***
6868
**A:** Refer to the question above.
6969

70+
***Q: My status is displaying as offline and won't change!***
71+
**A:** First, [make sure that you have a secondary account linked](#quick) and have selected your main account from the friends list. If you've done that and you're still having problems with an offline status, *make sure that both settings in your user profile (play activity and display online status settings) are set to "all friends"*.
72+
73+
***Q: I keep getting Error Code 9407; what should I do?***
74+
**A:** You're going to have to link your account with a real Nintendo Switch at least once in order to use the API and add your main account as a friend. (See [#73](https://github.com/MCMi460/NSO-RPC/issues/73))
75+
7076
*I am not liable for any sort of rate limiting Nintendo may hammer upon your network*
7177

7278
<h1 id = 'depth'>In-depth guide</h1>

client/_version.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import os
2+
import git
3+
4+
if __name__ == '__main__':
5+
# Deletes current version.txt file
6+
if os.path.exists('version.txt'):
7+
os.remove('version.txt')
8+
9+
# Writes latest git version info to 'version.txt'
10+
r = git.repo.Repo(search_parent_directories=True)
11+
version_info = r.git.describe('--tags')
12+
with open('version.txt', 'w') as f:
13+
f.write(version_info)
14+
f.write('\n')
15+
f.close()

0 commit comments

Comments
 (0)