-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{OS}_{arch}_executable_server.{ext}を作るためのシェルスクリプト・バッチファイルを置く
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |