Skip to content

VShkaberda/Payments_control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Payments_control

Application is a client part of project that helps to organize and control payments. It consists of several logical parts that allows to automatically update application.


payments_first_run.py

Provides initial installation of the application and creates a shortcut on desktop that refers to payments_checker.

payments_checker.py

Checks and installs updates and executes Payments afterwards.

Payments.py

Core of the application that establishes connection with database, checks permissions and creates an instance of PaymentApp.

tkPayments.py

Contains GUI and provides the functionality.

Auxiliary modules

checkboxtreeview.py, label_grid.py, multiselect.py, splash_screen.py, tkHyperlinkManager.py - provide additional widgets or frames with additional functionality for Tkinter. db_connect_sql.py - module to work with database. log_error.py - writes info about error into the file log.txt to the same directory where the main program is. singleinstance.py - creates Mutex to prevent launch multiple copies of application. xl.py - module to work with Excel.

Usage

End user is supposed to be working with executables created from py scripts. Current manual expects that Pyinstaller is used for creating executables. Beforehand upd_path should be specified in _version.py.

Three scripts need to be turned into executables: payments_first_run.py, payments_checker.py and Payments.py. The first two can be created with the next commands: pyinstaller --console --onefile payments_first_run.py and pyinstaller --noconsole payments_checker.py. Since the GUI uses additional resources there is spec file containing required data links and hidden imports. To create Payments executable one should use next script: pyinstaller --noconsole Payments.spec. After creating executables payments_checker.exe and payments_checker.exe.manifest need to be transfered into payments directory where payments.exe is.

payments_first_run.exe and zipped payments directory (it should be named payments.zip explicitly) should be copied into upd_path. After executing payments_first_run.exe application will be installed on user's PC and shortcut on desktop will be created.

Application update

After changes have been made into current scripts version_info should be updated in _version.py. New subdirectory has to be created in the path upd_path with the same name as version_info, e.g. if the new version_info = (1, 0, 3) the subdirectory name has to be "1.0.3". All added/modified files created by Pyinstaller should be copied into created directory. Generally, all files can be copied into subdirectory but that will drastically slow down update process because payments_checker.exe will copy all files found in subdirectory. When payments_checker.exe is runned by end user it loops through every subdirectory in path upd_path whose names are higher than current version of application und copies new files into working directory. It is recommended to keep up zipped payments being archive of the last stable version, in order to new users running payments_first_run.exe receive the actual version of application.

Work with application

The instructions about work with application should be added to ./src/resources as README.pdf.


Requirements

  • OS Windows

  • Python version 3.6 or higher

  • pyodbc

  • pythoncom (part of pywin32; when have a problem installing pywin32, check pypiwin32 and postinstall)

  • win32com (also part of pywin32)

  • tkcalendar version 1.5.0, 1.6.1 or higher (GNU General Public License v3.0)

  • xlsxwriter (BSD License)