Skip to content

Commit

Permalink
Merge pull request #64 from cx-freeze
Browse files Browse the repository at this point in the history
Update cxfreeze for workflow
  • Loading branch information
Kiyotoko committed Apr 23, 2024
2 parents 92cadd7 + 93ac6c3 commit c3f7352
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.pyc
dist/
dist/
venv/
1 change: 1 addition & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 29 additions & 13 deletions freeze.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
#!/bin/bash

echo "Hello from the seekers community! cx_Freeze helper 24.3.15"
echo "Hello from the seekers community! cx_Freeze helper 24.4.18"

usage() {
echo "Usage: $0 [-b|-s]" 1>&2
echo "Usage: $0 [-i|-s|-c|-t|-h]" 1>&2
}

build() {
echo "Building projekt ..."
pip install -r requirements.txt
pip install cx_Freeze
cxfreeze -c run_seekers.py --target-dir dist --include-files config.ini
install_requirements() {
echo "Install requirements ..."
python -m venv venv
venv/bin/pip install -r requirements.txt
venv/bin/pip install cx_Freeze
}

start() {
echo "Starting game ..."
build_seekers() {
echo "Building seekers ..."
venv/bin/cxfreeze -c run_seekers.py --target-dir dist/seekers --include-files config.ini
}

build_client() {
echo "Building client ..."
venv/bin/cxfreeze -c run_client.py --target-dir dist/client --include-files config.ini
}

test() {
echo "Testing build ..."
dist/run_seekers examples/ai-decide.py examples/ai-simple.py
}

[ $# -eq 0 ] && usage
while getopts ":bs" arg; do
while getopts ":isct" arg; do
case $arg in
b)
build
i)
install_requirements
;;
s)
start
build_seekers
;;
c)
build_client
;;
t)
test
;;
*)
usage
Expand Down
1 change: 0 additions & 1 deletion run_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import sys
import logging

import seekers.grpc.client
import seekers.seekers_types

Expand Down
1 change: 1 addition & 0 deletions seekers/grpc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stubs

0 comments on commit c3f7352

Please sign in to comment.