Switch to meson
parent
ec8e653bcd
commit
daa9f03fa7
|
@ -1,24 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
project(sirEdit)
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(GTKMM gtkmm-3.0)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
file(GLOB SIR ${CMAKE_CURRENT_SOURCE_DIR}/sir/*.cpp)
|
||||
add_subdirectory(cppCommon)
|
||||
|
||||
find_package(OpenMP)
|
||||
if (OPENMP_FOUND)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
|
||||
endif()
|
||||
|
||||
add_executable(sirEdit ${SOURCES} ${SIR})
|
||||
target_include_directories(sirEdit PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/cppCommon ${CMAKE_CURRENT_SOURCE_DIR}/sir)
|
||||
target_link_directories(sirEdit PRIVATE ${GTKMM_LIBRARY_DIRS})
|
||||
target_include_directories(sirEdit PRIVATE ${GTKMM_INCLUDE_DIRS})
|
||||
target_link_libraries(sirEdit skill.cpp.common ${GTKMM_LIBRARIES})
|
||||
target_include_directories(sirEdit PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
@ -2,6 +2,123 @@
|
|||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkPopover" id="AddToolDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="AddToolName">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="placeholder_text" translatable="yes">Name</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="AddToolDescription">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="placeholder_text" translatable="yes">Description</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="AddToolCMD">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="placeholder_text" translatable="yes">Command-Line</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="AddToolDo">
|
||||
<property name="label">gtk-add</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<template class="EditTool" parent="GtkPopover">
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="EditToolName">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="placeholder_text" translatable="yes">Name</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="EditToolDesc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="placeholder_text" translatable="yes">Description</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="EditToolCMD">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="placeholder_text" translatable="yes">Command-Line</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="EditToolDo">
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</template>
|
||||
<object class="GtkDialog" id="Export">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Export</property>
|
||||
|
@ -49,6 +166,9 @@
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -65,8 +185,9 @@
|
|||
<object class="GtkComboBoxText">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="active">0</property>
|
||||
<items>
|
||||
<item translatable="yes">Make-Script</item>
|
||||
<item translatable="yes">Makefile</item>
|
||||
<item translatable="yes">SKilL</item>
|
||||
</items>
|
||||
</object>
|
||||
|
@ -81,6 +202,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="action">select-folder</property>
|
||||
<property name="local_only">False</property>
|
||||
<property name="title" translatable="yes"/>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -149,190 +271,6 @@
|
|||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkDialog" id="NewToolDialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="ToolNewExit">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="ToolNewAdd">
|
||||
<property name="label">gtk-add</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Tool name: </property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="ToolName">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Description:</property>
|
||||
<property name="ellipsize">start</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="ToolDescription">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Buildargs:</property>
|
||||
<property name="ellipsize">start</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="ToolCommand">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
@ -353,10 +291,78 @@
|
|||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-redo</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image5">
|
||||
<object class="GtkImage" id="image6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-properties</property>
|
||||
<property name="stock">gtk-convert</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-convert</property>
|
||||
</object>
|
||||
<object class="GtkPopoverMenu" id="Menu">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="position">bottom</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">Import</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="image">image8</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="ExportButton">
|
||||
<property name="label" translatable="yes">Export</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="image">image6</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-info</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="submenu">main</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="mainWindow">
|
||||
<property name="width_request">800</property>
|
||||
|
@ -443,11 +449,15 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="MenuButton">
|
||||
<object class="GtkMenuButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="image">image5</property>
|
||||
<property name="direction">none</property>
|
||||
<property name="popover">Menu</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
|
@ -478,10 +488,16 @@
|
|||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher">
|
||||
<object class="GtkAlignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stack">stack1</property>
|
||||
<child>
|
||||
<object class="GtkStackSwitcher">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stack">stack1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
@ -1057,99 +1073,4 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkImage" id="image6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-convert</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image7">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-ok</property>
|
||||
</object>
|
||||
<object class="GtkImage" id="image8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-convert</property>
|
||||
</object>
|
||||
<object class="GtkPopoverMenu" id="Menu">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="relative_to">MenuButton</property>
|
||||
<property name="position">bottom</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">Import</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="image">image8</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="ExportButton">
|
||||
<property name="label" translatable="yes">Export</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="image">image6</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-preferences</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label">gtk-info</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="submenu">main</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -2,145 +2,6 @@
|
|||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkImage" id="image1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="stock">gtk-properties</property>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="StartupWindow">
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">300</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="window_position">center</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">TODO: Add icon/name</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="OpenSir">
|
||||
<property name="label">gtk-open</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="Settings">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="image">image1</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="MultispecWindow">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="attached_to">StartupWindow</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Merge Specifications</property>
|
||||
<property name="spacing">1</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="MultispecAdd">
|
||||
<property name="label">gtk-add</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="MultispecMerge">
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="MultispecList">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkImage" id="image2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
@ -153,7 +14,6 @@
|
|||
</object>
|
||||
<object class="GtkPopover" id="SettingMenu">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="relative_to">Settings</property>
|
||||
<property name="position">bottom</property>
|
||||
<property name="constrain_to">none</property>
|
||||
<child>
|
||||
|
@ -215,4 +75,229 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="StartupWindow">
|
||||
<property name="width_request">400</property>
|
||||
<property name="height_request">300</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="window_position">center</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">SirEdit</property>
|
||||
<property name="show_close_button">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label_item">
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="OpenSir">
|
||||
<property name="label">gtk-open</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="Settings">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="direction">none</property>
|
||||
<property name="popover">SettingMenu</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="ImportSKilLWindow">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="attached_to">StartupWindow</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Import SKilL-File</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="doImport">
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"> Source folder: </property>
|
||||
<property name="justify">right</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes"> Source file: </property>
|
||||
<property name="justify">right</property>
|
||||
<property name="xalign">1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFileChooserButton" id="importFolder">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="action">select-folder</property>
|
||||
<property name="local_only">False</property>
|
||||
<property name="title" translatable="yes"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFileChooserButton" id="importFile">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="local_only">False</property>
|
||||
<property name="title" translatable="yes"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="MultispecWindow">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="window_position">center-on-parent</property>
|
||||
<property name="attached_to">StartupWindow</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Merge Specifications</property>
|
||||
<property name="spacing">1</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="MultispecAdd">
|
||||
<property name="label">gtk-add</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="MultispecMerge">
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="always_show_image">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="MultispecList">
|
||||
<property name="width_request">500</property>
|
||||
<property name="height_request">200</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
{
|
||||
"app-id": "de.marko10_000.sirEdit",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "3.32",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "/app/bin/sirEdit",
|
||||
"writable-sdk": true,
|
||||
"finish-args": [
|
||||
"--require-version=1.0.0",
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs.*",
|
||||
"--talk-name=org.gnome.SettingsDaemon.Color",
|
||||
"--own-name=de.marko10-000.sirEdit"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"name": "update-meson",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://files.pythonhosted.org/packages/0b/93/ce7dc081e742d4b87e2d591e709f427992cdefdf0bac3f7638cb4f2bb14b/meson-0.51.0.tar.gz",
|
||||
"sha256": "b9a59a2116836257d53b2b803337e797ab4d11da4a9dfbaa76544b0ec0894dd9"
|
||||
}
|
||||
],
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"rm -v /usr/share/man /usr/share/doc",
|
||||
"pip3 install ."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sigc++",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://github.com/libsigcplusplus/libsigcplusplus/releases/download/2.10.2/libsigc++-2.10.2.tar.xz",
|
||||
"sha256": "b1ca0253379596f9c19f070c83d362b12dfd39c0a3ea1dd813e8e21c1a097a98"
|
||||
}
|
||||
],
|
||||
"config-opts": [
|
||||
"--enable-static",
|
||||
"--disable-shared"
|
||||
],
|
||||
"cleanup": [
|
||||
"*.a",
|
||||
"*.la"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "glibmm",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://ftp.gnome.org/pub/GNOME/sources/glibmm/2.60/glibmm-2.60.0.tar.xz",
|
||||
"sha256": "a3a1b1c9805479a16c0018acd84b3bfff23a122aee9e3c5013bb81231aeef2bc"
|
||||
}
|
||||
],
|
||||
"config-opts": [
|
||||
"--enable-static",
|
||||
"--disable-shared"
|
||||
],
|
||||
"cleanup": [
|
||||
"*.a",
|
||||
"*.la"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "cairomm",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://ftp.gnome.org/pub/GNOME/sources/cairomm/1.12/cairomm-1.12.0.tar.xz",
|
||||
"sha256": "a54ada8394a86182525c0762e6f50db6b9212a2109280d13ec6a0b29bfd1afe6"
|
||||
}
|
||||
],
|
||||
"config-opts": [
|
||||
"--enable-static",
|
||||
"--disable-shared"
|
||||
],
|
||||
"cleanup": [
|
||||
"*.a",
|
||||
"*.la"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pangomm",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://ftp.gnome.org/pub/GNOME/sources/pangomm/2.42/pangomm-2.42.0.tar.xz",
|
||||
"sha256": "ca6da067ff93a6445780c0b4b226eb84f484ab104b8391fb744a45cbc7edbf56"
|
||||
}
|
||||
],
|
||||
"config-opts": [
|
||||
"--enable-static",
|
||||
"--disable-shared"
|
||||
],
|
||||
"cleanup": [
|
||||
"*.a",
|
||||
"*.la"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "atkmm",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://ftp.gnome.org/pub/GNOME/sources/atkmm/2.28/atkmm-2.28.0.tar.xz",
|
||||
"sha256": "4c4cfc917fd42d3879ce997b463428d6982affa0fb660cafcc0bc2d9afcedd3a"
|
||||
}
|
||||
],
|
||||
"config-opts": [
|
||||
"--enable-static",
|
||||
"--disable-shared"
|
||||
],
|
||||
"cleanup": [
|
||||
"*.a",
|
||||
"*.la"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gtkmm",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://ftp.gnome.org/pub/GNOME/sources/gtkmm/3.24/gtkmm-3.24.1.tar.xz",
|
||||
"sha256": "ddfe42ed2458a20a34de252854bcf4b52d3f0c671c045f56b42aa27c7542d2fd"
|
||||
}
|
||||
],
|
||||
"config-opts": [
|
||||
"--enable-static",
|
||||
"--disable-shared"
|
||||
],
|
||||
"cleanup": [
|
||||
"*.a",
|
||||
"*.la"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "java",
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz",
|
||||
"sha256": "99be79935354f5c0df1ad293620ea36d13f48ec3ea870c838f20c504c9668b57"
|
||||
}
|
||||
],
|
||||
"buildsystem": "simple",
|
||||
"build-commands": [
|
||||
"mkdir -p /app/jre",
|
||||
"cp -rav * /app/jre",
|
||||
"mkdir -p /app/bin",
|
||||
"echo '# /usr/bin/env bash' >> /app/bin/java; echo 'exec /app/jre/bin/java $@' >> /app/bin/java",
|
||||
"echo '# /usr/bin/env bash' >> /app/bin/javac; echo 'exec /app/jre/bin/javac $@' >> /app/bin/javac",
|
||||
"chmod +x /app/bin/java /app/bin/javac"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sirEdit",
|
||||
"buildsystem": "meson-ninja",
|
||||
"sources": [
|
||||
{
|
||||
"type": "file",
|
||||
"path": "."
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"commands": [
|
||||
"ln -s /app/lib/libgtkmm-3.0.a /usr/lib/libgtkmm-3.0.a",
|
||||
"ls -la /usr/lib/libgtkmm-3.0.a"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
#include <functional>
|
||||
#include <gtkmm.h>
|
||||
#include <sirEdit/data/serialize.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace sirEdit {
|
||||
extern Gtk::Application* mainApplication;
|
||||
|
|
|
@ -0,0 +1,73 @@
|
|||
project('sirEdit', ['cpp'],
|
||||
version: '1.0.0',
|
||||
meson_version: '>= 0.51.0'
|
||||
)
|
||||
|
||||
cmake = import('cmake')
|
||||
cpp = meson.get_compiler('cpp')
|
||||
openmp = cpp.find_library('gomp')
|
||||
cppCommon = cmake.subproject('cppCommon')
|
||||
skillLib = cppCommon.dependency('skill_cpp_common')
|
||||
|
||||
thread_dep = dependency('threads')
|
||||
gtkmm = dependency('gtkmm-3.0', version: '>= 3.18')
|
||||
|
||||
# Sources of sir
|
||||
src_sir = [
|
||||
'sir/CommentFieldDeclarations.cpp',
|
||||
'sir/CommentTagFieldDeclarations.cpp',
|
||||
'sir/CustomFieldOptionFieldDeclarations.cpp',
|
||||
'sir/FieldLikeFieldDeclarations.cpp',
|
||||
'sir/HintFieldDeclarations.cpp',
|
||||
'sir/IdentifierFieldDeclarations.cpp',
|
||||
'sir/RestrictionFieldDeclarations.cpp',
|
||||
'sir/ToolFieldDeclarations.cpp',
|
||||
'sir/TypeFieldDeclarations.cpp',
|
||||
'sir/File.cpp',
|
||||
'sir/CommentPools.cpp',
|
||||
'sir/CommentTagPools.cpp',
|
||||
'sir/CustomFieldOptionPools.cpp',
|
||||
'sir/FieldLikePools.cpp',
|
||||
'sir/HintPools.cpp',
|
||||
'sir/IdentifierPools.cpp',
|
||||
'sir/RestrictionPools.cpp',
|
||||
'sir/ToolPools.cpp',
|
||||
'sir/TypePools.cpp',
|
||||
'sir/TypesOfComment.cpp',
|
||||
'sir/TypesOfCommentTag.cpp',
|
||||
'sir/TypesOfCustomFieldOption.cpp',
|
||||
'sir/TypesOfFieldLike.cpp',
|
||||
'sir/TypesOfHint.cpp',
|
||||
'sir/TypesOfIdentifier.cpp',
|
||||
'sir/TypesOfRestriction.cpp',
|
||||
'sir/TypesOfTool.cpp',
|
||||
'sir/TypesOfType.cpp'
|
||||
]
|
||||
inc_sir = include_directories('sir')
|
||||
|
||||
# SirEdit files
|
||||
src_siredit = [
|
||||
'src/main.cpp',
|
||||
'src/data/serializeSIR.cpp',
|
||||
'src/gui/loadFile.cpp',
|
||||
'src/gui/mainWindow.cpp',
|
||||
'src/gui/overview.cpp',
|
||||
'src/gui/startupWindow.cpp',
|
||||
'src/gui/toolsEditor.cpp'
|
||||
]
|
||||
inc_siredit = include_directories('include')
|
||||
|
||||
# Resource encoding
|
||||
resource_encoder = executable('resource_encoder', ['resource_encoder.cpp'], native: true)
|
||||
src_resources = [
|
||||
custom_target('startupWindow.glade',
|
||||
input: ['data/gui/startupWindow.glade'],
|
||||
output: ['tmpres_startupWindow_glade.cpp'],
|
||||
command: [resource_encoder, '@INPUT0@', '@OUTPUT0@', 'sirEdit_startupWindow_glade']),
|
||||
custom_target('mainWindow.glade',
|
||||
input: ['data/gui/mainWindow.glade'],
|
||||
output: ['tmpres_mainWindow_glade.cpp'],
|
||||
command: [resource_encoder, '@INPUT0@', '@OUTPUT0@', 'sirEdit_mainWindow_glade'])
|
||||
]
|
||||
|
||||
executable('sirEdit', src_sir + src_siredit + src_resources, cpp_args: '-std=c++17', dependencies: [gtkmm, skillLib, openmp, thread_dep], include_directories: [inc_sir, inc_siredit], install: true)
|
|
@ -0,0 +1,55 @@
|
|||
#include <cstdio>
|
||||
#include <stdlib.h>
|
||||
|
||||
char gensymbol(int id) {
|
||||
if(id < 10)
|
||||
return '0' + id;
|
||||
return 'a' + id - 10;
|
||||
}
|
||||
|
||||
void writedata(FILE* file, const char* data) {
|
||||
int counter = 0;
|
||||
while(data[counter] != 0)
|
||||
counter++;
|
||||
fwrite(data, 1, counter, file);
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
FILE* input = fopen(argv[1], "r");
|
||||
if(!input)
|
||||
return 2;
|
||||
|
||||
FILE* output = fopen(argv[2], "w");
|
||||
if(!output)
|
||||
return 3;
|
||||
|
||||
writedata(output, "#include <string>\nstd::string ");
|
||||
writedata(output, argv[3]);
|
||||
writedata(output, "(\"");
|
||||
|
||||
char buffer[1];
|
||||
int counter = 0;
|
||||
int readed;
|
||||
while(readed = fread(buffer, 1, 1, input)) {
|
||||
counter += readed;
|
||||
writedata(output, "\\x");
|
||||
char tmp[2] = {0, 0};
|
||||
tmp[0] = gensymbol((buffer[0] & 0xF0) >> 4);
|
||||
writedata(output, tmp);
|
||||
tmp[0] = gensymbol(buffer[0] & 0x0F);
|
||||
writedata(output, tmp);
|
||||
if(counter % 50 == 0)
|
||||
writedata(output, "\"\n\"");
|
||||
}
|
||||
|
||||
char tmp[12];
|
||||
sprintf(tmp, "%d", counter);
|
||||
writedata(output, "\", ");
|
||||
writedata(output, tmp);
|
||||
writedata(output, ");");
|
||||
|
||||
fclose(input);
|
||||
fclose(output);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
# everything related to hints
|
||||
|
||||
/**
|
||||
* anything that can receive annotations
|
||||
*/
|
||||
interface Annotations {
|
||||
Hint[] hints;
|
||||
Restriction[] restrictions;
|
||||
}
|
||||
|
||||
/**
|
||||
* A hint including name and parsed arguments
|
||||
*/
|
||||
@abstract
|
||||
Hint {
|
||||
string name;
|
||||
}
|
||||
|
||||
HintValues extends Hint {
|
||||
/**
|
||||
* if a string has arguments at all, they are stored as plain text
|
||||
*/
|
||||
string[] arguments;
|
||||
}
|
||||
|
||||
HintTypes extends Hint {
|
||||
Type[] types;
|
||||
}
|
||||
|
||||
/**
|
||||
* Base of type and field restrictions.
|
||||
*/
|
||||
@abstract
|
||||
Restriction {
|
||||
string name;
|
||||
}
|
||||
|
||||
RestrictionValues extends Restriction {
|
||||
/**
|
||||
* restriction arguments are stored as strings, because I do not want
|
||||
* to introduce a million restriction types just for range restrictions.
|
||||
*/
|
||||
string[] arguments;
|
||||
}
|
||||
|
||||
RestrictionTypes extends Restriction {
|
||||
Type[] types;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
# comment handling
|
||||
|
||||
/**
|
||||
* A comment that explains types or fields.
|
||||
*
|
||||
* @author Timm Felden
|
||||
*/
|
||||
Comment {
|
||||
string[] text;
|
||||
CommentTag[] tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* The tag part of a comment. Can be used for easy inspection of comments.
|
||||
*/
|
||||
CommentTag {
|
||||
string name;
|
||||
string[] text;
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
include "types.skill"
|
||||
|
||||
@abstract
|
||||
FieldLike with Annotations {
|
||||
|
||||
/**
|
||||
* the comment provided by the user or null
|
||||
*/
|
||||
Comment comment;
|
||||
|
||||
/**
|
||||
* The type of the field.
|
||||
*/
|
||||
Type type;
|
||||
|
||||
/**
|
||||
* the skill name
|
||||
*/
|
||||
Identifier name;
|
||||
}
|
||||
|
||||
Field extends FieldLike {
|
||||
|
||||
/**
|
||||
* true, iff the field is an auto field
|
||||
*/
|
||||
bool isAuto;
|
||||
}
|
||||
|
||||
/**
|
||||
* a language custom field
|
||||
*/
|
||||
CustomField extends FieldLike {
|
||||
|
||||
/**
|
||||
* the name of the language that treats this fields
|
||||
*/
|
||||
string language;
|
||||
|
||||
CustomFieldOption[] options;
|
||||
|
||||
/**
|
||||
* the type name that will be used to create a language specific field type
|
||||
*/
|
||||
string typename;
|
||||
}
|
||||
|
||||
/**
|
||||
* an option passed to a custom field
|
||||
*/
|
||||
CustomFieldOption {
|
||||
string name;
|
||||
string[] arguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* a view onto a field
|
||||
*
|
||||
* @note some components such as annotations must not be set by views
|
||||
*/
|
||||
FieldView extends FieldLike {
|
||||
|
||||
/**
|
||||
* the viewed component
|
||||
*/
|
||||
FieldLike target;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
# meta include for all sir specification files
|
||||
|
||||
include "annotations.skill"
|
||||
include "comments.skill"
|
||||
include "fields.skill"
|
||||
include "tools.skill"
|
||||
include "types.skill"
|
|
@ -0,0 +1,21 @@
|
|||
# definition of tools and build properties for tools
|
||||
|
||||
include "types.skill"
|
||||
|
||||
Tool {
|
||||
string name;
|
||||
string description;
|
||||
string command;
|
||||
|
||||
/**
|
||||
* the map of user types selected by this tool.
|
||||
* The string can get "u", "r", "w", "d".
|
||||
*/
|
||||
map<UserdefinedType, string> selectedUserTypes;
|
||||
|
||||
/**
|
||||
* The set of fields selected by this tool.
|
||||
* The string can get "u", "r", "w", "c".
|
||||
*/
|
||||
map<UserdefinedType, FieldLike, string> selectedFields;
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
# all sorts of types in skill
|
||||
|
||||
include "annotations.skill"
|
||||
include "comments.skill"
|
||||
include "fields.skill"
|
||||
|
||||
/**
|
||||
* A nicer version of a skill name that can be used to adapt to a target language naming convention.
|
||||
*/
|
||||
Identifier {
|
||||
|
||||
/**
|
||||
* the plain skill name
|
||||
*/
|
||||
string skillname;
|
||||
|
||||
/**
|
||||
* parts used to create the skill name
|
||||
*/
|
||||
string[] parts;
|
||||
}
|
||||
|
||||
/**
|
||||
* The root of the type hierarchy.
|
||||
*/
|
||||
@abstract
|
||||
Type {}
|
||||
|
||||
/**
|
||||
* Types without type arguments.
|
||||
*/
|
||||
interface GroundType extends Type {
|
||||
|
||||
/**
|
||||
* the skill name used to identify this type, e.g. i32.
|
||||
*/
|
||||
Identifier name;
|
||||
}
|
||||
|
||||
/**
|
||||
* All types defined by skill.
|
||||
*/
|
||||
@abstract
|
||||
BuiltinType extends Type {}
|
||||
|
||||
/**
|
||||
* simple predefined types, such as i32
|
||||
*/
|
||||
SimpleType extends BuiltinType with GroundType {}
|
||||
|
||||
/**
|
||||
* representation of constant integers
|
||||
*/
|
||||
ConstantInteger extends SimpleType {
|
||||
|
||||
v64 value;
|
||||
}
|
||||
|
||||
/**
|
||||
* containers with a single base type
|
||||
*/
|
||||
SingleBaseTypeContainer extends BuiltinType {
|
||||
|
||||
/**
|
||||
* the base type of this container
|
||||
*/
|
||||
GroundType base;
|
||||
|
||||
/**
|
||||
* can be one of:
|
||||
*
|
||||
* "set", "array", "list"
|
||||
*/
|
||||
string kind;
|
||||
}
|
||||
|
||||
/**
|
||||
* @note kind is always "array"
|
||||
*/
|
||||
ConstantLengthArrayType extends SingleBaseTypeContainer {
|
||||
|
||||
/**
|
||||
* the constant length of this array
|
||||
*/
|
||||
v64 length;
|
||||
}
|
||||
|
||||
/**
|
||||
* a map type
|
||||
*/
|
||||
MapType extends BuiltinType {
|
||||
|
||||
/**
|
||||
* base types of the map in order of appearance
|
||||
*/
|
||||
GroundType[] base;
|
||||
}
|
||||
|
||||
@abstract
|
||||
UserdefinedType extends Type with GroundType with Annotations {
|
||||
|
||||
/**
|
||||
* the comment provided by the user or null
|
||||
*/
|
||||
Comment comment;
|
||||
}
|
||||
|
||||
/**
|
||||
* A regular type definition
|
||||
*/
|
||||
ClassType extends UserdefinedType {
|
||||
|
||||
/**
|
||||
* there might be multiple fields under the same name in this type, as the class can be
|
||||
*
|
||||
* a) part of configuration
|
||||
*
|
||||
* b) contain custom fields
|
||||
*/
|
||||
FieldLike[] fields;
|
||||
|
||||
ClassType super;
|
||||
set<InterfaceType> interfaces;
|
||||
}
|
||||
|
||||
InterfaceType extends UserdefinedType {
|
||||
|
||||
/**
|
||||
* there might be multiple fields under the same name in this type, as the class can be
|
||||
* a) part of configuration
|
||||
* b) contain custom fields
|
||||
*/
|
||||
FieldLike[] fields;
|
||||
|
||||
ClassType super;
|
||||
set<InterfaceType> interfaces;
|
||||
}
|
||||
|
||||
EnumType extends UserdefinedType {
|
||||
|
||||
/**
|
||||
* there might be multiple fields under the same name in this type, as the class can be
|
||||
* a) part of configuration
|
||||
* b) contain custom fields
|
||||
*/
|
||||
FieldLike[] fields;
|
||||
|
||||
Identifier[] instances;
|
||||
}
|
||||
|
||||
TypeDefinition extends UserdefinedType {
|
||||
|
||||
/**
|
||||
* the target of this definition
|
||||
*/
|
||||
Type target;
|
||||
}
|
|
@ -2,6 +2,8 @@
|
|||
#include "mainWindow.hpp"
|
||||
#include <sirEdit/main.hpp>
|
||||
|
||||
extern std::string sirEdit_mainWindow_glade;
|
||||
|
||||
#include <list>
|
||||
#include <unordered_map>
|
||||
|
||||
|
@ -137,7 +139,7 @@ class MainWindow {
|
|||
public:
|
||||
MainWindow(unique_ptr<sirEdit::data::Serializer> serializer, Glib::RefPtr<Gio::File> file) : __transitions(*serializer) {
|
||||
// Builder
|
||||
this->__builder = Gtk::Builder::create_from_file("data/gui/mainWindow.glade");
|
||||
this->__builder = Gtk::Builder::create_from_string(sirEdit_mainWindow_glade);
|
||||
|
||||
// Gen historical view
|
||||
this->__serializer = std::move(serializer);
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include <gtkmm.h>
|
||||
#include <sirEdit/main.hpp>
|
||||
|
||||
extern std::string sirEdit_startupWindow_glade;
|
||||
|
||||
#include "startupWindow.hpp"
|
||||
|
||||
// INFO: Hack to to protect crashes after main program
|
||||
|
@ -12,7 +14,7 @@ extern void sirEdit::gui::runStartupWindow() {
|
|||
|
||||
// Load file
|
||||
if(!startUpBuild)
|
||||
startUpBuild = Gtk::Builder::create_from_file("data/gui/startupWindow.glade");
|
||||
startUpBuild = Gtk::Builder::create_from_string(sirEdit_startupWindow_glade);
|
||||
|
||||
// Window
|
||||
Gtk::ApplicationWindow* window;
|
||||
|
@ -44,7 +46,7 @@ extern void sirEdit::gui::runStartupWindow() {
|
|||
startUpBuild->get_widget("MultispecList", list);
|
||||
|
||||
auto tmp = new Gtk::HBox();
|
||||
auto tmp_label = new Gtk::Label("/home/marko/Projekte/SkillEdit/sirEdit/skill.sir");
|
||||
auto tmp_label = new Gtk::Label("skill.sir");
|
||||
tmp_label->set_alignment(Gtk::Align::ALIGN_START, Gtk::Align::ALIGN_CENTER);
|
||||
tmp->pack_start(*(tmp_label), true, true);
|
||||
auto tmpButton = new Gtk::Button();
|
||||
|
@ -62,6 +64,25 @@ extern void sirEdit::gui::runStartupWindow() {
|
|||
// TODO: Info
|
||||
|
||||
// TODO: Import skill file
|
||||
{
|
||||
Gtk::Button* button;
|
||||
Gtk::Button* doImport;
|
||||
Gtk::ApplicationWindow* window;
|
||||
Gtk::FileChooserButton* importFile;
|
||||
startUpBuild->get_widget("ImportSKILL", button);
|
||||
startUpBuild->get_widget("doImport", doImport);
|
||||
startUpBuild->get_widget("ImportSKilLWindow", window);
|
||||
startUpBuild->get_widget("importFile", importFile);
|
||||
|
||||
// Activation button
|
||||
button->signal_clicked().connect([window]() -> void {
|
||||
window->show_all();
|
||||
});
|
||||
|
||||
// Set properties
|
||||
doImport->set_sensitive(false);
|
||||
importFile->set_sensitive(false);
|
||||
}
|
||||
|
||||
// Open sir file
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue