Skip to content

Commit

Permalink
Dedicated Build Folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenithVal committed Feb 27, 2024
1 parent 0bb80b1 commit 48c2f20
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 77 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*build/
*dist/
*build/build
*build/dist
Build/OSCLeash.spec

Controllers/__pycache__/DataController.cpython-310.pyc
Controllers/__pycache__/PackageController.cpython-310.pyc
Controllers/__pycache__/ThreadController.cpython-310.pyc
Controllers/__pycache__/ThreadController.cpython-310.pyc
2 changes: 2 additions & 0 deletions Build/1 - Installer.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@REM This uses CX_Freeze to create an MSI installer file.
BuildInstaller.py bdist_msi
16 changes: 16 additions & 0 deletions Build/2 - SingleBinary.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@REM This uses pyinstaller to create a single binary executable. Adjust as needed for your system.

@REM get the repo path from current bat file location and go up one folder

@echo off
set REPO_PATH=%~dp0..
set ICON_PATH=%REPO_PATH%\Resources\VRChatOSCLeash.ico
set SCRIPT_PATH=%REPO_PATH%\OSCLeash.py
set BUILD_PATH=%REPO_PATH%\Build\dist

pyinstaller --noconfirm --onefile --console --icon "%ICON_PATH%" "%SCRIPT_PATH%"

@REM Don't need to keep this.
del "%REPO_PATH%\Build\OSCLeash.spec"

pause
145 changes: 71 additions & 74 deletions setup.py → Build/BuildInstaller.py
Original file line number Diff line number Diff line change
@@ -1,74 +1,71 @@
#new installer build script, using cx_freeze stable(6.15.x), and python 3.11 (3.12 should be supported in cx_freeze 6.16.x)
from cx_Freeze import setup, Executable
#change any area that says change me
#update items in "Summary_Data"
#update version numbers on new releases.

# Dependencies are automatically detected, but it might need
# fine tuning.
build_options = {'packages': [], 'excludes': []}

base = 'console'

#Create EXE and 2 shortcuts
executables = [
#Desktop ShortCut
Executable('OSCLeash.py',
base=base,
shortcut_name="OSCLeash",
shortcut_dir="DesktopFolder",
icon="Resources\VRChatOSCLeash.ico",
),
#StartMenu ShortCut
Executable('OSCLeash.py',
base=base,
shortcut_name="OSCLeash",
shortcut_dir="MyProgramMenu",
icon="Resources\VRChatOSCLeash.ico",
),
]

#not 100% sure what this is for, and idk if anything will break removing it
directory_table = [
("ProgramMenuFolder", "TARGETDIR", "."),
("MyProgramMenu", "ProgramMenuFolder", "MYPROG~1|My Program"),
]

#Data to show in win32_programs if, i understand correctly
msi_data = {
"Directory": directory_table,
"ProgId": [
("Prog.Id", "2.1.1", None, "VRChat OSC tool to move the player in the direction of a stretched Physbone", "IconId", None),
],
"Icon": [
("IconId", "Resources\VRChatOSCLeash.ico"),
],
}

#Values for the MSI installer file.
bdist_msi_options = {
#we dont need the exe callable via cmd without the fullpath
"add_to_path": False,
"data": msi_data,
#dont change this, this tells windows what version to remove when performing an upgrade
"upgrade_code": "{111834E6-DD67-4BD9-A402-A38A8424C39E}",
#this changes the icon in Add/Remove programs, sadly not the MSI it'self
"install_icon": "Resources\VRChatOSCLeash.ico",
#update the details tab in the MSI properties, these are the only values alloted
"summary_data": {
"author": "Various Authors",
"comments": "https://github.com/ZenithVal/OSCLeash/releases",
"keywords": "VRChat, OSC, Leash, OSCLeash",
},
}

#setting for the EXE, and options for python setup.py <options>
setup(name='OSCLeash',
version = '2.1.1',
description = 'VRChat OSC tool to move the player in the direction of a stretched Physbone',
license = "MIT License",
options = {
'build_exe': build_options,
'bdist_msi': bdist_msi_options,
},
executables = executables)
#Installer using cx_freeze stable(6.15.x), and python 3.11 (3.12 should be supported in cx_freeze 6.16.x)
from cx_Freeze import setup, Executable
#Update version numbers on new releases.

# Dependencies are automatically detected.
build_options = {'packages': [], 'excludes': []}

base = 'console'

# Create EXE and 2 shortcuts
executables = [
#Desktop ShortCut
Executable('..\OSCLeash.py',
base=base,
shortcut_name="OSCLeash",
shortcut_dir="DesktopFolder",
icon="..\Resources\VRChatOSCLeash.ico",
),
#StartMenu ShortCut
Executable('..\OSCLeash.py',
base=base,
shortcut_name="..\OSCLeash",
shortcut_dir="MyProgramMenu",
icon="..\Resources\VRChatOSCLeash.ico",
),
]

# Not 100% sure what this is for, and idk if anything will break removing it
directory_table = [
("ProgramMenuFolder", "TARGETDIR", "."),
("MyProgramMenu", "ProgramMenuFolder", "MYPROG~1|My Program"),
]

#Data to show in win32_programs?
msi_data = {
"Directory": directory_table,
"ProgId": [
("Prog.Id", "2.1.2", None, "VRChat OSC tool to move the player in the direction of a stretched Physbone", "IconId", None),
],
"Icon": [
("IconId", "..\Resources\VRChatOSCLeash.ico"),
],
}

#Values for the MSI installer file.
bdist_msi_options = {
#we dont need the exe callable via cmd without the fullpath
"add_to_path": False,
"data": msi_data,
#dont change this, this tells windows what version to remove when performing an upgrade
"upgrade_code": "{111834E6-DD67-4BD9-A402-A38A8424C39E}",
#this changes the icon in Add/Remove programs, sadly not the MSI it'self
"install_icon": "..\Resources\VRChatOSCLeash.ico",
#update the details tab in the MSI properties, these are the only values alloted
"summary_data": {
"author": "Various Authors",
"comments": "https://github.com/ZenithVal/OSCLeash/releases",
"keywords": "VRChat, OSC, Leash, OSCLeash",
},
}

# Setting for the EXE, and options for python setup.py <options>
setup(name='OSCLeash',
version = '2.1.2',
description = 'VRChat OSC tool to move the player in the direction of a stretched Physbone',
license = "MIT License",
options = {
'build_exe': build_options,
'bdist_msi': bdist_msi_options,
},
executables = executables)

0 comments on commit 48c2f20

Please sign in to comment.