mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
Merge pull request #46 from fhilipecrash/build/generate-python-exe-with-cx-freeze
Build/change pyinstaller with cx_freeze
This commit is contained in:
commit
f8d6375126
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -47,8 +47,8 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Build with pyinstaller
|
||||
run: pyinstaller torrent-client/main.py --distpath resources/dist --icon=images/icon.ico -n hydra-download-manager
|
||||
- name: Build with cx_Freeze
|
||||
run: python torrent-client/setup.py build
|
||||
|
||||
- name: Publish
|
||||
run: yarn run publish
|
||||
|
@ -66,7 +66,7 @@ yarn start
|
||||
Build the bittorrent client by using this command:
|
||||
|
||||
```bash
|
||||
pyinstaller torrent-client/main.py --distpath resources/dist --icon=images/icon.ico -n hydra-download-manager
|
||||
python torrent-client/setup.py build
|
||||
```
|
||||
|
||||
### Build the Electron application
|
||||
|
@ -13,6 +13,16 @@ import { ElectronegativityPlugin } from "@electron-forge/plugin-electronegativit
|
||||
import { mainConfig } from "./webpack.main.config";
|
||||
import { rendererConfig } from "./webpack.renderer.config";
|
||||
|
||||
const linuxPkgConfig = {
|
||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||
bin: "./Hydra",
|
||||
desktopTemplate: "./hydra-launcher.desktop",
|
||||
icon: "images/icon.png",
|
||||
genericName: "Games Launcher",
|
||||
name: "hydra-launcher",
|
||||
productName: "Hydra"
|
||||
};
|
||||
|
||||
const config: ForgeConfig = {
|
||||
packagerConfig: {
|
||||
asar: true,
|
||||
@ -40,16 +50,10 @@ const config: ForgeConfig = {
|
||||
}),
|
||||
new MakerZIP({}, ["darwin", "linux"]),
|
||||
new MakerRpm({
|
||||
options: {
|
||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||
bin: "./Hydra",
|
||||
},
|
||||
options: linuxPkgConfig
|
||||
}),
|
||||
new MakerDeb({
|
||||
options: {
|
||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||
bin: "./Hydra",
|
||||
},
|
||||
options: linuxPkgConfig
|
||||
}),
|
||||
],
|
||||
publishers: [
|
||||
|
11
hydra-launcher.desktop
Normal file
11
hydra-launcher.desktop
Normal file
@ -0,0 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Name=Hydra
|
||||
Comment=No bullshit. Just play.
|
||||
GenericName=Games Launcher
|
||||
Exec=hydra-launcher %U
|
||||
Icon=hydra-launcher
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;Utility;
|
||||
MimeType=x-scheme-handler/hydralauncher;
|
||||
StartupWMClass=Hydra
|
@ -1,3 +1,5 @@
|
||||
libtorrent
|
||||
pyinstaller
|
||||
cx_Freeze
|
||||
cx_Logging; sys_platform == 'win32'
|
||||
lief; sys_platform == 'win32'
|
||||
pywin32; sys_platform == 'win32'
|
||||
|
16
torrent-client/setup.py
Normal file
16
torrent-client/setup.py
Normal file
@ -0,0 +1,16 @@
|
||||
from cx_Freeze import setup, Executable
|
||||
|
||||
# Dependencies are automatically detected, but it might need fine tuning.
|
||||
build_exe_options = {
|
||||
"packages": ["libtorrent"],
|
||||
"build_exe": "resources/dist/hydra-download-manager",
|
||||
"include_msvcr": True
|
||||
}
|
||||
|
||||
setup(
|
||||
name="hydra-download-manager",
|
||||
version="0.1",
|
||||
description="Hydra Torrent Client",
|
||||
options={"build_exe": build_exe_options},
|
||||
executables=[Executable("torrent-client/main.py", target_name="hydra-download-manager")]
|
||||
)
|
Loading…
Reference in New Issue
Block a user