mirror of
https://github.com/relativemodder/aegnux.git
synced 2025-12-10 13:39:43 +05:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4285914512 | ||
|
|
aed41431f2 | ||
|
|
e05e9e576b | ||
|
|
d0fb24a741 | ||
|
|
700a669bc5 | ||
|
|
e6307377ef | ||
|
|
1fd0252870 | ||
|
|
6d6dd386f5 | ||
|
|
49830680b0 | ||
|
|
83c077a54d | ||
|
|
969ecd7884 |
11
README.md
11
README.md
@@ -6,6 +6,17 @@ A convenient way to install Adobe After Effects on Linux using Wine. Heavily ins
|
||||
|
||||
**⚠️ SOFTWARE IS NOT IN THE RELEASE STATE**
|
||||
|
||||
<div align="center">
|
||||
|
||||
### Aegnux community
|
||||
|
||||
[](https://www.reddit.com/r/Aegnux/)
|
||||
[](https://aur.archlinux.org/packages/aegnux)
|
||||
[](https://t.me/Aegnux)
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
*If you're interested in the project's roadmap, check out [**ROADMAP.md**](https://github.com/relativemodder/aegnux/blob/main/ROADMAP.md)*.
|
||||
|
||||
[Download Flatpak package](https://github.com/relativemodder/com.relative.Aegnux/releases/latest) if you want to install it on any distro.
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
|
||||
- [ ] Get hardware acceleration working on AMD GPUs
|
||||
|
||||
- [ ] Plugins installation
|
||||
- [x] Plugins installation
|
||||
|
||||
- [x] Ged rid of binary blobs
|
||||
|
||||
- [ ] Replace slow winetricks script (almost done)
|
||||
|
||||
- [ ] Desktop integration (.aep file association)
|
||||
- [x] Desktop integration (.aep file association)
|
||||
|
||||
- [ ] Link opening support (e.g. Mister Horse or CC Login)
|
||||
|
||||
- [ ] Make .deb package
|
||||
|
||||
|
||||
15
src/app.py
15
src/app.py
@@ -11,7 +11,18 @@ def main():
|
||||
app.setDesktopFileName(DESKTOP_FILE_NAME)
|
||||
app.setWindowIcon(QIcon(AE_ICON_PATH))
|
||||
|
||||
mainWindow = MainWindow()
|
||||
mainWindow.show()
|
||||
show_window = True
|
||||
quit_after_handling_args = False
|
||||
|
||||
for arg in sys.argv:
|
||||
if 'misterhorsepm://' in arg or '.aep' in arg:
|
||||
show_window = False
|
||||
quit_after_handling_args = True
|
||||
break
|
||||
|
||||
mainWindow = MainWindow(quit_after_handling_args)
|
||||
|
||||
if show_window:
|
||||
mainWindow.show()
|
||||
|
||||
return app.exec()
|
||||
@@ -111,6 +111,8 @@ class InstallationThread(ProcessThread):
|
||||
self.log_signal.emit(f"[INFO] Created CEP directory in {get_cep_dir()}")
|
||||
except:
|
||||
pass
|
||||
|
||||
self.symlink_support_files()
|
||||
|
||||
self.progress_signal.emit(99)
|
||||
|
||||
@@ -126,6 +128,19 @@ class InstallationThread(ProcessThread):
|
||||
self.log_signal.emit(f'[ERROR] {e}')
|
||||
self.finished_signal.emit(False)
|
||||
|
||||
def symlink_support_files(self):
|
||||
ae_dir = get_ae_install_dir()
|
||||
ae_pf_dir = get_wineprefix_dir().joinpath('drive_c/Program Files/Adobe/Adobe After Effects 2024')
|
||||
support_files_dir = ae_pf_dir.joinpath('Support Files')
|
||||
|
||||
if not ae_pf_dir.exists():
|
||||
os.makedirs(ae_pf_dir)
|
||||
|
||||
if not support_files_dir.exists():
|
||||
os.symlink(ae_dir, support_files_dir)
|
||||
|
||||
self.log_signal.emit(f'[DEBUG] Created symlink from {ae_dir} to {support_files_dir}')
|
||||
|
||||
def try_cleanup_installation(self):
|
||||
try:
|
||||
shutil.rmtree(get_aegnux_installation_dir(), True)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from ui.mainwindow import MainWindowUI
|
||||
from translations import gls
|
||||
from PySide6.QtCore import Slot
|
||||
@@ -12,7 +13,7 @@ from src.killaethread import KillAEThread
|
||||
from src.pluginthread import PluginThread
|
||||
from src.removeaethread import RemoveAEThread
|
||||
from src.utils import (
|
||||
check_aegnux_tip_marked, get_default_terminal, get_wine_bin_path_env,
|
||||
check_aegnux_tip_marked, get_default_terminal, get_mhtb_install_dir, get_wine_bin_path_env,
|
||||
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
|
||||
)
|
||||
@@ -20,9 +21,13 @@ from src.types import DownloadMethod
|
||||
|
||||
|
||||
class MainWindow(MainWindowUI):
|
||||
def __init__(self):
|
||||
def __init__(self, quit_after_handling_args: bool = False):
|
||||
super().__init__()
|
||||
|
||||
self.ran_from_aep_file = False
|
||||
self.ran_from_mhtb_link = False
|
||||
self.quit_after_handling_args = quit_after_handling_args
|
||||
|
||||
self.setWindowTitle(gls('welcome_win_title'))
|
||||
self.install_button.clicked.connect(self.install_button_clicked)
|
||||
self.run_button.clicked.connect(self.run_ae_button_clicked)
|
||||
@@ -71,6 +76,57 @@ class MainWindow(MainWindowUI):
|
||||
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 try_autoopen_mhtb(self):
|
||||
if self.ran_from_mhtb_link:
|
||||
return
|
||||
|
||||
self.ran_from_mhtb_link = True
|
||||
|
||||
mhtb_link = ''
|
||||
|
||||
for arg in sys.argv:
|
||||
if 'misterhorsepm://' in arg:
|
||||
mhtb_link = arg
|
||||
break
|
||||
|
||||
if mhtb_link == '':
|
||||
return
|
||||
|
||||
mhtb_dir = get_mhtb_install_dir()
|
||||
if mhtb_dir is None:
|
||||
QMessageBox.warning(
|
||||
self,
|
||||
gls('mhtb_not_found_title'),
|
||||
gls('mhtb_not_found_text')
|
||||
)
|
||||
exit(0)
|
||||
|
||||
self.run_mhtb_thread = RunExeThread([f'{mhtb_dir.as_posix()}/ProductManager.exe', mhtb_link])
|
||||
self.run_mhtb_thread.log_signal.connect(self._log)
|
||||
self.run_mhtb_thread.finished_signal.connect(self._finished)
|
||||
|
||||
self.run_mhtb_thread.start()
|
||||
|
||||
def try_autoopen_aep(self):
|
||||
self.run_ae_thread.clear_aep_file_arg()
|
||||
if self.ran_from_aep_file:
|
||||
return
|
||||
|
||||
self.ran_from_aep_file = True
|
||||
|
||||
aep_file = ''
|
||||
|
||||
for arg in sys.argv:
|
||||
if '.aep' in arg:
|
||||
aep_file = arg
|
||||
break
|
||||
|
||||
if aep_file == '':
|
||||
return
|
||||
|
||||
self.run_ae_thread.add_aep_file_arg(aep_file)
|
||||
self.run_ae_button_clicked()
|
||||
|
||||
def init_installation(self):
|
||||
if check_aegnux_installed():
|
||||
@@ -83,6 +139,8 @@ class MainWindow(MainWindowUI):
|
||||
self.kill_action.setEnabled(True)
|
||||
self.plugininst_action.setEnabled(True)
|
||||
self.term_action.setEnabled(True)
|
||||
self.try_autoopen_aep()
|
||||
self.try_autoopen_mhtb()
|
||||
|
||||
else:
|
||||
self.install_button.show()
|
||||
@@ -130,6 +188,9 @@ class MainWindow(MainWindowUI):
|
||||
|
||||
@Slot(bool)
|
||||
def _finished(self, success: bool):
|
||||
if self.quit_after_handling_args:
|
||||
exit(0)
|
||||
|
||||
self.lock_ui(False)
|
||||
self.progress_bar.hide()
|
||||
self.init_installation()
|
||||
|
||||
@@ -6,5 +6,13 @@ class RunAEThread(RunExeThread):
|
||||
def __init__(self):
|
||||
super().__init__(['AfterFX.exe'])
|
||||
|
||||
def add_aep_file_arg(self, aep_file: str):
|
||||
self.exe_args.append('Z:' + aep_file)
|
||||
|
||||
def clear_aep_file_arg(self):
|
||||
for arg in self.exe_args:
|
||||
if '.aep' in arg:
|
||||
self.exe_args.remove(arg)
|
||||
|
||||
def run(self):
|
||||
super().run()
|
||||
@@ -148,6 +148,15 @@ def get_wine_bin_path_env(old_path: str | None):
|
||||
old_path = old_path if old_path is not None else os.getenv('PATH')
|
||||
return f'{get_wine_runner_dir().as_posix()}/bin:{old_path}'
|
||||
|
||||
def get_mhtb_install_dir():
|
||||
wineprefix_dir = get_wineprefix_dir()
|
||||
mhtb_dir = wineprefix_dir.joinpath('drive_c/Program Files/Mister Horse Product Manager')
|
||||
|
||||
if not os.path.exists(mhtb_dir):
|
||||
return None
|
||||
|
||||
return mhtb_dir
|
||||
|
||||
def get_default_terminal() -> str:
|
||||
DEFAULT_ENVS = ["TERMINAL", "TERM_PROGRAM"]
|
||||
TERMINALS = [
|
||||
|
||||
@@ -38,5 +38,7 @@ STRINGS = {
|
||||
'plugin_note_text': 'Those plugins are available at https://t.me/Aegnux',
|
||||
'done_title': 'Done!',
|
||||
'done_ae': 'AE has been installed.',
|
||||
'done_plugins': 'The plugins have been installed.'
|
||||
'done_plugins': 'The plugins have been installed.',
|
||||
'mhtb_not_found_title': 'Mister Horse Product Manager Not Found',
|
||||
'mhtb_not_found_text': 'Mister Horse Product Manager is not installed in the Wine prefix. Please install it first.'
|
||||
}
|
||||
@@ -37,5 +37,7 @@ STRINGS = {
|
||||
'plugin_note': 'Замечание к приватным плагинам',
|
||||
'plugin_note_text': 'Эти плагины доступны здесь: https://t.me/Aegnux',
|
||||
'done_ae': 'AE был установлен.',
|
||||
'done_plugins': 'Плагины были установлены.'
|
||||
'done_plugins': 'Плагины были установлены.',
|
||||
'mhtb_not_found_title': 'Mister Horse Product Manager не найден',
|
||||
'mhtb_not_found_text': 'Mister Horse Product Manager не установлен в префиксе Wine. Пожалуйста, сначала установите его.'
|
||||
}
|
||||
@@ -37,5 +37,7 @@ STRINGS = {
|
||||
'plugin_note': 'Примітка до приватних плагінів',
|
||||
'plugin_note_text': 'Ці плагіни доступні тут: https://t.me/Aegnux',
|
||||
'done_ae': 'AE було встановлено.',
|
||||
'done_plugins': 'Плагіни було встановлено.'
|
||||
'done_plugins': 'Плагіни було встановлено.',
|
||||
'mhtb_not_found_title': 'Mister Horse Product Manager не знайдено',
|
||||
'mhtb_not_found_text': 'Mister Horse Product Manager не встановлено в префіксі Wine. Будь ласка, спочатку встановіть його.'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user