Skip to content

Commit

Permalink
Remove requirement for uiaccess (solves #30 #21
Browse files Browse the repository at this point in the history
Use UPX to build
  • Loading branch information
aliencaocao committed Dec 10, 2023
1 parent 5ab5203 commit 9302aff
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pyinstaller-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ jobs:
with:
python-version: '3.12'
- run: pip install pyinstaller-versionfile
- name: Install UPX
uses: crazy-max/ghaction-upx@v3
with:
install-only: true
- name: Check UPX version
run: upx --version
- name: Create version.txt for PyInstaller
working-directory: ./src
run: create-version-file version.yml --outfile version.txt
Expand Down
18 changes: 9 additions & 9 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from pypresence import DiscordNotFound, PipeClosed, Presence
from win32api import GetFileVersionInfo, HIWORD, LOWORD

__version__ = '0.3.1'
__version__ = '0.3.2'

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
Expand Down Expand Up @@ -255,15 +255,15 @@ def update():
try:
RPC.update(pid=pid,
state=f"{song_info['artist']} | {song_info['album']}",
details = song_info['title'].center(2),
large_image = song_info['cover'],
large_text = song_info['album'].center(2),
small_image = 'play' if status != Status.paused else 'pause',
small_text = 'Playing' if status != Status.paused else 'Paused',
start = int(time.time() - current_float)
details=song_info['title'].center(2),
large_image=song_info['cover'],
large_text=song_info['album'].center(2),
small_image='play' if status != Status.paused else 'pause',
small_text='Playing' if status != Status.paused else 'Paused',
start=int(time.time() - current_float)
if status != Status.paused else None,
buttons = [{'label': 'Listen on Netease',
'url': f'https://music.163.com/#/song?id={song_id}'}]
buttons=[{'label': 'Listen on Netease',
'url': f'https://music.163.com/#/song?id={song_id}'}]
)
except PipeClosed:
logger.info('Reconnecting to Discord...')
Expand Down
2 changes: 1 addition & 1 deletion src/main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ exe = EXE(
entitlements_file=None,
version='version.txt',
uac_admin=True,
uac_uiaccess=True,
uac_uiaccess=False,
)
2 changes: 1 addition & 1 deletion src/version.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version: 0.3.1.0
Version: 0.3.2.0
CompanyName: aliencaocao
FileDescription: Netease Cloudmusic Discord RPC
InternalName: Netease Cloudmusic Discord RPC
Expand Down

0 comments on commit 9302aff

Please sign in to comment.