Pith - wedge_linux
wedge_linux/main.cpp [0.8 kb]
Modified: 20:30:50 62 026 (20 May 026)
10 Days Ago
#include <QApplication>
#include <QSharedMemory>
#include <QSystemSemaphore>
#include "NoteWindow.h"

int main(int argc, char *argv[]) {
    QApplication a(argc, argv);

    QSystemSemaphore semaphore("wedge_03569", 1);
    semaphore.acquire();

#ifndef Q_OS_WIN
    QSharedMemory nix_fix("wedge_key_03569");
    if (nix_fix.attach()) {
        nix_fix.detach();
    }
#endif

    static QSharedMemory sharedMemory("wedge_key_03569");
    bool isRunning = false;
    if (!sharedMemory.create(1)) {
        isRunning = true;
    }
    
    semaphore.release();

    if (isRunning) {
        return 0; 
    }

    QCoreApplication::setOrganizationName("wedge");
    QCoreApplication::setApplicationName("wedge");
    QApplication::setApplicationDisplayName("wedge");

    NoteWindow w;
    w.show();
    return a.exec();
}
Updates
Shim - Android 70.026.1
Wedge - Linux 68.026.1
Wedge - Android 68.026.1
Taper - Linux 64.026.1
Ayh Extension - Chrome 63.026.1
Dev
TVShow (227) 'CSA'
TVShow (228) 'APT'
TVProgram (83) 'BXT'
Miter Update(s)
Shim (Dictation)

Menu
Calendar
Project Tin (024/029)
Miter
RSS Feed
User Avatar
@vgmlr
=SUM(parts)