This commit is contained in:
恍兮惚兮 2024-10-18 20:40:26 +08:00
parent 1b555fc823
commit 53b7155b9b
2 changed files with 9 additions and 9 deletions

View File

@ -43,7 +43,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.fname }}
path: build/${{ matrix.fname }}.zip
path: src/build/${{ matrix.fname }}.zip
- name: loadversion
id: loadversion

View File

@ -241,16 +241,16 @@ for f in collect:
ff.write(bs)
target = os.path.basename(targetdir)
if os.path.exists(rf"{targetdir}\..\{target}.zip"):
os.remove(rf"{targetdir}\..\{target}.zip")
if os.path.exists(rf"{targetdir}\..\{target}.7z"):
os.remove(rf"{targetdir}\..\{target}.7z")
if os.path.exists(rf"build\{target}.zip"):
os.remove(rf"build\{target}.zip")
if os.path.exists(rf"build\{target}.7z"):
os.remove(rf"build\{target}.7z")
os.system(
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=Deflate -mx9 {targetdir}\..\{target}.zip {targetdir}'
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=Deflate -mx9 build\{target}.zip {targetdir}'
)
if 0:
os.system(
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=LZMA2 -mx9 {targetdir}\..\{target}.7z {targetdir}'
rf'"C:\Program Files\7-Zip\7z.exe" a -m0=LZMA2 -mx9 build\{target}.7z {targetdir}'
)
with open(r"C:\Program Files\7-Zip\7z.sfx", "rb") as ff:
sfx = ff.read()
@ -261,10 +261,10 @@ if 0:
;!@InstallEnd@!
"""
with open(rf"{targetdir}\..\{target}.7z", "rb") as ff:
with open(rf"build\{target}.7z", "rb") as ff:
data = ff.read()
with open(rf"{targetdir}\..\{target}.exe", "wb") as ff:
with open(rf"build\{target}.exe", "wb") as ff:
ff.write(sfx)
ff.write(config.encode("utf8"))
ff.write(data)