这是一个使用 Go 和 Fyne GUI 开发的音乐播放器。它能够将音频文件(例如 星座になれたら - 結束バンド)嵌入到编译后的可执行文件中,从而实现无需外部音频文件即可播放音乐的功能。
- 嵌入式音频: 音频文件直接嵌入到程序中,方便分发。
- 简单 GUI: 提供播放/暂停按钮和状态显示。
- 循环播放: 音乐播放完毕后会自动循环。
- Go 1.22 或更高版本
- Git (可选,用于克隆仓库)
- 克隆仓库 (如果尚未克隆):
git clone https://github.com/ra1nyxin/aPlayOne.git cd aPlayOne - 下载依赖:
go mod tidy
- 构建可执行文件:
这将在当前目录生成一个名为
go build -ldflags "-s -w" -o aPlay.exe main.goaPlay.exe(Windows) 或aPlay(Linux/macOS) 的可执行文件。
直接运行生成的可执行文件:
./aPlay.exe # Windows
./aPlay # Linux/macOSThis is a simple music player developed using Go language and Fyne GUI library. It can embed audio files (e.g., 星座になれたら - 結束バンド) directly into the compiled executable, allowing music playback without external audio files.
- Embedded Audio: Audio files are embedded directly into the application for easy distribution.
- Simple GUI: Provides play/pause button and status display.
- Loop Playback: Music will loop automatically after finishing.
- Go 1.22 or higher
- Git (Optional, for cloning the repository)
- Clone the repository (if not already cloned):
git clone https://github.com/ra1nyxin/aPlayOne.git cd aPlayOne - Download dependencies:
go mod tidy
- Build the executable:
This will generate an executable named
go build -ldflags "-s -w" -o aPlay.exe main.goaPlay.exe(Windows) oraPlay(Linux/macOS) in the current directory.
Execute the generated executable directly:
./aPlay.exe # Windows
./aPlay # Linux/macOS