Skip to content

Instantly share code, notes, and snippets.

View lighth7015's full-sized avatar
Perpetually exhausted.

Robert Butler lighth7015

Perpetually exhausted.
View GitHub Profile
@lighth7015
lighth7015 / configure.log
Created April 8, 2020 16:25
SDK build system
SDK / Build Configuration Manager
* About SDK / Build Configuration Manager:
The SDK Manager confgures your system's build environment for the product, then building and automatically
packaging it for your computer (including a bootable ISO).
* SDK / Build environment:
Build Type : release
@lighth7015
lighth7015 / designer.cpp
Last active March 30, 2020 19:47
Dialog designer?
class DesignerForm: public wxPanel {
DECLARE_DYNAMIC_CLASS( DesignerForm )
DECLARE_EVENT_TABLE()
auto Designable(wxControl* instance) {
auto handler = [this, instance]( wxMouseEvent& cursor ) {
wxControl& control(*instance);
wxPrintf ( "Mouse event. ID = %d\n", control.GetId());
};
@lighth7015
lighth7015 / app.cpp
Last active March 29, 2020 18:57
wxFrame application
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
/**
* SignIn class declaration
*/
class SignIn: public wxFrame {
@lighth7015
lighth7015 / backtrace.log
Created March 29, 2020 18:30
wxWidgets backtrace
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff69de3e0 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0 0x00007ffff69de3e0 in () at /usr/lib/libgtk-x11-2.0.so.0
#1 0x00007ffff69e45d0 in gtk_rc_get_style () at /usr/lib/libgtk-x11-2.0.so.0
#2 0x00007ffff77fb256 in wxControl::GetDefaultAttributesFromGTKWidget(_GtkWidget*, bool, int) () at /usr/lib/libwx_gtk2u_core-3.0.so.0
#3 0x00007ffff77fb6e2 in wxControl::GetDefaultAttributes() const () at /usr/lib/libwx_gtk2u_core-3.0.so.0
#4 0x00007ffff7965f8b in wxWindowBase::GetFont() const () at /usr/lib/libwx_gtk2u_core-3.0.so.0
#5 0x00007ffff7834ac5 in wxStaticText::SetFont(wxFont const&) () at /usr/lib/libwx_gtk2u_core-3.0.so.0
#6 0x0000555555561c7c in SignIn::SignIn(wxWindow*, int, wxPoint const&, wxSize const&, long) (this=0x5555555f9b40, parent=0x0, id=10000, pos=..., size=..., style=537401408) at app.cpp:71
@lighth7015
lighth7015 / wxdrag.cpp
Created March 24, 2020 13:34
wxwidgets drag child
#include <wx/wx.h>
#include <wx/utils.h>
template <class T>
class Movable : public T {
bool dragging;
int x,y;
int height, width;
int top, left, topScreen, leftScreen;
wxWindow* parent;
@lighth7015
lighth7015 / textwrap.cpp
Created March 21, 2020 21:11
FLTK text justification
// Compile with FLTK (for Windows, OSX or Linux)
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/fl_draw.H>
#include <FL/Fl_Box.H>
#include <sstream>
#include <iterator>
#include <utility>
#include <string>
#include <vector>
@lighth7015
lighth7015 / build.log
Created March 21, 2020 19:23
build.log
i686-pc-msdosdjgpp-g++ -DPACKAGE_NAME=\"fox\" -DPACKAGE_TARNAME=\"fox\" -DPACKAGE_VERSION=\"1.6.57\" -DPACKAGE_STRING=\"fox\ 1.6.57\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"fox\" -DVERSION=\"1.6.57\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_VSSCANF=1 -DHAVE_VSNPRINTF=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_ZLIB_H=1 -I. -Wall -Wformat -Woverloaded-virtual -Wshadow -DUNICODE -DHAVE_ZLIB_H=1 -DHAVE_XFT_H=1 -I/usr/include/freetype2 -DNO_XIM -I/usr/include -MT reswrap.o -MD -MP -MF .deps/reswrap.Tpo -c -o reswrap.o reswrap.cpp
mv -f .deps/reswr
@lighth7015
lighth7015 / build.log
Created March 20, 2020 17:25
DJGPP build log
echo "compiling c:/mwinsrc/src/bin/landmine.exe"
compiling c:/mwinsrc/src/bin/landmine.exe
gcc -Wno-deprecated-declarations -O3 -s -DHAVE_FILEIO=1 -DMW_FEATURE_IMAGES=1 -DMW_FEATURE_TIMERS=1 -DHAVE_SIGNAL=0 -DHAVE_FPRINTF=0 -DNONETWORK=1 -DUPDATEREGIONS=1 -DERASEMOVE=1 -DHAVE_MMAP=0 -DNANOWM=1 -DHAVE_BMP_SUPPORT=1 -DHAVE_GIF_SUPPORT=1 -DHAVE_PNM_SUPPORT=0 -DHAVE_XPM_SUPPORT=1 -DHAVE_JPEG_SUPPORT=1 -DHAVE_PNG_SUPPORT=1 -DHAVE_FNT_SUPPORT=1 -DHAVE_FREETYPE_2_SUPPORT=1 -I/usr/include/freetype2 -DSCREEN_HEIGHT=768 -DSCREEN_WIDTH=1024 -DSCREEN_DEPTH=8 -DSCREEN_PIXTYPE=MWPF_TRUECOLORARGB -DMWPIXEL_FORMAT=MWPF_TRUECOLORARGB -Lc:/mwinsrc/src/lib -Ic:/mwinsrc/src/include -o c:/mwinsrc/src/bin/landmine.exe demos/nanox/landmine.o -ljpeg -lpng -lft2 -lz -lnano-X
c:/mwinsrc/src/lib/libnano-X.a(kbd_dj.o):kbd_dj.c:(.text+0x940): multiple definition of `_inportb'
c:/mwinsrc/src/lib/libnano-X.a(scr_djvesa.o):scr_djvesa.c:(.text+0x350): first defined here
c:/mwinsrc/src/lib/libnano-X.a(kbd_dj.o):kbd_dj.c:(.text+0x950): mult
@lighth7015
lighth7015 / wayfire.log
Created March 18, 2020 21:50
Crash log
II 18-03-20 17:48:02.669 - [src/main.cpp:260] Starting wayfire
II 18-03-20 17:48:02.683 - [render/egl.c:246] Using EGL 1.5
II 18-03-20 17:48:02.683 - [render/egl.c:247] Supported EGL extensions: EGL_EXT_buffer_age EGL_EXT_client_sync EGL_EXT_create_context_robustness EGL_EXT_output_base EGL_EXT_stream_acquire_mode EGL_EXT_sync_reuse EGL_IMG_context_priority EGL_KHR_config_attribs EGL_KHR_create_context_no_error EGL_KHR_context_flush_control EGL_KHR_create_context EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_partial_update EGL_KHR_swap_buffers_with_damage EGL_KHR_no_config_context EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_reusable_sync EGL_KHR_stream EGL_KHR_stream_attrib EGL_KHR_stream_consumer_gltexture EGL_KHR_stream_cross_process_fd EGL_KHR_stream_fifo EGL_KHR_stream_producer_eglsurface EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL
@lighth7015
lighth7015 / sdk.py
Created March 18, 2020 17:14
sdk.py
#!/usr/bin/env python
"""Wrapper for mesonbuild"""
import mesonbuild.mesonmain as sdk, sys, os, os.path as path
sdk_options = [ '--native-file', 'sdk/spec/system.txt', '--cross-file', 'sdk/spec/compiler.txt', 'build' ]
misc_params = sys.argv[1:]
sys.argv = list(( sys.argv[0], )) + sdk_options + misc_params
sys_path = os.environ['PATH']