Skip to content

Commit ffa9a34

Browse files
committed
Minor changes
1 parent 47925d3 commit ffa9a34

File tree

5 files changed

+83
-22
lines changed

5 files changed

+83
-22
lines changed

compile/Inno_Setup_Script.iss

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "SubGPT"
5+
#define MyAppVersion "1.1.0"
6+
#define MyAppExeName "SubGPT.exe"
7+
#define MyAppAssocName MyAppName + " File"
8+
#define MyAppAssocExt ".myp"
9+
#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
10+
11+
[Setup]
12+
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
13+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
14+
AppId={{6E5540FA-FE20-43AD-A6D2-CF10E19A0FB3}
15+
AppName={#MyAppName}
16+
AppVersion={#MyAppVersion}
17+
AppVerName={#MyAppName} {#MyAppVersion}
18+
DefaultDirName={autopf}\{#MyAppName}
19+
20+
; Specifies that Setup cannot run on anything but x64 and Windows 11 on Arm.
21+
ArchitecturesAllowed=x64compatible
22+
23+
; Requests that the install be done in "64-bit mode" on x64 or Windows 11 on Arm,
24+
; meaning it should use the native 64-bit Program Files directory and
25+
; the 64-bit view of the registry.
26+
ArchitecturesInstallIn64BitMode=x64compatible
27+
28+
ChangesAssociations=yes
29+
DisableProgramGroupPage=yes
30+
OutputBaseFilename=mysetup
31+
Compression=lzma
32+
SolidCompression=yes
33+
WizardStyle=modern
34+
35+
; Run in non administrative install mode (install for current user only.)
36+
PrivilegesRequired=lowest
37+
38+
SetupIconFile="C:\Users\Ali\Desktop\SubGPT\images\images\title_bar_icon_original.ico"
39+
40+
; Used to display version in installer properties
41+
VersionInfoVersion={#MyAppVersion}
42+
UninstallDisplayIcon="C:\Users\Ali\Desktop\SubGPT\images\images\title_bar_icon_original.ico"
43+
AppPublisher=aalramadan
44+
45+
46+
[Languages]
47+
Name: "english"; MessagesFile: "compiler:Default.isl"
48+
49+
[Tasks]
50+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
51+
52+
[Files]
53+
Source: "C:\Users\Ali\Desktop\SubGPT\dist\main\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
54+
Source: "C:\Users\Ali\Desktop\SubGPT\dist\main\_internal\*"; DestDir: "{app}\_internal"; Flags: ignoreversion recursesubdirs createallsubdirs
55+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
56+
57+
[Registry]
58+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
59+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
60+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0"
61+
Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
62+
Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: ""
63+
64+
[Icons]
65+
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
66+
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
67+
68+
[Run]
69+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runasoriginaluser
70+
71+
72+
73+

build.txt renamed to compile/build.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
Build (Windows):
2-
pyinstaller --onefile --windowed --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext --icon="C:\Users\Ali\Desktop\SubGPT\images\images\title_bar_icon_original.ico" main.py
2+
pyinstaller --windowed --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext --icon="C:\Users\Ali\Desktop\SubGPT\images\images\title_bar_icon_original.ico" main.py
33

4-
or
4+
* Use for debugging --> --console instead of --windowed
55

6-
nuitka --onefile --plugin-enable=pyside6 --show-modules --include-package=tiktoken --include-package=tiktoken_ext --windows-icon-from-ico="C:\Users\Ali\Desktop\SubGPT\images\images\title_bar_icon_original.ico" main.py
7-
8-
9-
--console instead of --windowed
10-
--enable-console instead of --onefile
11-
12-
13-
###########################
6+
#################################################################################
147
Python packages used:
158
annotated-types 0.7.0
169
anyio 4.4.0

main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from qasync import QEventLoop
55
import ui_functions
66
import asyncio
7-
import ctypes
87

98
class MainWindow(QMainWindow, Ui_MainWindow):
109
def __init__(self):
@@ -31,10 +30,6 @@ def __init__(self):
3130
if __name__ == "__main__":
3231
app = QApplication()
3332

34-
# Needed to make Windows use an icon for SubGPT in the taskbar (For building only)
35-
myappid = 'SubGPT.Unique.Identifier'
36-
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
37-
3833
loop = QEventLoop(app)
3934
asyncio.set_event_loop(loop)
4035

main.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ li.unchecked::marker { content: "\2610"; }
16071607
li.checked::marker { content: "\2612"; }
16081608
</style></head><body style=" font-family:'Segoe UI'; font-size:12pt; font-weight:400; font-style:normal;">
16091609
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:72pt;">SubGPT</span></p>
1610-
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">V1.0</p>
1610+
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:700;">v1.1</span></p>
16111611
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Provides translations for multiple languages using OpenAI's GPT</p>
16121612
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
16131613
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:700;">Developer</span></p>

ui_main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
################################################################################
4-
## Form generated from reading UI file 'mainhBrZSn.ui'
4+
## Form generated from reading UI file 'mainecyaCk.ui'
55
##
66
## Created by: Qt User Interface Compiler version 6.7.2
77
##
@@ -849,16 +849,16 @@ def retranslateUi(self, MainWindow):
849849
"li.checked::marker { content: \"\\2612\"; }\n"
850850
"</style></head><body style=\" font-family:'Segoe UI'; font-size:12pt; font-weight:400; font-style:normal;\">\n"
851851
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:72pt;\">SubGPT</span></p>\n"
852-
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">V1.0</p>\n"
853-
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Provides translations for multiple languag"
854-
"es using OpenAI's GPT</p>\n"
852+
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:14pt; font-weight:700;\">v1.1</span></p>\n"
853+
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text"
854+
"-indent:0px;\">Provides translations for multiple languages using OpenAI's GPT</p>\n"
855855
"<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
856856
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:14pt; font-weight:700;\">Developer</span></p>\n"
857857
"<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">aalramadan</p>\n"
858858
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
859859
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
860-
"<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -"
861-
"qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
860+
"<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px"
861+
"; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p>\n"
862862
"<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>", None))
863863
pass
864864
# retranslateUi

0 commit comments

Comments
 (0)