35 lines
642 B
C++
35 lines
642 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Open.Linux.cpp
|
|
Date: 2021-6-12
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
#include <RuntimeInternal.hpp>
|
|
#include "Processes.hpp"
|
|
#include "Open.Linux.hpp"
|
|
|
|
#include <unistd.h>
|
|
|
|
namespace Aurora::Processes
|
|
{
|
|
static void LinuxOpenAsync(const AuString &open)
|
|
{
|
|
if (fork() == 0)
|
|
{
|
|
setsid();
|
|
execl("xdg-open", open.c_str());
|
|
}
|
|
}
|
|
|
|
AUKN_SYM void OpenUri(const AuString &uri)
|
|
{
|
|
OpenUri(uri);
|
|
}
|
|
|
|
AUKN_SYM void OpenFile(const AuString &file)
|
|
{
|
|
OpenUri(file);
|
|
}
|
|
} |