Skip to content

Commit

Permalink
{OS}_{arch}_executable_server.{ext}を作るためのシェルスクリプト・バッチファイルを置く
Browse files Browse the repository at this point in the history
  • Loading branch information
okaits committed Sep 30, 2024
1 parent 8ad056d commit d57c9c7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Binary file added generate_executable_server.ps
Binary file not shown.
20 changes: 20 additions & 0 deletions generate_executable_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/bash -e
# linux_amd64_executable_server.elfを作る
# 注: poetry runを介して実行すること。

python3 -m pip install PyInstaller
python3 -m PyInstaller --onefile server.py

arch="$(uname -m)"

if [ "$arch" == "x86_64" ]; then
arch=amd64
fi

output_filename=linux_"$arch"_executable_server.elf

mv dist/server "$output_filename"
chmod +x "$output_filename"

# Clean up
rm -r dist build server.spec

0 comments on commit d57c9c7

Please sign in to comment.