diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index c15a979..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -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) diff --git a/data/gui/mainWindow.glade b/data/gui/mainWindow.glade index c686562..55c0598 100644 --- a/data/gui/mainWindow.glade +++ b/data/gui/mainWindow.glade @@ -2,6 +2,123 @@ + + False + + + True + False + + + True + True + Name + + + 0 + 0 + + + + + True + True + Description + + + 0 + 1 + + + + + True + True + Command-Line + + + 0 + 2 + + + + + gtk-add + True + True + True + True + True + + + 0 + 3 + + + + + + False Export @@ -49,6 +166,9 @@ 1 + False @@ -65,8 +185,9 @@ True False + 0 - Make-Script + Makefile SKilL @@ -81,6 +202,7 @@ True False select-folder + False @@ -149,190 +271,6 @@ - - False - True - dialog - - - - - - False - vertical - 2 - - - False - end - - - gtk-cancel - True - True - True - True - - - True - True - 0 - - - - - gtk-add - True - True - True - True - - - True - True - 1 - - - - - False - False - 0 - - - - - True - False - vertical - - - True - False - - - True - False - Tool name: - - - False - True - 0 - - - - - True - True - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - - - True - False - Description: - start - - - False - False - 0 - - - - - True - True - in - - - True - True - - - - - True - True - 1 - - - - - True - True - 1 - - - - - True - False - - - True - False - Buildargs: - start - - - False - True - 0 - - - - - True - True - in - - - True - True - - - - - True - True - 1 - - - - - True - True - 2 - - - - - True - True - 1 - - - - - True False @@ -353,10 +291,78 @@ False gtk-redo - + True False - gtk-properties + gtk-convert + + + True + False + gtk-convert + + + False + bottom + + + True + False + vertical + + + Import + True + True + True + image8 + none + True + + + False + True + 0 + + + + + Export + True + True + True + image6 + none + True + + + False + True + 1 + + + + + gtk-info + True + True + True + none + True + True + + + False + True + 3 + + + + + main + 1 + + 800 @@ -443,11 +449,15 @@ - + True True True - image5 + none + Menu + + + end @@ -478,10 +488,16 @@ False vertical - + True False - stack1 + + + True + False + stack1 + + False @@ -1057,99 +1073,4 @@ - - True - False - gtk-convert - - - True - False - gtk-ok - - - True - False - gtk-convert - - - False - MenuButton - bottom - - - True - False - vertical - - - Import - True - True - True - image8 - none - True - - - False - True - 0 - - - - - Export - True - True - True - image6 - none - True - - - False - True - 1 - - - - - gtk-preferences - True - True - True - none - True - True - - - False - True - 2 - - - - - gtk-info - True - True - True - none - True - True - - - False - True - 3 - - - - - main - 1 - - - diff --git a/data/gui/startupWindow.glade b/data/gui/startupWindow.glade index 6fa2cc2..89aec96 100644 --- a/data/gui/startupWindow.glade +++ b/data/gui/startupWindow.glade @@ -2,145 +2,6 @@ - - True - False - gtk-properties - - - 400 - 300 - False - center - - - - - - True - False - vertical - - - True - False - 0 - none - - - True - False - 12 - - - - - - - - True - False - TODO: Add icon/name - - - - - True - True - 0 - - - - - True - False - - - gtk-open - True - True - True - True - True - - - True - True - 0 - - - - - True - True - True - image1 - True - - - False - False - end - 1 - - - - - - False - True - 1 - - - - - - - False - True - StartupWindow - - - True - False - Merge Specifications - 1 - True - - - gtk-add - True - True - True - True - True - - - - - gtk-apply - True - True - True - True - True - - - end - 1 - - - - - - - True - False - - - True False @@ -153,7 +14,6 @@ False - Settings bottom none @@ -215,4 +75,229 @@ + + 400 + 300 + False + center + + + True + False + SirEdit + True + + + + + True + False + vertical + + + True + False + 0 + none + + + True + False + 12 + + + + + + + + + + + True + True + 0 + + + + + True + False + + + gtk-open + True + True + True + True + True + + + True + True + 0 + + + + + True + True + True + none + SettingMenu + + + + + + False + True + 1 + + + + + + False + True + 1 + + + + + + + False + True + center-on-parent + StartupWindow + + + True + False + Import SKilL-File + True + + + gtk-apply + True + True + True + True + + + end + + + + + + + True + False + + + True + False + Source folder: + right + 1 + + + 0 + 0 + + + + + True + False + Source file: + right + 1 + + + 0 + 1 + + + + + True + False + True + select-folder + False + + + + 1 + 0 + + + + + True + False + True + False + + + + 1 + 1 + + + + + + + False + True + center-on-parent + StartupWindow + + + True + False + Merge Specifications + 1 + True + + + gtk-add + True + True + True + True + True + + + + + gtk-apply + True + True + True + True + True + + + end + 1 + + + + + + + 500 + 200 + True + False + + + diff --git a/de.marko10-000.sirEdit.json b/de.marko10-000.sirEdit.json new file mode 100644 index 0000000..97b9d69 --- /dev/null +++ b/de.marko10-000.sirEdit.json @@ -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" + ] + } + ] + } + ] +} + diff --git a/include/sirEdit/main.hpp b/include/sirEdit/main.hpp index 1b91a03..5f63beb 100644 --- a/include/sirEdit/main.hpp +++ b/include/sirEdit/main.hpp @@ -2,6 +2,7 @@ #include #include #include +#include namespace sirEdit { extern Gtk::Application* mainApplication; diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..8df1838 --- /dev/null +++ b/meson.build @@ -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) diff --git a/resource_encoder.cpp b/resource_encoder.cpp new file mode 100644 index 0000000..93e87f1 --- /dev/null +++ b/resource_encoder.cpp @@ -0,0 +1,55 @@ +#include +#include + +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 \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; +} + diff --git a/sirSpec/annotations.skill b/sirSpec/annotations.skill new file mode 100644 index 0000000..c6167d1 --- /dev/null +++ b/sirSpec/annotations.skill @@ -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; +} diff --git a/sirSpec/comments.skill b/sirSpec/comments.skill new file mode 100644 index 0000000..03d082e --- /dev/null +++ b/sirSpec/comments.skill @@ -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; +} \ No newline at end of file diff --git a/sirSpec/fields.skill b/sirSpec/fields.skill new file mode 100644 index 0000000..916e29d --- /dev/null +++ b/sirSpec/fields.skill @@ -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; +} \ No newline at end of file diff --git a/sirSpec/sir.skill b/sirSpec/sir.skill new file mode 100644 index 0000000..1fbaa74 --- /dev/null +++ b/sirSpec/sir.skill @@ -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" \ No newline at end of file diff --git a/sirSpec/tools.skill b/sirSpec/tools.skill new file mode 100644 index 0000000..e221baf --- /dev/null +++ b/sirSpec/tools.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 selectedUserTypes; + + /** + * The set of fields selected by this tool. + * The string can get "u", "r", "w", "c". + */ + map selectedFields; +} diff --git a/sirSpec/types.skill b/sirSpec/types.skill new file mode 100644 index 0000000..5a6cec5 --- /dev/null +++ b/sirSpec/types.skill @@ -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 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 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; +} \ No newline at end of file diff --git a/src/gui/mainWindow.cpp b/src/gui/mainWindow.cpp index d0f6b39..c48dbb4 100644 --- a/src/gui/mainWindow.cpp +++ b/src/gui/mainWindow.cpp @@ -2,6 +2,8 @@ #include "mainWindow.hpp" #include +extern std::string sirEdit_mainWindow_glade; + #include #include @@ -137,7 +139,7 @@ class MainWindow { public: MainWindow(unique_ptr serializer, Glib::RefPtr 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); diff --git a/src/gui/startupWindow.cpp b/src/gui/startupWindow.cpp index bae8f93..a2f0b3d 100644 --- a/src/gui/startupWindow.cpp +++ b/src/gui/startupWindow.cpp @@ -1,6 +1,8 @@ #include #include +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 { diff --git a/cppCommon b/subprojects/cppCommon similarity index 100% rename from cppCommon rename to subprojects/cppCommon