Skip to content

Commit

Permalink
Add script
Browse files Browse the repository at this point in the history
  • Loading branch information
banesullivan committed Oct 16, 2023
1 parent d31c40a commit 4aa5eaa
Show file tree
Hide file tree
Showing 4 changed files with 1,103 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
- uses: vimtor/action-zip@v1.1
with:
files: dist/main
dest: doge.zip
dest: giva.zip

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Application
path: doge.zip
path: giva.zip
12 changes: 2 additions & 10 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ def resource_path(relative_path=""):
return os.path.join(base_path, relative_path)


DOGE_FILE = resource_path(os.path.join("assets", "doge.ply"))
ICON_FILE = resource_path(os.path.join(".", "icon.ico"))


class MyMainWindow(MainWindow):
def __init__(self, parent=None, show=True):
QtWidgets.QMainWindow.__init__(self, parent)
Expand Down Expand Up @@ -67,13 +63,9 @@ def __init__(self, parent=None, show=True):
self.show()


def add_data(plotter):
mesh = pv.read("sample.vtk")
plotter.add_mesh(mesh, show_edges=True)


if __name__ == "__main__":
from script import bind_to_plotter
app = QtWidgets.QApplication(sys.argv)
window = MyMainWindow()
add_data(window.plotter)
bind_to_plotter(window.plotter)
sys.exit(app.exec_())
11 changes: 3 additions & 8 deletions main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ dir_name = 'main'

added_files = []

# key goes (file to copy, path to move it to (relative to exe))
added_files.append(('assets/doge.ply', 'assets'))
added_files.append(('icon.ico', '.'))

a = Analysis(
["main.py"],
["main.py", "script.py"],
pathex=[],
binaries=[],
datas=added_files,
Expand All @@ -31,13 +27,12 @@ exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name="DogeViewer",
name="GIVAViewer",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
icon='icon.ico')
console=True,)

coll = COLLECT(exe,
a.binaries,
Expand Down
Loading

0 comments on commit 4aa5eaa

Please sign in to comment.