Skip to content

Commit

Permalink
Merge pull request #208 from mutchiko/mutchiko-patch-1
Browse files Browse the repository at this point in the history
Improvments for next release
  • Loading branch information
dmitry-s93 authored Jan 1, 2025
2 parents d7df72a + b1ecc9d commit b6c24ca
Show file tree
Hide file tree
Showing 5 changed files with 570 additions and 516 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Network)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets Network)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets LinguistTools DBus Network)

set(PROJECT_SOURCES
Expand Down Expand Up @@ -40,8 +40,8 @@ set(TS_FILES
MControlCenter_zh_CN.ts
)

find_program(LUPDATE_EXECUTABLE lupdate lupdate-qt5 REQUIRED)
find_program(LRELEASE_EXECUTABLE lrelease lrelease-qt5 REQUIRED)
find_program(LUPDATE_EXECUTABLE lupdate lupdate6 lupdate-qt6 PATHS /lib/qt6/bin/ REQUIRED)
find_program(LRELEASE_EXECUTABLE lrelease lrelease6 lrelease-qt6 PATHS /lib/qt6/bin/ REQUIRED)

foreach(_ts_file ${TS_FILES})
execute_process(COMMAND
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# MControlCenter

MControlCenter is a Free and Open Source GNU/Linux application that allows you to change the settings of MSI laptops.
![Screenshots of MControlCenter](https://user-images.githubusercontent.com/12676622/219121128-0476b54b-3330-40c7-b7ac-8d4a884f8abd.png)

![Screenshots of MControlCenter](https://github.com/user-attachments/assets/85616b6a-6ec4-4533-b1b7-e5d9b521f82d)



## Features

Expand All @@ -20,12 +23,13 @@ MControlCenter is a Free and Open Source GNU/Linux application that allows you t

- Saving multiple fan speed profiles

## Tested on
## Supported devices

The main device on which the application is being tested: **MSI Summit E16 Flip Evo A12MT**
The app uses the msi-ec driver that comes with the linux kernel, so device support depends on whether the kernel driver supports your device or not.

[List of tested devices](/docs/tested_devices.md)
[List of tested devices by msi-ec](https://github.com/BeardOverflow/msi-ec/blob/main/docs/supported_devices.md)

In case of missing performance mode selection, follow the steps on the msi-ec github page to add support for your device.

## Installation

Expand Down
3 changes: 3 additions & 0 deletions scripts/create_installer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -xe
echo "Creating the installer"

VERSION=$(grep -oP "(?<=MControlCenter VERSION )[0-9.]*" ../CMakeLists.txt)

Expand All @@ -21,3 +22,5 @@ cp ./install.sh ./uninstall.sh $DIST_DIR
tar -czvf $DIST_DIR.tar.gz $DIST_DIR

rm -r $DIST_DIR

echo "Installer created successfully"
9 changes: 4 additions & 5 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,10 @@ void MainWindow::setUpdateDataError(bool error) {
}

void MainWindow::setTabsEnabled(bool enabled) {
ui->infoTab->setEnabled(enabled);
ui->modeTab->setEnabled(enabled);
ui->overviewTab->setEnabled(enabled);
ui->batteryTab->setEnabled(enabled);
ui->fanControlTab->setEnabled(enabled);
ui->settingsTab->setEnabled(enabled);
ui->keyboardTab->setEnabled(enabled);
ui->debugTab->setEnabled(enabled);

if (modeTrayMenu)
Expand Down Expand Up @@ -394,7 +393,7 @@ void MainWindow::updateUserMode() {
ui->superBatteryModeRadioButton->click();
break;
default:
ui->modeTab->setDisabled(true);
ui->overviewTab->setDisabled(true);
if (modeTrayMenu)
modeTrayMenu->setDisabled(true);
break;
Expand Down Expand Up @@ -801,4 +800,4 @@ void MainWindow::createActions() {

void MainWindow::saveStateRequest(QSessionManager &sessionManager) {
sessionManager.setRestartHint(QSessionManager::RestartNever);
}
}
Loading

0 comments on commit b6c24ca

Please sign in to comment.