Skip to content

Commit

Permalink
noai builds added
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-ellafi committed Mar 17, 2024
1 parent 40de4f1 commit 994b5e9
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build_noai.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -e

pyinstaller playbtw_build_noai.spec --clean --noconfirm --distpath dist_playbtw/scripts;
pyinstaller playbtw_dist_noai.spec --clean --noconfirm --distpath dist_playbtw/scripts;

exit 0;
2 changes: 1 addition & 1 deletion playbtw_build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exe = EXE(
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
Expand Down
45 changes: 45 additions & 0 deletions playbtw_build_noai.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- mode: python ; coding: utf-8 -*-

a = Analysis(
['scripts/playbtw_core.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=['playbtw_ai'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=None,
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
name='playbtw',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
exclude_binaries=True
)

col = COLLECT(
exe,
a.binaries,
a.datas,
name=''
)
35 changes: 35 additions & 0 deletions playbtw_dist_noai.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# -*- mode: python ; coding: utf-8 -*-

from md2pdf.core import md2pdf

import shutil
import os
import glob

if os.path.isdir('{0}/../match'):
shutil.rmtree('{0}/../match'.format(DISTPATH), ignore_errors=True)
if os.path.isdir('{0}/../tables'):
shutil.rmtree('{0}/../tables'.format(DISTPATH), ignore_errors=True)

os.makedirs('{0}/../match'.format(DISTPATH), exist_ok=True)
os.makedirs('{0}/../tables'.format(DISTPATH), exist_ok=True)

md2pdf('README.pdf', md_file_path='README.md', css_file_path='pdf.css', base_url='./')

shutil.move('README.pdf', '{0}/../README.pdf'.format(DISTPATH))

shutil.copy('match/playbtw_core.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_utils.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_mythic.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_pum.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_gum2.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_mune.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_prompty.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_opse.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_crge.yml', '{0}/../match/'.format(DISTPATH))
shutil.copy('match/playbtw_ai.yml', '{0}/../match/'.format(DISTPATH))

for f in glob.glob('tables/*'):
shutil.copy2(f, '{0}/../tables/'.format(DISTPATH))

shutil.make_archive('PlayBTW_v3_02_noai', 'zip', 'dist_playbtw')

0 comments on commit 994b5e9

Please sign in to comment.