Skip to content

Commit 4e7652a

Browse files
authored
sync (#19)
* Update dev_package_and_upload.yml * Update README.md * update nuitka_build.py * Update pyinstaller_package_and_release.yml * Update nuitka_package_release.yml * Update nuitka_build.py * 更新 NetEase_Cloud_Music_Download (#18) * Update dev_package_and_upload.yml (#17) * 更新 NetEase_Cloud_Music_Download
1 parent e0f9d10 commit 4e7652a

6 files changed

Lines changed: 21 additions & 11 deletions

File tree

.github/workflows/nuitka_package_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,6 @@ jobs:
8484
generate_release_notes: true
8585
draft: false
8686
prerelease: false
87+
overwrite_files: true
8788
files: |
8889
dist/*.exe

.github/workflows/pyinstaller_package_and_release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
generate_release_notes: true
7373
draft: false
7474
prerelease: false
75+
overwrite_files: true
7576
files: |
7677
dist/*.exe
7778
@@ -83,4 +84,4 @@ jobs:
8384
# file: "./dist/*.exe"
8485
# release_id: ${{ steps.create_release.outputs.id }}
8586
# verbose: false
86-
# overwrite: true
87+
# overwrite: true

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,5 @@ cython_debug/
198198
.temp
199199
temp/
200200
.vscode/
201-
.idea/
201+
.idea/
202+
**/*.bak

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
**禁止任何人将代码用于违法行为**
66

7-
[![Auto Package and Release](https://github.com/God-2077/python-code/actions/workflows/auto_package_and_release.yml/badge.svg)](https://github.com/God-2077/python-code/actions/workflows/auto_package_and_release.yml)[![Dev Package and Upload(dev)](https://github.com/God-2077/python-code/actions/workflows/dev_package_and_upload.yml/badge.svg?branch=dev)](https://github.com/God-2077/python-code/actions/workflows/dev_package_and_upload.yml)
7+
[![Nuitka Package and Release](https://github.com/God-2077/python-code/actions/workflows/nuitka_package_release.yml/badge.svg)](https://github.com/God-2077/python-code/actions/workflows/nuitka_package_release.yml)
8+
[![Nuitka Package and Upload(dev)](https://github.com/God-2077/python-code/actions/workflows/dev_package_and_upload.yml/badge.svg)](https://github.com/God-2077/python-code/actions/workflows/dev_package_and_upload.yml)
89

910
## [网易云音乐歌单批量下载歌曲][1]
1011

package/nuitka_build.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import argparse
77
from pathlib import Path
88
# from zip import zip_files_and_folders
9+
import uuid
10+
import shutil
911

1012
def main():
1113
print("="*50)
@@ -92,7 +94,7 @@ def main():
9294
'--mingw64',
9395
# '--mode',
9496
'--assume-yes-for-downloads', #自动下载外部代码
95-
'--show-memory'
97+
# '--show-memory'
9698

9799
]
98100

@@ -120,8 +122,12 @@ def main():
120122
# print(f"警告: UPX目录不存在 {upx_dir}")
121123
# else:
122124
# print("不使用UPX压缩")
125+
123126
# 添加主Python文件
124-
cmd.append(str(python_file))
127+
t_file = str(uuid.uuid4()) + ".py"
128+
t_file_path = base_dir / t_file
129+
shutil.copy(str(python_file), t_file_path)
130+
cmd.append(str(t_file_path))
125131

126132
# 打印并执行命令
127133
print("执行命令:", ' '.join(cmd))
@@ -137,7 +143,7 @@ def main():
137143
result = subprocess.run(cmd)
138144

139145
if result.returncode == 0:
140-
print(f"(onefile)打包成功: {dist_path / output_name}")
146+
print(f"打包成功: {dist_path / output_name}")
141147
success_count += 1
142148
else:
143149
print(f"打包失败,退出码: {result.returncode}")

package/nuitka_config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
icon:
1414
windows-disable-console: False
1515
distpath: 'dist'
16-
timeout: 1200
16+
timeout: 2700
1717
output-name-template: '{{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
1818

1919
- name: 'Keyboard_monitoring'
@@ -29,7 +29,7 @@
2929
icon:
3030
windows-disable-console: False
3131
distpath: 'dist'
32-
timeout: 1200
32+
timeout: 2700
3333
output-name-template: '{{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
3434

3535
- name: 'NetEase_Cloud_Music_Download'
@@ -46,7 +46,7 @@
4646
icon:
4747
windows-disable-console: False
4848
distpath: 'dist'
49-
timeout: 1200
49+
timeout: 2700
5050
output-name-template: '{{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
5151

5252
- name: 'ftp_server'
@@ -60,7 +60,7 @@
6060
icon:
6161
windows-disable-console: False
6262
distpath: 'dist'
63-
timeout: 1200
63+
timeout: 2700
6464
output-name-template: '{{name}}_{{version}}_nuitka_{{os}}_{{arch}}'
6565

6666
- name: 'sunrise_sunset_info'
@@ -74,5 +74,5 @@
7474
icon:
7575
windows-disable-console: False
7676
distpath: 'dist'
77-
timeout: 1200
77+
timeout: 2700
7878
output-name-template: '{{name}}_{{version}}_nuitka_{{os}}_{{arch}}'

0 commit comments

Comments
 (0)