Skip to content

Commit

Permalink
ubuntu workflow attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Odizinne committed Aug 16, 2024
1 parent 5d4bb27 commit e9f9b20
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 8 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/qt-linux-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build

on:
push:
branches:
- linux

jobs:
linux-build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.7.2'
host: 'linux'
add-tools-to-path: true

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libgl1-mesa-dev
- name: Build with qmake
run: |
mkdir build
cd build
qmake ../HeadsetControl-Qt.pro CONFIG+=release
make -j$(nproc)
pwd
ls
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: HeadsetControl-Qt_linux_64
path: build/HeadsetControl-Qt
5 changes: 3 additions & 2 deletions HeadsetControl-Qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
DEPENDENCIES_DIR = $$PWD/src/dependencies
DEST_DIR = $$OUT_PWD/release/dependencies

QMAKE_POST_LINK += powershell -Command "New-Item -ItemType Directory -Path '$$DEST_DIR' -Force; Copy-Item -Path '$$DEPENDENCIES_DIR\*' -Destination '$$DEST_DIR' -Recurse -Force"
#mkdir $$DEST_DIR
win32 {
QMAKE_POST_LINK += powershell -Command "New-Item -ItemType Directory -Path '$$DEST_DIR' -Force; Copy-Item -Path '$$DEPENDENCIES_DIR\*' -Destination '$$DEST_DIR' -Recurse -Force"
}

4 changes: 2 additions & 2 deletions src/HeadsetControlQt/headsetcontrolqt.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "HeadsetControlQt.h"
#include "ui_HeadsetControlQt.h"
#include "headsetcontrolqt.h"
#include "ui_headsetcontrolqt.h"
#include "utils.h"
#include "shortcutmanager.h"
#include <QIcon>
Expand Down
12 changes: 8 additions & 4 deletions src/ShortcutManager/shortcutmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
#include <QStandardPaths>
#include <QSysInfo>
#include <QtWidgets/QWidget>
#include <shlobj.h>
#include <shobjidl.h>
#include <windows.h>

const QString desktopFile = QDir::homePath() + "/.config/autostart/headsetcontrol-qt.desktop";
#ifdef _WIN32
#include <shlobj.h>
#include <shobjidl.h>
#include <windows.h>
#endif

const QString desktopFile = QDir::homePath() + "/.config/autostart/headsetcontrol-qt.desktop";

#ifdef _WIN32
QString getStartupFolder()
{
QString path;
Expand Down Expand Up @@ -104,6 +107,7 @@ void manageShortcut(bool state)
}
}
}
#endif

bool isDesktopfilePresent()
{
Expand Down

0 comments on commit e9f9b20

Please sign in to comment.