-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Louis Cundari III edited this page Jan 22, 2023
·
2 revisions
Welcome to the DAQ-TA wiki!
How to create a new exe version.txt Instructions to create executable for Windows:
Instructions to create executable for Windows:
*When pasting commands, ensure you remove the quotes and rename the capitalized words to their corresponding needs (ex, PATH or PATH_OF_VENV).
1 pip install pyinstaller* 2. Create new virtual environment to store project a. Open CMD b) python -m PATH venv - change PATH to name or directory of folder c) Replace PATH_OF_VENV and paste: "cd PATH_OF_VENV" d) "cd Scripts" e) "activate.bat" f) "cd .." g) "pip install -r requirements.txt" - taken from the github page - or: "pip install PACKAGE_NAME"
- Copy/paste only the necessary code files into the folder + the logo.ico file
- With CMD still open, change FULL_PATH_TO_VENV to the folder path, then paste: "pyinstaller --windowed --onedir --add-data FULL_PATH_TO_VENV\lib\site-packages\customtkinter;customtkinter\ --icon="logo.ico" -n DAQ_TA gui_v2.py
- After a few minutes, a "build" and "dist" folder will be created. Open "dist" -> open "DAQ_TA"
- Copy/paste the "logo.ico" file into this folder
- Right click on "DAQ_TA.exe" -> click "Create shortcut"
- Move this shortcut into the "dist" folder
- Rename the shortcut file to say only "DAQ_TA.exe"
- Launch the shortcut file.