diff --git a/CMakeLists.txt b/CMakeLists.txt index b668716..e76180e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,5 +33,15 @@ install(TARGETS feedbackd-configuration) include(GNUInstallDirs) -install(FILES "data/com.thebrokenrail.FeedbackD-Configuration.desktop" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications") -install(FILES "data/com.thebrokenrail.FeedbackD-Configuration.png" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/96x96/apps") \ No newline at end of file +install(FILES "data/com.thebrokenrail.FeedbackD-Configuration.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications") +install(FILES "data/com.thebrokenrail.FeedbackD-Configuration.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/96x96/apps") + +set(CPACK_PACKAGE_VENDOR "TheBrokenRail") + +set(CPACK_PACKAGE_VERSION_MAJOR 1) +set(CPACK_PACKAGE_VERSION_MINOR 0) +set(CPACK_PACKAGE_VERSION_PATCH 0) + +set(CPACK_GENERATOR "TGZ") + +include(CPack) \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..53ff721 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM arm64v8/alpine:edge + +RUN apk add --no-cache build-base clang cmake libhandy1-dev gtk+3.0-dev json-glib-dev \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..a047c8e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,22 @@ +pipeline { + agent { + dockerfile true + } + stages { + stage('Prepare Build') { + steps { + sh 'mkdir build; cd build; cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILEr=clang++ ..' + } + } + stage('Build') { + steps { + sh 'cd build; make -j$(nproc) package' + } + post { + success { + archiveArtifacts artifacts: 'build/*.tar.gz', fingerprint: true + } + } + } + } +} diff --git a/README.md b/README.md index 8696f0c..d4dd797 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,9 @@ # FeedbackD Configuration A Simple Configuration Tool For [FeedbackD](https://source.puri.sm/Librem5/feedbackd) + +# Installation +1. Run: + ```sh + sudo apk add gtk+3.0 libhandy1 gvfs json-glib + ``` +2. Download [Latest Build](TBD) And Extract To Desired Prefix \ No newline at end of file diff --git a/src/main.c b/src/main.c index ba938c9..421e269 100644 --- a/src/main.c +++ b/src/main.c @@ -57,11 +57,16 @@ static void on_edit(GtkWidget *button, struct event_location *data) { open_dialog(button, data, 0); } +// Remove Widget Handler +static void remove_widget(GtkWidget *widget, __attribute__((unused)) void *data) { + gtk_widget_destroy(widget); +} + // Load Profile Into List static void load_profile(GtkListBox *list) { char *name = profile_list_to_name(list); - gtk_container_foreach(GTK_CONTAINER(list), (GtkCallback) gtk_widget_destroy, NULL); + gtk_container_foreach(GTK_CONTAINER(list), remove_widget, NULL); JsonArray *profile = name_to_profile(name); if (profile != NULL && list != NULL) {