VIStk 0.3.7__tar.gz → 0.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of VIStk might be problematic. Click here for more details.
- vistk-0.3.8/.vscode/c_cpp_properties.json +18 -0
- vistk-0.3.8/.vscode/launch.json +24 -0
- vistk-0.3.8/.vscode/settings.json +59 -0
- {vistk-0.3.7/VIStk.egg-info → vistk-0.3.8}/PKG-INFO +1 -1
- {vistk-0.3.7 → vistk-0.3.8}/VIS/Templates/spec.txt +2 -2
- vistk-0.3.8/VIS/Templates/version.txt +30 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIS/VIS.py +5 -7
- {vistk-0.3.7 → vistk-0.3.8}/VIS/project.py +97 -19
- vistk-0.3.8/VIS/release.py +158 -0
- {vistk-0.3.7 → vistk-0.3.8/VIStk.egg-info}/PKG-INFO +1 -1
- {vistk-0.3.7 → vistk-0.3.8}/VIStk.egg-info/SOURCES.txt +4 -0
- {vistk-0.3.7 → vistk-0.3.8}/changelog.md +22 -2
- vistk-0.3.8/documentation.md +67 -0
- {vistk-0.3.7 → vistk-0.3.8}/knownissues.md +0 -3
- {vistk-0.3.7 → vistk-0.3.8}/pyproject.toml +1 -1
- vistk-0.3.7/VIS/release.py +0 -107
- vistk-0.3.7/documentation.md +0 -3
- {vistk-0.3.7 → vistk-0.3.8}/.github/workflows/publish.yml +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/.gitignore +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/Form/Icons/VIS.ico +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/Form/README.txt +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/Form/Screens/__init__.py +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/Form/Screens/root.py +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/Form/Screens/styles.py +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/Form/modules/__init__.py +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/LICENSE +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/README.md +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/Untitled.xcf +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIS/Form.zip +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIS/Templates/collect.txt +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIS/Templates/f_element.txt +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIS/Templates/screen.txt +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIS/__init__.py +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIS/__pycache__/__init__.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIS/menu.py +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIStk.egg-info/dependency_links.txt +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIStk.egg-info/entry_points.txt +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIStk.egg-info/requires.txt +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/VIStk.egg-info/top_level.txt +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/VIS.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/__init__.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/cleanup.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/elements.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/menu.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/patch.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/project.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/screen.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/__pycache__/stitch.cpython-313.pyc +0 -0
- {vistk-0.3.7 → vistk-0.3.8}/setup.cfg +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"configurations": [
|
|
3
|
+
{
|
|
4
|
+
"name": "windows-gcc-x64",
|
|
5
|
+
"includePath": [
|
|
6
|
+
"${workspaceFolder}/**"
|
|
7
|
+
],
|
|
8
|
+
"compilerPath": "gcc",
|
|
9
|
+
"cStandard": "${default}",
|
|
10
|
+
"cppStandard": "${default}",
|
|
11
|
+
"intelliSenseMode": "windows-gcc-x64",
|
|
12
|
+
"compilerArgs": [
|
|
13
|
+
""
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"version": 4
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "C/C++ Runner: Debug Session",
|
|
6
|
+
"type": "cppdbg",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"args": [],
|
|
9
|
+
"stopAtEntry": false,
|
|
10
|
+
"externalConsole": true,
|
|
11
|
+
"cwd": "c:/Users/bmiCAD/Documents/Visual_Interfacing_Structure/VIS/Templates",
|
|
12
|
+
"program": "c:/Users/bmiCAD/Documents/Visual_Interfacing_Structure/VIS/Templates/build/Debug/outDebug",
|
|
13
|
+
"MIMode": "gdb",
|
|
14
|
+
"miDebuggerPath": "gdb",
|
|
15
|
+
"setupCommands": [
|
|
16
|
+
{
|
|
17
|
+
"description": "Enable pretty-printing for gdb",
|
|
18
|
+
"text": "-enable-pretty-printing",
|
|
19
|
+
"ignoreFailures": true
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"C_Cpp_Runner.cCompilerPath": "gcc",
|
|
3
|
+
"C_Cpp_Runner.cppCompilerPath": "g++",
|
|
4
|
+
"C_Cpp_Runner.debuggerPath": "gdb",
|
|
5
|
+
"C_Cpp_Runner.cStandard": "",
|
|
6
|
+
"C_Cpp_Runner.cppStandard": "",
|
|
7
|
+
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build/vcvarsall.bat",
|
|
8
|
+
"C_Cpp_Runner.useMsvc": false,
|
|
9
|
+
"C_Cpp_Runner.warnings": [
|
|
10
|
+
"-Wall",
|
|
11
|
+
"-Wextra",
|
|
12
|
+
"-Wpedantic",
|
|
13
|
+
"-Wshadow",
|
|
14
|
+
"-Wformat=2",
|
|
15
|
+
"-Wcast-align",
|
|
16
|
+
"-Wconversion",
|
|
17
|
+
"-Wsign-conversion",
|
|
18
|
+
"-Wnull-dereference"
|
|
19
|
+
],
|
|
20
|
+
"C_Cpp_Runner.msvcWarnings": [
|
|
21
|
+
"/W4",
|
|
22
|
+
"/permissive-",
|
|
23
|
+
"/w14242",
|
|
24
|
+
"/w14287",
|
|
25
|
+
"/w14296",
|
|
26
|
+
"/w14311",
|
|
27
|
+
"/w14826",
|
|
28
|
+
"/w44062",
|
|
29
|
+
"/w44242",
|
|
30
|
+
"/w14905",
|
|
31
|
+
"/w14906",
|
|
32
|
+
"/w14263",
|
|
33
|
+
"/w44265",
|
|
34
|
+
"/w14928"
|
|
35
|
+
],
|
|
36
|
+
"C_Cpp_Runner.enableWarnings": true,
|
|
37
|
+
"C_Cpp_Runner.warningsAsError": false,
|
|
38
|
+
"C_Cpp_Runner.compilerArgs": [],
|
|
39
|
+
"C_Cpp_Runner.linkerArgs": [],
|
|
40
|
+
"C_Cpp_Runner.includePaths": [],
|
|
41
|
+
"C_Cpp_Runner.includeSearch": [
|
|
42
|
+
"*",
|
|
43
|
+
"**/*"
|
|
44
|
+
],
|
|
45
|
+
"C_Cpp_Runner.excludeSearch": [
|
|
46
|
+
"**/build",
|
|
47
|
+
"**/build/**",
|
|
48
|
+
"**/.*",
|
|
49
|
+
"**/.*/**",
|
|
50
|
+
"**/.vscode",
|
|
51
|
+
"**/.vscode/**"
|
|
52
|
+
],
|
|
53
|
+
"C_Cpp_Runner.useAddressSanitizer": false,
|
|
54
|
+
"C_Cpp_Runner.useUndefinedSanitizer": false,
|
|
55
|
+
"C_Cpp_Runner.useLeakSanitizer": false,
|
|
56
|
+
"C_Cpp_Runner.showCompilationTime": false,
|
|
57
|
+
"C_Cpp_Runner.useLinkTimeOptimization": false,
|
|
58
|
+
"C_Cpp_Runner.msvcSecureNoWarnings": false
|
|
59
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UTF-8
|
|
2
|
+
|
|
3
|
+
VSVersionInfo(
|
|
4
|
+
ffi=FixedFileInfo(
|
|
5
|
+
filevers=($sM$,$sm$,$sp$,0),
|
|
6
|
+
prodvers=($M$,$m$,$p$,0),
|
|
7
|
+
mask=0x3f,
|
|
8
|
+
flags=0x0,
|
|
9
|
+
OS=0x40004,
|
|
10
|
+
fileType=0x1,
|
|
11
|
+
subtype=0x0,
|
|
12
|
+
date=(0, 0)
|
|
13
|
+
),
|
|
14
|
+
kids=[
|
|
15
|
+
StringFileInfo(
|
|
16
|
+
[
|
|
17
|
+
StringTable(
|
|
18
|
+
u'040904B0',
|
|
19
|
+
[StringStruct(u'CompanyName', u'$company$'),
|
|
20
|
+
StringStruct(u'FileDescription', u'$desc$'),
|
|
21
|
+
StringStruct(u'FileVersion', u'$sM$.$sm$.$sp$'),
|
|
22
|
+
StringStruct(u'InternalName', u'$title$-$name$'),
|
|
23
|
+
StringStruct(u'LegalCopyright', u'Copyright © $year$ $company$'),
|
|
24
|
+
StringStruct(u'OriginalFilename', u'$name$.exe'),
|
|
25
|
+
StringStruct(u'ProductName', u'$name$'),
|
|
26
|
+
StringStruct(u'ProductVersion', u'$M$.$m$.$p$')])
|
|
27
|
+
]),
|
|
28
|
+
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
|
|
29
|
+
]
|
|
30
|
+
)
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
import os
|
|
3
3
|
import zipfile
|
|
4
|
-
import subprocess
|
|
5
|
-
import shutil
|
|
6
4
|
from VIS.project import *
|
|
7
5
|
from importlib import metadata
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
from VIS.release import newRelease
|
|
11
7
|
|
|
12
8
|
inp = sys.argv
|
|
13
9
|
print(f"VIS Version {metadata.version("VIStk")}")
|
|
@@ -51,5 +47,7 @@ def __main__():
|
|
|
51
47
|
print("Screen does not exist")
|
|
52
48
|
|
|
53
49
|
case "release" | "Release" | "r" | "R":
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
if len(inp) == 4:
|
|
51
|
+
newRelease(inp[2],inp[3])
|
|
52
|
+
else:
|
|
53
|
+
newRelease(inp[2])
|
|
@@ -76,16 +76,37 @@ class VINFO():
|
|
|
76
76
|
#DO NOT MESS WITH THE TEMPLATE HEADERS
|
|
77
77
|
|
|
78
78
|
title = input("Enter a name for the VIS project: ")
|
|
79
|
-
|
|
79
|
+
self.title = title
|
|
80
80
|
info = {}
|
|
81
|
-
info[title] = {}
|
|
82
|
-
info[title]["Screens"]={}
|
|
83
|
-
info[title]["defaults"]={}
|
|
84
|
-
info[title]["defaults"]["icon"]="VIS"#default icon
|
|
81
|
+
info[self.title] = {}
|
|
82
|
+
info[self.title]["Screens"]={}
|
|
83
|
+
info[self.title]["defaults"]={}
|
|
84
|
+
info[self.title]["defaults"]["icon"]="VIS"#default icon
|
|
85
|
+
self.d_icon = "VIS"
|
|
86
|
+
self[self.title]["metadata"]={}
|
|
87
|
+
comp = input("What company is this for(or none)? ")
|
|
88
|
+
if not comp in ["none","None"]:
|
|
89
|
+
info[self.title]["metadata"]["company"] = comp
|
|
90
|
+
self.company = comp
|
|
91
|
+
else:
|
|
92
|
+
info[self.title]["metadata"]["company"] = None
|
|
93
|
+
self.company = None
|
|
94
|
+
|
|
95
|
+
version = input("What is the initial version for the project (0.0.1 default): ")
|
|
96
|
+
vers = version.split(".")
|
|
97
|
+
if len(vers)==3:
|
|
98
|
+
if vers[0].isnumeric() and vers[1].isnumeric() and vers[2].isnumeric():
|
|
99
|
+
self.version = version
|
|
100
|
+
else:
|
|
101
|
+
self.version = "0.0.1"
|
|
102
|
+
else:
|
|
103
|
+
self.version = "0.0.1"
|
|
104
|
+
info[self.title]["metadata"]["version"] = self.version
|
|
105
|
+
|
|
85
106
|
with open(wd+"/.VIS/project.json","w") as f:
|
|
86
107
|
f.write("{}")
|
|
87
108
|
json.dump(info,f,indent=4)
|
|
88
|
-
print(f"Setup project.json for project {title} in {wd}/.VIS/")
|
|
109
|
+
print(f"Setup project.json for project {self.title} in {wd}/.VIS/")
|
|
89
110
|
|
|
90
111
|
|
|
91
112
|
#Need to get current python location where VIS is installed
|
|
@@ -95,39 +116,73 @@ class VINFO():
|
|
|
95
116
|
self.p_project = getPath()
|
|
96
117
|
self.p_vinfo = self.p_project + "/.VIS"
|
|
97
118
|
self.p_sinfo = self.p_vinfo + "/project.json"
|
|
98
|
-
with open(self.p_sinfo,"r") as f:
|
|
119
|
+
with open(self.p_sinfo,"r") as f:
|
|
120
|
+
info = json.load(f)
|
|
121
|
+
self.title = list(info.keys())[0]
|
|
122
|
+
self.version = info[self.title]["metadata"]["version"]
|
|
123
|
+
self.company = info[self.title]["metadata"]["company"]
|
|
124
|
+
|
|
125
|
+
self.screenlist = []
|
|
99
126
|
self.p_screens = self.p_project +"/Screens"
|
|
100
127
|
self.p_modules = self.p_project +"/modules"
|
|
101
128
|
self.p_templates = self.p_vinfo + "/Templates"
|
|
102
|
-
self.
|
|
129
|
+
self.p_icons = self.p_project + "/Icons"
|
|
130
|
+
self.p_images = self.p_project + "/Images"
|
|
131
|
+
|
|
132
|
+
def setVersion(self,version:str):
|
|
133
|
+
"""Sets a new project version
|
|
134
|
+
"""
|
|
135
|
+
with open(self.p_sinfo,"r") as f:
|
|
136
|
+
info = json.load(f)
|
|
137
|
+
|
|
138
|
+
info[self.title]["metadata"]["version"] = version
|
|
139
|
+
|
|
140
|
+
with open(self.p_sinfo,"w") as f:
|
|
141
|
+
json.dump(info,f,indent=4)
|
|
142
|
+
|
|
103
143
|
|
|
104
144
|
class Screen(VINFO):
|
|
105
145
|
"""A VIS screen object
|
|
106
146
|
"""
|
|
107
|
-
def __init__(self,name:str,script:str,release:bool=False,icon:str=None,exists:bool=True):
|
|
147
|
+
def __init__(self,name:str,script:str,release:bool=False,icon:str=None,exists:bool=True,desc:str=None):
|
|
108
148
|
super().__init__()
|
|
109
149
|
self.name=name
|
|
110
150
|
self.script=script
|
|
111
151
|
self.release=release
|
|
112
152
|
self.icon=icon
|
|
113
|
-
self.path = self.p_screens+"/"+name
|
|
114
|
-
self.m_path = self.p_modules+"/"+name
|
|
153
|
+
self.path = self.p_screens+"/"+self.name
|
|
154
|
+
self.m_path = self.p_modules+"/"+self.name
|
|
115
155
|
|
|
116
156
|
if not exists:
|
|
117
157
|
with open(self.p_sinfo,"r") as f:
|
|
118
158
|
info = json.load(f)
|
|
119
159
|
|
|
120
|
-
info[self.title]["Screens"][name] = {"script":script,"release":release}
|
|
160
|
+
info[self.title]["Screens"][self.name] = {"script":script,"release":release}
|
|
121
161
|
if not icon == None:
|
|
122
|
-
info[self.title]["Screens"][name]["icon"] = icon
|
|
162
|
+
info[self.title]["Screens"][self.name]["icon"] = icon
|
|
163
|
+
|
|
164
|
+
if not desc == None:
|
|
165
|
+
info[self.title]["Screens"][self.name]["desc"] = desc
|
|
166
|
+
else:
|
|
167
|
+
info[self.title]["Screens"][self.name]["desc"] = "A VIS Created Executable"
|
|
168
|
+
|
|
169
|
+
info[self.title]["Screens"][self.name]["version"] = "1.0.0"#always making first major version of screen
|
|
170
|
+
|
|
171
|
+
info[self.title]["Screens"][self.name]["current"] = None#always making first major version of screen
|
|
123
172
|
|
|
124
173
|
with open(self.p_sinfo,"w") as f:
|
|
125
174
|
json.dump(info,f,indent=4)
|
|
126
175
|
|
|
127
176
|
shutil.copyfile(self.p_templates+"/screen.txt",self.p_project+"/"+script)
|
|
128
|
-
os.mkdir(self.p_screens+"/"+name)
|
|
129
|
-
os.mkdir(self.p_modules+"/"+name)
|
|
130
|
-
|
|
177
|
+
os.mkdir(self.p_screens+"/"+self.name)
|
|
178
|
+
os.mkdir(self.p_modules+"/"+self.name)
|
|
179
|
+
|
|
180
|
+
with open(self.p_sinfo,"r") as f:
|
|
181
|
+
info = json.load(f)
|
|
182
|
+
self.desc = info[self.title]["Screens"][self.name]["desc"]
|
|
183
|
+
self.s_version = info[self.title]["Screens"][self.name]["version"]
|
|
184
|
+
self.current = info[self.title]["Screens"][self.name]["current"]
|
|
185
|
+
|
|
131
186
|
|
|
132
187
|
def addElement(self,element:str) -> int:
|
|
133
188
|
if validName(element):
|
|
@@ -195,7 +250,27 @@ class Screen(VINFO):
|
|
|
195
250
|
print("Stitched: ")
|
|
196
251
|
for i in stitched:
|
|
197
252
|
print(f"\t{i} to {self.name}")
|
|
198
|
-
|
|
253
|
+
|
|
254
|
+
def syncVersion(self) -> int:
|
|
255
|
+
"""Syncs the version stored in sinfo with the version in memory
|
|
256
|
+
"""
|
|
257
|
+
with open(self.p_sinfo,"r") as f:
|
|
258
|
+
info = json.load(f)
|
|
259
|
+
info[self.title]["Screens"][self.name]["current"] = self.current
|
|
260
|
+
with open(self.p_sinfo,"w") as f:
|
|
261
|
+
json.dump(info,f)
|
|
262
|
+
return 1
|
|
263
|
+
|
|
264
|
+
def crntVersion(self) -> int:
|
|
265
|
+
"""Checks if the version needs to be synced and returns 1 if its synced
|
|
266
|
+
"""
|
|
267
|
+
if not self.s_version == self.current:
|
|
268
|
+
self.current = self.version
|
|
269
|
+
self.syncVersion()
|
|
270
|
+
return 1
|
|
271
|
+
else:
|
|
272
|
+
return 0
|
|
273
|
+
|
|
199
274
|
|
|
200
275
|
class Project(VINFO):
|
|
201
276
|
"""VIS Project Object
|
|
@@ -212,8 +287,10 @@ class Project(VINFO):
|
|
|
212
287
|
scr = Screen(screen,
|
|
213
288
|
info[self.name]["Screens"][screen]["script"],
|
|
214
289
|
info[self.name]["Screens"][screen]["release"],
|
|
215
|
-
info[self.name]["Screens"][screen].get("icon")
|
|
290
|
+
info[self.name]["Screens"][screen].get("icon"),
|
|
291
|
+
exists=True)
|
|
216
292
|
self.screenlist.append(scr)
|
|
293
|
+
self.d_icon = info[self.name]["defaults"]["icon"]
|
|
217
294
|
|
|
218
295
|
def newScreen(self,screen:str) -> int:
|
|
219
296
|
"""Creates a new screen with some prompting
|
|
@@ -248,7 +325,8 @@ class Project(VINFO):
|
|
|
248
325
|
release = False
|
|
249
326
|
ictf =input("What is the icon for this screen (or none)?: ")
|
|
250
327
|
icon = ictf.strip(".ico") if ".ICO" in ictf.upper() else None
|
|
251
|
-
|
|
328
|
+
desc = input("Write a description for this screen: ")
|
|
329
|
+
self.screenlist.append(Screen(screen,script,release,icon,False,desc))
|
|
252
330
|
|
|
253
331
|
return 1
|
|
254
332
|
else:
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
from VIS.project import *
|
|
2
|
+
import subprocess
|
|
3
|
+
import shutil
|
|
4
|
+
from os.path import exists
|
|
5
|
+
import time
|
|
6
|
+
import datetime
|
|
7
|
+
|
|
8
|
+
info = {}
|
|
9
|
+
project = Project()
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def build(version:str=""):
|
|
13
|
+
"""Build project spec file with specific version
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
print(f"Creating project.spec for {project.name}")
|
|
17
|
+
|
|
18
|
+
with open(project.p_vinfo+"/Templates/spec.txt","r") as f:
|
|
19
|
+
spec = f.read()
|
|
20
|
+
with open(project.p_vinfo+"/Templates/collect.txt","r") as f:
|
|
21
|
+
collect = f.read()
|
|
22
|
+
|
|
23
|
+
spec_list = []
|
|
24
|
+
name_list = []
|
|
25
|
+
os.mkdir(project.p_vinfo+"/Build")
|
|
26
|
+
for i in project.screenlist:
|
|
27
|
+
if i.release:
|
|
28
|
+
name_list.append(i.name)
|
|
29
|
+
if not i.icon == None:
|
|
30
|
+
icon = i.icon
|
|
31
|
+
else:
|
|
32
|
+
icon = project.d_icon
|
|
33
|
+
spec_list.append(spec.replace("$name$",i.name))
|
|
34
|
+
spec_list[len(spec_list)-1] = spec_list[len(spec_list)-1].replace("$icon$",icon)
|
|
35
|
+
spec_list[len(spec_list)-1] = spec_list[len(spec_list)-1].replace("$file$",i.script)
|
|
36
|
+
|
|
37
|
+
#build metadata
|
|
38
|
+
with open(project.p_templates+"/version.txt","r") as f:
|
|
39
|
+
meta = f.read()
|
|
40
|
+
|
|
41
|
+
#Update Overall Project Version
|
|
42
|
+
vers = project.version.split(".")
|
|
43
|
+
major = vers[0]
|
|
44
|
+
minor = vers[1]
|
|
45
|
+
patch = vers[2]
|
|
46
|
+
meta = meta.replace("$M$",major)
|
|
47
|
+
meta = meta.replace("$m$",minor)
|
|
48
|
+
meta = meta.replace("$p$",patch)
|
|
49
|
+
|
|
50
|
+
#Update Screen Version
|
|
51
|
+
vers = i.s_version.split(".")
|
|
52
|
+
major = vers[0]
|
|
53
|
+
minor = vers[1]
|
|
54
|
+
patch = vers[2]
|
|
55
|
+
meta = meta.replace("$sM$",major)
|
|
56
|
+
meta = meta.replace("$sm$",minor)
|
|
57
|
+
meta = meta.replace("$sp$",patch)
|
|
58
|
+
|
|
59
|
+
if project.company != None:
|
|
60
|
+
meta = meta.replace("$company$",project.company)
|
|
61
|
+
meta = meta.replace("$year$",str(datetime.datetime.now().year))
|
|
62
|
+
else:
|
|
63
|
+
meta = meta.replace(" VALUE \"CompanyName\", VER_COMPANYNAME_STR\n","")
|
|
64
|
+
meta = meta.replace(" VALUE \"LegalCopyright\", VER_LEGALCOPYRIGHT_STR\n","")
|
|
65
|
+
meta = meta.replace("#define VER_LEGAL_COPYRIGHT_STR \"Copyright © $year$ $company$\\0\"\n\n","")
|
|
66
|
+
meta = meta.replace("$name$",i.name)
|
|
67
|
+
meta = meta.replace("$desc$",i.desc)
|
|
68
|
+
|
|
69
|
+
with open(project.p_vinfo+f"/Build/{i.name}.txt","w") as f:
|
|
70
|
+
f.write(meta)
|
|
71
|
+
spec_list[len(spec_list)-1] = spec_list[len(spec_list)-1].replace("$meta$",project.p_vinfo+f"/Build/{i.name}.txt")
|
|
72
|
+
spec_list.append("\n\n")
|
|
73
|
+
|
|
74
|
+
insert = ""
|
|
75
|
+
for i in name_list:
|
|
76
|
+
insert=insert+"\n\t"+i+"_exe,\n\t"+i+"_a.binaries,\n\t"+i+"_a.zipfiles,\n\t"+i+"_a.datas,"
|
|
77
|
+
collect = collect.replace("$insert$",insert)
|
|
78
|
+
collect = collect.replace("$version$",project.name+"-"+version) if not version == "" else collect.replace("$version$",project.name)
|
|
79
|
+
|
|
80
|
+
header = "# -*- mode: python ; coding: utf-8 -*-\n\n\n"
|
|
81
|
+
|
|
82
|
+
with open(project.p_vinfo+"/project.spec","w") as f:
|
|
83
|
+
f.write(header)
|
|
84
|
+
with open(project.p_vinfo+"/project.spec","a") as f:
|
|
85
|
+
f.writelines(spec_list)
|
|
86
|
+
f.write(collect)
|
|
87
|
+
|
|
88
|
+
print(f"Finished creating project.spec for {project.title} {version if not version =="" else "current"}")#advanced version will improve this
|
|
89
|
+
|
|
90
|
+
def clean(version:str=" "):
|
|
91
|
+
"""Cleans up build environment to save space
|
|
92
|
+
"""
|
|
93
|
+
print("Cleaning up build environment")
|
|
94
|
+
project=Project()
|
|
95
|
+
shutil.rmtree(project.p_vinfo+"/Build")
|
|
96
|
+
print("Appending Screen Data To Environment")
|
|
97
|
+
if version == " ":
|
|
98
|
+
if exists(f"{project.p_project}/dist/{project.title}/Icons/"): shutil.rmtree(f"{project.p_project}/dist/{project.title}/Icons/")
|
|
99
|
+
if exists(f"{project.p_project}/dist/{project.title}/Images/"): shutil.rmtree(f"{project.p_project}/dist/{project.title}/Images/")
|
|
100
|
+
shutil.copytree(project.p_project+"/Icons/",f"{project.p_project}/dist/{project.title}/Icons/",dirs_exist_ok=True)
|
|
101
|
+
shutil.copytree(project.p_project+"/Images/",f"{project.p_project}/dist/{project.title}/Images/",dirs_exist_ok=True)
|
|
102
|
+
else:
|
|
103
|
+
if exists(f"{project.p_project}/dist/{project.title}/Icons/"): shutil.rmtree(f"{project.p_project}/dist/{project.name}/Icons/")
|
|
104
|
+
if exists(f"{project.p_project}/dist/{project.title}/Images/"): shutil.rmtree(f"{project.p_project}/dist/{project.name}/Images/")
|
|
105
|
+
shutil.copytree(project.p_project+"/Icons/",f"{project.p_project}/dist/{project.title}-{version.strip(" ")}/Icons/",dirs_exist_ok=True)
|
|
106
|
+
shutil.copytree(project.p_project+"/Images/",f"{project.p_project}/dist/{project.title}-{version.strip(" ")}/Images/",dirs_exist_ok=True)
|
|
107
|
+
print(f"\n\nReleased new{version}build of {project.title}!")
|
|
108
|
+
|
|
109
|
+
def newVersion(version:str):
|
|
110
|
+
"""Updates the project version, permanent, cannot be undone
|
|
111
|
+
"""
|
|
112
|
+
project = VINFO()
|
|
113
|
+
old = str(project.version)
|
|
114
|
+
vers = project.version.split(".")
|
|
115
|
+
if version == "Major":
|
|
116
|
+
vers[0] = str(int(vers[0])+1)
|
|
117
|
+
vers[1] = str(0)
|
|
118
|
+
vers[2] = str(0)
|
|
119
|
+
if version == "Minor":
|
|
120
|
+
vers[1] = str(int(vers[1])+1)
|
|
121
|
+
vers[2] = str(0)
|
|
122
|
+
if version == "Patch":
|
|
123
|
+
vers[2] = str(int(vers[2])+1)
|
|
124
|
+
|
|
125
|
+
project.setVersion(f"{vers[0]}.{vers[1]}.{vers[2]}")
|
|
126
|
+
project = VINFO()
|
|
127
|
+
print(f"Updated Version {old}=>{project.version}")
|
|
128
|
+
|
|
129
|
+
def newRelease(version,type:str="Patch"):
|
|
130
|
+
"""Releases a version of your project
|
|
131
|
+
"""
|
|
132
|
+
match version:
|
|
133
|
+
case "a":
|
|
134
|
+
build("alpha")
|
|
135
|
+
subprocess.call(f"pyinstaller {project.p_vinfo}/project.spec --noconfirm --distpath {project.p_project}/dist/ --log-level FATAL")
|
|
136
|
+
clean(" alpha ")
|
|
137
|
+
case "b":
|
|
138
|
+
build("beta")
|
|
139
|
+
subprocess.call(f"pyinstaller {project.p_vinfo}/project.spec --noconfirm --distpath {project.p_project}/dist/ --log-level FATAL")
|
|
140
|
+
clean(" beta ")
|
|
141
|
+
case "c":
|
|
142
|
+
newVersion(type)
|
|
143
|
+
build()
|
|
144
|
+
subprocess.call(f"pyinstaller {project.p_vinfo}/project.spec --noconfirm --distpath {project.p_project}/dist/ --log-level FATAL")
|
|
145
|
+
clean()
|
|
146
|
+
case "sync":
|
|
147
|
+
build("alpha")
|
|
148
|
+
subprocess.call(f"pyinstaller {project.p_vinfo}/project.spec --noconfirm --distpath {project.p_project}/dist/ --log-level FATAL")
|
|
149
|
+
clean(" alpha ")
|
|
150
|
+
build("beta")
|
|
151
|
+
subprocess.call(f"pyinstaller {project.p_vinfo}/project.spec --noconfirm --distpath {project.p_project}/dist/ --log-level FATAL")
|
|
152
|
+
clean(" beta ")
|
|
153
|
+
build()
|
|
154
|
+
subprocess.call(f"pyinstaller {project.p_vinfo}/project.spec --noconfirm --distpath {project.p_project}/dist/ --log-level FATAL")
|
|
155
|
+
clean()
|
|
156
|
+
print("\t- alpha\n\t- beta\n\t- current")
|
|
157
|
+
case _:
|
|
158
|
+
print(f"Could not release Project Version {version}")
|
|
@@ -7,6 +7,9 @@ documentation.md
|
|
|
7
7
|
knownissues.md
|
|
8
8
|
pyproject.toml
|
|
9
9
|
.github/workflows/publish.yml
|
|
10
|
+
.vscode/c_cpp_properties.json
|
|
11
|
+
.vscode/launch.json
|
|
12
|
+
.vscode/settings.json
|
|
10
13
|
Form/README.txt
|
|
11
14
|
Form/Icons/VIS.ico
|
|
12
15
|
Form/Screens/__init__.py
|
|
@@ -23,6 +26,7 @@ VIS/Templates/collect.txt
|
|
|
23
26
|
VIS/Templates/f_element.txt
|
|
24
27
|
VIS/Templates/screen.txt
|
|
25
28
|
VIS/Templates/spec.txt
|
|
29
|
+
VIS/Templates/version.txt
|
|
26
30
|
VIS/__pycache__/__init__.cpython-313.pyc
|
|
27
31
|
VIStk.egg-info/PKG-INFO
|
|
28
32
|
VIStk.egg-info/SOURCES.txt
|
|
@@ -29,11 +29,27 @@
|
|
|
29
29
|
0.3.7
|
|
30
30
|
|
|
31
31
|
- VIS now uses mostly project.py to manage everything
|
|
32
|
-
- - this is much sleaker and faster
|
|
32
|
+
- - this is much sleaker and faster
|
|
33
33
|
- - aiming to remove the need to use any subprocess.call
|
|
34
34
|
|
|
35
|
+
0.3.8
|
|
36
|
+
|
|
37
|
+
- releasing now uses the project.py modules and its classes
|
|
38
|
+
- project now stores default icon as an attribute
|
|
39
|
+
- no longer any subprocess.call()s anywhere but releasing
|
|
40
|
+
- releaseing now feature version metadata
|
|
41
|
+
- autoincreases the version on release current
|
|
42
|
+
- descriptions of screens now taken on creation
|
|
43
|
+
|
|
35
44
|
## Upcoming
|
|
36
45
|
|
|
46
|
+
0.3.9
|
|
47
|
+
|
|
48
|
+
- version numbering for screens control
|
|
49
|
+
- Auto title screens on creation
|
|
50
|
+
- Auto add icon to screen on creation
|
|
51
|
+
- Edit screen settings
|
|
52
|
+
|
|
37
53
|
### Pre Official Release
|
|
38
54
|
|
|
39
55
|
0.3.X:
|
|
@@ -41,7 +57,6 @@
|
|
|
41
57
|
- Auto title screens on creation
|
|
42
58
|
- Auto add icon to screen on creation
|
|
43
59
|
- Edit screen settings
|
|
44
|
-
- Some sort of version management with releases (beyond alpha/beta/current)
|
|
45
60
|
|
|
46
61
|
0.4.X
|
|
47
62
|
|
|
@@ -101,6 +116,11 @@
|
|
|
101
116
|
- Crash Logs
|
|
102
117
|
- Grid manager
|
|
103
118
|
- Tutorial?
|
|
119
|
+
- VIS GUI
|
|
120
|
+
- - GUI for VIS default settings
|
|
121
|
+
- - GUI for VIS project settings (defaults)
|
|
122
|
+
- - - GUI for VIS screens settings (name, icons, other)
|
|
123
|
+
- Auto updating of things like icon and script when changes are made
|
|
104
124
|
|
|
105
125
|
### Working with VIScode extension
|
|
106
126
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Documentation
|
|
2
|
+
|
|
3
|
+
## Commands
|
|
4
|
+
|
|
5
|
+
### Project Creation
|
|
6
|
+
|
|
7
|
+
Initialize new project in current folder
|
|
8
|
+
|
|
9
|
+
```cmd
|
|
10
|
+
VIS new
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Will provide a series of prompts in order to setup a blank project
|
|
14
|
+
|
|
15
|
+
Accepted as:
|
|
16
|
+
|
|
17
|
+
- `New`
|
|
18
|
+
- `new`
|
|
19
|
+
- `N`
|
|
20
|
+
- `n`
|
|
21
|
+
|
|
22
|
+
### Screen Creation
|
|
23
|
+
|
|
24
|
+
Initialize a new screen in the project
|
|
25
|
+
|
|
26
|
+
```cmd
|
|
27
|
+
VIS add screen <screen_name>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Will setup a new blank screen ready for compiling to .exe if assigned. A series of prompts will aid creation.
|
|
31
|
+
|
|
32
|
+
Accepted as:
|
|
33
|
+
|
|
34
|
+
- `Add`
|
|
35
|
+
- `add`
|
|
36
|
+
- `A`
|
|
37
|
+
- `a`
|
|
38
|
+
|
|
39
|
+
and
|
|
40
|
+
|
|
41
|
+
- `Screen`
|
|
42
|
+
- `screen`
|
|
43
|
+
- `S`
|
|
44
|
+
- `s`
|
|
45
|
+
|
|
46
|
+
### Element Creation
|
|
47
|
+
|
|
48
|
+
Initialize a new element (frame) on a screen
|
|
49
|
+
|
|
50
|
+
```cmd
|
|
51
|
+
VIS add screen <screen_name> elements <element_name>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Will create new frames and bind them to the screen based on the default templates. Additionally this command can be used to create a new screen and populate it with elements in one line.
|
|
55
|
+
|
|
56
|
+
To add multiple elements in one call the element names should be seperated by "-" and contain no spaces.
|
|
57
|
+
|
|
58
|
+
```cmd
|
|
59
|
+
VIS add screen <screen_name> elements <element_1>-<element_2>-<element_3>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Accepted as:
|
|
63
|
+
|
|
64
|
+
- `Elements`
|
|
65
|
+
- `elements`
|
|
66
|
+
- `E`
|
|
67
|
+
- `e`
|
vistk-0.3.7/VIS/release.py
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
from VIS.project import *
|
|
3
|
-
import subprocess
|
|
4
|
-
import json
|
|
5
|
-
import shutil
|
|
6
|
-
from os.path import exists
|
|
7
|
-
|
|
8
|
-
root = getPath()
|
|
9
|
-
info = {}
|
|
10
|
-
with open(root+"/.VIS/project.json","r") as f:
|
|
11
|
-
info = json.load(f)
|
|
12
|
-
name = list(info.keys())[0]
|
|
13
|
-
|
|
14
|
-
def build(version:str=""):
|
|
15
|
-
"""Build project spec file with specific version
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
print(f"Creating project.spec for {name}")
|
|
19
|
-
|
|
20
|
-
with open(root+"/.VIS/Templates/spec.txt","r") as f:
|
|
21
|
-
spec = f.read()
|
|
22
|
-
with open(root+"/.VIS/Templates/collect.txt","r") as f:
|
|
23
|
-
collect = f.read()
|
|
24
|
-
|
|
25
|
-
spec_list = []
|
|
26
|
-
name_list = []
|
|
27
|
-
|
|
28
|
-
for i in info[name]["Screens"].keys():
|
|
29
|
-
if info[name]["Screens"][i]["release"]:
|
|
30
|
-
name_list.append(i)
|
|
31
|
-
file = info[name]["Screens"][i]["script"]
|
|
32
|
-
#icon = "du"
|
|
33
|
-
if not info[name]["Screens"][i].get("icon") == None:
|
|
34
|
-
icon = info[name]["Screens"][i]["icon"]
|
|
35
|
-
else:
|
|
36
|
-
icon = info[name]["defaults"]["icon"]
|
|
37
|
-
spec_list.append(spec.replace("$name$",i))
|
|
38
|
-
spec_list[len(spec_list)-1] = spec_list[len(spec_list)-1].replace("$icon$",icon)
|
|
39
|
-
spec_list[len(spec_list)-1] = spec_list[len(spec_list)-1].replace("$file$",file)
|
|
40
|
-
spec_list.append("\n\n")
|
|
41
|
-
|
|
42
|
-
insert = ""
|
|
43
|
-
for i in name_list:
|
|
44
|
-
insert=insert+"\n\t"+i+"_exe,\n\t"+i+"_a.binaries,\n\t"+i+"_a.zipfiles,\n\t"+i+"_a.datas,"
|
|
45
|
-
collect = collect.replace("$insert$",insert)
|
|
46
|
-
collect = collect.replace("$version$",name+"-"+version) if not version == "" else collect.replace("$version$",name)
|
|
47
|
-
|
|
48
|
-
header = "# -*- mode: python ; coding: utf-8 -*-\n\n\n"
|
|
49
|
-
|
|
50
|
-
with open(root+"/.VIS/project.spec","w") as f:
|
|
51
|
-
f.write(header)
|
|
52
|
-
with open(root+"/.VIS/project.spec","a") as f:
|
|
53
|
-
f.writelines(spec_list)
|
|
54
|
-
f.write(collect)
|
|
55
|
-
|
|
56
|
-
print(f"Setup project.spec for {name} {version if not version =="" else "current"}")#advanced version will improve this
|
|
57
|
-
|
|
58
|
-
def clean(version:str=" "):
|
|
59
|
-
"""Cleans up build environment to save space
|
|
60
|
-
"""
|
|
61
|
-
print("Cleaning up build environment")
|
|
62
|
-
if version == " ":
|
|
63
|
-
if exists(f"{root}/dist/{name}/Icons/"): shutil.rmtree(f"{root}/dist/{name}/Icons/")
|
|
64
|
-
if exists(f"{root}/dist/{name}/Images/"): shutil.rmtree(f"{root}/dist/{name}/Images/")
|
|
65
|
-
shutil.copytree(root+"/Icons/",f"{root}/dist/{name}/Icons/",dirs_exist_ok=True)
|
|
66
|
-
shutil.copytree(root+"/Images/",f"{root}/dist/{name}/Images/",dirs_exist_ok=True)
|
|
67
|
-
else:
|
|
68
|
-
if exists(f"{root}/dist/{name}/Icons/"): shutil.rmtree(f"{root}/dist/{name}/Icons/")
|
|
69
|
-
if exists(f"{root}/dist/{name}/Images/"): shutil.rmtree(f"{root}/dist/{name}/Images/")
|
|
70
|
-
shutil.copytree(root+"/Icons/",f"{root}/dist/{name}-{version.strip(" ")}/Icons/",dirs_exist_ok=True)
|
|
71
|
-
shutil.copytree(root+"/Images/",f"{root}/dist/{name}-{version.strip(" ")}/Images/",dirs_exist_ok=True)
|
|
72
|
-
print(f"\n\nReleased new{version}build of {name}!")
|
|
73
|
-
|
|
74
|
-
version = sys.argv[1]
|
|
75
|
-
match version:
|
|
76
|
-
case "a":
|
|
77
|
-
build("alpha")
|
|
78
|
-
subprocess.call(f"pyinstaller {root}/.VIS/project.spec --noconfirm --distpath {root}/dist/ --log-level FATAL")
|
|
79
|
-
clean(" alpha ")
|
|
80
|
-
case "b":
|
|
81
|
-
build("beta")
|
|
82
|
-
subprocess.call(f"pyinstaller {root}/.VIS/project.spec --noconfirm --distpath {root}/dist/ --log-level FATAL")
|
|
83
|
-
clean(" beta ")
|
|
84
|
-
case "c":
|
|
85
|
-
build()
|
|
86
|
-
subprocess.call(f"pyinstaller {root}/.VIS/project.spec --noconfirm --distpath {root}/dist/ --log-level FATAL")
|
|
87
|
-
clean()
|
|
88
|
-
case "sync":
|
|
89
|
-
build("alpha")
|
|
90
|
-
subprocess.call(f"pyinstaller {root}/.VIS/project.spec --noconfirm --distpath {root}/dist/ --log-level FATAL")
|
|
91
|
-
clean(" alpha ")
|
|
92
|
-
build("beta")
|
|
93
|
-
subprocess.call(f"pyinstaller {root}/.VIS/project.spec --noconfirm --distpath {root}/dist/ --log-level FATAL")
|
|
94
|
-
clean(" beta ")
|
|
95
|
-
build()
|
|
96
|
-
subprocess.call(f"pyinstaller {root}/.VIS/project.spec --noconfirm --distpath {root}/dist/ --log-level FATAL")
|
|
97
|
-
clean()
|
|
98
|
-
print("\t- alpha\n\t- beta\n\t- current")
|
|
99
|
-
case _:
|
|
100
|
-
inp = input(f"Release Project Version {version}?")
|
|
101
|
-
match inp:
|
|
102
|
-
case "y" | "Y" | "yes" | "Yes":
|
|
103
|
-
build(version)
|
|
104
|
-
subprocess.call(f"pyinstaller {root}/.VIS/project.spec --noconfirm --distpath {root}/dist/ --log-level FATAL")
|
|
105
|
-
clean(f" {version} ")
|
|
106
|
-
case _:
|
|
107
|
-
print(f"Could not release Project Version {version}")
|
vistk-0.3.7/documentation.md
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|