diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 6cec6ab0e..1634f1af1 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -253,6 +253,7 @@ macro(createPackage) install(FILES ${IMHEX_ICON} DESTINATION "${IMHEX_BUNDLE_PATH}/Contents/Resources") install(TARGETS main BUNDLE DESTINATION ".") + install(TARGETS updater BUNDLE DESTINATION ".") install(FILES $ DESTINATION "${IMHEX_BUNDLE_PATH}") # Update library references to make the bundle portable @@ -265,6 +266,7 @@ macro(createPackage) set(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/imhex.app/Contents/Info.plist") else() install(TARGETS main RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + install(TARGETS updater RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) if(WIN32) # Forwarder is only needed on Windows install(TARGETS main-forwarder BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() diff --git a/dist/Arch/PKGBUILD b/dist/Arch/PKGBUILD index d7ec649fb..70858f447 100644 --- a/dist/Arch/PKGBUILD +++ b/dist/Arch/PKGBUILD @@ -17,6 +17,7 @@ md5sums=(SKIP) package() { install -Dm755 "$srcdir/usr/bin/imhex" "$pkgdir/usr/bin/imhex" + install -Dm755 "$srcdir/usr/bin/imhex-updater" "$pkgdir/usr/bin/imhex-updater" install -Dm644 "$srcdir/usr/lib/libimhex.so.$pkgver" "$pkgdir/usr/lib/libimhex.so.$pkgver" for plugin in "$srcdir/usr/lib/imhex/plugins/"*.hexplug*; do diff --git a/dist/rpm/imhex.spec b/dist/rpm/imhex.spec index 8b6f24a8f..9b266deae 100644 --- a/dist/rpm/imhex.spec +++ b/dist/rpm/imhex.spec @@ -121,6 +121,7 @@ cp -a lib/third_party/xdgpp/LICENSE %{buildroot %license %{_datadir}/licenses/%{name}/ %doc README.md %{_bindir}/imhex +%{_bindir}/imhex-updater %{_datadir}/pixmaps/%{name}.png %{_datadir}/applications/%{name}.desktop %{_libdir}/libimhex.so* diff --git a/plugins/builtin/source/content/welcome_screen.cpp b/plugins/builtin/source/content/welcome_screen.cpp index 77679125a..cbde5a9d1 100644 --- a/plugins/builtin/source/content/welcome_screen.cpp +++ b/plugins/builtin/source/content/welcome_screen.cpp @@ -229,16 +229,6 @@ namespace hex::plugin::builtin { ImGui::Dummy({}); recent::draw(); - if (ImHexApi::System::getInitArguments().contains("update-available")) { - ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 5); - ImGui::TableNextColumn(); - ImGuiExt::UnderlinedText("hex.builtin.welcome.header.update"_lang); - { - if (ImGuiExt::DescriptionButton("hex.builtin.welcome.update.title"_lang, hex::format("hex.builtin.welcome.update.desc"_lang, ImHexApi::System::getInitArguments()["update-available"]).c_str(), ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0))) - ImHexApi::System::updateImHex(ImHexApi::System::UpdateType::Stable); - } - } - ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 6); ImGui::TableNextColumn(); @@ -251,6 +241,14 @@ namespace hex::plugin::builtin { } ImGuiExt::EndSubWindow(); + if (ImHexApi::System::getInitArguments().contains("update-available")) { + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + + if (ImGuiExt::DescriptionButton("hex.builtin.welcome.update.title"_lang, hex::format("hex.builtin.welcome.update.desc"_lang, ImHexApi::System::getInitArguments()["update-available"]).c_str(), ImVec2(ImGui::GetContentRegionAvail().x * 0.8F, 0))) + ImHexApi::System::updateImHex(ImHexApi::System::UpdateType::Stable); + } + ImGui::EndTable(); } ImGui::SameLine();