Pith - wedge_linux
wedge_linux/main.cpp [0.8 kb]
Modified: 20:43:24 147 026 (13 Aug 026)
10 Days Ago
#include <QApplication>
#include <QSharedMemory>
#include <QSystemSemaphore>
#include "WedgeNote.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");

    a.setQuitOnLastWindowClosed(false);

    NoteWindow w;
    w.show();
    return a.exec();
}
Updates
Kerf - Android 157.026
Kiln - Android 157.026
Wedge - Android 156.026
Whittle - Linux 155.026
Grit - Firefox/Chrome 154.026

Menu
Calendar
Project Tin (024/029)
Miter
RSS Feed
User Avatar
@vgmlr
=SUM(parts)
0.00151
257,183 (+437)