-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from XXXFQ:develop
Update README and version to 0.2.0 with build scripts
- Loading branch information
Showing
6 changed files
with
1,791 additions
and
47 deletions.
There are no files selected for viewing
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
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,28 @@ | ||
@echo off | ||
echo Build start... | ||
|
||
:: PowerShellコマンドでUPXのパスを取得 | ||
for /f "usebackq tokens=*" %%i in (`powershell -Command "(Get-Command upx.exe).Path | Split-Path"`) do set UPX_DIR=%%i | ||
|
||
:: UPXのパスが見つからない場合エラーを表示 | ||
if "%UPX_DIR%"=="" ( | ||
echo Error: UPX not found in PATH. | ||
echo Please ensure UPX is installed and its directory is in the PATH environment variable. | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
:: UPXのパスを確認 | ||
echo UPX Directory: %UPX_DIR% | ||
|
||
:: 仮想環境でPyInstallerを実行 | ||
poetry run pyinstaller --onefile --name radiko-recorder -c --hidden-import=radiko_recorder --upx-dir "%UPX_DIR%" -p ./radiko_recorder radiko_recorder/__main__.py | ||
|
||
if %ERRORLEVEL% NEQ 0 ( | ||
echo Build failed! | ||
pause | ||
exit /b 1 | ||
) | ||
|
||
echo Build complete! | ||
pause |
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,28 @@ | ||
#!/bin/bash | ||
|
||
echo "Build start..." | ||
|
||
# UPXのパスを取得 | ||
UPX_PATH=$(command -v upx) | ||
|
||
# UPXのパスが見つからない場合エラーを表示 | ||
if [ -z "$UPX_PATH" ]; then | ||
echo "Error: UPX not found in PATH." | ||
echo "Please ensure UPX is installed and its directory is in the PATH environment variable." | ||
exit 1 | ||
fi | ||
|
||
# UPXのディレクトリを取得 | ||
UPX_DIR=$(dirname "$UPX_PATH") | ||
echo "UPX Directory: $UPX_DIR" | ||
|
||
# Poetry仮想環境でPyInstallerを実行 | ||
poetry run pyinstaller --onefile --name radiko-recorder -c --hidden-import=radiko_recorder --upx-dir "$UPX_DIR" -p ./radiko_recorder radiko_recorder/__main__.py | ||
|
||
# ビルドが成功したかを確認 | ||
if [ $? -ne 0 ]; then | ||
echo "Build failed!" | ||
exit 1 | ||
fi | ||
|
||
echo "Build complete!" |
Oops, something went wrong.