-
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.
installer for full standalone executable now working.
- Loading branch information
1 parent
19bda1d
commit df44558
Showing
9 changed files
with
155 additions
and
15 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,46 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
block_cipher = None | ||
|
||
SITE_PACKAGES = 'C:/Users/Carson/miniconda3/envs/env_3d_beats/Lib/site-packages/' | ||
REPO_ROOT = 'C:/Users/Carson/code/hand_decision_trees' | ||
|
||
a = Analysis([REPO_ROOT + '/src/3d_bz.py'], | ||
pathex=[REPO_ROOT], | ||
binaries=[ (SITE_PACKAGES + 'glfw/glfw3.dll', '.') ], | ||
datas=[], | ||
hiddenimports=[], | ||
hookspath=[], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher, | ||
noarchive=False) | ||
pyz = PYZ(a.pure, a.zipped_data, | ||
cipher=block_cipher) | ||
|
||
exe = EXE(pyz, | ||
a.scripts, | ||
[], | ||
exclude_binaries=True, | ||
name='3d_bz', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
console=True, | ||
disable_windowed_traceback=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None ) | ||
coll = COLLECT(exe, | ||
a.binaries, | ||
a.zipfiles, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
name='3d_bz') |
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,30 @@ | ||
# run this to create an installer. | ||
# you must already have precompiled fatbins, and declare the model / config / fatbins you want to include | ||
# run this from the root of the repo. i.e. you should be running the command: ./installer/build_all.ps1 | ||
|
||
$pyi_build = './installer/pyi_build' | ||
$pyi_temp = './installer/pyi_temp' | ||
|
||
if (Test-Path $pyi_build) { Remove-Item -Recurse -Force $pyi_build } | ||
if (Test-Path $pyi_temp) { Remove-Item -Recurse -Force $pyi_temp } | ||
|
||
# use pyinstaller to assemble standalone binary (and many many DLLs and other libs) | ||
pyinstaller --workpath $pyi_temp --distpath $pyi_build ./installer/3d_bz.spec | ||
|
||
if (Test-Path $pyi_temp) { Remove-Item -Recurse -Force $pyi_temp } | ||
|
||
# you need Inno Setup (6) installed to make the installer! | ||
|
||
$model_dir = 'model' | ||
$model_cfg = 'model/model_cfg.json' | ||
$fatbin_dir = 'cuda_fatbin' | ||
|
||
&'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' ` | ||
make_windows_installer.iss ` | ||
/Dbuild_dir=$pyi_build/3d_bz ` | ||
/Dmodel_dir=$model_dir ` | ||
/Dmodel_cfg=$model_cfg ` | ||
/Dfatbin_dir=$fatbin_dir ` | ||
/DAPP_NAME=3d-beats ` | ||
/DAPP_VERSION=2.0 ` | ||
/Oinstaller |
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,54 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define PUBLISHER "Carson Swope" | ||
#define APP_EXE "3d_bz.exe" | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{E8E83B0A-4C84-458C-BA7B-CAEF3B56768B} | ||
AppName={#APP_NAME} | ||
AppVersion={#APP_VERSION} | ||
AppVerName={#APP_NAME} {#APP_VERSION} | ||
AppCopyright=Copyright (C) 2021 Carson Swope | ||
AppPublisher=Carson Swope | ||
AppPublisherURL=https://www.3d-beats.com/ | ||
DefaultDirName={autopf}\{#APP_NAME} | ||
DisableProgramGroupPage=yes | ||
; Install for current user, not system-wide | ||
PrivilegesRequired=lowest | ||
OutputBaseFilename={#APP_NAME}-setup-{#APP_VERSION} | ||
Compression=lzma | ||
SolidCompression=yes | ||
WizardStyle=modern | ||
VersionInfoVersion={#APP_VERSION} | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
|
||
[Files] | ||
Source: "{#build_dir}/*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs | ||
Source: "{#model_dir}/*"; DestDir: "{app}/{#model_dir}"; Flags: ignoreversion recursesubdirs | ||
Source: "{#fatbin_dir}/*"; DestDir: "{app}/{#fatbin_dir}"; Flags: ignoreversion recursesubdirs | ||
Source: "hand_config.json"; DestDir: "{app}"; Flags: ignoreversion | ||
|
||
[Dirs] | ||
Name: "{userappdata}\3d-beats" | ||
|
||
[UninstallDelete] | ||
Type: filesandordirs; Name: "{userappdata}\3d-beats" | ||
Type: filesandordirs; Name: "{app}" | ||
|
||
[Icons] | ||
; Name: "{app}\{#APP_NAME}"; Filename: "{app}\{#APP_NAME}" | ||
Name: "{app}\{#APP_NAME}"; Filename: "{app}\{#APP_EXE}"; \ | ||
Parameters: "-cfg {app}\{#model_cfg} --fatbin_in {app}\{#fatbin_dir}" | ||
Name: "{autoprograms}\{#APP_NAME}"; Filename: "{app}\{#APP_EXE}"; \ | ||
Parameters: "-cfg {app}\{#model_cfg} --fatbin_in {app}\{#fatbin_dir}" | ||
Name: "{autodesktop}\{#APP_NAME}"; Filename: "{app}\{#APP_EXE}"; \ | ||
Parameters: "-cfg {#model_cfg} --fatbin_in {#fatbin_dir}"; Tasks: desktopicon | ||
|
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ PyOpenGL==3.1.5 | |
pyrealsense2==2.44.0.3073 | ||
scipy==1.6.2 | ||
python-rtmidi==1.4.9 | ||
pyinstaller==4.5.1 |
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
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