Skip to content

Commit 0f5d946

Browse files
Update
1 parent ed06e7a commit 0f5d946

9 files changed

+86
-6
lines changed

MANIFEST.in

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include imgs/dfdlogo.gif
2+
include imgs/pythonpoweredlengthgif.gif

__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Initialize PyPI Package
22

3-
__all__ = ["ProgramVer"]
3+
__all__ = ["main"]

__main__.py

+61-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,64 @@
1-
from main import ProgramVer
1+
# Import Statements
2+
from tkinter import *
3+
import os
4+
5+
# Document Functions
6+
def openLicense():
7+
windowl = Tk()
8+
licensefile = open('LICENSE.txt', 'r') #change file address as needed
9+
licensecontents = licensefile.read()
10+
licensefile.close()
11+
windowl.title('License')
12+
licensetext = Text(windowl)
13+
licensetext.insert(INSERT, licensecontents)
14+
licensetext.pack()
15+
16+
def openEULA():
17+
windowl = Tk()
18+
eulafile = open('EULA.txt', 'r') # change file address as needed
19+
eulacontents = eulafile.read()
20+
eulafile.close()
21+
windowl.title('EULA')
22+
eulatext = Text(windowl)
23+
eulatext.insert(INSERT, eulacontents)
24+
eulatext.pack()
25+
26+
# ProgramVer Function
27+
def ProgramVer():
28+
window = Tk()
29+
# Window Elements
30+
window.title('Copyright & Version Info for ProgramVer') #change name based on program name
31+
# UI Elements
32+
dfdimage = PhotoImage(file='imgs/dfdlogo.gif')
33+
pythonimage = PhotoImage(file='imgs/pythonpoweredlengthgif.gif')
34+
dfdlogo = Label(window, image = dfdimage)
35+
pythonpowered = Label(window, image = pythonimage)
36+
info = Label(window, text='ProgramVer \n Version: 1.9.0 (Build #)') #change respectively
37+
trademarks = Label(window, text='Copyright (C) 2017 - 2022 Dog Face Development Co. All rights reserved in all countries. \n ProgramVer and its code, user interface and all other associated trademarks are protected \nby trademarks and copyright in Canada, the United States and other countries.') #change as needed
38+
licenseblurb = Label(window, text="""\n ProgramVer - Version window for DFD Co.'s programs
39+
Copyright (C) 2017-2022 Dog Face Development Company
40+
41+
This program is free software: you can redistribute it and/or modify
42+
it under the terms of the GNU General Public License as published by
43+
the Free Software Foundation, version 3 of the License.
44+
45+
This program is distributed in the hope that it will be useful,
46+
but WITHOUT ANY WARRANTY; without even the implied warranty of
47+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48+
GNU General Public License below for more details.""") #change as needed
49+
licensebtn = Button(window, text='Open License', command=openLicense)
50+
eulabtn = Button(window, text='Open EULA', command=openEULA)
51+
# Pack Statements
52+
dfdlogo.pack(side=TOP)
53+
info.pack(side=TOP)
54+
trademarks.pack(side=TOP)
55+
licenseblurb.pack(side=TOP)
56+
licensebtn.pack(pady=5)
57+
eulabtn.pack(pady=5)
58+
pythonpowered.pack(side=BOTTOM)
59+
# Maintain Window
60+
window.mainloop()
61+
262

363
if __name__ == '__main__':
464
ProgramVer()

dfdlogo.gif imgs/dfdlogo.gif

File renamed without changes.
File renamed without changes.

main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def ProgramVer():
4646
# Window Elements
4747
window.title('Copyright & Version Info for ProgramVer') #change name based on program name
4848
# UI Elements
49-
dfdimage = PhotoImage(file='dfdlogo.gif')
50-
pythonimage = PhotoImage(file='pythonpoweredlengthgif.gif')
49+
dfdimage = PhotoImage(file='imgs/dfdlogo.gif')
50+
pythonimage = PhotoImage(file='imgs/pythonpoweredlengthgif.gif')
5151
dfdlogo = Label(window, image = dfdimage)
5252
pythonpowered = Label(window, image = pythonimage)
5353
info = Label(window, text='ProgramVer \n Version: 1.9.0 (Build #)') #change respectively

pyproject.toml

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ classifiers = [
2222

2323
[project.urls]
2424
"Homepage" = "https://github.com/Dog-Face-Development/ProgramVer"
25-
"Bug Tracker" = "https://github.com/Dog-Face-Development/ProgramVer/issues"
25+
"Bug Tracker" = "https://github.com/Dog-Face-Development/ProgramVer/issues"
26+
27+
[tool.setuptools]
28+
include-package-data = true
29+
30+
[tool.setuptools.packages.find]
31+
where = ["imgs"]

setup.cfg

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
name = programver
33
version = 1.9.0
44

5+
[options]
6+
packages = find:
7+
package_dir =
8+
= imgs
9+
include_package_data = True
10+
11+
[options.packages.find]
12+
where = imgs
13+
514
[options.entry_points]
615
console_scripts =
716
programver = main:ProgramVer

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from setuptools import setup
1+
from setuptools import setup, find_packages
22

33
def readme():
44
with open('README.md') as f:
@@ -19,6 +19,9 @@ def readme():
1919
keywords='program version windows winver microsoft license gui',
2020
url='https://github.com/Dog-Face-Development/ProgramVer',
2121
author='willtheorangeguy',
22+
packages=find_packages(where="imgs"),
23+
package_dir={"": "imgs"},
24+
include_package_data=True,
2225
entry_points={
2326
'console_scripts': [
2427
'programver=main:ProgramVer'

0 commit comments

Comments
 (0)