Skip to content

Commit

Permalink
Fix build program
Browse files Browse the repository at this point in the history
  • Loading branch information
xsat committed Sep 1, 2023
1 parent 52dc189 commit 6638189
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
9 changes: 4 additions & 5 deletions main.py → pinger.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

DEFAULT_THEME: str = 'Dark'

SETTINGS_FILENAME: str = 'settings.ini'
TRANSLATION_FILENAME: str = 'translation.ini'
SETTINGS_FILENAME: str = 'data/settings.ini'
TRANSLATION_FILENAME: str = 'data/translation.ini'

DEFAULT_LANGUAGE: str = 'DEFAULT'

Expand All @@ -27,7 +27,7 @@
DEFAULT_TIME_FORMAT: str = '%Y-%m-%d %H:%M:%S'


def main() -> None:
def pinger() -> None:
def generate_key(left_name: str, right_name: str) -> str:
return md5(f'{left_name}-{right_name}'.encode()).hexdigest()

Expand Down Expand Up @@ -83,7 +83,6 @@ def get_last_check_text() -> str:
window.refresh()

for element_key in element_keys:
print(window[element_key].metadata)
address: str = window[element_key].metadata
is_ping_success: bool = ping(address)
new_background_color: str = get_background_color(is_ping_success)
Expand All @@ -94,4 +93,4 @@ def get_last_check_text() -> str:


if __name__ == '__main__':
main()
pinger()
Binary file modified requirements.txt
Binary file not shown.
20 changes: 7 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
from cx_Freeze import setup, Executable

base = None

executables = [Executable('main.py', base=base)]

packages = ['configparser', 'hashlib', 'PySimpleGUI', 'platform', 'subprocess', 're', 'ping', 'time', 'idna']
options = {
'build_exe': {
'packages': packages,
},
}

setup(
name='Pinger',
options=options,
options={
'build_exe': {
'packages': ['configparser', 'hashlib', 'PySimpleGUI', 'platform', 'subprocess', 're', 'ping', 'time'],
'include_files': [('settings.ini', 'data/settings.ini'), ('translation.ini', 'data/translation.ini')],
},
},
version='1.0.0',
description='This is simple software what **ping** all provided ip addresses or hostnames.',
executables=executables
executables=[Executable('pinger.py')]
)

0 comments on commit 6638189

Please sign in to comment.