diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9b1a89..15a38e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,7 @@ set(MAIN_HEADERS
src/modloader.h
src/sunshine.h
src/lightmap.h
+ src/define.h
)
set(MAIN_SOURCE
@@ -311,7 +312,8 @@ else()
add_compile_options(-march=native -mtune=native)
endif()
if(DEBUG)
- add_compile_options(-g3 -O0 -fno-omit-frame-pointer -ggdb -fcheck-new -gbtf)
+ add_compile_options(-g3 -fno-omit-frame-pointer)
+ #add_compile_options(-g3 -O0 -fno-omit-frame-pointer -ggdb -fcheck-new -gbtf)
else()
add_compile_options(-O2 -ffast-math -fipa-pta -ftree-vectorize -fstdarg-opt -fomit-frame-pointer -frename-registers
-ffunction-sections -fdata-sections -fvisibility=hidden)
diff --git a/PORTING.md b/PORTING.md
index 0034a08..d30bb89 100644
--- a/PORTING.md
+++ b/PORTING.md
@@ -1,10 +1,9 @@
-# О состоянии портов
-
+# Операционные системы
| Платформа | Завершено | Состояние |
| Platform | Done % | State |
| :--- | :---: | :--- |
| Windows | 100% | Играбельно |
-| Linux | 90% | В работе, но уже играбельно
TODO:
* Fix Wallpaper manager |
+| Linux | 91% | В работе, но уже играбельно
TODO:
* Fix Wallpaper manager |
| *BSD | 15% | в работе |
| GNU/Hurd | 1% | В работе |
| Solaris/OpenSolaris | 1% | В работе |
@@ -19,3 +18,48 @@
| Аврора ОС | 0% | Возможно, но пока не в работе |
| ChromeOS/ChromiumOS | 0.4% | Неизвестное |
| MacOS | 10% | Неизвестное, но работа ведётся |
+
+
+# Окружения рабочего стола
+| Окружение | Завершено |
+| LXDE | 100% |
+| XFCE | 0% |
+| GNOME | 0% |
+| KDE | 0% |
+| LXQt | 0% |
+| MATE | 0% |
+| Cinnamon | 0% |
+| Budgie | 0% |
+| Deepin | 0% |
+| COSMIC | 0% |
+| Pantheon | 0% |
+| Enlightenment | 0% |
+| Unity | 0% |
+| Sugar Desktop | 0% |
+| ROX Desktop | 0% |
+| Fluxbox | 0% |
+| Openbox | 0% |
+| Trinity | 0% |
+| Blackbox | 0% |
+| AwesomeWM | 0% |
+| DWM | 0% |
+| hyperland | 0% |
+| niri | 0% |
+| Fish | 0% |
+| Lumina | 0% |
+| IceWM | 0% |
+| Window Maker | 0% |
+| I3 | 0% |
+| Sway | 0% |
+| Wayfire | 0% |
+| bspwm | 0% |
+| herbstluftwm | 0% |
+| xmonad | 0% |
+| qtile | 0% |
+| CDE | 0% |
+| Fvwm95 | 0% |
+| OpenWindows | 0% |
+| Dt | 0% |
+| 9wm | 0% |
+| Twm | 0% |
+| WindowLab | 0% |
diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp
index c9005b4..2cc93aa 100644
--- a/binding-mri/binding-mri.cpp
+++ b/binding-mri/binding-mri.cpp
@@ -31,6 +31,7 @@
#include "audio.h"
#include "boost-hash.h"
#include "meow.h"
+#include "sunshine.h"
#include
#include
@@ -129,7 +130,7 @@ void fileIntBindingInit();
void journalBindingInit();
void wallpaperBindingInit();
-#ifdef __linux__
+#ifdef unix_like
void wallpaperBindingTerminate();
#endif
void nikoBindingInit();
@@ -591,7 +592,7 @@ static void mriBindingExecute(){
static void mriBindingTerminate(){
rb_raise(rb_eSystemExit, " ");
-#ifdef __linux__
+#ifdef unix_like
wallpaperBindingTerminate();
#endif
}
diff --git a/binding-mri/journal-binding.cpp b/binding-mri/journal-binding.cpp
index 2ba0cb9..2e2a40f 100644
--- a/binding-mri/journal-binding.cpp
+++ b/binding-mri/journal-binding.cpp
@@ -3,11 +3,12 @@
#include "pipe.h"
#include "debugwriter.h"
#include "i18n.h"
+#include "define.h"
//OS-Specific code
#if defined _WIN32
#define OS_W32
-#elif defined __APPLE__ || __linux__
+#elif unix_like
#define LINUX
#ifdef __APPLE__
#define OS_OSX
@@ -38,7 +39,7 @@ static volatile char message_buffer[BUFFER_SIZE];
static volatile bool active = false;
static volatile int message_len = 0;
-#ifdef LINUX
+#ifdef unix_like
static std::string PIPE_PATH = std::string(getpwuid(getuid())->pw_dir) + "/.oneshot-pipe";
static volatile int out_pipe = -1;
void cleanup_pipe(){
diff --git a/binding-mri/niko-binding.cpp b/binding-mri/niko-binding.cpp
index af4253b..f5c1b99 100644
--- a/binding-mri/niko-binding.cpp
+++ b/binding-mri/niko-binding.cpp
@@ -3,11 +3,12 @@
#include "sharedstate.h"
#include "debugwriter.h"
#include "eventthread.h"
+#include "define.h"
#if defined _WIN32
#define OS_W32
#include
-#elif defined __APPLE__ || __linux__
+#elif unix_like
#define LINUX
#ifdef __APPLE__
#define OS_OSX
@@ -42,7 +43,7 @@ static volatile char message_buffer[BUFFER_SIZE];
static volatile bool active = false;
static volatile int message_len = 0;
-#ifdef LINUX
+#ifdef unix_like
static std::string NIKO_PIPE_PATH = std::string(getpwuid(getuid())->pw_dir) + "/.oneshot-niko-pipe";
static volatile int out_pipe = -1;
void niko_cleanup_pipe(){
@@ -97,7 +98,7 @@ RB_METHOD(nikoPrepare){
//SDL_VERSION(&syswindow.version);
//SDL_GetWindowWMInfo(shState->rtData().window, &syswindow);
-#ifdef LINUX
+#ifdef unix_like
char path[PATH_MAX];
std::string journal;
@@ -196,7 +197,7 @@ RB_METHOD(nikoStart){
void nikoBindingInit(){
mutex = SDL_CreateMutex();
-#if defined __linux
+#if unix_like
mkfifo(NIKO_PIPE_PATH.c_str(), 0666);
atexit(niko_cleanup_pipe);
#endif
diff --git a/binding-mri/oneshot-binding.cpp b/binding-mri/oneshot-binding.cpp
index 4c8400d..ae01836 100644
--- a/binding-mri/oneshot-binding.cpp
+++ b/binding-mri/oneshot-binding.cpp
@@ -98,7 +98,7 @@ void oneshotBindingInit(){
// Constants
rb_const_set(module, rb_intern("OS"), rb_str_new2(shState->oneshot().os().c_str()));
- #ifdef __linux__
+ #ifdef unix_like
rb_const_set(module, rb_intern("DE"), rb_str_new2(shState->oneshot().desktopEnv.c_str()));
#endif
rb_const_set(module, rb_intern("USER_NAME"), rb_str_new2(shState->oneshot().userName().c_str()));
diff --git a/binding-mri/screen-binding.cpp b/binding-mri/screen-binding.cpp
index 2d3ddd3..a0bd630 100644
--- a/binding-mri/screen-binding.cpp
+++ b/binding-mri/screen-binding.cpp
@@ -27,7 +27,7 @@ static void start(){
CreateProcessW(path, args, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
delete [] args;
#else
-#if defined __linux
+#if defined unix_like
char path[PATH_MAX];
ssize_t len = readlink("/proc/self/exe", path, PATH_MAX);
if (len == -1)
diff --git a/binding-mri/wallpaper-binding.cpp b/binding-mri/wallpaper-binding.cpp
index b870ce9..b0fc54b 100644
--- a/binding-mri/wallpaper-binding.cpp
+++ b/binding-mri/wallpaper-binding.cpp
@@ -3,10 +3,8 @@
#include
#include
#include