mirror of
https://github.com/relativemodder/aegnux.git
synced 2025-12-10 05:29:38 +05:00
more polishing
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
- [x] Ged rid of binary blobs
|
||||
|
||||
- [ ] Replace slow winetricks script
|
||||
- [ ] Replace slow winetricks script (almost done)
|
||||
|
||||
- [ ] Desktop integration (.aep file association)
|
||||
|
||||
|
||||
7
assets/fontsmooth.reg
Normal file
7
assets/fontsmooth.reg
Normal file
@@ -0,0 +1,7 @@
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_CURRENT_USER\\Control Panel\\Desktop]
|
||||
"FontSmoothing"="2"
|
||||
"FontSmoothingGamma"=dword:00000578
|
||||
"FontSmoothingOrientation"=dword:00000001
|
||||
"FontSmoothingType"=dword:00000002
|
||||
@@ -12,6 +12,7 @@ WINE_RUNNER_DIR = BASE_DIR + '/assets/wine'
|
||||
WINETRICKS_BIN = BASE_DIR + '/bin/winetricks'
|
||||
CABEXTRACT_BIN = BASE_DIR + '/bin/cabextract'
|
||||
GDIPLUS_DLL = BASE_DIR + '/assets/gdiplus.dll'
|
||||
FONTSMOOTH_REG = BASE_DIR + '/assets/fontsmooth.reg'
|
||||
|
||||
VCR_ZIP = BASE_DIR + '/assets/vcr.zip'
|
||||
MSXML_ZIP = BASE_DIR + '/assets/msxml3.zip'
|
||||
|
||||
@@ -2,7 +2,7 @@ import os
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
from src.config import (
|
||||
AE_DOWNLOAD_URL, AE_FILENAME,
|
||||
AE_DOWNLOAD_URL, AE_FILENAME, FONTSMOOTH_REG,
|
||||
WINE_RUNNER_DIR, WINETRICKS_BIN,
|
||||
CABEXTRACT_BIN, WINE_STYLE_REG,
|
||||
VCR_ZIP, MSXML_ZIP, GDIPLUS_DLL
|
||||
@@ -12,7 +12,8 @@ from src.utils import (
|
||||
DownloadMethod, get_aegnux_installation_dir,
|
||||
get_ae_install_dir, get_wine_runner_dir, is_nvidia_present,
|
||||
get_winetricks_bin, get_wineprefix_dir, get_cabextract_bin,
|
||||
get_vcr_dir_path, get_msxml_dir_path, mark_aegnux_as_installed
|
||||
get_vcr_dir_path, get_msxml_dir_path, mark_aegnux_as_installed,
|
||||
get_cep_dir
|
||||
)
|
||||
|
||||
class InstallationThread(ProcessThread):
|
||||
@@ -107,7 +108,7 @@ class InstallationThread(ProcessThread):
|
||||
|
||||
self.progress_signal.emit(60)
|
||||
|
||||
tweaks = ['dxvk', 'corefonts', 'fontsmooth=rgb']
|
||||
tweaks = ['dxvk', 'corefonts']
|
||||
for tweak in tweaks:
|
||||
self.log_signal.emit(f'[DEBUG] Installing {tweak} with winetricks')
|
||||
self.run_command(['winetricks', '-q', tweak], in_prefix=True)
|
||||
@@ -152,10 +153,21 @@ class InstallationThread(ProcessThread):
|
||||
in_prefix=True
|
||||
)
|
||||
|
||||
self.log_signal.emit(f'[DEBUG] Applying fontsmooth settings')
|
||||
self.run_command(
|
||||
['wine', 'regedit', FONTSMOOTH_REG],
|
||||
in_prefix=True
|
||||
)
|
||||
|
||||
if is_nvidia_present():
|
||||
self.log_signal.emit("[INFO] Starting NVIDIA libs installation...")
|
||||
self.install_nvidia_libs()
|
||||
|
||||
try:
|
||||
self.log_signal.emit(f"[INFO] Created CEP directory in {get_cep_dir()}")
|
||||
except:
|
||||
pass
|
||||
|
||||
self.progress_signal.emit(99)
|
||||
|
||||
self.cleanup()
|
||||
|
||||
@@ -12,7 +12,7 @@ from src.killaethread import KillAEThread
|
||||
from src.removeaethread import RemoveAEThread
|
||||
from src.utils import (
|
||||
check_aegnux_tip_marked, get_wine_bin_path_env,
|
||||
show_download_method_dialog, get_ae_plugins_dir, get_wineprefix_dir,
|
||||
get_cep_dir, get_ae_plugins_dir, get_wineprefix_dir,
|
||||
check_aegnux_installed, mark_aegnux_tip_as_shown, get_ae_install_dir, get_aegnux_installation_dir
|
||||
)
|
||||
from src.types import DownloadMethod
|
||||
@@ -63,6 +63,7 @@ class MainWindow(MainWindowUI):
|
||||
self.plugind_action.triggered.connect(self.plugins_folder_clicked)
|
||||
self.aed_action.triggered.connect(self.ae_folder_clicked)
|
||||
self.aeg_action.triggered.connect(self.aegnux_folder_clicked)
|
||||
self.cep_action.triggered.connect(self.cep_folder_clicked)
|
||||
|
||||
def init_installation(self):
|
||||
if check_aegnux_installed():
|
||||
@@ -96,6 +97,7 @@ class MainWindow(MainWindowUI):
|
||||
self.plugind_action = self.browseMenu.addAction(gls('plugind_action'))
|
||||
self.aed_action = self.browseMenu.addAction(gls('aed_action'))
|
||||
self.aeg_action = self.browseMenu.addAction(gls('aeg_action'))
|
||||
self.cep_action = self.browseMenu.addAction(gls('cep_action'))
|
||||
|
||||
self.debugMenu = self.menuBar().addMenu(gls('debug_menu'))
|
||||
self.kill_action = self.debugMenu.addAction(gls('kill_action'))
|
||||
@@ -222,6 +224,10 @@ class MainWindow(MainWindowUI):
|
||||
def aegnux_folder_clicked(self):
|
||||
os.system(f'xdg-open "{get_aegnux_installation_dir()}"')
|
||||
|
||||
@Slot()
|
||||
def cep_folder_clicked(self):
|
||||
os.system(f'xdg-open "{get_cep_dir()}"')
|
||||
|
||||
@Slot()
|
||||
def run_command_alt_t(self):
|
||||
env = os.environ.copy()
|
||||
|
||||
@@ -91,6 +91,15 @@ def get_wineprefix_dir():
|
||||
|
||||
return wineprefix_dir
|
||||
|
||||
def get_cep_dir():
|
||||
wineprefix_dir = get_wineprefix_dir()
|
||||
cep_dir = wineprefix_dir.joinpath('drive_c/Program Files (x86)/Common Files/Adobe/CEP')
|
||||
|
||||
if not os.path.exists(cep_dir):
|
||||
os.makedirs(cep_dir)
|
||||
|
||||
return cep_dir
|
||||
|
||||
def get_wine_runner_dir():
|
||||
aegnux_dir = get_aegnux_installation_dir()
|
||||
runner_dir = aegnux_dir.joinpath('runner')
|
||||
|
||||
@@ -28,5 +28,6 @@ STRINGS = {
|
||||
'debug_menu': 'Debug',
|
||||
'kill_action': 'Kill AE',
|
||||
'log_action': 'Toggle log',
|
||||
'term_action': 'Open Terminal'
|
||||
'term_action': 'Open Terminal',
|
||||
'cep_action': 'CEP directory'
|
||||
}
|
||||
@@ -28,5 +28,6 @@ STRINGS = {
|
||||
'debug_menu': 'Отладка',
|
||||
'kill_action': 'Остановить AE',
|
||||
'log_action': 'Вкл/выкл логи',
|
||||
'term_action': 'Открыть терминал'
|
||||
'term_action': 'Открыть терминал',
|
||||
'cep_action': 'Папка с CEP'
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class MainWindowUI(QMainWindow):
|
||||
super().__init__()
|
||||
self._construct_ui()
|
||||
self._set_styles()
|
||||
self.setMinimumSize(480, 600)
|
||||
self.setMinimumSize(500, 600)
|
||||
|
||||
def _set_styles(self):
|
||||
with open(f'{STYLES_PATH}/mainwindow.css') as fp:
|
||||
@@ -33,8 +33,21 @@ class MainWindowUI(QMainWindow):
|
||||
def _construct_ui(self):
|
||||
central_widget = QWidget()
|
||||
self.setCentralWidget(central_widget)
|
||||
|
||||
layout_container = QWidget()
|
||||
layout_container.setMinimumWidth(500)
|
||||
|
||||
self.root_layout = QVBoxLayout(central_widget)
|
||||
self.root_layout = QVBoxLayout(layout_container)
|
||||
|
||||
main_layout = QHBoxLayout(central_widget)
|
||||
|
||||
main_layout.addItem(
|
||||
QSpacerItem(1, 1, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
|
||||
)
|
||||
main_layout.addWidget(layout_container)
|
||||
main_layout.addItem(
|
||||
QSpacerItem(1, 1, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
|
||||
)
|
||||
|
||||
self.add_expanding_vertical_sizer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user