Skip to content

Commit

Permalink
Move Tkinter gui to it's folder
Browse files Browse the repository at this point in the history
  • Loading branch information
MP3Martin committed Sep 17, 2022
1 parent be0ff12 commit 3cf5584
Show file tree
Hide file tree
Showing 141 changed files with 32 additions and 9 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build_tkinter_gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: gui-py-without-debug
path: gui.py
path: Tkinter_GUI/gui.py
build:
needs: [disable-debug]
runs-on: ${{ matrix.os }}
Expand All @@ -40,39 +40,49 @@ jobs:
with:
python-version: 3.7

- run: pip install -r requirements.txt pyinstaller
- run: pyinstaller gui.spec
- run: pip install -r Tkinter_GUI/requirements.txt pyinstaller
- name: Build using pyinstaller
run: |
cd Tkinter_GUI
pyinstaller gui.spec
cd ..
- name: ZIP Linux
if: ${{ runner.os == 'Linux' }}
run: |
cd Tkinter_GUI
mv dist/* dist/real_division_Tkinter-GUI-Linux-x64
cd dist/
zip real_division_Tkinter-GUI-Linux-x64.zip *
cd ..
cd ..
# rm -r dist/real_division_Tkinter-GUI-Linux-x64
- name: ZIP Windows
if: ${{ runner.os == 'Windows' }}
run: |
cd Tkinter_GUI
cd dist/
ren gui.exe real_division_Tkinter-GUI-Windows-x64.exe
7z a -tzip real_division_Tkinter-GUI-Windows-x64.zip *
# del real_division_Tkinter-GUI-Windows-x64.exe
cd ..
cd ..
- name: ZIP macOS
if: ${{ runner.os == 'macOS' }}
run: |
cd Tkinter_GUI
cd dist/
mv gui real_division_Tkinter-GUI-macOS-x64.app
zip real_division_Tkinter-GUI-macOS-x64.zip * -r
rm -r real_division_Tkinter-GUI-macOS-x64.app
cd ..
cd ..
- uses: softprops/action-gh-release@v1
with:
files: dist/*
files: Tkinter_GUI/dist/*
cleanup:
needs: [disable-debug, build]
runs-on: 'ubuntu-latest'
Expand Down
File renamed without changes.
21 changes: 17 additions & 4 deletions gui.py → Tkinter_GUI/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@
import tkinter as tk
from tkinter import ttk, messagebox
import tkinter.font as tkFont
import real_division_core as rdc
import sys
import os


sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
try:
import real_division_core as rdc
except:
#import failed
sys.path.pop()
import real_division_core as rdc
else:
#import suceeded
sys.path.pop()


import webbrowser
import re
from pathlib import Path
import os
import sys
# import sv_ttk
global can_calculate
global empty_content
Expand Down Expand Up @@ -242,7 +255,7 @@ def addFirstZero(input):
master.tk.call("source", str(themePath))
master.tk.call("set_theme", "dark")
except:
print("Could not load theme :/")
print("Could not load the theme :/")
master.after(500, lambda: messagebox.showerror("Error", "Could not load the theme :(\nYou can still use this program."))


Expand Down
2 changes: 1 addition & 1 deletion gui.spec → Tkinter_GUI/gui.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec_root = os.path.abspath(SPECPATH)
a = Analysis(['gui.py'],
pathex=[spec_root],
binaries=[],
datas=[ ( 'azure.tcl', '.' ), ('./theme/*.*', 'theme'), ('./theme/dark/*.*', 'theme/dark'), ('./theme/light/*.*', 'theme/light')],
datas=[ ( 'azure.tcl', '.' ), ('./theme/*.*', 'theme'), ('./theme/dark/*.*', 'theme/dark'), ('./theme/light/*.*', 'theme/light'), ('../real_division_core/*.*', 'real_division_core')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 3cf5584

Please sign in to comment.