From f89d271f8c55c5d4d62a5f0e44c84a3e2e2f190a Mon Sep 17 00:00:00 2001 From: Lucas de Castro Borges Date: Mon, 22 Apr 2024 18:47:37 -0300 Subject: New upstream version 2.0.11pre --- CMakeLists.txt | 20 +++++++++++++++----- README.md | 9 +++++---- hardinfo2/pci_util.c | 2 +- modules/benchmark.c | 2 +- modules/benchmark/benches.c | 22 ++++++++++++++++++++++ shell/syncmanager.c | 4 ++-- 6 files changed, 46 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e265d73..7ffa7b08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,15 +2,17 @@ cmake_minimum_required(VERSION 3.0.0) cmake_policy(VERSION 3.0.0) project(hardinfo2) -set(HARDINFO2_VERSION "2.0.9") +set(HARDINFO2_VERSION "2.0.11") option(HARDINFO2_GTK3 "Build for GTK3 (0/off for GTK2)" 1) option(HARDINFO2_LIBSOUP3 "Build for libsoup-3.0(EXPERIMENTAL) (0/off for libsoup-2.4)" 0) +set(DISTRO "" CACHE STRING "Distro build version eg. 1.el(rpm) or 1(deb)") +set(MAINTAINER "" CACHE STRING "Distro maintainer 'name '") +#old/unused deprecated - lets us know if anyone uses these below set(OVRARCH "" CACHE STRING "Override HARDINFO2_ARCH value") set(OVRCPUINFO "" CACHE STRING "Specify a different file for /proc/cpuinfo") set(OVRDTRROOT "" CACHE STRING "Specify a different path for /proc/device-tree") -set(DISTRO "" CACHE STRING "Distro build version eg. 1.el(rpm) or 1(deb)") SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(GNUInstallDirs) @@ -114,13 +116,21 @@ endif() set(PACKAGE_DISTRO ${HARDINFO2_VERSION}-${distro}-${disversion}${CPACK_SYSTEM_NAME}) SET(CPACK_PACKAGE_VERSION ${HARDINFO2_VERSION}) if(DISTRO) + message("-- DISTRO BUILD") string(REGEX REPLACE "[.].*" "" DISTRO_BUILD_VER ${DISTRO}) set(CPACK_PACKAGE_VERSION "${HARDINFO2_VERSION}-${DISTRO_BUILD_VER}") set(PACKAGE_DISTRO "${HARDINFO2_VERSION}-${DISTRO}") if(${HARDINFO2_GTK3}) else() - message(FATAL_ERROR "Distro-Building not supported with GTK2!!") + message(FATAL_ERROR "Distro-Building not supported with GTK2!!") endif() + if(MAINTAINER) + set(PACKAGE_MAINTAINER ${MAINTAINER}) + else() + set(PACKAGE_MAINTAINER "hwspeedy ") + endif() +else() + set(PACKAGE_MAINTAINER "hwspeedy ") endif() #Put it together string(REPLACE " " "_" CPACK_PACKAGE_FILE_NAME "hardinfo${PACKAGE_DELIMITER}${PACKAGE_DISTRO}${PACKAGE_ARCHITECTURE}") @@ -522,7 +532,7 @@ else() endif() #RPM -SET(CPACK_RPM_PACKAGE_MAINTAINER "hwspeedy ") +SET(CPACK_RPM_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER}) SET(CPACK_RPM_PACKAGE_DESCRIPTION "Hardinfo2 is a small application that displays information about your hardware and operating system. It has online benchmarking to check your machine performance against other machines.") SET(CPACK_RPM_PACKAGE_RECOMMENDS "sysbench, udisks2, mesa-utils, lsscsi, lm-sensors, xdg-utils, iperf3") SET(CPACK_RPM_PACKAGE_LICENSE "GPL2+") @@ -540,7 +550,7 @@ endif() SET(CPACK_RPM_PACKAGE_DEPENDS "libjson-glib-1.0-0, zlib, ${PACKAGE_LS}, ${PACKAGE_GTK}, libglib2.0-0 (>=2.10)") #DEB -SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "hwspeedy ") +SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER}) SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Hardinfo2 is a small application that displays information about your hardware and operating system. It has online benchmarking to check your machine performance against other machines.") SET(CPACK_DEBIAN_PACKAGE_RECOMMENDS "sysbench, udisks2, mesa-utils, lsscsi, lm-sensors, xdg-utils, iperf3") SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/hardinfo2/hardinfo2") diff --git a/README.md b/README.md index c32286ef..ed4a42ab 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Test](https://github.com/hardinfo2/hardinfo2/actions/workflows/test.yml/badge.svg)](https://github.com/hardinfo2/hardinfo2/actions/workflows/test.yml) -[![GitHub release](https://img.shields.io/github/release/hardinfo2/hardinfo2.svg)](https://hardinfo2.org/github?latest_release) +[![GitHub release](https://img.shields.io/github/v/release/hardinfo2/hardinfo2?display_name=release)](https://hardinfo2.org/github?latest_release) [![GitHub release](https://img.shields.io/github/v/release/hardinfo2/hardinfo2?include_prereleases&label=PreRelease&color=blue&display_name=release)](https://hardinfo2.org/github?latest_prerelease) HARDINFO2 @@ -66,9 +66,10 @@ Building and installing Distro building --------------- For distribution in the different distros - please use the cmake build system with CPack: -- cmake -DDISTRO=1.el8 .. (rpm style) -- cmake -DDISTRO=1 .. (deb style) +- cmake -DDISTRO=1.el8 -DMAINTAINER="name \" .. (rpm style) +- cmake -DDISTRO=1 -DMAINTAINER="name \" .. (deb style) - make package +- make package_source Please add/change CMakeLists.txt for your distro, so we have an easy to use package for all distributions. @@ -90,7 +91,7 @@ Load with `modprobe eeprom` and refresh the module screen. - **xdg-utils**: xdg_open is used to open your browser for bugs, homepage & links. - **iperf3**: iperf3 is used to benchmark internal network speed. - **apcaccess**: apcaccess is used for battery information. (optional) -- **lspci/lsusb**: is used for bus information - installed by distro. (optional) +- **lspci/lsusb**: is used for bus information - only used on old kernels and installed by distro. (optional) License ------ diff --git a/hardinfo2/pci_util.c b/hardinfo2/pci_util.c index d4a9dea3..a97d5dc6 100644 --- a/hardinfo2/pci_util.c +++ b/hardinfo2/pci_util.c @@ -299,7 +299,7 @@ static gboolean pci_get_device_sysfs(uint32_t dom, uint32_t bus, uint32_t dev, u s->pcie_width_max = strtoul(tmp, NULL, 0); free(tmp); } - tmp = _sysfs_bus_pci(dom, bus, dev, func, "max_link_width"); + tmp = _sysfs_bus_pci(dom, bus, dev, func, "current_link_width"); if (tmp) { s->pcie_width_curr = strtoul(tmp, NULL, 0); free(tmp); diff --git a/modules/benchmark.c b/modules/benchmark.c index 0dd883dc..18156e01 100644 --- a/modules/benchmark.c +++ b/modules/benchmark.c @@ -807,7 +807,7 @@ static gchar *get_benchmark_results(gsize *len) continue; } - json_builder_set_member_name(builder, entries[i].name); + json_builder_set_member_name(builder, entries_english_name[i]); json_builder_begin_object(builder); diff --git a/modules/benchmark/benches.c b/modules/benchmark/benches.c index 64ec687a..0b57ac1c 100644 --- a/modules/benchmark/benches.c +++ b/modules/benchmark/benches.c @@ -79,6 +79,28 @@ void scan_gui(gboolean reload) } #endif +//Note: Same order as entries, used for json to server +static char *entries_english_name[] = { + "CPU Blowfish (Single-thread)", + "CPU Blowfish (Multi-thread)", + "CPU Blowfish (Multi-core)", + "CPU Zlib", + "CPU CryptoHash", + "CPU Fibonacci", + "CPU N-Queens", + "FPU FFT", + "FPU Raytracing (Single-thread)", + "Internal Network Speed", + "SysBench CPU (Single-thread)", + "SysBench CPU (Multi-thread)", + "SysBench CPU (Four threads)", + "SysBench Memory (Single-thread)", + "SysBench Memory (Two threads)", + "SysBench Memory (Quad threads)", + "SysBench Memory (Multi-thread)", + "GPU Drawing"}; + + static ModuleEntry entries[] = { [BENCHMARK_BLOWFISH_SINGLE] = { diff --git a/shell/syncmanager.c b/shell/syncmanager.c index 17fdc421..4608eb7d 100644 --- a/shell/syncmanager.c +++ b/shell/syncmanager.c @@ -504,8 +504,8 @@ static void sync_dialog_netarea_show(SyncDialog *sd) gtk_widget_show(GTK_WIDGET(sd->sna->vbox)); gtk_label_set_markup(GTK_LABEL(sd->label), LABEL_SYNC_SYNCING); - gtk_window_set_default_size(GTK_WINDOW(sd->dialog), 0, 0); - gtk_window_reshow_with_initial_size(GTK_WINDOW(sd->dialog)); + //gtk_window_set_default_size(GTK_WINDOW(sd->dialog), 0, 0); + //gtk_window_reshow_with_initial_size(GTK_WINDOW(sd->dialog)); } static void sync_dialog_netarea_hide(SyncDialog *sd) -- cgit v1.2.3