-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
61 lines (53 loc) · 2.24 KB
/
Copy pathsetup.py
File metadata and controls
61 lines (53 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Retail Operations Suite
# Copyright (C) 2025 Nikoloz Taturashvili (ნიკოლოზ ტატურაშვილი).
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import os
import subprocess
import sys
from setuptools import setup, Command
# --- Application Information ---
APP_NAME = "Retail Operations Suite"
APP_VERSION = "3.1.1"
APP_DESCRIPTION = "A suite of tools for managing retail operations, including price tag generation."
COMPANY_NAME = "Nikoloz Taturashvili"
class BuildCommand(Command):
description = "Build the application and create an installer."
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
# Build the executable with PyInstaller
pyinstaller_path = os.path.join(sys.prefix, 'Scripts', 'pyinstaller.exe')
subprocess.run([pyinstaller_path, "main.spec", "--clean", "--noconfirm"], check=True)
# Compile the installer with Inno Setup
# Note: This assumes that the Inno Setup compiler (iscc.exe) is in your system's PATH.
# You may need to provide the full path to iscc.exe.
inno_setup_compiler = r"C:\Program Files (x86)\Inno Setup 6\iscc.exe"
if not os.path.exists(inno_setup_compiler):
print("Inno Setup compiler not found. Please install Inno Setup and ensure iscc.exe is in your PATH or update the path in setup.py.")
sys.exit(1)
subprocess.run([inno_setup_compiler, "setup.iss"], check=True)
setup(
name=APP_NAME,
version=APP_VERSION,
description=APP_DESCRIPTION,
author=COMPANY_NAME,
packages=[],
cmdclass={
'build': BuildCommand,
}
)