Skip to content

Commit f105319

Browse files
authored
Merge pull request #105 from matthewyang204/main
Add installer + Python 3.13 compatibility
2 parents b0c589f + d2c5bef commit f105319

File tree

4 files changed

+66
-4
lines changed

4 files changed

+66
-4
lines changed

auratext.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@echo off
2+
setlocal
3+
4+
: Set the script directory to the location of this batch file
5+
set SCRIPT_DIR=%~dp0
6+
7+
: Start Aura Text
8+
echo Starting Aura Text...
9+
python "%SCRIPT_DIR%main.py"
10+
echo Exiting...
11+
12+
endlocal

install.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import shutil
2+
import os
3+
import sys
4+
5+
print("Starting installation...")
6+
7+
print("Retrieving environment variables...")
8+
localappdata = os.getenv('LOCALAPPDATA')
9+
print(f"Local AppData is {localappdata}")
10+
programs = os.path.join(localappdata, "Programs", "Aura-Text")
11+
print(f"Installation directory is {programs}")
12+
13+
print("Copying files...")
14+
print("LocalAppData\AuraText")
15+
shutil.copytree("LocalAppData\AuraText", os.path.join(localappdata, "AuraText"), dirs_exist_ok=True)
16+
print("Aura-Text")
17+
shutil.copytree(os.getcwd(), programs, dirs_exist_ok=True, ignore=shutil.ignore_patterns(".git"))
18+
19+
print("Installing dependencies...")
20+
exit_code = os.system(f'"{sys.executable}" -m pip install -r requirements.txt')
21+
if exit_code != 0:
22+
print(f"Installation failed with exit code {exit_code} while installing dependencies.")
23+
sys.exit(exit_code)
24+
exit_code2 = os.system(f'"{sys.executable}" -m pip install wheels\pyqtdarktheme-2.1.0-py3-none-any.whl')
25+
if exit_code2 != 0:
26+
print(f"Installation failed with exit code {exit_code2} while installing pyqtdarktheme.")
27+
sys.exit(exit_code2)
28+
29+
print("Creating shortcuts...")
30+
import winshell
31+
print("Desktop")
32+
desktop = winshell.desktop()
33+
shortcut_path = winshell.shortcut(os.path.join(os.path.join(desktop, "Aura Text.lnk")))
34+
shortcut_path.path = os.path.join(programs, "auratext.bat")
35+
shortcut_path.working_directory = programs
36+
shortcut_path.description = "Aura Text is a versatile and powerful text editor powered by QScintilla that provides all the necessary tools for developers. It is build using PyQt6 and Python."
37+
shortcut_path.icon_location = (os.path.join(programs, "icon.ico"), 0)
38+
shortcut_path.write()
39+
print("Start Menu")
40+
desktop = winshell.start_menu()
41+
shortcut_path = winshell.shortcut(os.path.join(os.path.join(desktop, "Aura Text.lnk")))
42+
shortcut_path.path = os.path.join(programs, "auratext.bat")
43+
shortcut_path.working_directory = programs
44+
shortcut_path.description = "Aura Text is a versatile and powerful text editor powered by QScintilla that provides all the necessary tools for developers. It is build using PyQt6 and Python."
45+
shortcut_path.icon_location = (os.path.join(programs, "icon.ico"), 0)
46+
shortcut_path.write()
47+
48+
print("Installation complete.")

requirements.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ autopep8==2.0.2
33
GitPython==3.1.42
44
PyAutoGUI==0.9.54
55
pyjokes==0.6.0
6-
PyQt6==6.6.1
7-
PyQt6_sip==13.6.0
6+
PyQt6==6.9.1
7+
PyQt6_sip==13.10.2
88
pyqt_find_replace_text_widget==0.0.14
9-
pyqtconsole==1.2.2
9+
pyqtconsole==1.2.3
1010
pyttsx3==2.90
11-
pywin32==306
11+
pywin32==311
1212
pywinstyles==1.3
1313
qt_material==2.14
1414
Requests==2.32.4
1515
roastedbyai==1.2.0
1616
pyqtdarktheme
1717
PyQt6-Fluent-Widgets==1.6.0
1818
PyQt6-QScintilla==2.14.1
19+
winshell==0.6
20+
markdown==3.8.2
59.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)