Compare commits

..
Author SHA1 Message Date
anthropic-code-agent[bot]andashaduri 893dfc75c8 Improve format detection: check output content for JSON vs text
- When smartctl/output property exists: both JSON and text available
- When no property and output starts with '{': JSON only (loaded JSON virtual drive)
- When no property and output doesn't start with '{': text only (loaded text virtual drive)
- Ensures correct filters shown for each scenario per requirements

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ashaduri/gsmartcontrol/sessions/a0167009-9a8b-4835-9c5d-83a6f7ff903d
2026-03-22 17:32:06 +00:00
anthropic-code-agent[bot]andashaduri 4823af1d23 Fix data format detection logic for JSON vs Text
- Correctly detect when output is JSON (has smartctl/output property) vs text
- When smartctl/output property exists, output is JSON format
- When no property exists, output is text format (loaded virtual drive)
- Ensures filters are shown appropriately for available formats

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ashaduri/gsmartcontrol/sessions/a0167009-9a8b-4835-9c5d-83a6f7ff903d
2026-03-22 17:31:00 +00:00
anthropic-code-agent[bot]andashaduri 81f21c9218 Implement JSON/Text save filters in View Output window
- Add separate JSON and Text file filters to save dialog
- Detect available data formats (JSON/Text) from storage device
- Handle user-selected filter to determine save format
- Extract text output from smartctl/output property when saving as txt
- Add set_storage_device() method to pass device context
- Default to JSON when both formats available (per requirements)

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ashaduri/gsmartcontrol/sessions/a0167009-9a8b-4835-9c5d-83a6f7ff903d
2026-03-22 17:29:25 +00:00
anthropic-code-agent[bot] 4642c9bb13 Initial plan 2026-03-22 17:24:54 +00:00
Alexander Shaduri 57a16f6971 Fix compilation. 2026-03-08 19:08:51 +01:00
Alexander Shaduri 79f1c7d5b0 Merge pull request #106 from ashaduri/claude/fix-red-text-legibility
Red text is barely legible when using a dark theme
2026-03-08 19:05:19 +01:00
Alexander Shaduri a7f0cb78cd Merge remote-tracking branch 'origin/claude/fix-red-text-legibility' into claude/fix-red-text-legibility
# Conflicts:
#	src/applib/warning_colors.h
#	src/gui/gsc_info_window.cpp
2026-03-08 19:04:00 +01:00
Alexander Shaduri 3642afc46f Use readable text highlight colors in dark mode. 2026-03-08 18:52:27 +01:00
Alexander ShaduriandCopilot e4c9afeed0 Update src/applib/warning_colors.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
Alexander ShaduriandCopilot 06a0a75349 Update src/gui/gsc_info_window.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
anthropic-code-agent[bot]andashaduri c322e96741 Revert to umbrella gtkmm.h include per maintainer request
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
anthropic-code-agent[bot]andashaduri a6e2dd0cc6 Add GTK init guard and optimize theme detection
- Guard theme detection with Gtk::Main::level() check to avoid crashes in non-GUI executables
- Use narrow headers (gtkmm/settings.h, gtkmm/main.h) instead of umbrella gtkmm.h
- Return early from app_property_get_label_highlight_color() for WarningLevel::None

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
anthropic-code-agent[bot]andashaduri 6de9bb897d Implement theme-aware red text colors for dark theme legibility
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-08 18:52:27 +01:00
anthropic-code-agent[bot] ef30450c5f Initial plan 2026-03-08 18:52:27 +01:00
Claude 083936e99b Add Windows dark mode detection and automatic GTK theme switching (#111) 2026-03-08 18:31:58 +01:00
Alexander ShaduriandCopilot 68032c4f3c Update src/applib/warning_colors.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 17:39:35 +01:00
Alexander ShaduriandCopilot 7e626460c0 Update src/gui/gsc_info_window.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-07 16:15:24 +01:00
anthropic-code-agent[bot]andashaduri 258d06b755 Revert to umbrella gtkmm.h include per maintainer request
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 19:08:06 +00:00
anthropic-code-agent[bot]andashaduri 525fcfe3af Add GTK init guard and optimize theme detection
- Guard theme detection with Gtk::Main::level() check to avoid crashes in non-GUI executables
- Use narrow headers (gtkmm/settings.h, gtkmm/main.h) instead of umbrella gtkmm.h
- Return early from app_property_get_label_highlight_color() for WarningLevel::None

Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-06 14:36:54 +00:00
anthropic-code-agent[bot]andashaduri f692e2879c Implement theme-aware red text colors for dark theme legibility
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2026-03-04 21:56:40 +00:00
anthropic-code-agent[bot] d110c7abbc Initial plan 2026-03-04 21:50:41 +00:00
Alexander Shaduri 5343ba9dae Cleanups 2026-03-04 22:48:21 +01:00
Alexander Shaduri 3d1e962107 Agentic: Tweak instructions. 2026-03-04 22:37:05 +01:00
Alexander Shaduri c14d7a7791 Windows: Manually install nsis since it's no longer available by default in CI. 2026-03-04 22:33:57 +01:00
Alexander Shaduri 4f3745f8ec Add copilot helper files. 2026-03-04 22:06:57 +01:00
Alexander Shaduri dadfd60ed3 Fix gcc shadow warning. 2025-11-25 19:29:46 +01:00
copilot-swe-agent[bot] 6c8fea7309 Add new natural sort order tests. 2025-11-25 19:29:28 +01:00
copilot-swe-agent[bot] 9d9e3b1a4d Update .gitignore to exclude CodeQL build directory 2025-11-25 13:00:03 +01:00
copilot-swe-agent[bot]andashaduri 54425a306a Implement natural sort order for drive names
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
2025-11-25 12:59:41 +01:00
Alexander Shaduri be601f514d Upgrade CodeQL actions to version 4
Updated CodeQL actions to version 4 in the workflow configuration.
2025-11-18 19:44:28 +01:00
Alexander Shaduri a7c7c8190c Update CodeQL SARIF upload action to v4 2025-11-18 19:43:57 +01:00
Alexander Shaduri 44948de7d0 Fixed typos and updated visible copyright years. 2025-06-11 09:43:36 +02:00
Alexander Shaduri e2efde2d1a Updated nlohmann json to version 3.12.0. 2025-05-16 17:48:32 +04:00
Alexander Shaduri 6630116ba1 Properly implemented persistence of manually added devices (#87). Added --forget-devices option to clear the list if any of the devices causes trouble. 2025-04-28 18:51:42 +04:00
Alexander Shaduri 1f7c2b6a92 Manually added devices can be persistent now. 2025-04-28 11:19:44 +00:00
Alexander Shaduri 10ad6b74eb Merge remote-tracking branch 'origin/main' 2025-04-25 12:22:38 +04:00
Alexander Shaduri f62de567df MSYS no longer supports 32-bit Windows, so disable it in CI. 2025-04-25 12:12:52 +04:00
Alexander Shaduri d96dc79943 Merge pull request #86 from checktext00/patch-1
Update 36535 to 65535 hours in selftest log tooltip.
2025-04-17 11:32:32 +04:00
Alexander Shaduri e35c301605 Update gsc_info_window.cpp
Looking at the smartmontools code, it should be 65535 I believe.
2025-04-17 11:31:13 +04:00
checktext00 7af8dba9f3 update 36535 to 65536 hours 2025-04-16 11:58:09 +00:00
Alexander Shaduri caa80a30d1 Merge pull request #83 from stanislav-brabec/main
Typo fix in Czech desktop translation.
2025-03-12 20:46:01 +04:00
Stanislav Brabec db4928e78f Typo fix in Czech desktop translation. 2025-03-12 16:43:39 +01:00
Alexander Shaduri af96fa2cda Merge pull request #82 from stanislav-brabec/main
Add desktop translations
2025-03-11 11:55:47 +04:00
Stanislav Brabec c08ef9070b Add desktop translations
Add desktop translations imported from the openSUSE
desktop-file-translations project.
https://l10n.opensuse.org/projects/desktop-file-translations/
2025-03-10 22:10:45 +01:00
Alexander Shaduri 6fe5b43bc1 Document Vista. 2025-03-02 19:13:32 +04:00
Alexander Shaduri b3056aedd0 Update download links for 2.0.2. 2025-02-24 16:50:08 +04:00
Alexander Shaduri b2912950c9 Fixed Windows CI packaging. 2025-02-24 16:08:36 +04:00
Alexander Shaduri af2e47308c Bumped version to 2.0.2. 2025-02-24 16:04:30 +04:00
Alexander Shaduri 37be3a413a Updated NEWS for 2.0.2 release. 2025-02-24 16:03:48 +04:00
Alexander Shaduri a7281b7b1e Document GCC 11 support. 2025-02-24 16:03:22 +04:00
Alexander Shaduri 23d06c4bc7 Cleanup. 2025-02-24 16:03:02 +04:00
Alexander Shaduri b5f522d8bc Fix OBS repository list. 2025-02-24 14:56:14 +04:00
Alexander Shaduri 283792715c Update CI to use GCC14. 2025-02-24 14:03:40 +04:00
Alexander Shaduri d7032eb351 Allow smartctl < 7.3 again, falling back to Text parser; this configuration is for compatibility only and not fully supported. 2025-02-24 13:52:04 +04:00
Alexander Shaduri 589c280bdc Support saving smartctl output to text (using old text format) instead of json (#76). 2025-02-15 13:22:47 +04:00
Alexander Shaduri 9f85d09736 Support standard (non-extended) self-test log in JSON ATA parser (#79). 2025-02-14 13:48:30 +04:00
Alexander Shaduri d45e5360cc Temperature: Fixed reporting unreasonably large values when raw value encodes min/max values as well (#78); support protocol-independent temperature reporting in JSON. 2025-02-14 13:28:43 +04:00
Alexander Shaduri 58d2a8b58f Windows: Use older librsvg in CI to support Windows 7 (#71). 2025-02-13 17:11:33 +04:00
Alexander Shaduri d51820476b Windows: Use older librsvg in CI to support Windows 7 (#71). 2025-02-13 16:35:55 +04:00
Alexander Shaduri bfce801cc5 Windows: Use older librsvg in CI to support Windows 7 (#71). 2025-02-13 16:30:36 +04:00
Alexander Shaduri 63f32e4d8b Windows: Use older librsvg in CI to support Windows 7 (#71). 2025-02-13 16:25:47 +04:00
Alexander Shaduri 0fc5d208bb Support Ubuntu 22.04 in CI. 2025-02-07 13:00:29 +04:00
Alexander Shaduri 8b3b500034 Support Ubuntu 22.04 in CI. 2025-02-07 11:51:13 +04:00
Alexander Shaduri a5fddf1bb2 Use {fmt} instead of <format> to support older compilers. 2025-02-07 11:44:50 +04:00
Alexander Shaduri f3dc0274c3 Added generic build instructions. 2025-02-07 10:41:04 +04:00
Alexander Shaduri 515bf11c3d Added self-test "lifetime hours" wrapping behavior to the column header tooltip. 2024-12-26 13:07:24 +04:00
Alexander Shaduri a254c17fcb Updated wikipedia links. 2024-12-10 18:26:40 +04:00
Alexander Shaduri 7e9959c455 Update wikipedia link. 2024-12-10 18:20:35 +04:00
Alexander Shaduri a57e543701 Windows: Avoid using non-integer font sizes. 2024-12-06 12:33:50 +04:00
Alexander Shaduri 43d4b86943 Add sha1sum of the source archive. 2024-11-26 15:44:54 +04:00
Alexander Shaduri 81cdd0db81 Reflect version 2.0.1. 2024-11-26 15:45:49 +04:00
Alexander Shaduri b76bb1002e Windows: Bundle missing dlls needed by CI GTK. 2024-11-26 14:59:00 +04:00
Alexander Shaduri dea940222e GitHub CI: Fixed invalid artifact names. 2024-11-26 14:57:21 +04:00
Alexander Shaduri 4a075cc187 Bumped version to 2.0.1. 2024-11-26 14:04:37 +04:00
Alexander Shaduri e17c10c965 Windows: Bundle glib schemas to avoid native file dialog crash. 2024-11-26 13:59:52 +04:00
Alexander Shaduri 8c96c02468 Add a note about DPI awareness limitations. 2024-11-26 13:43:45 +04:00
Alexander Shaduri 4260f94ce7 Minor style issue in documentation. 2024-11-21 16:17:50 +04:00
Alexander Shaduri 21f73e4eae Add a note about SCSI / SAS support. 2024-11-21 16:14:13 +04:00
Alexander Shaduri 743173df81 Merge remote-tracking branch 'origin/main' 2024-11-19 18:22:46 +04:00
Alexander Shaduri 17b6ea23b4 Clarify device support in documentation. 2024-11-19 18:21:34 +04:00
Alexander Shaduri 840398c073 Fix potential crash in attribute description database. 2024-11-19 12:58:45 +04:00
Alexander Shaduri 93384e4c37 Fix compiler warning. 2024-11-19 12:39:01 +04:00
Alexander Shaduri 566b11026e Fix "Show SMART capable only" checkbox not having effect. 2024-11-07 14:48:18 +04:00
Alexander Shaduri 8fd2986a92 Update SECURITY.md for 2.0.0. 2024-11-07 14:00:47 +04:00
Alexander Shaduri e7dd2cf434 Recommend a 64-bit installer on Windows due to more testing. 2024-11-07 13:57:27 +04:00
Alexander Shaduri cdfbf8795a Update the Downloads page for 2.0.0. 2024-11-07 13:51:46 +04:00
Alexander Shaduri d110ddad10 Update NEWS.txt and other files in preparation for 2.0.0. 2024-11-07 13:09:59 +04:00
Alexander Shaduri 36cecf3acc Bumped version to 2.0.0. 2024-11-06 14:55:23 +04:00
Alexander Shaduri 066eaec993 Windows: Use Adwaita theme by default, win32 theme has too many problems (with Classic theme and with fractional dpi scaling). 2024-11-06 14:11:08 +04:00
Alexander Shaduri 746ebf9b02 Windows: Re-enable dpi awareness and scale up the font in case of fractional scaling. 2024-11-06 13:57:59 +04:00
Alexander Shaduri 1deffe6a98 Don't require gettext - we don't need it yet. 2024-11-06 12:38:04 +04:00
Alexander Shaduri 7ac61f1cac Fix crash on startup in Windows. 2024-11-06 12:37:48 +04:00
Alexander Shaduri e386c86316 Merge remote-tracking branch 'origin/main' 2024-11-05 17:28:48 +04:00
Alexander Shaduri da84eb027f Disable LTO in mingw due to CI errors. 2024-11-05 17:28:25 +04:00
Alexander Shaduri 1d9f2a2744 Fix win32 toolchain files for release builds. 2024-11-05 16:52:26 +04:00
Alexander Shaduri c1d0f46366 Make sure NSIS installer works. 2024-11-05 15:33:33 +04:00
Alexander Shaduri 99bf00d27c Fixed running "Update smartctl database" on Windows; use argv on all platforms so it is more secure. 2024-11-05 14:53:19 +04:00
Alexander Shaduri 7fd43bba2c Info window: Don't use Gtk::Stock for icons. 2024-11-05 14:15:19 +04:00
Alexander Shaduri 48f14267e5 Hide too noisy clang-tidy warning. 2024-11-05 14:00:50 +04:00
Alexander Shaduri b785a4fbec Replace bundled icons with the ones from Oxygen project; bundle removable drive icon; update copyrights accordingly. 2024-11-05 14:00:33 +04:00
Alexander Shaduri 3aa5ddfc32 Test results are presented in a more obvious manner now. 2024-11-04 20:38:47 +04:00
Alexander Shaduri c2277edb56 Show smartctl database version in basic properties. 2024-11-04 17:07:20 +04:00
Alexander Shaduri d82ec219f6 Refactoring: Split out property description code for ATA Attribute and ATA Statistic into separate files.
Added descriptions and warnings to NVMe Attributes.
Storage Property: Rely less on reported name (not as useful with JSON parser), more on generic name.
2024-11-04 16:56:10 +04:00
Alexander Shaduri dc007c84ab Fix ATA testing with when JSON parser is used. 2024-11-04 13:11:19 +04:00
Alexander Shaduri ccd04b86d3 Page tweaks. 2024-10-31 19:09:43 +04:00
Alexander Shaduri 0531a37133 Update pages remote theme (the old one was deleted). 2024-10-31 19:02:11 +04:00
Alexander Shaduri 566cff8ded Update pages remote theme (the old one was deleted). 2024-10-31 18:57:24 +04:00
Alexander Shaduri 74c5e92d4b Do not remove NVMe devices namespaces if a device has more than one namespace. 2024-10-31 16:21:43 +04:00
Alexander Shaduri aaa374c8ed Fix self-test status execution returning error. 2024-10-31 16:21:15 +04:00
Alexander Shaduri 2a6902dbb5 Support self-tests on WD NVMe with smartctl < 7.5. 2024-10-31 16:05:07 +04:00
Alexander Shaduri 02206a8967 Minor code cleanups. 2024-10-31 15:56:23 +04:00
Alexander Shaduri af2a5a18b3 "Perform Tests" menu item is correctly disabled now if self-tests are not supported; if support is unknown, an appropriate message is shown after the Info window is displayed. 2024-10-31 15:47:42 +04:00
Alexander Shaduri 1d0e325813 JSON Basic Parser: Make sure the health property is in the health section (fixes GUI not displaying health after first scan). 2024-10-31 15:21:02 +04:00
Alexander Shaduri f4e22a5c96 Windows: Add a note about why hidpi is disabled. 2024-10-31 15:18:01 +04:00
Alexander Shaduri fb468f8594 Windows: Fixed auto-detection issues, minor refactoring of the detection code. 2024-10-31 14:26:20 +04:00
Alexander Shaduri 4ff0aaad9c Hide self-test tab if NVMe does not support self-tests. 2024-06-11 13:53:23 +04:00
Alexander Shaduri c0eb5e2087 Renamed bundled icon files. 2024-06-11 13:48:41 +04:00
Alexander Shaduri c795635469 Improve device type detection. 2024-06-11 13:47:11 +04:00
Alexander Shaduri e844b9949d Detection of NVMe self-test support. 2024-06-11 13:46:57 +04:00
Alexander Shaduri 5c807e1859 Fix missing include. 2024-06-11 13:29:35 +04:00
Alexander Shaduri b2edaf69c1 Fix data member naming convention. 2024-06-11 13:29:25 +04:00
Alexander Shaduri dfa6d043b3 Improve per-drive-type icon selection. 2024-06-11 13:16:24 +04:00
Alexander Shaduri 5e3f01f350 Fixed function naming convention. 2024-06-11 13:15:40 +04:00
Alexander Shaduri f9a098d67b Merge pull request #62 from skitt/package-name
Add the package name to the icons and ui paths
2024-06-11 12:22:18 +04:00
Stephen Kitt 3324e27dee Add the package name to the icons and ui paths
CMAKE_INSTALL_FULL_DATADIR gives the read-only
architecture-independent data root without the package name, so
BuildEnv::package_pkgdata_dir() only returns that ("/usr/share" or
equivalent). This adds the package name to the appropriate search
paths in app_init_and_loop().

Signed-off-by: Stephen Kitt <steve@sk2.org>
2024-06-05 16:01:47 +02:00
Alexander Shaduri 25f1c62d2c Support NVMe behind USB bridges. 2024-05-31 12:50:03 +04:00
Alexander Shaduri afd6ce0a1f Fix CI. 2024-05-29 13:36:00 +04:00
Alexander Shaduri fb62473b0b Fix CI. 2024-05-29 12:49:04 +04:00
Alexander Shaduri 9b1bc82353 Extract smartmontools before running cmake. 2024-05-29 12:23:51 +04:00
Alexander Shaduri d1f0b517e4 More debug messages. 2024-05-29 11:24:22 +04:00
Alexander Shaduri ec50159a15 Add listing of files for debugging. 2024-05-29 11:06:38 +04:00
Alexander Shaduri a7f513fd7c Fix CPack rules. 2024-05-28 14:07:20 +04:00
Alexander Shaduri 698024d47d Fix CPack rules. 2024-05-28 13:44:00 +04:00
Alexander Shaduri eb8d91470b Fix CPack rules. 2024-05-28 13:34:50 +04:00
Alexander Shaduri 780f22818e CPack improvements for Windows. 2024-05-28 11:59:49 +04:00
Alexander Shaduri fdcf9f7099 Fix security warning. 2024-05-28 11:25:59 +04:00
Alexander Shaduri ec0445ec54 Merge remote-tracking branch 'origin/main' 2024-05-28 11:21:13 +04:00
Alexander Shaduri 75f50cd5bb Update workflows with latest permissions. 2024-05-28 11:19:51 +04:00
Alexander Shaduri 4d1af3ce9c Merge pull request #61 from skitt/canonical-nlohmann-json
Use the canonical nlohmann json include path.
2024-05-28 10:53:52 +04:00
Stephen Kitt 7b6aa046f4 Use the canonical nlohmann json include path
As documented in https://github.com/nlohmann/json, the canonical
include path for json.hpp is nlohmann/json.hpp. Tihs updated the
vendored dependency to match, so that gsmartcontrol can more easily be
built using a system-installed copy of nlohmann json as well as the
vendored copy.

Signed-off-by: Stephen Kitt <steve@sk2.org>
2024-05-27 13:31:27 +02:00
Alexander Shaduri 844f6ed86f Add workflow for creating Windows Release packages. 2024-05-22 13:44:06 +04:00
Alexander Shaduri 7a8cbe202e Use llvm17 in FreeBSD. 2024-05-22 13:34:56 +04:00
Alexander Shaduri ec2a4648e1 Upgrade freebsd build to latest version of action. 2024-05-22 12:59:23 +04:00
Alexander Shaduri 186682b6d4 Updated NEWS.txt to include information about 1.1.4. 2024-05-22 12:01:55 +04:00
Alexander Shaduri db6811450e Remove local_glibmm.h workaround for broken libintl.h. 2024-05-22 11:51:41 +04:00
Alexander Shaduri 1c19b51fda Moved application GUI source files to gui subdirectory. 2024-05-22 11:46:02 +04:00
Alexander Shaduri 28cad446b7 Packaging fixes. 2024-05-21 20:33:04 +04:00
Alexander Shaduri 84867cc474 Create and use cmake toolchains for msys2. 2024-05-21 16:46:53 +04:00
Alexander Shaduri 13c644efdc List msys2 files for debugging. 2024-05-21 14:47:26 +04:00
Alexander Shaduri 5085c35269 List msys2 files for debugging. 2024-05-21 14:46:30 +04:00
Alexander Shaduri 7682f1285e Merge remote-tracking branch 'origin/main' 2024-05-20 17:41:41 +04:00
Alexander Shaduri 74a0cf012b Refactored so that executor options are given as a vector, not as a string; this improves reliability as the string does not have to be shell-parsed. 2024-05-20 17:41:29 +04:00
Alexander Shaduri d356e2e79f Add nvme as a type option in GUI. 2024-05-20 17:40:41 +04:00
Alexander Shaduri fe027b7fc7 Update windows packaging. 2024-05-17 17:09:22 +04:00
Alexander Shaduri 501134c2fd Use double-quoting of commands in Windows. 2024-05-17 16:56:44 +04:00
Alexander Shaduri debe2e63cb Github issue template tweaks. 2024-05-17 14:38:52 +04:00
Alexander Shaduri 4452ec50fb Updated OBS workflow repositories. 2024-05-17 14:38:21 +04:00
Alexander Shaduri f034f45b93 Packaging fixes. 2024-05-17 14:10:19 +04:00
Alexander Shaduri 5160486dcd Packaging fixes. 2024-05-17 14:04:24 +04:00
Alexander Shaduri 876c586620 Packaging fixes. 2024-05-17 13:59:47 +04:00
Alexander Shaduri 85ef6faf7d Packaging fixes. 2024-05-17 13:40:46 +04:00
Alexander Shaduri 6004a76884 Packaging fixes. 2024-05-17 13:39:54 +04:00
Alexander Shaduri 944829a6be Packaging fixes. 2024-05-17 13:34:29 +04:00
Alexander Shaduri 9b75a426c5 Packaging fixes. 2024-05-17 13:26:32 +04:00
Alexander Shaduri d6d63b7f88 Packaging fixes. 2024-05-17 13:14:01 +04:00
Alexander Shaduri d9adde161c Packaging fixes. 2024-05-17 13:12:03 +04:00
Alexander Shaduri 3d45bbe12a Packaging fixes. 2024-05-17 13:09:13 +04:00
Alexander Shaduri 90be761780 Updated packaging. 2024-05-17 12:49:47 +04:00
Alexander Shaduri 22c5cfdffd Updated packaging. 2024-05-17 12:46:06 +04:00
Alexander Shaduri 7834f61662 Updated packaging. 2024-05-17 12:43:04 +04:00
Alexander Shaduri cafb1ef28d Updated packaging. 2024-05-17 12:29:44 +04:00
Alexander Shaduri 4211374126 Updated documentation to indicate NVMe support. 2024-05-17 11:38:57 +04:00
Alexander Shaduri cfa50198ee Removed unused cmake file. 2024-05-17 11:37:35 +04:00
Alexander Shaduri f4c1cebfd0 Update cron script to use json. 2024-05-17 11:24:52 +04:00
Alexander Shaduri 7cef499e67 Use ubuntu-24.04 for Actions as ubuntu-latest does not have gcc13 as of now. 2024-05-16 17:04:37 +04:00
Alexander Shaduri e40da83827 Merge pull request #60 from ashaduri/stdregex
PCRE to std::regex port
2024-05-16 16:49:27 +04:00
Alexander Shaduri d916dc4a9d Removed mention of any pcre dependency. 2024-05-16 16:47:44 +04:00
Alexander Shaduri 791cc93f5f Fixed std::regex-based parsing. 2024-05-16 16:41:39 +04:00
Alexander Shaduri 1df72dc2e0 Initial port from pcre to std::regex (not working yet). 2024-05-16 16:27:18 +04:00
Alexander Shaduri cf3a9f6ae3 Partial port from pcre to std::regex. 2024-05-16 15:13:34 +04:00
Alexander Shaduri 946f4b4339 Fix test failure under Arm architecture. 2024-05-15 13:48:48 +04:00
Alexander Shaduri e88a0b5ca3 Limit the VM memory. 2024-05-15 13:42:50 +04:00
Alexander Shaduri 6d23e01a82 Fixed running tests under Arm. 2024-05-15 13:42:38 +04:00
Alexander Shaduri 0f8c6039ce Update GitHub actions. 2024-05-15 13:12:49 +04:00
Alexander Shaduri 2abae1c673 Update GitHub actions. 2024-05-15 13:07:05 +04:00
Alexander Shaduri 1e16d7b521 Update GitHub actions. 2024-05-15 12:26:40 +04:00
Alexander Shaduri 55dade8b51 Install clang. 2024-05-15 12:18:42 +04:00
Alexander Shaduri 2e53d3e4c9 Try AppleClang 16. 2024-05-15 12:09:52 +04:00
Alexander Shaduri 4a0ce23184 Compile with AppleClang 15. 2024-05-15 12:00:33 +04:00
Alexander Shaduri 02535eeeb2 Update GitHub actions. 2024-05-14 18:35:42 +04:00
Alexander Shaduri 6d49968a59 Fix make_format_args() calls. 2024-05-14 18:30:46 +04:00
Alexander Shaduri 84ae416c2c Removed AODC feature, it's been deprecated for a while. 2024-05-14 17:42:46 +04:00
Alexander Shaduri dd4fd4d187 Fixed loading text files as virtual devices (size parsing, ATA detection). 2024-05-14 17:26:51 +04:00
Alexander Shaduri ade001359b Implemented loading virtual drives from JSON. 2024-05-14 16:57:01 +04:00
Alexander Shaduri ac2d3d6b33 Implement proper SMART on/off switch support detection. 2024-05-14 15:55:12 +04:00
Alexander Shaduri 537ea258ca NVMe: Full support for self-testing. 2024-05-14 15:41:27 +04:00
Alexander Shaduri 32302c6a80 Info Window: Fixed refresh not working with treeviews. 2024-05-14 15:11:06 +04:00
Alexander Shaduri 5ba969c561 NVMe: Support self-test log and running self-tests (untested). 2024-05-14 14:27:24 +04:00
Alexander Shaduri 5a4e60f645 Format LBA in locale-aware way. 2024-05-14 14:26:37 +04:00
Alexander Shaduri 456feb645a NVMe: Show Error Log. 2024-05-14 11:50:27 +04:00
Alexander Shaduri 556a82e42b NVMe: Show attributes in Info window. 2024-05-13 18:11:06 +04:00
Alexander Shaduri 57f7b6d000 Make Info window display tabs only if properties with appropriate sections are available. 2024-05-13 17:17:24 +04:00
Alexander Shaduri 67a0b128f7 Display info properly for flash drives. 2024-05-13 16:49:07 +04:00
Alexander Shaduri f60f08327c Info Window: Adapt to ATA JSON parser. 2024-05-13 16:48:48 +04:00
Alexander Shaduri 72c01bebba NVMe: Parse error log. 2024-05-13 16:48:26 +04:00
Alexander Shaduri dede4695e9 ATA JSON parser is on par with Text parser now, feature-wise. 2024-05-13 16:48:01 +04:00
Alexander Shaduri 5efefd3576 Implemented NVMe self-test log parsing.
Refactoring AtaStorageProperty -> StorageProperty.
2024-05-07 19:36:40 +04:00
Alexander Shaduri 516eaa2086 Basic NVMe parser implemented. 2024-05-02 15:20:16 +04:00
Alexander Shaduri c3a6f0b624 Implemented detection of device type. 2024-05-02 14:38:31 +04:00
Alexander Shaduri 6594cddb65 Refactored drive data fetch and parsing, and drive types. 2024-05-02 13:47:20 +04:00
Alexander Shaduri bf2343015e Avoid unnecessary exceptions when reading config file. 2024-05-02 13:47:14 +04:00
Alexander Shaduri 228bcf5014 Fixed enum_helper.h errors. 2024-05-02 13:46:49 +04:00
Alexander Shaduri 589263e902 etc... -> etc. 2024-04-25 16:53:30 +04:00
Alexander Shaduri 02bdf755a3 Fixed crash on reload; tables still to be fixed. 2024-04-25 16:44:25 +04:00
Alexander Shaduri 61fe92e201 ATA JSON parser improvements. 2024-04-24 15:58:45 +04:00
Alexander Shaduri 1b7264793e ATA JSON parser improvements. 2024-04-24 15:51:01 +04:00
Alexander Shaduri 13fc56c24a Updated visible copyright years. 2024-04-23 17:18:08 +04:00
Alexander Shaduri 18a6628d0e Support parsing more of ATA output in JSON. 2024-04-23 17:03:52 +04:00
Alexander Shaduri 5746ab5ed9 GitHub actions: Fix conflicting artifact names. 2024-04-23 16:32:59 +04:00
Alexander Shaduri ac90991a27 GitHub actions: Support smartmontools 7.4 installer directory structure when extracting. 2024-04-23 14:11:31 +04:00
Alexander Shaduri 531d39d888 Smartmontools in Windows uses update-smart-drivedb.ps1 now, so use that. 2024-04-23 13:51:51 +04:00
Alexander Shaduri 68576e9a95 Use smartmontools 7.4 in CI. 2024-04-23 13:31:01 +04:00
Alexander Shaduri f7d9956665 Support parsing ATA Self-test Log in JSON.
UI fixes.
2024-04-23 12:55:23 +04:00
Alexander Shaduri aa0c2e520f Updated GitHub actions to use Node20 versions. 2024-04-22 22:19:14 +04:00
Alexander Shaduri 9ea48c7298 Fix win32 compilation. 2024-04-22 22:05:36 +04:00
Alexander Shaduri c065e55ca1 GH Actions: Use GCC 13, that is the minimum required now. 2024-04-22 18:08:34 +04:00
Alexander Shaduri 2c163503d9 GH Actions: Use GCC 12. 2024-04-22 17:48:34 +04:00
Alexander Shaduri 212b6bfe4f Fix compilation. 2024-04-22 17:22:14 +04:00
Alexander Shaduri ea6998dcad Support parsing ATA Directory Log in JSON. 2024-04-22 17:17:00 +04:00
Alexander Shaduri d6ec442945 Support parsing ATA Attributes in JSON. 2024-04-19 14:21:06 +04:00
Alexander Shaduri 6da27f7e86 Support parsing ATA Capabilities from JSON. 2024-04-19 11:47:48 +04:00
Alexander Shaduri 50d605b5b4 Updated .clang-tidy to ignore library headers. 2024-04-19 11:47:25 +04:00
Alexander Shaduri b147a3db3e Ported some more of string_algo.h to string_view. 2024-04-19 11:46:51 +04:00
Alexander Shaduri 6018f35598 Disable std::filesystem TR support, we require C++20 anyway. 2024-04-16 12:40:10 +04:00
Alexander Shaduri fccf448b3a Bundle and use tl::expected instead of std::expected to support C++20 compilers. 2024-04-16 12:39:22 +04:00
Alexander Shaduri 0cd846728c Fixed compiler warnings. 2024-04-15 17:15:00 +04:00
Alexander Shaduri 876e29973c Simplified AtaStorageProperty by mergin Section and SubSection. 2024-04-15 16:29:51 +04:00
Alexander Shaduri 351f5edaa9 Switched most of message-based error handling to std::expected.
Refactored enum class naming to use ThisCase.
Decorated most getters with [[nodiscard]].
2024-03-22 18:21:08 +04:00
Alexander Shaduri 6edcf19694 Implemented Basic Output JSON parser.
Switched all devices to JSON by default.
2024-03-20 23:11:50 +04:00
Alexander Shaduri 73463e5c23 Cleanup of output format / device type handling. 2024-03-20 20:57:16 +04:00
Alexander Shaduri 21267acb8c Separate out basic text parser from StorageDevice.
Store all properties in StoragePropertyRepository.
2024-03-20 20:29:19 +04:00
Alexander Shaduri 9889f8792f Initial work on JSON parser. 2024-03-19 16:16:36 +04:00
Alexander Shaduri ae5a327116 Initial work on JSON parser. 2024-03-15 17:33:24 +04:00
Alexander Shaduri 8b12bb45c3 Initial work on JSON parser. 2024-03-15 16:59:14 +04:00
Alexander Shaduri a32b9fb8a9 Initial work on JSON parser. 2024-03-14 16:06:16 +04:00
Alexander Shaduri eb44ed1bc5 Some code modernization. 2024-03-14 13:52:46 +04:00
Alexander Shaduri 5fe252934c Disabled false positive. 2024-03-11 15:25:38 +04:00
Alexander Shaduri 3c4a740759 Improved constness of local variables. 2024-03-11 15:25:14 +04:00
Alexander Shaduri 29555ed584 Ported away from deprecated u8path(). 2024-03-11 14:53:05 +04:00
Alexander Shaduri f454b9df2d Disabled noisy warnings. 2024-03-11 14:50:21 +04:00
Alexander Shaduri 6266ce3c6c Ported SmartctlParser to std::expected, added hz::ErrorContainer as a helper. 2024-03-11 14:50:08 +04:00
Alexander Shaduri d0cfd73fab Removed leaf, porting to std::expected. 2024-03-07 14:39:08 +04:00
Alexander Shaduri 985700c79d Moved to C++23, making the code compatible with it (u8string / u8path incompatibilities). 2024-03-07 14:38:44 +04:00
Alexander Shaduri e650fa4d8b Fixed a typo. 2024-02-29 18:28:35 +04:00
Alexander Shaduri 72b2173dfc Make sure to require Gtkmm. 2024-02-29 18:28:16 +04:00
Alexander Shaduri 7f688e0fa4 Initial work on JSON parser. 2023-03-06 19:18:48 +04:00
Alexander Shaduri c8f79c36b4 Minor cleanups. 2023-03-06 19:18:16 +04:00
Alexander Shaduri 396ea3daf3 Fixed some clang-tidy warnings. 2023-03-03 23:00:52 +04:00
Alexander Shaduri c4b2c1d760 Merge pull request #41 from ferdnyc/no-warn-printf
FindFilesystem: Eliminate Win32 warning
2023-01-16 13:32:31 +04:00
FeRD (Frank Dana) 0bf4ef711e FindFilesystem: Eliminate Win32 warning
Using `printf("%s")` with a `std::filesystem::path` on Win32 will
cause a compile warning, because `std::filesystem::path::value_type`
is technically `wchar_t`.

The warning is harmless, but by using iostream to print the value
on `std::cout` instead, the code compiles without warnings.
2023-01-15 12:54:17 -05:00
Alexander Shaduri affdd497ec Updated GitHub actions to use Node16 (try 2). 2023-01-09 18:18:29 +04:00
Alexander Shaduri 6b6bd2e369 GitHub action: Fix codeql. 2023-01-09 17:44:05 +04:00
Alexander Shaduri 466b4f9a0f GitHub action: Install pcre in msys2. 2023-01-09 17:43:02 +04:00
Alexander Shaduri e90aad5994 Updated GitHub actions to use Node16. 2023-01-09 17:41:21 +04:00
Alexander Shaduri 338c8a8eee Merge remote-tracking branch 'origin/main' 2023-01-09 17:28:04 +04:00
Alexander Shaduri a390c3daa6 Updated Catch2 to 2.13.10. 2023-01-09 17:27:52 +04:00
Alexander Shaduri 9e0dbe67e6 Ignore doxygen_doc in git. 2023-01-09 17:14:03 +04:00
Alexander Shaduri 6b02bf5df0 Update _config.yml 2022-09-14 12:38:20 +04:00
Alexander Shaduri 029f519005 Update SECURITY.md 2022-06-17 12:35:41 +04:00
Alexander Shaduri b6248459be Update issue templates 2022-06-17 12:34:08 +04:00
Alexander Shaduri 51e3b2a1f7 Update issue templates 2022-06-17 12:33:50 +04:00
Alexander Shaduri b2504e9477 Update issue templates 2022-06-17 12:32:35 +04:00
Alexander Shaduri ec6ddd1c5c Update SECURITY.md 2022-06-17 12:30:44 +04:00
Alexander Shaduri 60705fe93b Update issue templates 2022-06-17 12:29:37 +04:00
Alexander Shaduri cf407da41b Update issue templates 2022-06-17 12:27:01 +04:00
Alexander Shaduri 5435feb932 Windows: Make sure we consider non-fixed drives as well, when detecting "Drive letters" for a drive. 2022-05-20 13:04:26 +04:00
Alexander Shaduri 02e4f8e536 GitHub Actions: Use github.workspace instead of runner.workspace. 2022-03-15 14:12:30 +04:00
Alexander Shaduri db090f9164 Updated github pages: Document NSIS options. 2022-02-18 12:12:40 +04:00
Alexander Shaduri 70967beebf Implemented smartctl output format detection function, along with its test. 2022-02-16 17:33:05 +04:00
Alexander Shaduri 5b7c2f6dbb Added helper for testing leaf-created errors. 2022-02-16 17:32:20 +04:00
Alexander Shaduri 2d7a3a4dd9 Updated clang-tidy configuration to exclude noisy warnings. 2022-02-16 17:30:06 +04:00
Alexander Shaduri 01d699fc74 Make sure the third-party libraries are always included as "system". 2022-02-15 16:30:27 +04:00
Alexander Shaduri 6ed82f821f Added a Boost LEAF library copy. 2022-02-15 16:29:45 +04:00
Alexander Shaduri c59fa32efe Added a Boost LEAF library copy. 2022-02-15 16:22:41 +04:00
Alexander Shaduri dbdb0e4686 Fixed compilation. 2022-02-15 16:22:00 +04:00
Alexander Shaduri fc0df14992 Refactored smartctl output parser for better API, support for different formats. 2022-02-15 15:56:42 +04:00
Alexander Shaduri a5771f1af9 Updated OBS workflows. 2022-02-15 14:03:35 +04:00
Alexander Shaduri 4db097b0b0 Update cmake requirement to 3.14. 2022-02-15 14:03:24 +04:00
Alexander Shaduri 65e4c4f7ac Revert "Fixed test link errors on Debian 10."
This reverts commit 5009fbfbe4.
2022-02-15 14:01:51 +04:00
Alexander Shaduri d1df4b2fad Updated OBS workflows. 2022-02-15 13:44:01 +04:00
Alexander Shaduri 5009fbfbe4 Fixed test link errors on Debian 10. 2022-02-15 13:42:43 +04:00
Alexander Shaduri cbfcf2bb3c Updated OBS workflows. 2022-02-15 12:58:32 +04:00
Alexander Shaduri 63e16d0bac Updated OBS workflows. 2022-02-14 17:27:51 +04:00
Alexander Shaduri cd58c6ce90 Updated OBS workflows. 2022-02-14 15:29:41 +04:00
Alexander Shaduri 6787b3c1fe Updated OBS workflows. 2022-02-14 15:27:04 +04:00
Alexander Shaduri 980ff6f150 Updated OBS workflows. 2022-02-14 15:25:16 +04:00
Alexander Shaduri ef5f97ad88 Updated OBS workflows. 2022-02-14 15:20:21 +04:00
Alexander Shaduri 9ad97c8390 Added OBS workflow integration. 2022-02-14 14:33:12 +04:00
Alexander Shaduri 8256ea2115 Fixed CodeQL workflow. 2022-02-14 14:32:51 +04:00
Alexander Shaduri b6f97ba0a4 Updated github actions. 2022-02-14 13:46:42 +04:00
Alexander Shaduri 88a36c6f57 Changed internal property names to match smartctl's json paths. 2022-02-14 13:21:23 +04:00
Alexander Shaduri 8932460b8c Updated github pages. 2022-02-13 13:43:21 +04:00
Alexander Shaduri 7e570cea45 Refactored parse_byte_size out of SmartctlAtaTextParser. 2022-02-11 18:04:54 +04:00
Alexander Shaduri 1d781d3d54 Code cleanups. 2022-02-11 16:01:10 +04:00
Alexander Shaduri c1070e375f Added initial work for selecting smartctl parser type.
Refactored smartctl version parsing, added tests.
2022-02-11 16:00:21 +04:00
Alexander Shaduri 582d4ad5cd Converted hz string algorithms example into a test. 2022-02-11 14:08:57 +04:00
Alexander Shaduri 907c9ac423 Refactored example_string_num.cpp into a test.
Fixed underflow detection for unsigned types in hz::string_is_numeric().
2022-02-11 13:43:22 +04:00
Alexander Shaduri f9c805648a Converted hz unit formatting example into a test. 2022-02-10 17:17:06 +04:00
Alexander Shaduri 94e3e864bc Merge remote-tracking branch 'origin/main' into main 2022-02-10 16:45:45 +04:00
Alexander Shaduri 53acbd9594 libdebug: Removed C-style debug_print*() functions, ported everything to debug_out_*(). 2022-02-10 16:45:33 +04:00
Alexander Shaduri 085f066958 rconfig: A safer way to pass data to a C callback. 2022-02-10 16:44:08 +04:00
Alexander Shaduri 594f177160 Merge pull request #27 from skitt/lcall
Set LC_ALL to control the locale of other processes.
2022-02-10 12:18:23 +04:00
Stephen Kitt c53166f630 Set LC_ALL to control the locale
LANG specifies the default locale, LC_NUMERIC specifies the locale for
that particular category, but LC_ALL overrides all the locale
settings. Thus any user with LC_ALL set can still run into
locale-related problems.

Setting LC_ALL to C avoids any such issue.

See locale(7) for details.

Signed-off-by: Stephen Kitt <steve@sk2.org>
2022-02-10 08:26:34 +01:00
Alexander Shaduri 64f4a8077e Updated links to the new gsmartcontrol.shaduri.dev site. 2022-02-09 17:51:09 +04:00
Alexander Shaduri a4bfdcefa8 Updated github pages. 2022-02-09 17:33:20 +04:00
Alexander Shaduri e6b83c7473 Updated links to online documentation. 2022-02-08 19:21:45 +04:00
Alexander Shaduri 107292a328 Updated github pages. 2022-02-08 19:16:25 +04:00
Alexander Shaduri 9f31c845ee Updated github pages. 2022-02-08 18:39:26 +04:00
Alexander Shaduri 3acee26d05 Updated github pages. 2022-02-08 18:36:44 +04:00
Alexander Shaduri 1b260fd745 Updated github pages. 2022-02-08 18:35:32 +04:00
Alexander Shaduri 02dd6176d7 Updated github pages. 2022-02-08 18:32:33 +04:00
Alexander Shaduri d19c6acadd Updated github pages. 2022-02-08 18:26:53 +04:00
Alexander Shaduri 911ec96207 Updated github pages. 2022-02-08 18:10:21 +04:00
Alexander Shaduri 1cefc9d9ba Updated github pages. 2022-02-08 17:27:56 +04:00
Alexander Shaduri da1b73feee Updated github pages. 2022-02-08 17:22:10 +04:00
Alexander Shaduri 8ce7d781a4 Updated github pages. 2022-02-08 17:16:55 +04:00
Alexander Shaduri 3db5941757 Updated github pages. 2022-02-08 16:56:15 +04:00
Alexander Shaduri 8b925ae0c4 Updated github pages. 2022-02-08 15:31:34 +04:00
Alexander Shaduri ea7f65725e Updated github pages and README.md. 2022-02-08 15:28:13 +04:00
Alexander Shaduri 137736d6eb Updated github pages. 2022-02-08 13:05:27 +04:00
Alexander Shaduri d0136e6a71 Updated github pages. 2022-02-07 19:05:35 +04:00
Alexander Shaduri 9abb0ff3a9 Update README.md 2022-02-04 15:42:05 +04:00
Alexander Shaduri b706b114b3 Use ubuntu-latest in github action. 2022-02-04 14:33:41 +04:00
Alexander Shaduri 3085c037ba Bumped Debian package compatibility level to 9. 2022-02-04 14:29:43 +04:00
Alexander Shaduri c34ddd32a5 Split github tier2 builds into standard and flaky actions. 2022-02-04 14:29:26 +04:00
Alexander Shaduri 3c10a1e12a Fix syntax errors in cs.po. 2022-02-04 14:24:19 +04:00
Alexander Shaduri a154a813ad Use Catch2 v2 instead of v3 due to build errors with latest compilers. 2022-02-04 14:24:01 +04:00
Alexander Shaduri 3b5c7365a1 Windows: Embed exe manifest in the resource; don't handle the manifest in NSIS. 2022-02-04 12:02:44 +04:00
Alexander Shaduri 0f78b7e91c Windows: Set GTK_CSD=0 only if no GTK_CSD is set. 2022-02-04 12:02:04 +04:00
Alexander Shaduri cf93bf008f Updated Catch2 to git devel branch 2022-02-02. 2022-02-02 23:42:47 +04:00
Alexander Shaduri 2bbe7788f1 Ubuntu package: Fixed support for Ubuntu 21.10 on OBS. 2022-02-02 23:37:21 +04:00
Alexander Shaduri 025348bfe3 Remove trailing slash from homepage URL. 2022-02-02 23:14:15 +04:00
Alexander Shaduri 4cf809b579 Debian package: Fixed support for Debian Testing and Debian Unstable on OBS. 2022-02-02 23:13:53 +04:00
Alexander Shaduri 9e1d92a7bc Debian package: Build tests and examples, this should fix OBS build failures. 2022-02-02 23:09:20 +04:00
Alexander Shaduri ef94137edc Info Window: Make the text views with output texts use monospace font with the new GTK versions. 2022-02-01 13:46:43 +04:00
Alexander Shaduri 910f71ec9e Info Window: Align and monospace table cells where applicable to improve readability. 2022-02-01 13:31:18 +04:00
Alexander Shaduri f4973cdb4b Handle all tree view styling in per-table cell renderers; this fixes conflicts between renderer styles and markup. 2022-02-01 12:51:48 +04:00
Alexander Shaduri 4dcc8e23e7 List all gtkmm deprecation macros for future reference. 2022-02-01 12:45:41 +04:00
Alexander Shaduri 044193c7ed Command execution popup windows: Use "dialog" type of window instead of "notifications"; this should fix #17 (the popup is floating above all the other applications). 2022-01-31 15:29:14 +04:00
Alexander Shaduri 29b2bb6635 Merge remote-tracking branch 'origin/main' into main 2022-01-31 15:11:12 +04:00
Alexander Shaduri d9f0314655 Code cleanup - reduce std::wcslen usage. 2022-01-31 15:11:04 +04:00
Alexander Shaduri af6c230edc Update devskim-analysis.yml 2022-01-31 15:09:50 +04:00
Alexander Shaduri 01746ab16d Ported some win32_tools.h code to std::filesystem. 2022-01-31 14:38:31 +04:00
Alexander Shaduri 5865134b29 Code cleanup - reduce std::strlen usage. 2022-01-29 22:27:12 +04:00
Alexander Shaduri 39d033c50d Fixed Codacy note in shell script. 2022-01-29 21:48:35 +04:00
Alexander Shaduri f64b3bc82d Added license badge to README.md 2022-01-29 21:45:01 +04:00
Alexander Shaduri 3f2353cc57 Updated README.md for style. 2022-01-29 21:29:49 +04:00
Alexander Shaduri bc20a790da Merge remote-tracking branch 'origin/main' into main 2022-01-29 21:27:48 +04:00
Alexander Shaduri a238770418 Update style. 2022-01-29 21:25:47 +04:00
Alexander Shaduri 90eb339a05 Fixed Codacy warnings in shell scripts. 2022-01-29 21:12:36 +04:00
Alexander Shaduri fa16ff964e Merge remote-tracking branch 'origin/main' into main 2022-01-29 11:57:08 +04:00
Alexander Shaduri ebb864f234 Add nullptr check to on_cell_data_render(), just in case. 2022-01-29 11:56:54 +04:00
Alexander Shaduri 01a33b97a7 Merge pull request #25 from codacy-badger/codacy-badge
Add a Codacy badge to README.md
2022-01-27 23:07:22 +04:00
Alexander Shaduri 8b05464444 Delete msvc-analysis.yml 2022-01-27 23:04:16 +04:00
The Codacy Badger 977396e852 Add Codacy badge 2022-01-27 18:33:50 +00:00
Alexander Shaduri 84b6e84c49 Update devskim-analysis.yml 2022-01-27 22:19:55 +04:00
Alexander Shaduri 33b96b459e Update msvc-analysis.yml 2022-01-27 22:18:08 +04:00
Alexander Shaduri a095f9f6bd Delete scorecards-analysis.yml 2022-01-27 22:01:48 +04:00
Alexander Shaduri 828558bfcc Update devskim-analysis.yml 2022-01-27 21:57:52 +04:00
Alexander Shaduri e49b0cbf8c Update codeql-analysis.yml 2022-01-27 21:49:28 +04:00
Alexander Shaduri 39fc4b2997 Create CODE_OF_CONDUCT.md 2022-01-25 17:14:04 +04:00
Alexander Shaduri 5d2925fd94 Create SECURITY.md 2022-01-25 17:08:56 +04:00
Alexander Shaduri f6a2a1cab5 Create scorecards-analysis.yml 2022-01-25 17:05:30 +04:00
Alexander Shaduri 661bcfe56e Create msvc-analysis.yml 2022-01-25 17:04:03 +04:00
Alexander Shaduri 821da2ce29 Create devskim-analysis.yml 2022-01-25 17:03:11 +04:00
Alexander Shaduri 38ee3fabd9 Create codacy-analysis.yml 2022-01-25 17:02:01 +04:00
Alexander Shaduri ac54d29f66 Create codeql-analysis.yml 2022-01-25 17:00:46 +04:00
Alexander Shaduri b27b04ebf0 Fixed building under Windows. 2022-01-25 16:54:42 +04:00
Alexander Shaduri 055438e740 Place less code in #ifdef _WIN32 to make platform-specific compilation less error-prone. 2022-01-25 16:42:10 +04:00
Alexander Shaduri 5f11e9a7ce Fixed building under Windows. 2022-01-18 16:31:13 +04:00
Alexander Shaduri f128de2b30 Fixed building non-debug builds. 2022-01-18 15:53:48 +04:00
Alexander Shaduri 88e9e8c2f7 Implemented most build settings as constexpr functions and ported most of macro-based conditional compilation to if constexpr(); this significantly improves code quality and the chance of build success on different platforms and build configurations.
More code modernization.
2022-01-18 15:30:55 +04:00
Alexander Shaduri 235fba8a04 Convert relative smartctl-nc path to absolute before running it. 2022-01-15 15:24:11 +04:00
Alexander Shaduri 0183626c73 Change current path to gsmartcontrol directory before running smartctl - this should fix not being able to find "smartctl-nc" when CWD differs from gsmartcontrol installation directory, as it may happen when running gsmartcontrol from cmd. 2022-01-15 15:07:10 +04:00
Alexander Shaduri bcc36f260d Fixed finding data files in non-debug builds when running from build directory. 2022-01-15 15:01:39 +04:00
Alexander Shaduri ad796dad9e Automatically handle running from source/build directory and from package, using whereami library; this should fix not being able to run the application from non-standard build directories. 2022-01-15 14:35:06 +04:00
Alexander Shaduri 0ca482bc5d Include whereami library as a third-party dependency. 2022-01-15 14:33:12 +04:00
Alexander Shaduri c72b746d0a Escape all text wherever it may be interpreted as markup, even if not coming from external source. 2022-01-14 19:17:15 +04:00
Alexander Shaduri b4b6980a0c Fixed a GTK warning related to markup in Info window's attributes tab. 2022-01-14 18:53:16 +04:00
Alexander Shaduri 534dcd129e Code modernization and cleanups. 2022-01-14 15:06:07 +04:00
Alexander Shaduri 3e4cefb04f Fixed a crash when trying to render main window icons which have incomplete data; fixes #13 in main branch. 2022-01-12 18:04:42 +04:00
Alexander Shaduri dd392845a6 Fixed cmake build for the last commit. 2022-01-10 21:09:03 +04:00
Alexander Shaduri 7f2fb32735 Refactored InstanceManager (now WindowInstanceManager) to manage all window instances, keep them alive and have the ability to destroy them; this avoids any manual "delete" calls, and fixes a (newly introduced) crash on exit. 2022-01-10 19:13:11 +04:00
Alexander Shaduri f3247ec13b Merge remote-tracking branch 'origin/main' into main 2022-01-10 17:02:12 +04:00
Alexander Shaduri ad014517b9 Set LC_NUMERIC=C for smartctl process to avoid locale-dependent number formatting. 2022-01-10 17:01:56 +04:00
Alexander Shaduri e3de5aa3fe Merge pull request #21 from hjudt/fix-barely-readable-info-cell-texts
Device Information window: Fix barely readable table cell text on some systems
2021-12-21 18:03:12 +04:00
Harald Judt 6adac797d3 Fix barely readable info cell texts
By simply resetting values, the rendered cell text colors are barely
readable. Setting Pango::WEIGHT_NORMAL instead of resetting seems to fix this
nicely without any negative consequences.

Signed-off-by: Harald Judt <h.judt@gmx.at>
2021-12-21 14:25:06 +01:00
Alexander Shaduri 99c9d393c2 Merge pull request #15 from davoper/improvements
Add time to default filename in save dialog
2021-12-01 18:07:07 +04:00
dpc 17f54a8848 Add time (%H%M) to default filename in save dialog 2021-10-08 20:24:02 +02:00
Alexander Shaduri f9c5ad470c Merge pull request #11 from Translate-SW/patch-4
Update LINGUAS list
2021-08-11 18:32:23 +04:00
Alexander Shaduri da539e57a4 Merge pull request #12 from Translate-SW/patch-3
Czech translations for GSmartControl (cs.po)
2021-08-11 18:31:59 +04:00
CZ-Translator 37d86b2914 Update LINGUAS 2021-08-09 18:00:39 +02:00
CZ-Translator acc84385b5 Create cs.po 2021-08-09 17:59:07 +02:00
Alexander Shaduri 701ce81aab Merge pull request #5 from pinotree/legacy-pixmaps-location
Stop installing application icons to the legacy pixmaps location
2021-05-17 13:19:34 +04:00
Pino Toscano 71bcfe80e3 Stop installing app icon in pixmaps location
The /usr/share/pixmaps location is considered a legacy location for
application icons; since the application icons are already installed in
the global XDG hicolor theme, then simply stop installing the 48px one
in the legacy pixmaps location.
2021-05-16 17:57:52 +02:00
Pino Toscano b53bbe5a97 Drop the XPM version of the app icon
The application icon is already provided as PNG in different sizes, and
installed in the global XDG hicolor icon theme. Hence, the XPM version
of it can be dropped, as it is redundant.
2021-05-16 17:54:01 +02:00
Pino Toscano ccc9cd1a32 debian: drop old Debian menu file
Debian officially deprecated the old Debian menu system more than 5
years ago [1]. Hence, drop the old menu file, as not much of use
anymore.

[1] https://lists.debian.org/debian-devel-announce/2015/09/msg00000.html
2021-05-16 17:50:38 +02:00
Alexander Shaduri b78f8573b5 Implemented smartctl process environment changes without changing the main program's environment.
Removed ScopedEnv class - it's not thread-safe and very easy to misuse.
2021-04-21 16:48:46 +04:00
Alexander Shaduri 3b7576d95c Catch2: Treat catch2 headers as system. 2021-03-22 16:48:42 +04:00
Alexander Shaduri cdb9a4c603 Renamed SmartctlTextParser to SmartctlAtaTextParser. 2021-03-19 14:51:32 +04:00
Alexander Shaduri 9a2606d96f Disable compiler warnings when compiling third-party dependencies. 2021-03-19 14:50:08 +04:00
Alexander Shaduri b1ebc88a3c GitHub actions: Use msys2 shell when running tests in msys. 2021-03-19 14:49:18 +04:00
Alexander Shaduri a33d4109d1 Fix cross-compiling (test discovery doesn't work when cross-compiling). 2021-03-17 14:26:13 +04:00
Alexander Shaduri 15ab09063b Minor cleanups. 2021-03-17 14:25:30 +04:00
Alexander Shaduri 3f0b7c1681 Fixed catch2 compiling under mingw. 2021-03-17 14:24:52 +04:00
Alexander Shaduri b1150d8e86 Implemented app_pcre_get_options() tests. 2021-03-16 18:10:35 +04:00
Alexander Shaduri b84f3d9218 Register libdebug domains in test_all. 2021-03-16 18:10:19 +04:00
Alexander Shaduri 9db25f3907 Add Catch2 testing framework and integrate it into the build system and CI; moved json to subdirectory. 2021-03-16 17:57:01 +04:00
Alexander Shaduri 812bd2191e Fixed non-linux builds. 2021-03-16 16:27:06 +04:00
Alexander Shaduri 788a4760b8 Refactored storage property classes (better naming, documentation), removed app_gtkmm_features.h. 2021-03-16 16:06:28 +04:00
Alexander Shaduri d74da816a1 Refactored command executors (better naming, documentation). 2021-03-16 15:24:08 +04:00
Alexander Shaduri cfc11bef6e Refactored app_pcrecpp.h structure. 2021-03-15 19:00:50 +04:00
Alexander Shaduri bedd8f362b Refactored gtkmm utils and app builder to simply the code and document it better. 2021-03-15 17:55:22 +04:00
Alexander Shaduri 7855ce9dfb Fixed cmake warnings. 2021-03-15 16:40:25 +04:00
Alexander Shaduri 81d6656f13 Github actions: Add Linux binary package generation. 2021-03-12 18:36:59 +04:00
Alexander Shaduri 6fad220e7e Change version to 1.1.99. 2021-03-12 18:36:18 +04:00
Alexander Shaduri 2a0f32b2c7 Try to fix msys2 packaging. 2021-03-12 18:13:31 +04:00
Alexander Shaduri 212bdb80f8 Try to fix msys2 packaging. 2021-03-12 17:54:37 +04:00
Alexander Shaduri 6039667556 Try to fix msys2 packaging. 2021-03-12 16:25:00 +04:00
Alexander Shaduri 4960be8cd1 Try to fix msys2 packaging. 2021-03-12 16:03:16 +04:00
Alexander Shaduri 89b1a5a6bd Try to fix msys2 packaging. 2021-03-12 15:09:36 +04:00
Alexander Shaduri 173f379111 OBS Debian fixes. 2021-03-12 15:09:29 +04:00
Alexander Shaduri 14288cbd1a OBS Debian fixes. 2021-03-12 15:08:30 +04:00
Alexander Shaduri 4b72bd3824 Fixed compilation under Debian 10. 2021-03-12 10:58:31 +00:00
Alexander Shaduri 902e06b893 Try to fix msys2 packaging. 2021-03-12 14:48:19 +04:00
Alexander Shaduri ca9e83ce9b OBS fixes for Debian, SLE15. 2021-03-12 14:34:51 +04:00
Alexander Shaduri 58919f3dae Implement Windows zip and NSIS packaging in GitHub actions. 2021-03-12 14:34:25 +04:00
Alexander Shaduri b042e8ad19 Merge remote-tracking branch 'origin/main' into main 2021-03-12 14:33:13 +04:00
Alexander Shaduri b188fab4df Improved Windows packaging. 2021-03-12 14:09:10 +04:00
Alexander Shaduri 5f9801328f Merge remote-tracking branch 'origin/main' into main 2021-03-11 18:06:36 +04:00
Alexander Shaduri d7978e759d Support Windows zip and NSIS package generation in MSYS2. 2021-03-11 18:06:06 +04:00
Alexander Shaduri 2d83424510 Another fix for cmake 3.12. 2021-03-11 18:05:23 +04:00
Alexander Shaduri 78391d236b Support cmake 3.12. 2021-03-11 17:09:42 +04:00
Alexander Shaduri 7934433100 Make GitHub treat header files as C++. 2021-03-11 16:44:31 +04:00
Alexander Shaduri 692fb1c7ca Fixed "drive is testing" message on startup. 2021-03-10 14:28:22 +04:00
Alexander Shaduri a6fa512e46 Updated OBS rpm rules. 2021-03-10 14:14:35 +04:00
Alexander Shaduri 4809173feb Updated OBS rpm/debian rules. 2021-03-10 13:57:22 +04:00
Alexander Shaduri 2e49c6b7ed Support compilation under gcc 7. 2021-03-10 13:44:28 +04:00
Alexander Shaduri 72064d2324 Add naive deb package support (incomplete). 2021-03-10 13:31:22 +04:00
Alexander Shaduri ce309529c5 Update OBS rpm and deb builds (deb not really supported yet). 2021-03-10 13:13:19 +04:00
Alexander Shaduri cb1abab75f Support Finnish decimal separator (backported from Debian package). 2021-03-10 13:05:47 +04:00
Alexander Shaduri 9c97f463c9 Fixed a few typos (backported from debian package). 2021-03-10 13:05:21 +04:00
Alexander Shaduri c6d910ec21 GitHub actions: Moved macos to tier2 platform list. 2021-03-10 12:39:42 +04:00
Alexander Shaduri 9574a6df20 Fixed a warning from OBS. 2021-03-09 22:01:19 +04:00
Alexander Shaduri 39c57564a6 Fixed a warning in rpm SPEC file. 2021-03-09 22:00:42 +04:00
Alexander Shaduri c0686dd234 Fixed a typo in rpm spec file. 2021-03-09 21:33:15 +04:00
Alexander Shaduri 134633e7ac Updated RPM spec to support CentOS with EPEL. 2021-03-09 21:32:39 +04:00
Alexander Shaduri c1a1aca7ec GitHub actions: Add cpack test to Ubuntu build. 2021-03-09 21:12:18 +04:00
Alexander Shaduri 57f9605f70 Split github build actions into 2 tiers (tier 1 and 2 supported platforms); tier 1 platforms are build automatically, tier 2 are built on demand. 2021-03-09 21:11:54 +04:00
Alexander Shaduri 4a658d8f43 Require proper cmake version in spec file. 2021-03-09 21:10:43 +04:00
Alexander Shaduri e4e438b579 Fixed rpm spec file for opensuse. 2021-03-09 20:58:23 +04:00
Alexander Shaduri 3080aa7f87 Updated rpm spec file's build requirements. 2021-03-09 18:00:29 +04:00
Alexander Shaduri 3e19e3e5cb Updated rpm spec file to support cmake. 2021-03-09 17:57:46 +04:00
Alexander Shaduri 09e9e7d380 Fixed cmake install target, support cpack windows binary zip / NSIS, support package_source target; removed cpack RPM and DEB support. 2021-03-09 17:14:51 +04:00
Alexander Shaduri cbd45a27fb Removed autotools-related files from gitignore. 2021-03-09 17:12:08 +04:00
Alexander Shaduri b0b9c4169e Initial refactoring to support cpack-based packaging and OBS builds. 2021-03-09 15:17:25 +04:00
Alexander Shaduri 8d6b75057e GitHub action: Fix passing correct cmake flags in freebsd build. 2021-03-09 15:16:19 +04:00
Alexander Shaduri 1ddcbc224e Fixed compilation under FreeBSD and QNX. 2021-03-09 13:08:27 +04:00
Alexander Shaduri 8dd21e2b82 Re-enable freebsd in github workflow. 2021-03-09 12:18:28 +04:00
Alexander Shaduri 2de5360ac8 Updated github workflow. 2021-03-08 18:46:13 +04:00
Alexander Shaduri 28bc0fc826 Updated github workflow. 2021-03-08 18:36:14 +04:00
Alexander Shaduri 98b96cdeb2 Updated github workflow. 2021-03-08 18:06:30 +04:00
Alexander Shaduri 98798a3e57 Updated configure-dev script with cmake support. 2021-03-08 17:24:31 +04:00
Alexander Shaduri 4d04cd5089 Updated github workflow. 2021-03-08 17:16:59 +04:00
Alexander Shaduri 0b8c94bf6f Updated configure-dev script with cmake support. 2021-03-08 17:12:04 +04:00
Alexander Shaduri 2f900bf3a2 Updated github workflow. 2021-03-08 17:11:37 +04:00
Alexander Shaduri 71a34549ab Updated github workflow. 2021-03-08 17:00:35 +04:00
Alexander Shaduri a1c7855a63 Updated github workflow. 2021-03-08 16:53:16 +04:00
Alexander Shaduri d101a92750 Support old Glibmm only with libstdc++. 2021-03-08 16:51:42 +04:00
Alexander Shaduri fce77dc7d7 Fixed building under macosx. 2021-03-08 16:51:12 +04:00
Alexander Shaduri 14a7e26e09 Updated github workflow. 2021-03-08 16:38:37 +04:00
Alexander Shaduri 700ada0b5b Updated github workflow to include macos. 2021-03-08 16:06:16 +04:00
Alexander Shaduri 740b544615 Fixed syntax error in cmake.yml. 2021-03-08 15:58:14 +04:00
Alexander Shaduri ad64427126 Don't use $GITHUB_WORKSPACE in msys2 build. 2021-03-08 15:57:13 +04:00
Alexander Shaduri 4463726d51 Disabled freebsd build for now (it's broken), 2021-03-08 15:52:46 +04:00
Alexander Shaduri 95cb1abab8 Use matrix msystem for msys builds. 2021-03-08 14:55:04 +04:00
Alexander Shaduri 10af1ab1f2 Use msys shell for msys builds. 2021-03-08 14:45:51 +04:00
Alexander Shaduri 824827ff26 Added new experimental GitHub workflows for ubuntu, windows-msys2, freebsd. 2021-03-08 14:38:29 +04:00
Alexander Shaduri 60d9bf1922 Add separate toolchain with clang-tidy support. 2021-03-05 14:19:45 +04:00
Alexander Shaduri cb42040a8d Add .vs (VS with CMake support) to gitignore. 2021-03-05 14:19:26 +04:00
Alexander Shaduri d9d681db5e Refactored libdebug's bitset-related types. 2021-03-05 14:19:01 +04:00
Alexander Shaduri 1d5e8822e6 Fixed compilation under MSYS2. 2021-03-04 14:35:05 +04:00
Alexander Shaduri 53a3f73156 Modernized Windows code, fixed compiler warnings under mingw. 2021-03-03 19:40:02 +04:00
Alexander Shaduri 28dacf4d74 Fixed all remaining clang-tidy warnings. 2021-03-03 18:15:23 +04:00
Alexander Shaduri 2859666708 Make all examples use main_tools.h exception wrapper. 2021-03-03 18:15:05 +04:00
Alexander Shaduri f861918789 Fixed compilation error in hz/main_tools.h. 2021-03-03 17:40:46 +04:00
Alexander Shaduri 8e2cf08be1 Cleaned up libdebug for clang-tidy warnings. 2021-03-03 17:40:21 +04:00
Alexander Shaduri 4f6f0ce9f6 Minor cleanup. 2021-03-03 16:54:59 +04:00
Alexander Shaduri 3032bbc4e7 Added new hz/main_tools.h header to cmake. 2021-03-03 16:54:37 +04:00
Alexander Shaduri 6f1dd37818 Fixed a few clang-tidy warnings in hz. 2021-03-03 16:54:16 +04:00
Alexander Shaduri f8369fe436 Fixed a few clang-tidy warnings in libdebug. 2021-03-03 16:53:50 +04:00
Alexander Shaduri ff3b07a086 Fixed a few clang-tidy warnings in applib. 2021-03-03 16:53:22 +04:00
Alexander Shaduri e329946213 Ported some main() functions to new main_tools. 2021-03-03 16:43:04 +04:00
Alexander Shaduri 5572421eca New hz::main_tools component to handle exceptions in main(). 2021-03-03 16:42:26 +04:00
Alexander Shaduri ef0803cb4d Redirect github page to old sourceforge page for now. 2021-03-03 12:22:21 +04:00
Alexander Shaduri 60ba6078c2 Fixed some problems reported by clang-tidy. 2021-03-02 19:12:18 +04:00
Alexander Shaduri 8d66596995 New .clang-tidy configuration to catch code problems. 2021-03-02 19:11:56 +04:00
Alexander Shaduri 07b6a27dc0 Fixed libintl conflicts causing compilation errors in Windows. 2021-03-02 18:25:16 +04:00
Alexander Shaduri 6e93516a4b Fixed copying .ico file in Windows. 2021-03-02 18:24:19 +04:00
Alexander Shaduri 5ce4a3aeb8 Implement toolchain support for cross-compilation and development. 2021-03-02 18:23:49 +04:00
Alexander Shaduri 2e3d8e72b6 Fixed a memory leak in utf8-to-utf16 conversion and a gcc warning. 2021-03-02 18:22:46 +04:00
Alexander Shaduri 0be08399a0 Fixed Win32 compiler errors related to paths. 2021-03-02 18:21:55 +04:00
Alexander Shaduri 0cd5202e74 Hide binary symbols by default. 2021-03-02 18:20:13 +04:00
Alexander Shaduri 1479256575 Update "JSON for Modern C++" to version 3.9.1. 2021-03-02 18:19:42 +04:00
Alexander Shaduri 306fbd503b Write debian and rpm scripts to "data" directory, not build directory. 2021-03-02 18:19:12 +04:00
Alexander Shaduri a5aff22d34 Link Win32 manifest into the gsmartcontrol binary. 2021-03-02 16:44:50 +04:00
Alexander Shaduri 3a8d75fbf0 Link Win32 manifest into the gsmartcontrol binary. 2021-03-02 16:44:23 +04:00
Alexander Shaduri 1d0762e756 Disable format-security warnings in Clang. 2021-03-02 16:43:25 +04:00
Alexander Shaduri d017f425d0 Use "example_" prefix instead of "_example" suffix for example sources and binaries. 2021-03-02 16:42:24 +04:00
Alexander Shaduri 56dec521c5 Updated Doxyfile with latest doxygen template. 2021-03-01 23:19:14 +04:00
Alexander Shaduri fdce91471e Fixed clang warning. 2021-03-01 22:45:19 +04:00
Alexander Shaduri 2986bb4893 Ported hz::scoped_ptr to std::unique_ptr and removed it. 2021-03-01 22:43:22 +04:00
Alexander Shaduri 8f82cd5c8a Removed unnecessary line in github action. 2021-03-01 22:42:49 +04:00
Alexander Shaduri 11bbbe1155 Removed TODO file. 2021-03-01 18:12:23 +04:00
Alexander Shaduri 80cc4c9515 Disable glibmm throw(...) workaround with newer glibmm. 2021-03-01 16:47:02 +04:00
Alexander Shaduri c6f506781b Make flags size_t. 2021-03-01 16:26:51 +04:00
Alexander Shaduri be22e3b999 Re-enable checkout action. 2021-03-01 16:26:34 +04:00
Alexander Shaduri 8cc7fb1e17 Disable compiler warnings unless explicitly enabled, to avoid compilation failures on older systems without specific warning flags. 2021-03-01 16:21:42 +04:00
Alexander Shaduri 28c86de4c9 Fixed compiler warning in libdebug. 2021-03-01 16:20:54 +04:00
Alexander Shaduri dac585c01b Fixed building examples. 2021-03-01 16:20:40 +04:00
Alexander Shaduri 357207c6a8 Added gettext as debian package dependency. 2021-03-01 16:20:21 +04:00
Alexander Shaduri 4e1db889c0 Disable github checkout action, it's unnecessary. 2021-03-01 16:19:59 +04:00
Alexander Shaduri 8d4f4d26f7 Added Ubuntu dependencies. 2021-03-01 15:19:59 +04:00
Alexander Shaduri 6e4766149f Fixed github action matrix. 2021-03-01 15:08:22 +04:00
Alexander Shaduri d4bc3f01bf Added github action (Ubuntu). 2021-03-01 15:04:52 +04:00
Alexander Shaduri d5785606a0 Updated homepage URLs and some copyright notices. 2021-03-01 14:53:00 +04:00
Alexander Shaduri d760a3d0f2 Map gtk log levels to libdebug log levels. 2021-03-01 14:44:30 +04:00
Alexander Shaduri b013cbd65c Updated copyright notices in .glade files. 2021-03-01 14:04:46 +04:00
Alexander Shaduri 698500fd3e Refactored the build config header and macros; Added OS- and compiler-specific options and macros to cmake. 2021-03-01 14:04:35 +04:00
Alexander Shaduri f0dfeaf8c0 Updated / added copyright headers. 2021-02-26 14:36:27 +04:00
Alexander Shaduri fed79c7de0 Updated .in files to use cmake variables. 2021-02-26 14:01:09 +04:00
Alexander Shaduri 8eaef139e9 Merge remote-tracking branch 'origin/master' 2021-02-24 17:58:02 +04:00
Alexander Shaduri c6ebf9feb1 Initial version of complete port to cmake; removed all autotools files. 2021-02-24 17:57:51 +04:00
Alexander Shaduri 9ec1e52b5a Create CNAME 2021-02-23 20:37:50 +04:00
Alexander Shaduri d0db433bc8 Added sample github pages. 2021-02-23 20:33:46 +04:00
Alexander Shaduri b7be12c7aa Removed old IDE files. 2021-02-23 20:33:28 +04:00
Alexander Shaduri 7b1217100b Updated license files and some file license headers. 2021-02-23 20:33:17 +04:00
Alexander Shaduri b24e0ef6f2 Moved files out of doc directory and updated them. 2021-02-23 20:32:40 +04:00
Alexander Shaduri dc6bd27d22 Added .gitignore, removed SVN ignore files. 2021-02-23 20:29:29 +04:00
Alexander Shaduri 0f6ff2a4cb Moved files out of gsmartcontrol directory after import from SVN. 2021-02-23 20:24:01 +04:00
Alexander Shaduri 7075a4f4d5 More work on cmake support. 2021-02-23 11:54:56 +00:00
Alexander Shaduri f4ed97d5ea Fixed a crash when system locale is set to invalid locale. 2021-01-05 12:25:21 +00:00
Alexander Shaduri 6d3a097f20 Started marking texts as translatable.
Fixed a few minor bugs.
2019-07-23 10:45:17 +00:00
Alexander Shaduri 5265ebb939 Implemented gettext integration.
Marked all window texts for translation (library texts still to go).
Switched glade files to use gtk 3.20, added copyright information.
2018-02-05 17:52:41 +00:00
Alexander Shaduri 9e783a5afc Drive settings are now serialized to config as json objects.
Removed bin2ascii_encoder.
2018-02-02 20:21:35 +00:00
Alexander Shaduri 0feb3b4aaa Data files are no longer compiled-in, but loaded at runtime.
Moved licenses and other documentation to "docs".
Simplified some GtkBuilder code.
2018-02-01 22:26:31 +00:00
Alexander Shaduri 6c624de79c Ported all filesystem code to C++17 std::filesystem.
Removed hz/fs_*.
Added new hz/fs.h and hz/fs_ns.h files with some filesystem utility functions.
Removed hz/string_wcmatch.h, it's no longer needed.
Removed hz/i18n.h, it never worked.
2018-01-31 20:17:03 +00:00
Alexander Shaduri b48bd99f70 More C++17 modernization. 2018-01-27 21:09:14 +00:00
Alexander Shaduri cbd0d94d90 Removed some autoconf checks, they're detected using macros now.
Use config.h only for CONFIG_* macros; for everything else - define them on
the command-line, or detect using feature checks.
Removed hz_config.h - moved all of its checks to respective files.
More C++17 modernization.
Split GscInfoWindow::fill_ui_with_info() into tab-specific functions.
2018-01-27 20:44:55 +00:00
Alexander Shaduri ee3adb70d4 Info window: Fixed attribute values not being rendered properly.
Fixed examples.
2018-01-15 21:16:53 +00:00
Alexander Shaduri d8af6a9af1 Got rid of intrusive_ptr. 2018-01-15 20:11:55 +00:00
Alexander Shaduri e20b4326a8 switch on type -> static map. 2018-01-15 17:28:04 +00:00
Alexander Shaduri 77e0278f93 enum -> enum class where applicable. 2018-01-15 16:55:03 +00:00
Alexander Shaduri 32623afb9b Use std::variant in StorageProperty. 2018-01-15 15:00:46 +00:00
Alexander Shaduri e83abacffd Ported to std::chrono.
Fixed lots of build warnings.
2018-01-14 21:39:55 +00:00
Alexander Shaduri 52eb101aeb GSmartControl is GPL3 only now.
Updated copyrights to 2018.
2018-01-13 20:31:43 +00:00
Alexander Shaduri 59b3a8a8e4 Don't use picojson (it has problems), use Lohmann's JSON for Modern C++. 2018-01-13 20:09:04 +00:00
Alexander Shaduri f87003b192 Removed rmn.
Added picojson.
Ported rconfig to picojson.
Ported rconfig's "/runtime" to GscStartupSettings.
2018-01-12 21:16:36 +00:00
Alexander Shaduri 89fb954223 Removed errno_string. 2018-01-05 21:30:13 +00:00
Alexander Shaduri ecea03b271 Fixed string_num.
Renamed tests to examples.
2018-01-02 19:47:15 +00:00
Alexander Shaduri f127fb9afd Further porting to C++17 (string_num, ...). 2018-01-01 22:58:42 +00:00
Alexander Shaduri c77d23be7a Moar porting. 2018-01-01 00:29:24 +00:00
Alexander Shaduri 72343e1067 Futher porting to C++17. 2017-12-31 23:09:29 +00:00
Alexander Shaduri 0902345808 Removed all thread stuff. 2017-12-31 16:56:17 +00:00
Alexander Shaduri 2ae1a561d7 Further removal of old code and porting to C++17. 2017-12-30 22:52:39 +00:00
Alexander Shaduri d4c06f61d6 Ported from hz::any_type to std::any. 2017-12-30 21:35:28 +00:00
Alexander Shaduri 02cfa33907 First round of porting to C++17 and removing old code. 2017-12-30 20:27:07 +00:00
524 changed files with 103726 additions and 47865 deletions
+109
View File
@@ -0,0 +1,109 @@
---
# Exceptions:
# bugprone-branch-clone is too noisy in parsing code.
# bugprone-easily-swappable-parameters is too noisy.
# cert-dcl50-cpp is triggered by hz::string_sprintf()'s C style.
# clang-analyzer-deadcode.DeadStores is too noisy.
# clang-analyzer-cplusplus.NewDeleteLeaks doesn't understand Gtkmm memory management.
# cppcoreguidelines-avoid-magic-numbers, readability-magic-numbers is triggered by attribute database.
# cppcoreguidelines-avoid-do-while is triggered in DBG macros.
# cppcoreguidelines-owning-memory doesn't support deleting Gtkmm objects.
# cppcoreguidelines-pro-type-cstyle-cast needed by GTK C casts.
# cppcoreguidelines-pro-type-reinterpret-cast is needed by WinAPI-facing functions
# cppcoreguidelines-pro-type-vararg is triggered by hz::string_sprintf().
# cppcoreguidelines-pro-bounds-array-to-pointer-decay is triggered by va_start in hz::string_sprintf().
# cppcoreguidelines-pro-bounds-pointer-arithmetic is useless (triggered by argv) until we have std::span.
# misc-include-cleaner does not really work.
# misc-no-recursion is too noisy.
# modernize-raw-string-literal is very noisy.
# modernize-use-trailing-return-type is contrary to our style.
# performance-enum-size is too noisy.
# readability-avoid-unconditional-preprocessor-if is triggered on platform-specific code
# readability-convert-member-functions-to-static is triggered for many callbacks.
# readability-function-cognitive-complexity needed by UI constructors.
# readability-isolate-declaration is noisy.
# readability-identifier-length is too noisy.
Checks: >
-abseil-*,
-altera-*,
-android-*,
-boost-*,
bugprone-*,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
cert-*,
-cert-dcl50-cpp,
clang-analyzer-*,
-clang-analyzer-deadcode.DeadStores,
-clang-analyzer-cplusplus.NewDeleteLeaks,
concurrency-*,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-darwin-*,
-fuchsia-*,
google-*
hicpp-*,
-linuxkernel-*,
-llvm-*,
-llvmlibc-*,
misc-*,
-misc-include-cleaner,
-misc-no-recursion,
modernize-*,
-modernize-use-trailing-return-type,
-modernize-raw-string-literal,
-mpi-*,
-objc-*,
openmp-*,
performance-*,
-performance-enum-size,
portability-*,
readability-*,
-readability-avoid-unconditional-preprocessor-if,
-readability-convert-member-functions-to-static,
-readability-function-cognitive-complexity,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-identifier-length,
-zircon-*
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none
CheckOptions:
- key: bugprone-exception-escape.CheckCapsOnly
value: '1'
- key: cppcoreguidelines-macro-usage.CheckCapsOnly
value: '1'
- key: cppcoreguidelines-owning-memory.LegacyResourceConsumers
value: '::free;::realloc;::freopen;::fclose;Gtk::manage'
- key: misc-assert-side-effect.AssertMacros
value: assert,DBG_ASSERT
- key: misc-assert-side-effect.CheckFunctionCalls
value: '0'
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: '1'
- key: misc-include-cleaner.IgnoreHeaders
value: 'libdebug/*;local_glibmm.h;glib/*;gtk/*;gtkmm/*;glibmm/*'
- key: performance-unnecessary-value-param.AllowedTypes
value: 'RefPtr;Ptr$'
- key: readability-braces-around-statements.ShortStatementLines
value: '2'
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: '1'
- key: readability-implicit-bool-cast.AllowConditionalPointerCasts
value: '1'
...
+3
View File
@@ -0,0 +1,3 @@
# Make sure github recognizes header files as C++, not C.
*.h linguist-language=C++
+28
View File
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug, enhancement
assignees: ashaduri
---
**Version and Environment**
- GSmartControl version: [Are you using the latest released version or git?]
- OS: [e.g. openSUSE Linux 15.5]
**Describe the Bug**
[A clear and concise description of what the bug is].
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Screenshots**
[If applicable, add screenshots to help explain your problem].
**Additional Context**
[Add any other context about the problem here (GTK+ version, etc.)]
+24
View File
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ashaduri
---
**Version and Environment**
- GSmartControl version: [Are you using the latest released version or git?]
- OS: [e.g. openSUSE Linux 15.5]
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
+15
View File
@@ -0,0 +1,15 @@
---
name: Other issue
about: Issues other than bugs and enhancements
title: ''
labels: ''
assignees: ashaduri
---
**Version and Environment**
- GSmartControl version: [Are you using the latest released version or git?]
- OS: [e.g. openSUSE Linux 15.5]
**Describe the Issue**
[A clear and concise description of what the issue is].
+124
View File
@@ -0,0 +1,124 @@
# GSmartControl – Copilot Instructions
GSmartControl is a C++20 GTK3/Gtkmm GUI for inspecting hard-drive and SSD health via SMART data
(wrapping `smartctl` from smartmontools). It supports Linux, Windows (MSYS2/MinGW), macOS, and BSDs.
## Build
```bash
mkdir build && cd build
# Standard Linux build (uses dev toolchain with warnings enabled)
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_TOOLCHAIN_FILE=../toolchains/linux-dev.cmake
# Windows (MSYS2/MinGW64)
cmake .. -G "MSYS Makefiles" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_TOOLCHAIN_FILE=../toolchains/win64-mingw-msys2.cmake
# Build on MSYS2/MinGW64 (from build dir)
cmake --build . --target all -j 18
```
The `configure-dev` script is a convenience wrapper: `./configure-dev -t <toolchain> -c <compiler> -b <build_type>`.
Key CMake options:
- `-DAPP_BUILD_TESTS=ON` – enable test targets
- `-DAPP_BUILD_EXAMPLES=ON` – enable example targets
- `-DAPP_COMPILER_ENABLE_WARNINGS=ON` – strict compiler warnings (set automatically by `linux-dev.cmake`)
## Tests
Tests use **Catch2** (vendored in `dependencies/catch2/`). They are only built when `-DAPP_BUILD_TESTS=ON` is passed.
```bash
# Build and run all tests
cmake .. -DAPP_BUILD_TESTS=ON
cmake --build .
ctest -C RelWithDebInfo --rerun-failed --output-on-failure
# Run a single test executable directly (from build dir)
./test_all "[smartctl_parser]" # Catch2 tag filter
./test_all "test name substring" # substring match
```
Test sources live in `src/applib/tests/` and `src/hz/tests/`; they are linked into `src/test_all/`.
## Linting
Clang-tidy config is at `.clang-tidy` in the repo root. Run it via CMake or directly:
```bash
clang-tidy src/applib/storage_device.cpp -- -std=c++20 $(pkg-config --cflags gtkmm-3.0)
```
## Architecture
The codebase is split into libraries and one GUI executable:
| Component | Location | Purpose |
|---|---|---|
| `applib` | `src/applib/` | Core logic: SMART parsing, device detection, command execution |
| `hz` | `src/hz/` | General-purpose C++ utilities (strings, filesystem, error types) |
| `rconfig` | `src/rconfig/` | Runtime config load/save with auto-save support |
| `libdebug` | `src/libdebug/` | Debug logging with named channels |
| `gui` | `src/gui/` | GTK/Gtkmm UI (windows, dialogs, Glade `.ui` files) |
### Parsing pipeline
`smartctl` output is parsed through a strategy pattern:
- JSON parsers (`smartctl_json_ata_parser`, `smartctl_json_nvme_parser`, `smartctl_json_basic_parser`) target smartctl ≥ 7.3.
- Text parsers (`smartctl_text_ata_parser`, `smartctl_text_basic_parser`) handle legacy output.
- Parsed results are stored as `StorageProperty` objects in a `StoragePropertyRepository` on `StorageDevice`.
### Device detection
`StorageDetector` is an abstract interface; platform implementations are:
- `storage_detector_linux.cpp` – scans `/dev/sd*`, `/dev/nvme*`, etc.
- `storage_detector_win32.cpp` – WMI/registry enumeration
- `storage_detector_other.cpp` – generic `/dev` scanning (BSD/macOS)
### Async execution
`AsyncCommandExecutor` wraps `CommandExecutor` (which shells out to `smartctl`) in a background thread.
Completion is signalled via **libsigc++** signals back to the GTK main loop. Never call GTK APIs from the worker thread;
queue them through signals or `Glib::signal_idle()`.
### Error handling
Use `hz::ExpectedValue<T, E>` (wrapping `tl::expected`) for recoverable errors instead of exceptions.
Enum-based error types (`StorageDeviceError`, `SmartctlParserError`) are preferred over string errors.
## Key Conventions
**Naming:**
- Classes: `PascalCase` (e.g., `StorageDevice`, `SmartctlParser`)
- Methods and members: `snake_case`; private/member fields have a trailing `_` (e.g., `device_list_`)
- GUI classes in `src/gui/` are prefixed `Gsc` (e.g., `GscMainWindow`)
- Filenames: `snake_case.cpp` / `snake_case.h`
**Headers:**
- Use `#ifndef FILENAME_H` / `#define FILENAME_H` guards (not `#pragma once`)
- Include order: standard library → third-party (GTK/Gtkmm) → project headers
- All project headers are included relative to `src/` (the include root)
**Modern C++20/23 patterns used throughout:**
- `std::optional<T>` for nullable values
- `hz::ExpectedValue<T, E>` for error-returning functions
- `std::string_view` for non-owning string parameters
- `fmt::format()` (vendored `fmt` library) for string formatting
- Smart pointers exclusively; no raw owning pointers
**Vendored dependencies** are in `dependencies/` and added via `add_subdirectory`.
Do not modify them; prefer upgrading the whole vendored copy.
**Translations:** UI strings are wrapped with `_()` (gettext). `.po` files live in `po/`.
Translations are not yet supported.
**Platform guards:** Use `#ifdef CONFIG_KERNEL_FAMILY_WINDOWS`,
`#ifdef CONFIG_KERNEL_LINUX`, etc.
## Agentic Development
Place all plans and temporary files in `agent_workspace/`. This directory is ignored by Git.
+249
View File
@@ -0,0 +1,249 @@
name: Build (Tier 1 platforms)
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
SMARTMONTOOLS_INSTALLER: smartmontools-7.4-1.win32-setup.exe
SMARTMONTOOLS_URL: https://downloads.sourceforge.net/project/smartmontools/smartmontools/7.4/smartmontools-7.4-1.win32-setup.exe
jobs:
linux-ubuntu-24_04:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update Package Database
run: sudo apt-get update
- name: Install Dependencies
run: sudo apt-get install libgtkmm-3.0-dev gettext
- name: Create Build Directory
run: cmake -E make_directory build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
env:
CC: gcc-14
CXX: g++-14
run: >
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/linux-dev.cmake"
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
- name: Pack (cmake install and make binary package)
shell: bash
working-directory: ${{github.workspace}}/build
run: cpack -G TBZ2
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Linux Packages
path: ${{github.workspace}}/build/gsmartcontrol-*-Linux*.*
linux-ubuntu-22_04:
# GCC 11
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Update Package Database
run: sudo apt-get update
- name: Install Dependencies
run: sudo apt-get install libgtkmm-3.0-dev gettext
- name: Create Build Directory
run: cmake -E make_directory build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
env:
CC: gcc-11
CXX: g++-11
run: >
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/linux-dev.cmake"
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
- name: Pack (cmake install and make binary package)
shell: bash
working-directory: ${{github.workspace}}/build
run: cpack -G TBZ2
# - name: Upload artifacts
# uses: actions/upload-artifact@v4
# with:
# name: Linux Packages
# path: ${{github.workspace}}/build/gsmartcontrol-*-Linux*.*
windows-msys2:
runs-on: windows-latest
strategy:
matrix:
include: [
{ msystem: MINGW64, arch: x86_64, platform: win64, urlpath: mingw64 },
# MSYS2 no longer supports for 32-bit Windows.
# { msystem: MINGW32, arch: i686, platform: win32, urlpath: mingw32 }
]
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
# p7zip is needed to extract smartmontools
# fontconfig owns /etc/fonts
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
mingw-w64-${{ matrix.arch }}-gtkmm3
mingw-w64-${{ matrix.arch }}-pkg-config
mingw-w64-${{ matrix.arch }}-cmake
mingw-w64-${{ matrix.arch }}-gcc
mingw-w64-${{ matrix.arch }}-fontconfig
mingw-w64-${{ matrix.arch }}-nsis
make
p7zip
- name: Downgrade Packages to support Windows 7
# librsvg 2.59 requires Windows 8.1 or later (confirmed by dependency walker).
# We need to downgrade to 2.58.
# This contains gdk_pixbuf loader as well, and re-runs the loader cache update.
# https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-librsvg-2.58.0-1-any.pkg.tar.zst
# https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-librsvg-2.58.0-1-any.pkg.tar.zst
shell: msys2 {0}
working-directory: ${{github.workspace}}
run: |
wget https://repo.msys2.org/mingw/${{ matrix.urlpath }}/mingw-w64-${{ matrix.arch }}-librsvg-2.58.0-1-any.pkg.tar.zst
pacman -U --noconfirm mingw-w64-${{ matrix.arch }}-librsvg-2.58.0-1-any.pkg.tar.zst
- name: Download Package Requirements
shell: msys2 {0}
working-directory: ${{github.workspace}}
run: |
mkdir -p build/smartmontools
cd build/smartmontools
wget $SMARTMONTOOLS_URL
- name: Extract Package Requirements (64-bit)
if: ${{ matrix.msystem == 'MINGW64' }}
shell: msys2 {0}
working-directory: ${{github.workspace}}/build/smartmontools
run: >
7z -bb1 e $SMARTMONTOOLS_INSTALLER
bin/smartctl.exe
bin/smartctl-nc.exe
bin/update-smart-drivedb.ps1
bin/drivedb.h
- name: Extract Package Requirements (32-bit)
if: ${{ matrix.msystem == 'MINGW32' }}
shell: msys2 {0}
working-directory: ${{github.workspace}}/build/smartmontools
run: >
7z -bb1 e $SMARTMONTOOLS_INSTALLER
bin32/smartctl.exe
bin32/smartctl-nc.exe
bin/update-smart-drivedb.ps1
bin/drivedb.h
- name: List installed files
shell: msys2 {0}
run: |
ls -1R /mingw64
ls -1R /mingw32
- name: List Files in Workspace
shell: msys2 {0}
working-directory: ${{github.workspace}}
run: ls -1R .
- name: Configure CMake
shell: msys2 {0}
run: >
cmake -B build -S "$GITHUB_WORKSPACE"
-G "MSYS Makefiles"
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/${{ matrix.platform }}-mingw-msys2.cmake"
- name: Build
shell: msys2 {0}
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: msys2 {0}
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
- name: Package ZIP
shell: msys2 {0}
working-directory: ${{github.workspace}}/build
run: cpack -G ZIP
- name: Package NSIS (64-bit)
if: ${{ matrix.msystem == 'MINGW64' }}
shell: msys2 {0}
working-directory: ${{github.workspace}}/build
run: cpack -G NSIS64
- name: Package NSIS (32-bit)
if: ${{ matrix.msystem == 'MINGW32' }}
shell: msys2 {0}
working-directory: ${{github.workspace}}/build
run: cpack -G NSIS
- name: Upload artifacts
if: ${{ matrix.msystem == 'MINGW64' }}
uses: actions/upload-artifact@v4
with:
name: Windows 64-Bit Packages
path: ${{github.workspace}}/build/gsmartcontrol-*-win*.*
- name: Upload artifacts
if: ${{ matrix.msystem == 'MINGW32' }}
uses: actions/upload-artifact@v4
with:
name: Windows 32-Bit Packages
path: ${{github.workspace}}/build/gsmartcontrol-*-win*.*
+46
View File
@@ -0,0 +1,46 @@
name: Build (Tier 2 platforms with flaky builds)
# FreeBSD build via vmactions/freebsd-vm is known to fail randomly,
# so we don't want it to be triggered on every commit.
# Manually triggered
on: [workflow_dispatch]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
CXX: clang++-17
jobs:
freebsd:
runs-on: ubuntu-latest
# env:
# variables to pass to VM
# MYTOKEN : ${{ secrets.MYTOKEN }}
steps:
- uses: actions/checkout@v4
- name: Build and test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v1
with:
envs: 'BUILD_TYPE CXX'
usesh: true
sync: rsync
# release: "14.0"
prepare: >
pkg install -y cmake pkgconf gtkmm30 gettext libiconv llvm17
run: >
mkdir build && cd build
cmake ..
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DAPP_BUILD_EXAMPLES=ON
-DAPP_BUILD_TESTS=ON
-DAPP_COMPILER_ENABLE_WARNINGS=ON
cmake --build . --config $BUILD_TYPE
ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
+75
View File
@@ -0,0 +1,75 @@
name: Build (Tier 2 platforms)
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
jobs:
macos-homebrew:
runs-on: macos-latest
strategy:
matrix:
include: [
# We need AppleClang 16, but GitHub only has 14 for now.
# { compiler: apple-clang },
{ compiler: clang }
]
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: brew install pkg-config gtkmm3 cmake
- name: Install Clang Compiler
if: ${{ matrix.compiler == 'clang' }}
run: brew install llvm@17
- name: Create Build Directory
run: cmake -E make_directory build
- name: Configure CMake (Apple Clang)
if: ${{ matrix.compiler == 'apple-clang' }}
shell: bash
working-directory: ${{github.workspace}}/build
run: >
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DAPP_BUILD_EXAMPLES=ON
-DAPP_BUILD_TESTS=ON
-DAPP_COMPILER_ENABLE_WARNINGS=ON
- name: Configure CMake
if: ${{ matrix.compiler == 'clang' }}
shell: bash
working-directory: ${{github.workspace}}/build
run: >
cmake $GITHUB_WORKSPACE
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DAPP_BUILD_EXAMPLES=ON
-DAPP_BUILD_TESTS=ON
-DAPP_COMPILER_ENABLE_WARNINGS=ON
-DCMAKE_CXX_COMPILER=$(brew --prefix llvm@17)/bin/clang++
- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
+61
View File
@@ -0,0 +1,61 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.
name: Codacy Security Scan
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '27 22 * * 1'
permissions:
contents: read
jobs:
codacy-security-scan:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Codacy Security Scan
runs-on: ubuntu-24.04
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v4
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: results.sarif
+85
View File
@@ -0,0 +1,85 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '24 10 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-24.04
permissions:
# required for all workflows
security-events: write
# required to fetch internal or private CodeQL packs
#packages: read
# only required for workflows in private repositories
#actions: read
#contents: read
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update Package Database
run: sudo apt-get update
- name: Install Dependencies
run: sudo apt-get install libgtkmm-3.0-dev gettext
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
env:
CC: gcc-13
CXX: g++-13
uses: github/codeql-action/autobuild@v4
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
+36
View File
@@ -0,0 +1,36 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: DevSkim
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '25 22 * * 0'
jobs:
lint:
name: DevSkim
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run DevSkim scanner
uses: microsoft/DevSkim-Action@v1
with:
ignore-globs: dummy_to_avoid_action_error,**/.git/**,*.txt,**/dependencies/**,env_tools.h,app_gtkmm_tools.cpp
- name: Upload DevSkim scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: devskim-results.sarif
+140
View File
@@ -0,0 +1,140 @@
name: Windows Release
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
SMARTMONTOOLS_INSTALLER: smartmontools-7.4-1.win32-setup.exe
SMARTMONTOOLS_URL: https://downloads.sourceforge.net/project/smartmontools/smartmontools/7.4/smartmontools-7.4-1.win32-setup.exe
jobs:
windows-msys2:
runs-on: windows-latest
strategy:
matrix:
include: [
{ msystem: MINGW64, arch: x86_64, platform: win64, urlpath: mingw64 },
{ msystem: MINGW32, arch: i686, platform: win32, urlpath: mingw32 }
]
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
# p7zip is needed to extract smartmontools
# fontconfig owns /etc/fonts
with:
msystem: ${{ matrix.msystem }}
update: true
install: >-
mingw-w64-${{ matrix.arch }}-gtkmm3
mingw-w64-${{ matrix.arch }}-pkg-config
mingw-w64-${{ matrix.arch }}-cmake
mingw-w64-${{ matrix.arch }}-gcc
mingw-w64-${{ matrix.arch }}-fontconfig
make
p7zip
- name: Downgrade Packages to support Windows 7
# librsvg 2.59 requires Windows 8.1 or later (confirmed by dependency walker).
# We need to downgrade to 2.58.
# This contains gdk_pixbuf loader as well, and re-runs the loader cache update.
# https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-librsvg-2.58.0-1-any.pkg.tar.zst
# https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-librsvg-2.58.0-1-any.pkg.tar.zst
shell: msys2 {0}
working-directory: ${{github.workspace}}
run: |
wget https://repo.msys2.org/mingw/${{ matrix.urlpath }}/mingw-w64-${{ matrix.arch }}-librsvg-2.58.0-1-any.pkg.tar.zst
pacman -U --noconfirm mingw-w64-${{ matrix.arch }}-librsvg-2.58.0-1-any.pkg.tar.zst
- name: Download Package Requirements
shell: msys2 {0}
working-directory: ${{github.workspace}}
run: |
mkdir -p build/smartmontools
cd build/smartmontools
wget $SMARTMONTOOLS_URL
- name: Extract Package Requirements (64-bit)
if: ${{ matrix.msystem == 'MINGW64' }}
shell: msys2 {0}
working-directory: ${{github.workspace}}/build/smartmontools
run: >
7z -bb1 e $SMARTMONTOOLS_INSTALLER
bin/smartctl.exe
bin/smartctl-nc.exe
bin/update-smart-drivedb.ps1
bin/drivedb.h
- name: Extract Package Requirements (32-bit)
if: ${{ matrix.msystem == 'MINGW32' }}
shell: msys2 {0}
working-directory: ${{github.workspace}}/build/smartmontools
run: >
7z -bb1 e $SMARTMONTOOLS_INSTALLER
bin32/smartctl.exe
bin32/smartctl-nc.exe
bin/update-smart-drivedb.ps1
bin/drivedb.h
- name: List installed files
shell: msys2 {0}
run: |
ls -1R /mingw64
ls -1R /mingw32
- name: Configure CMake
shell: msys2 {0}
run: >
cmake -B build -S "$GITHUB_WORKSPACE"
-G "MSYS Makefiles"
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/${{ matrix.platform }}-mingw-msys2.cmake"
- name: Build
shell: msys2 {0}
working-directory: ${{github.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: msys2 {0}
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
- name: Package ZIP
shell: msys2 {0}
working-directory: ${{github.workspace}}/build
run: cpack -G ZIP
- name: Package NSIS (64-bit)
if: ${{ matrix.msystem == 'MINGW64' }}
shell: msys2 {0}
working-directory: ${{github.workspace}}/build
run: cpack -G NSIS64
- name: Package NSIS (32-bit)
if: ${{ matrix.msystem == 'MINGW32' }}
shell: msys2 {0}
working-directory: ${{github.workspace}}/build
run: cpack -G NSIS
- name: Upload artifacts
if: ${{ matrix.msystem == 'MINGW64' }}
uses: actions/upload-artifact@v4
with:
name: Windows 64-Bit Packages
path: ${{github.workspace}}/build/gsmartcontrol-*-win*.*
- name: Upload artifacts
if: ${{ matrix.msystem == 'MINGW32' }}
uses: actions/upload-artifact@v4
with:
name: Windows 32-Bit Packages
path: ${{github.workspace}}/build/gsmartcontrol-*-win*.*
+46
View File
@@ -0,0 +1,46 @@
# Builds
/0*
/win32*
/win64*
/cmake-build-*
/build*
/_codeql_build_dir
# Non-project files
/TODO
# Doxygen generated
/doxygen_doc
# OS-generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
# IDE
/.vs
/*.pcs
/.idea
/CMakeLists.txt.user
# Agents
/.codebuddy
# Translations
/po/boldquot.sed
/po/en@boldquot.header
/po/en@quot.header
/po/insert-header.sin
/po/Makevars.template
/po/quot.sed
/po/remove-potcdate.sin
/po/Rules-quot
/po/gsmartcontrol.pot
/po/*.gmo
+196
View File
@@ -0,0 +1,196 @@
# This file describes OBS workflows:
# https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.scm_ci_workflow_integration.html
# Workflow for pull requests
#build_pull_request_workflow:
# steps:
# - branch_package:
# source_project: home:alex_sh:gsmartcontrol:github_ci:main
# source_package: gsmartcontrol
# target_project: home:alex_sh:gsmartcontrol:github_ci:main
#
# - configure_repositories:
# project: home:alex_sh:gsmartcontrol:github_ci:main
# repositories:
# - name: openSUSE_Tumbleweed
# paths:
# - target_project: openSUSE:Factory
# target_repository: snapshot
# architectures:
# - x86_64
# - i586
#
# - set_flags:
# flags:
# - type: publish
# status: disable
# project: home:alex_sh:gsmartcontrol:github_ci:main
#
# filters:
# event: pull_request
# branches:
# only:
# - main
# Workflow for pushes
# Note: This adds new repositories to the project if they do not exist.
build_main_workflow:
steps:
- configure_repositories:
project: home:alex_sh:gsmartcontrol:github_ci:main
repositories:
- name: openSUSE_Tumbleweed
paths:
- target_project: openSUSE:Factory
target_repository: snapshot
architectures:
- x86_64
- name: openSUSE_Slowroll
paths:
- target_project: openSUSE:Slowroll
target_repository: standard
architectures:
- x86_64
- name: openSUSE_Leap_15.6
paths:
- target_project: openSUSE:Leap:15.6
target_repository: standard
architectures:
- x86_64
- name: openSUSE_Leap_15.5
paths:
- target_project: devel:gcc
target_repository: openSUSE_Leap_15.5
- target_project: openSUSE:Leap:15.5
target_repository: standard
architectures:
- x86_64
- name: openSUSE_Factory_ARM
paths:
- target_project: openSUSE:Factory:ARM
target_repository: standard
architectures:
- aarch64
- armv7l
- name: SUSE_SLE-15-SP6
paths:
- target_project: devel:gcc
target_repository: SLE-15
- target_project: SUSE:SLE-15-SP6:GA
target_repository: standard
architectures:
- x86_64
- name: Ubuntu_24.04
paths:
- target_project: openSUSE:Tools
target_repository: xUbuntu_24.04
- target_project: Ubuntu:24.04
target_repository: universe
architectures:
- x86_64
- name: Ubuntu_23.10
paths:
- target_project: openSUSE:Tools
target_repository: xUbuntu_23.10
- target_project: Ubuntu:23.10
target_repository: universe
architectures:
- x86_64
- name: Ubuntu_22.04
paths:
- target_project: openSUSE:Tools
target_repository: xUbuntu_22.04
- target_project: Ubuntu:22.04
target_repository: universe
architectures:
- x86_64
- name: Fedora_Rawhide
paths:
- target_project: openSUSE:Tools
target_repository: Fedora_Rawhide
- target_project: Fedora:Rawhide
target_repository: standard
architectures:
- x86_64
- name: Fedora_41
paths:
- target_project: openSUSE:Tools
target_repository: Fedora_41
- target_project: Fedora:41
target_repository: standard
architectures:
- x86_64
- aarch64
- name: Fedora_40
paths:
- target_project: openSUSE:Tools
target_repository: Fedora_40
- target_project: Fedora:40
target_repository: standard
architectures:
- x86_64
- aarch64
- name: Fedora_39
paths:
- target_project: openSUSE:Tools
target_repository: Fedora_39
- target_project: Fedora:39
target_repository: standard
architectures:
- x86_64
- aarch64
- name: Debian_Unstable
paths:
- target_project: openSUSE:Tools
target_repository: Debian_Unstable
- target_project: Debian:Next
target_repository: standard
architectures:
- x86_64
- name: Debian_Testing
paths:
- target_project: openSUSE:Tools
target_repository: Debian_Testing
- target_project: Debian:Testing
target_repository: update
architectures:
- x86_64
- i586
- set_flags:
flags:
- type: publish
status: enable
project: home:alex_sh:gsmartcontrol:github_ci:main
- type: debuginfo
status: enable
project: home:alex_sh:gsmartcontrol:github_ci:main
- rebuild_package:
project: home:alex_sh:gsmartcontrol:github_ci:main
package: gsmartcontrol
filters:
event: push
branches:
only:
- main
-18
View File
@@ -1,18 +0,0 @@
0*
*.pcs
autom4te.cache
Makefile.in
configure
depcomp
config.guess
config.sub
aclocal.m4
config.h.in
compile
ar-lib
missing
install-sh
*.glade.cpp
*.ui.cpp
*.txt.cpp
.kdev4
-1
View File
@@ -1 +0,0 @@
svn propset svn:ignore -F .svnignore.txt .
-1
View File
@@ -1 +0,0 @@
Alexander Shaduri <ashaduri 'at' gmail.com>
+81
View File
@@ -0,0 +1,81 @@
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2021 - 2024 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
# 3.14 for proper object library support (wrt linking)
cmake_minimum_required(VERSION 3.14)
# Use new policy for option() to supress warnings.
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
include(${CMAKE_SOURCE_DIR}/version.txt)
project(gsmartcontrol
VERSION ${CMAKE_PROJECT_VERSION}
DESCRIPTION "Hard Disk Drive and SSD Health Inspection Tool"
HOMEPAGE_URL "https://gsmartcontrol.shaduri.dev"
LANGUAGES CXX
)
# Provide DATADIR, etc.
include(GNUInstallDirs)
message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
include(src/build_config/compiler_options.cmake)
# Disable RPATH manipulation, we don't have shared libraries
set(CMAKE_SKIP_BUILD_RPATH TRUE)
set(CMAKE_SKIP_INSTALL_RPATH TRUE)
# Write the binaries to project root (avoids conflicts with manifests, also it's more convenient this way)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
# User-controlled build options
option(APP_BUILD_EXAMPLES "Build examples" OFF)
option(APP_BUILD_TESTS "Build tests" OFF)
# Install documentation
set(DOC_FILES
LICENSE.LGPL3.txt
LICENSE.txt
NEWS.txt
README.md
)
if (WIN32)
install(FILES ${DOC_FILES} DESTINATION doc/)
install(DIRECTORY docs DESTINATION doc/
PATTERN "*.yml" EXCLUDE
PATTERN "CNAME" EXCLUDE
)
else()
install(FILES ${DOC_FILES} TYPE DOC)
install(DIRECTORY docs TYPE DOC
PATTERN "*.yml" EXCLUDE
PATTERN "CNAME" EXCLUDE
)
endif()
# CTest support
include(CTest)
#include(${CMAKE_SOURCE_DIR}/dependencies/catch2/Catch2/extras/Catch.cmake)
include(${CMAKE_SOURCE_DIR}/dependencies/catch2/Catch2/contrib/Catch.cmake)
add_subdirectory(contrib)
add_subdirectory(data)
add_subdirectory(dependencies)
add_subdirectory(packaging)
add_subdirectory(src)
# Packaging support
include(packaging/cpack_options.cmake)
+128
View File
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
ashaduri@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
-1
View File
@@ -1 +0,0 @@
See LICENSE.gsmartcontrol.txt file for copyright and license information.
-1
View File
@@ -1 +0,0 @@
See the NEWS file.
+1827 -1046
View File
File diff suppressed because it is too large Load Diff
-1
View File
@@ -1 +0,0 @@
See README.txt file, Installation section.
+165
View File
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
View File
-25
View File
@@ -1,25 +0,0 @@
Copyright (c) 2006-2008 Alexander Chemeris
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-26
View File
@@ -1,26 +0,0 @@
Copyright (c) 1987, 1989, 1990, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-339
View File
@@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
-34
View File
@@ -1,34 +0,0 @@
GSmartControl License
This product is multi-licensed under GNU GPL versions 2 and 3.
You are free to choose which one you use.
This program is free software: you can redistribute it and/or modify it under
the terms of either version 2 or (at your option) version 3 of the GNU General
Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public Licenses for more details.
You should have received copies of these licenses along with this program.
If not, see <http://www.gnu.org/licenses/>.
See LICENSE_gpl2.txt and LICENSE_gpl3.txt for details.
All files which don't have any copyright notices, as well as tests and
examples are covered under the Unlicense. See LICENSE_unlicense.txt for
details.
This product includes the HZ library (or portions of it). See LICENSE_hz.txt
for details.
This product includes icons from Crystal Project,
copyright 2006-2007 Everaldo Coelho.
http://www.everaldo.com/crystal, http://www.yellowicon.com .
Crystal Project icons are licensed under GNU LGPL. See
http://www.everaldo.com/crystal/?action=license for details.
-40
View File
@@ -1,40 +0,0 @@
HZ Library License
The HZ library contains software licensed under several different licenses.
This is due to HZ including portions of other software.
All original code (except for the tests) is licensed under the Zlib License.
See LICENSE_zlib.txt for details.
All tests and examples are covered under the Unlicense. See
LICENSE_unlicense.txt for details.
Portions of this software are copyright Regents of the University of
California, see LICENSE_bsd-ucb.txt for details.
Portions of this software are copyright Alexander Chemeris, see
LICENSE_bsd-ac.txt for details.
Portions of this software are licensed under Boost Software License, see
LICENSE_boost_1_0.txt and individual source files for copyright information.
Each source file contains its copyright information.
If you intend to use HZ in your product, please note that you MUST include
these licenses somewhere in your distribution (simply redistributing the
license files or reproducing their texts in documentation and/or other
supplied materials is OK):
* LICENSE_zlib.txt (source distributions only);
* LICENSE_bsd-ucb.txt (source and binary distributions);
* LICENSE_boost_1_0.txt (source distributions only).
If you use only portions of HZ, you may ignore this requirement for files you
don't use. For example, if you don't use any of the Boost-licensed files, you
are not required to distribute the Boost license.
-25
View File
@@ -1,25 +0,0 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
-17
View File
@@ -1,17 +0,0 @@
Zlib License
THIS SOFTWARE IS PROVIDED 'AS-IS', WITHOUT ANY EXPRESS OR IMPLIED
WARRANTY. IN NO EVENT WILL THE AUTHORS BE HELD LIABLE FOR ANY DAMAGES
ARISING FROM THE USE OF THIS SOFTWARE.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-262
View File
@@ -1,262 +0,0 @@
# Add autoconf.m4 directory to local macro search path
ACLOCAL_AMFLAGS = -I autoconf.m4
SUBDIRS = data debian.dist src
# These files are actually needed for compilation.
noinst_DATA = AUTHORS.txt LICENSE_gsmartcontrol.txt
# For the files to be bundled with the distribution, specify them in
# one of the following.
# These will be installed into docdir.
# Some of these files are actually needed for compilation (see src/res/Makefile.am).
dist_doc_DATA = AUTHORS.txt ChangeLog NEWS README.txt \
LICENSE_boost_1_0.txt \
LICENSE_bsd-ac.txt \
LICENSE_bsd-ucb.txt \
LICENSE_gpl2.txt \
LICENSE_gpl3.txt \
LICENSE_gsmartcontrol.txt \
LICENSE_hz.txt \
LICENSE_unlicense.txt \
LICENSE_zlib.txt
# nobase_ preserves their directory names.
nobase_dist_doc_DATA = contrib/cron-based_noadmin/README \
contrib/cron-based_noadmin/cron_gather_smart.sh \
contrib/cron-based_noadmin/crontab.example \
contrib/cron-based_noadmin/smartctl_subst.sh
# Extra files bundled with distribution.
# file2csource.sh is needed for building but not installed.
EXTRA_DIST = COPYING INSTALL configure autogen.sh \
gsmartcontrol.kdev4 \
file2csource.sh \
gsmartcontrol.spec
# rpm support
src-rpm: dist
rpmbuild -ts $(distdir).tar.bz2
# NSIS installer support.
# Requires installed NSIS, smartctl-nc.exe, smartctl.exe, update-smart-drivedb.exe.
# Gtkmm and pcre dlls are required if linking against them.
# dos2unix on build machine.
# Execute only with win32 build present.
WIN_ZIP_NAME = $(PACKAGE)-$(VERSION)-@WINDOWS_SUFFIX@
win-dist: win-dist-nocleanup win-dist-cleanup
win-dist-nocleanup: win-dist-prepare nsis-dist-nocleanup win-zip-dist-nocleanup
win-dist-cleanup: win-zip-dist-cleanup nsis-dist-cleanup
rm -rf win-dist
win-dist-clean: win-dist-cleanup
rm -f gsmartcontrol-*.exe gsmartcontrol-*.zip
win-dist-prepare-all: nsis-dist-prepare win-zip-dist-prepare
# All of GTK+
GTK_BIN_FILES = gdk-pixbuf-query-loaders.exe \
gspawn-win32-helper-console.exe \
gspawn-win32-helper.exe \
gspawn-win64-helper-console.exe \
gspawn-win64-helper.exe \
gtk-query-immodules-3.0.exe \
gtk-update-icon-cache-3.0.exe \
libatk-1.*.dll \
libatkmm-1.*.dll \
libbz2-*.dll \
libcairo-*.dll \
libcairomm-1*.dll \
libepoxy-*.dll \
libffi-*.dll \
libexpat-*.dll \
libfontconfig-*.dll \
libfreetype-*.dll \
libgdk-3*.dll \
libgdk_pixbuf-2.*.dll \
libgdkmm-3.*.dll \
libgio-2.*.dll \
libgiomm-2.*.dll \
libglib-2.*.dll \
libglibmm*2.*.dll \
libgmodule-2.*.dll \
libgobject-2.*.dll \
libgraphite*.dll \
libgthread-2.*.dll \
libgtk-3*.dll \
libgtkmm-3*.dll \
libharfbuzz*.dll \
libiconv*.dll \
libintl*.dll \
libjasper*.dll \
libjpeg*.dll \
liblzma*.dll \
libpango*-1.*.dll \
libpixman*.dll \
libpng16-*.dll \
libsigc-2.*.dll \
libstdc++-*.dll \
libtiff-*.dll \
libwinpthread-*.dll \
libxml2-*.dll \
zlib1.dll
# Don't strip smartctl (it will only change the header), and
# don't strip update-smart-drivedb (it will break its CRC check).
win-dist-prepare: all
$(MKDIR_P) win-dist
cp $(top_srcdir)/data/icon_*.png win-dist/
$(MKDIR_P) win-dist/doc
cp data/nsis/distribution.txt win-dist/doc/
cp $(top_srcdir)/AUTHORS.txt $(top_srcdir)/LICENSE_* $(top_srcdir)/README.txt win-dist/doc/
cp $(top_srcdir)/NEWS win-dist/doc/NEWS.txt
cp src/gsmartcontrol.exe src/gsmartcontrol.exe.manifest win-dist/
unix2dos win-dist/doc/*.txt
cp -p "@WINDOWS_SYSROOT@"/bin/drivedb.h win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/smartctl-nc.exe win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/smartctl.exe win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/update-smart-drivedb.exe win-dist/
for file in $(GTK_BIN_FILES); do for f in "@WINDOWS_SYSROOT@/bin/"$$file; do if test -f "$${f}"; then cp -p "$${f}" win-dist/; fi; done; done
# <prefix>/etc/gtk-3.0/ should contain settings.ini with a win32 theme.
$(MKDIR_P) win-dist/etc
$(MKDIR_P) win-dist/etc/fonts
$(MKDIR_P) win-dist/etc/gtk-3.0
cp -p "@WINDOWS_SYSROOT@"/etc/fonts/fonts.conf win-dist/etc/fonts/
# cp -p "@WINDOWS_SYSROOT@"/etc/gtk-3.0/im-multipress.conf win-dist/etc/gtk-3.0/
cp -p "@WINDOWS_SYSROOT@"/etc/gtk-3.0/settings.ini win-dist/etc/gtk-3.0/
$(MKDIR_P) win-dist/share
cp -p -r "@WINDOWS_SYSROOT@"/share/themes win-dist/share
# needed for file chooser
$(MKDIR_P) win-dist/share/glib-2.0
cp -p -r "@WINDOWS_SYSROOT@"/share/glib-2.0/schemas win-dist/share/glib-2.0
# $(MKDIR_P) win-dist/share/icons
# cp -p "@WINDOWS_SYSROOT@"/share/icons/hicolor win-dist/share/icons
# needed for window titlebar (if using client-side decorations),
# tree sorting indicators, GUI icons.
$(MKDIR_P) win-dist/share/icons/Adwaita/16x16/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
$(MKDIR_P) win-dist/share/icons/Adwaita/16x16/status
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/status/dialog-information.png win-dist/share/icons/Adwaita/16x16/status
$(MKDIR_P) win-dist/share/icons/Adwaita/22x22/status
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/22x22/status/dialog-information.png win-dist/share/icons/Adwaita/22x22/status
$(MKDIR_P) win-dist/share/icons/Adwaita/24x24/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
$(MKDIR_P) win-dist/share/icons/Adwaita/24x24/status
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/status/dialog-information.png win-dist/share/icons/Adwaita/24x24/status
$(MKDIR_P) win-dist/share/icons/Adwaita/32x32/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
$(MKDIR_P) win-dist/share/icons/Adwaita/32x32/status
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/status/dialog-information.png win-dist/share/icons/Adwaita/32x32/status
$(MKDIR_P) win-dist/share/icons/Adwaita/48x48/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
$(MKDIR_P) win-dist/share/icons/Adwaita/48x48/status
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/status/dialog-information.png win-dist/share/icons/Adwaita/48x48/status
$(MKDIR_P) win-dist/share/icons/Adwaita/64x64/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
# $(MKDIR_P) win-dist/share/icons/Adwaita/64x64/status
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/status/dialog-information.png win-dist/share/icons/Adwaita/64x64/status
$(MKDIR_P) win-dist/share/icons/Adwaita/96x96/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/actions/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
# $(MKDIR_P) win-dist/share/icons/Adwaita/96x96/status
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/status/dialog-information.png win-dist/share/icons/Adwaita/96x96/status
$(MKDIR_P) win-dist/share/icons/Adwaita/256x256/status
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/256x256/status/dialog-information.png win-dist/share/icons/Adwaita/256x256/status
# other
cp -p "@WINDOWS_SYSROOT@"/bin/libgcc_s_*.dll win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/libpcre-1.dll win-dist/
cp -p "@WINDOWS_SYSROOT@"/bin/libpcrecpp-0.dll win-dist/
nsis-dist-prepare: win-dist-prepare
cp -a win-dist nsis-dist
cp $(top_srcdir)/data/gsmartcontrol.ico nsis-dist/
cp data/nsis/*.nsi $(top_srcdir)/data/nsis/nsi_* nsis-dist/
unix2dos nsis-dist/*.nsi
nsis-dist-nocleanup: nsis-dist-prepare
cd nsis-dist && @NSIS_EXEC@ gsmartcontrol.nsi
mv nsis-dist/$(PACKAGE)-$(VERSION)-@WINDOWS_SUFFIX@.exe .
nsis-dist-cleanup:
rm -rf nsis-dist
nsis-dist: nsis-dist-prepare nsis-dist-nocleanup nsis-dist-cleanup
win-zip-dist-prepare: win-dist-prepare
cp -a win-dist $(WIN_ZIP_NAME)
win-zip-dist-nocleanup: win-zip-dist-prepare
zip -K -9r $(WIN_ZIP_NAME).zip $(WIN_ZIP_NAME)
win-zip-dist-cleanup:
rm -rf $(WIN_ZIP_NAME)
win-zip-dist: win-zip-dist-prepare win-zip-dist-nocleanup win-zip-dist-cleanup
distclean-local: win-dist-clean
+67 -1
View File
@@ -1,3 +1,69 @@
Version 2.0.2, released on 2025-02-24
Support GCC 11 (and Ubuntu 22.04) by using and vendoring fmt library
(#77).
Support an option of saving smartctl output to text instead of JSON (#76).
Restored pre-2.0.0 runtime support for smartctl < 7.3 (based on Text
parser); this is an unsupported, old method without NVMe, provided
for compatibility only (#77).
Restored pre-2.0.0 support for standard (non-extended) self-test log found
in very old ATA drives; the new JSON parser did not support this
previously (#79).
Better support for temperature values in JSON parser; this fixes
unreasonably large temperature values (#78).
Add a tooltip explaining self-test "lifetime hours" wrapping behavior
(#73).
Windows: Fixed a crash on Windows 7 when opening drive information
by using Windows 7-compatible librsvg (#71).
Windows: Avoid using non-integer font sizes.
Version 2.0.1, released on 2024-11-26
Windows: Fixed a crash when opening a native file dialog (#67).
Version 2.0.0, released on 2024-11-07
New JSON-based parser for smartctl output (requires smartctl 7.3+) (#4).
Support for NVMe drives (self-tests require smartctl 7.4+) (#4).
New "Basic" JSON parser for SCSI, flash, and other non-ATA/NVMe drives.
PCRE library is no longer required (the code has been ported to
std::regex) (#40).
A lot of code has been refactored and modernized using C++17 and C++20
features, removing much of the custom library code.
The build process requires a C++20-compliant compiler now (GCC 13+,
Clang 17+, Apple Clang 15+).
CMake (3.14+) is now used as a build system instead of autotools.
GSmartControl is now licensed under GNU GPL 3 only.
Icons come from Oxygen project now (LGPL 3+) instead of Crystal project.
Documentation in md format comes with the source code ("docs" directory).
Support new versions and prereleases of smartctl (#46, #42).
Better detection of drive types thanks to the JSON parser.
Removed ATA AODC feature, it has been deprecated for a while now.
Information window: Some values are aligned and monospaced to improve
readability.
Fixed command execution popup dialog being on top of all windows (#17).
Other minor UI improvements and fixes.
Windows: Better support for HiDPI (including fractional scaling).
Windows: NSIS package is generated by CPack now.
Windows: Packages are built using GitHub CI now.
Version 1.1.4, released on 2022-02-04
Fixed a crash when trying to render main window icons which have
incomplete data; this fixes a rare crash when scanning devices (#13).
Fixed rendering compatibility issues with newer GTK3 versions.
Fixed build system conflict with C++20 version header (#14).
Fixed "Running command ..." dialog floating above windows of other
applications (#17).
Fixed a crash when system locale is set to invalid locale.
Support Finnish decimal separator (backported from the Debian package)
(#23).
Set LC_NUMERIC=C for smartctl process to avoid locale-dependent number
formatting (#23).
Fixed printing all GTK messages as warnings; the messages are sorted by
severity now.
Add current time to default filename in Save Output dialog.
Support macos stat command in file2csource.sh.
Fixed a few typos (backported from the Debian package).
Windows port now uses Adwaita theme due to issues with win32 theme.
Windows port is dpi-aware now.
Version 1.1.3, released on 2017-11-12
Fixed gsmartcontrol-root not launching if GDK_* variables are not set.
@@ -113,7 +179,7 @@ Version 0.8.6, released on 2011-06-12
included.
In-program help has been expanded considerably.
General improvements to user interface have been implemented (better GNOME
HIG compliance, better tooltips, dialogs, etc...).
HIG compliance, better tooltips, dialogs, etc.).
Added ability to show smartctl output for devices whose info could not be
parsed fully.
Attributes in "brief" format are supported now.
+76
View File
@@ -0,0 +1,76 @@
# GSmartControl
***Hard disk drive and SSD health inspection tool***
[![Generic badge](https://img.shields.io/badge/Homepage-gsmartcontrol.shaduri.dev-brightgreen.svg)](https://gsmartcontrol.shaduri.dev)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/ashaduri/gsmartcontrol?label=Version)](https://gsmartcontrol.shaduri.dev/downloads)
[![license: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Platforms](https://img.shields.io/badge/Platforms-linux%20%7C%20windows%20%7C%20macos%20%7C%20*bsd-blue)](https://gsmartcontrol.shaduri.dev/software-requirements)
[![Packaging status](https://repology.org/badge/tiny-repos/gsmartcontrol.svg?header=Software%20distributions%20and%20repositories)](https://repology.org/project/gsmartcontrol/versions)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/528f4f7aaf0e446abf7e55d2affc7bec)](https://app.codacy.com/gh/ashaduri/gsmartcontrol?utm_source=github.com&utm_medium=referral&utm_content=ashaduri/gsmartcontrol&utm_campaign=Badge_Grade_Settings)
---
[GSmartControl](https://gsmartcontrol.shaduri.dev)
is a graphical user interface for smartctl (from [smartmontools](https://www.smartmontools.org/)
package), which is a tool for
querying and controlling [SMART](https://en.wikipedia.org/wiki/Self-Monitoring,_Analysis_and_Reporting_Technology)
(Self-Monitoring, Analysis, and Reporting
Technology) data on modern hard disk and solid-state drives. It allows you to
inspect the drive's SMART data to determine its health, as well as run various
tests on it.
## Downloads
The [Downloads](https://gsmartcontrol.shaduri.dev/downloads) page contains
all the available packages of GSmartControl.
## Features
- automatically reports and highlights any anomalies;
- allows enabling/disabling SMART;
- supports configuration of global and per-drive options for smartctl;
- performs SMART self-tests;
- displays drive identity information, capabilities, attributes, device statistics, etc.;
- can read in smartctl output from a saved file, interpreting it as a read-only virtual device;
- works on most smartctl-supported operating systems;
- has extensive help information.
### Supported Hardware
GSmartControl supports SATA, PATA, and NVMe drives, as well as drives
behind some USB bridges and RAID controllers.
Please see the
[Supported Hardware](https://gsmartcontrol.shaduri.dev/supported-hardware) page
for more information.
### Supported Platforms
GSmartControl supports all major desktop operating systems, including
Linux, Windows, macOS, FreeBSD, and other BSD-style operating systems.
Please see the
[Software Requirements](https://gsmartcontrol.shaduri.dev/software-requirements) page
for more information.
## Copyright and Licensing
GSmartControl is Copyright (C) 2008 - 2025 Alexander Shaduri [ashaduri@gmail.com](mailto:ashaduri@gmail.com) and contributors.
GSmartControl is licensed under the terms of
[GNU General Public License Version 3](https://www.gnu.org/licenses/gpl-3.0.en.html).
This program is free software: you can redistribute it and/or modify it under
the terms of version 3 of the GNU General Public License as published by the
Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public Licenses for more details.
This product includes icons from Oxygen Icons copyright [KDE](https://kde.org)
and licensed under the [GNU LGPL version 3](https://www.gnu.org/licenses/lgpl-3.0.en.html) or later.
-101
View File
@@ -1,101 +0,0 @@
About GSmartControl
GSmartControl - Hard disk drive and SSD health inspection tool.
GSmartControl is a graphical user interface for smartctl (from smartmontools
package, see https://www.smartmontools.org/), which is a tool for
querying and controlling SMART (Self-Monitoring, Analysis, and Reporting
Technology) data on modern hard disk and solid-state drives. It allows you to
inspect the drive's SMART data to determine its health, as well as run various
tests on it.
GSmartControl supports ATA drives (both PATA and SATA), various USB to
ATA bridges and drives behind some RAID controllers:
* Adaptec (Linux, some models only)
* Areca (Linux, Windows)
* HP CCISS (Linux)
* HP hpsa / hpahcisr (Linux)
* Intel Matrix Storage (CSMI) (Linux, Windows, FreeBSD)
* LSI 3ware (Linux, Windows)
* LSI MegaRAID (Windows)
Note: Smartmontools supports even more RAID Controllers. The drives
behind such controllers can be manually added to GSmartControl using
"Add Device..." functionality or --add-device command-line option.
See https://www.smartmontools.org/wiki/Supported_RAID-Controllers .
https://gsmartcontrol.sourceforge.io/
Software Requirements
Note: If using the official Windows package, no additional software is required.
Build requirements:
* pcre 1 - http://www.pcre.org .
* GTK+, version 3.4 or higher - see http://www.gtk.org .
* Gtkmm, version 3.4 or higher - see http://www.gtkmm.org .
Runtime requirements:
* smartmontools - see https://www.smartmontools.org/ .
* xterm
The following operating systems are supported:
* Linux - All the popular configurations should work.
* FreeBSD - Tested with DesktopBSD / x86.
* NetBSD - Tested with NetBSD / x86.
* OpenBSD - Tested with OpenBSD / x86-64.
* DragonFlyBSD - Code written but no testing has been performed yet. Expected
to work without any issues.
* Windows Vista SP2 (32-bit and 64-bit), Windows 7 SP1, Windows Server 2008,
Windows 8.1, Windows 10. The Windows port uses pd0, pd1, etc...
for physical drives 0, 1, etc... .
* Mac OS X.
* Solaris.
* QNX - Code written but no testing has been performed yet.
Command Line Options
GSmartControl inherits options from GTK+ and other libraries, so be sure to
run it with --help option to get a full list of accepted parameters.
Note: The Windows version may not have a text output at all, so --help and
similar arguments won't have any effect.
The most important parameters are:
-?, --help - Show help options.
-l, --no-locale - Don't use system locale.
-V, --version - Display version information.
--no-scan - Don't scan devices on startup.
--no-hide-tabs - Don't hide non-identity tabs when SMART is disabled. Useful
for debugging.
--add-virtual - Load smartctl data from file, creating a virtual drive. You
can specify this option multiple times.
--add-device - Add this device to device list. The format of the device is
"<device>::<type>::<extra_args>", where type and extra_args are optional. This
option is useful with --no-scan to list certain drives only. You can specify
this option multiple times.
Example: --add-device /dev/sda --add-device /dev/twa0::3ware,2 --add-device
'/dev/sdb::::-T permissive'.
-v, --verbose - Enable verbose logging; same as --verbosity-level 5.
-q, --quiet - Disable logging; same as --verbosity-level 0.
-b, --verbosity-level - Set verbosity level [0-5].
License and Copyright
For license information, see LICENSE_gsmartcontrol.txt file.
+16
View File
@@ -0,0 +1,16 @@
# Security Policy
## Supported Versions
The following versions are supported with security updates:
| Version | Supported |
|----------| ------------------ |
| git main | :white_check_mark: |
| 2.0.x | :white_check_mark: |
| < 2.0.0 | :x: |
## Reporting a Vulnerability
Please report security vulnerabilities privately to
Alexander Shaduri [ashaduri@gmail.com](mailto:ashaduri@gmail.com).
-49
View File
@@ -1,49 +0,0 @@
GTKMM Notes:
To transfer an ownership from your local code to a container, use
Gtk::Button* pButton = Gtk::manage(new Gtk::Button("Test"));
container->add(*pButton);
(add() takes an object by reference).
otherwise, you will need to delete() it.
local scope destruction also works if using stack variables.
{
Gtk::Button aButton;
// destroyed here
}
--------------------------------------------------------
TODO:
-l defects support? (smartctl 6.6)
Don't rely on smartctl return code (2), parse the output instead.
This will allow us to show the Info page.
Need usage cases.
Testing:
If ETA time has elapsed, but it's still only at 10% completion,
ETA 0 is displayed. Fix.
Detect running tests on launch (maybe ask the user too? some tests
may be stuck due to bad firmware, e.g. 3ware/windows).
If smartctl outputs gibberish while testing, the GUI hangs.
Support RAID for these controllers (supported by smartctl 6.5):
https://www.smartmontools.org/wiki/Supported_RAID-Controllers
Adaptec (Windows, Linux using "-d aacraid")
HighPoint RocketRAID (Linux, FreeBSD (analyze sent info))
LSI MegaRAID (Linux, FreeBSD)
3ware (FreeBSD)
Areca (FreeBSD)
HP CCISS (FreeBSD)
+1
View File
@@ -0,0 +1 @@
*
-48
View File
@@ -1,48 +0,0 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ac_cxx_exceptions.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_CXX_EXCEPTIONS
#
# DESCRIPTION
#
# If the C++ compiler supports exceptions handling (try, throw and catch),
# define HAVE_EXCEPTIONS.
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
#
# Copyright (c) 2008 Todd Veldhuizen
# Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
AC_DEFUN([AC_CXX_EXCEPTIONS],
[AC_CACHE_CHECK(whether the compiler supports exceptions,
ac_cv_cxx_exceptions,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
[[try { throw 1; } catch (int i) { return i; }]])],
[ac_cv_cxx_exceptions=yes], [ac_cv_cxx_exceptions=no])
AC_LANG_POP([])
])
if test "$ac_cv_cxx_exceptions" = yes; then
AC_DEFINE(HAVE_EXCEPTIONS, 1,
[defined to 1 if the compiler supports exceptions, 0 otherwise])
else
AC_DEFINE(HAVE_EXCEPTIONS, 0,
[defined to 1 if the compiler supports exceptions, 0 otherwise])
fi
])
-47
View File
@@ -1,47 +0,0 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ac_cxx_namespaces.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_CXX_NAMESPACES
#
# DESCRIPTION
#
# If the compiler can prevent names clashes using namespaces, define
# HAVE_NAMESPACES.
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
#
# Copyright (c) 2008 Todd Veldhuizen
# Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
AC_DEFUN([AC_CXX_NAMESPACES],
[AC_CACHE_CHECK(whether the compiler implements namespaces,
ac_cv_cxx_namespaces,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[namespace Outer { namespace Inner { int i = 0; }}]],
[[using namespace Outer::Inner; return i;]])],
[ac_cv_cxx_namespaces=yes], [ac_cv_cxx_namespaces=no])
AC_LANG_POP([])
])
if test "$ac_cv_cxx_namespaces" = yes; then
AC_DEFINE(HAVE_NAMESPACES, 1,
[defined to 1 if the compiler implements namespaces, 0 otherwise])
else
AC_DEFINE(HAVE_NAMESPACES, 0,
[defined to 1 if the compiler implements namespaces, 0 otherwise])
fi
])
-60
View File
@@ -1,60 +0,0 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ac_cxx_rtti.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_CXX_RTTI
#
# DESCRIPTION
#
# If the compiler supports Run-Time Type Identification (typeinfo header
# and typeid keyword), define HAVE_RTTI.
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
#
# Copyright (c) 2008 Todd Veldhuizen
# Copyright (c) 2008 Luc Maisonobe <luc@spaceroots.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
AC_DEFUN([AC_CXX_RTTI],
[AC_CACHE_CHECK(whether the compiler supports Run-Time Type Identification,
ac_cv_cxx_rtti,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <typeinfo>
class Base {
public:
Base () {}
virtual int f () { return 0; }
};
class Derived : public Base {
public :
Derived () {}
virtual int f () { return 1; }
};
]], [[
Derived d;
Base* ptr = &d;
return typeid (*ptr) == typeid (Derived);
]])],
[ac_cv_cxx_rtti=yes], [ac_cv_cxx_rtti=no])
AC_LANG_POP([])
])
if test "$ac_cv_cxx_rtti" = yes; then
AC_DEFINE(HAVE_RTTI, 1,
[defined to 1 if the compiler supports Run-Time Type Identification, 0 otherwise])
else
AC_DEFINE(HAVE_RTTI, 0,
[defined to 1 if the compiler supports Run-Time Type Identification, 0 otherwise])
fi
])
@@ -1,49 +0,0 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ac_cxx_verbose_terminate_handler.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_CXX_VERBOSE_TERMINATE_HANDLER
#
# DESCRIPTION
#
# If the compiler does have the verbose terminate handler, define
# HAVE_VERBOSE_TERMINATE_HANDLER.
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
#
# Copyright (c) 2008 Lapo Luchini <lapo@lapo.it>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
AC_DEFUN([AC_CXX_VERBOSE_TERMINATE_HANDLER],
[AC_CACHE_CHECK(whether the compiler has __gnu_cxx::__verbose_terminate_handler,
ac_cv_verbose_terminate_handler,
[
AC_REQUIRE([AC_CXX_EXCEPTIONS])
AC_REQUIRE([AC_CXX_NAMESPACES])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <exception>]],
[[std::set_terminate(__gnu_cxx::__verbose_terminate_handler);]])],
[ac_cv_verbose_terminate_handler=yes], [ac_cv_verbose_terminate_handler=no])
AC_LANG_POP([])
])
if test "$ac_cv_verbose_terminate_handler" = yes; then
AC_DEFINE(HAVE_VERBOSE_TERMINATE_HANDLER, 1,
[defined to 1 if the compiler has __gnu_cxx::__verbose_terminate_handler, 0 otherwise])
else
AC_DEFINE(HAVE_VERBOSE_TERMINATE_HANDLER, 0,
[defined to 1 if the compiler has __gnu_cxx::__verbose_terminate_handler, 0 otherwise])
fi
])
-34
View File
@@ -1,34 +0,0 @@
############################################################################
# Copyright:
# (C) 2008 - 2009 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# APP_AUTO_CLEAR_FLAGS()
# Clear user-specified CFLAGS / CXXFLAGS / LIBS / LDFLAGS if requested.
# You should call this macro before any of AC_PROG_C(XX) checks to
# avoid checking with user-specified options.
AC_DEFUN([APP_AUTO_CLEAR_FLAGS], [
AC_ARG_ENABLE(user-flags, AS_HELP_STRING([--disable-user-flags],
[ignore user-supplied compiler flags (default: user flags are enabled)]),
[app_cv_compiler_user_flags=${enableval}], [app_cv_compiler_user_flags=yes])
AC_MSG_NOTICE([Enable user-specified compiler flags: $app_cv_compiler_user_flags])
# Reset user-supplied flags if requested.
if test "x$app_cv_compiler_user_flags" = "xno"; then
CFLAGS="";
CXXFLAGS="";
LIBS="";
LDFLAGS="";
fi
])
-302
View File
@@ -1,302 +0,0 @@
############################################################################
# Copyright:
# (C) 2008 - 2009 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# APP_COMPILER_OPTIONS([flags_prefix])
# This macro enables various compiler flags (common warnings, optimization,
# debug, etc...), controllable through configure options.
# flags_prefixCFLAGS, flags_prefixCXXFLAGS and flags_prefixLDFLAGS
# will be initialized (or appended to) with the results.
# DEBUG and DEBUG_BUILD will be exported to config.h in case of debug builds.
# You must call AX_COMPILER_VENDOR, APP_DETECT_OS_KERNEL([target], ...)
# and APP_DETECT_OS_ENV([target], ...) before using this macro.
AC_DEFUN([APP_COMPILER_OPTIONS], [
# These requirements check compile-time presence, not that they were called
AC_REQUIRE([AX_COMPILER_VENDOR])
AC_REQUIRE([APP_DETECT_OS_ENV])
app_cv_compiler_options_cflags="";
app_cv_compiler_options_cxxflags="";
app_cv_compiler_options_ldflags="";
# ---- Common compiler options (warnings, etc...)
AC_ARG_ENABLE(common-options, AS_HELP_STRING([--enable-common-options=<compiler>|auto|none],
[enable useful compilation options (warnings, mostly). Accepted values are auto, none, gnu, clang, intel, sun. (Default: auto)]),
[app_cv_compiler_common_options=${enableval}], [app_cv_compiler_common_options=none])
# the default value is "yes" (if no value given after =), treat it as auto.
if test "x$app_cv_compiler_common_options" = "xyes" || test "x$app_cv_compiler_common_options" = "xauto"; then
app_cv_compiler_common_options="$ax_cv_cxx_compiler_vendor";
fi
if test "x$app_cv_compiler_common_options" = "xno"; then
# for pretty message
app_cv_compiler_common_options="none";
fi
AC_MSG_NOTICE([Enable common compiler flags for: $app_cv_compiler_common_options])
if test "x$app_cv_compiler_common_options" != "xnone"; then
# gcc (or clang) / gnu environment, mingw, cygwin.
if test "x$app_cv_compiler_common_options" = "xgnu" || test "x$app_cv_compiler_common_options" = "xclang"; then
if test "x$app_cv_target_os_env" = "xmingw32" || test "x$app_cv_target_os_env" = "xmingw64" \
|| test "x$app_cv_target_os_env" = "xcygwin"; then
# mingw gcc options:
# -mno-cygwin - generate non-cygwin executables in cygwin's mingw.
# -mms-bitfields - make structures compatible with msvc. recommended default for non-cygwin. Default for mingw.
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -mms-bitfields"
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -mms-bitfields"
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -mms-bitfields"
fi
app_cv_compiler_tmp_var="-Wall -Wcast-align -Wcast-qual -Wconversion \
-Wfloat-equal -Wnon-virtual-dtor -Woverloaded-virtual \
-Wpointer-arith -Wshadow -Wsign-compare -Wsign-promo -Wundef -Wwrite-strings";
if test "x$app_cv_compiler_common_options" = "xclang"; then
# these are really annoying
app_cv_compiler_tmp_var="$app_cv_compiler_tmp_var -Wno-sign-conversion -Wno-format-security"
fi
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags $app_cv_compiler_tmp_var";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags $app_cv_compiler_tmp_var";
# intel / gnu environment
elif test "x$app_cv_compiler_common_options" = "xintel" && test "x$app_cv_target_os_env" = "xgnu"; then
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -w1";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags \
-ftrapuv -fstack-security-check -early-template-check -static-libgcc -static-intel \
-Wcomment -Wdeprecated -Wextra-tokens -Wformat -Wmissing-prototypes -Wnon-virtual-dtor \
-Wpointer-arith -Wreturn-type -Wshadow -Wtrigraphs -Wuninitialized -w1";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -static-libgcc -static-intel";
# suncc
elif test "x$app_cv_compiler_common_options" = "xsun"; then
# Enable useful language extensions (e.g. __func__ in C++). Details at
# http://docs.sun.com/app/docs/doc/820-7599/bkapy?a=view
# Additional options: "-staticlib=Crun -staticlib=Cstd" - link statically to
# C++ runtime and standard libraries.
# http://docs.sun.com/app/docs/doc/820-7599/bkaws?a=view
# STLport seems to be more standards-compliant, but incompatible
# with default Cstd. Also, it's not guaranteed to keep compatibility
# between versions. Select it with "-library=stlport4".
# http://docs.sun.com/app/docs/doc/820-7599/bkakg?a=view
# http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags \
+w -errtags -erroff=notemsource,notused -features=extensions";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags \
+w -errtags -erroff=notemsource,notused -features=extensions";
fi
fi
# ---- Compiler options for debug builds
AC_ARG_ENABLE(debug-options, AS_HELP_STRING([--enable-debug-options=<compiler>|auto|none],
[enable debug build options. Accepted values are auto, none, gnu, clang, intel, sun. (Default: none)]),
[app_cv_compiler_debug_options=${enableval}], [app_cv_compiler_debug_options=none])
# the default value is "yes" (if no value given after =), treat it as auto.
if test "x$app_cv_compiler_debug_options" = "xyes" || test "x$app_cv_compiler_debug_options" = "xauto"; then
app_cv_compiler_debug_options="$ax_cv_cxx_compiler_vendor";
fi
if test "x$app_cv_compiler_debug_options" = "xno"; then
# for pretty message
app_cv_compiler_debug_options="none";
fi
AC_MSG_NOTICE([Enable debug build flags for: $app_cv_compiler_debug_options])
if test "x$app_cv_compiler_debug_options" != "xnone"; then
# Define DEBUG and DEBUG_BUILD for debug builds (through config.h).
AC_DEFINE([DEBUG], [1], [Defined for debug builds])
AC_DEFINE([DEBUG_BUILD], [1], [Defined for debug builds])
# gcc, mingw
if test "x$app_cv_compiler_debug_options" = "xgnu" || test "x$app_cv_compiler_debug_options" = "xclang"; then
# We could put libstdc++ debug options here, but it generates binary-incompatible
# C++ code, which leads to runtime errors with e.g. libsigc++.
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -g3 -O0";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -g3 -O0";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -g3 -O0";
# intel / gnu
elif test "x$app_cv_compiler_debug_options" = "xintel" && test "x$app_cv_target_os_env" = "xgnu"; then
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -g3 -O0";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -g3 -O0";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -g3 -O0";
# suncc
elif test "x$app_cv_compiler_debug_options" = "xsun"; then
# There's no -O0, it's the default. Debug format is stabs by default, but can be switched
# to dwarf by -xdebugformat=dwarf.
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -xs -g";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -xs -g";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -xs -g";
fi
fi
# ---- Compiler options for optimized builds
AC_ARG_ENABLE(optimize-options, AS_HELP_STRING([--enable-optimize-options=<compiler>|auto|none],
[enable optimized build options. Accepted values are auto, none, gnu, clang, intel, sun. (Default: none)]),
[app_cv_compiler_optimize_options=${enableval}], [app_cv_compiler_optimize_options=none])
# the default value is "yes" (if no value given after =), treat it as auto.
if test "x$app_cv_compiler_optimize_options" = "xyes" || test "x$app_cv_compiler_optimize_options" = "xauto"; then
app_cv_compiler_optimize_options="$ax_cv_cxx_compiler_vendor";
fi
if test "x$app_cv_compiler_optimize_options" = "xno"; then
# for pretty message
app_cv_compiler_optimize_options="none";
fi
AC_MSG_NOTICE([Enable optimized build flags for: $app_cv_compiler_optimize_options])
if test "x$app_cv_compiler_optimize_options" != "xnone"; then
# gcc, mingw
if test "x$app_cv_compiler_optimize_options" = "xgnu" || test "x$app_cv_compiler_optimize_options" = "xclang"; then
# -mtune=generic is since gcc 4.0 iirc
if test "x$app_cv_target_os_env" = "xmingw32"; then
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -g0 -O3 -s -march=i686";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -g0 -O3 -s -march=i686";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -g0 -O3 -s -march=i686";
else # mingw64, cygwin (they have new gcc), others.
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -g0 -O3 -s";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -g0 -O3 -s";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -g0 -O3 -s";
fi
# -mtune=generic is only for x86*
case "$target" in
i686-*)
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -mtune=generic";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -mtune=generic";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -mtune=generic";
;;
x86_64-*)
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -mtune=generic";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -mtune=generic";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -mtune=generic";
;;
esac
# intel / gnu
elif test "x$app_cv_compiler_optimize_options" = "xintel" && test "x$app_cv_target_os_env" = "xgnu"; then
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -g0 -O3 -s";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -g0 -O3 -s";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -g0 -O3 -s";
# suncc
elif test "x$app_cv_compiler_optimize_options" = "xsun"; then
# There's no -O0, it's the default. Debug format is stabs by default, but can be switched
# to dwarf by -xdebugformat=dwarf.
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -xO5";
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -xO5";
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -s";
fi
fi
# ---- Compiler options for GCC pch support
AC_ARG_ENABLE(gcc-pch,
AS_HELP_STRING([--enable-gcc-pch],[enable precompiled header support (pch make target) (GCC only) (default: disabled)
(use "make gch" to speed up the compilation, but don't enable it if you don't intend to use it - it will slow things down)]),
[app_cv_compiler_gcc_pch=${enableval}], [app_cv_compiler_gcc_pch=no])
AC_MSG_NOTICE([Enable GCC precompiled header usage: $app_cv_compiler_gcc_pch])
# Don't check the vendor here - it's disabled by default, so it's on the user.
if test "x$app_cv_compiler_gcc_pch" = "xyes"; then
app_cv_compiler_options_cflags="$app_cv_compiler_options_cflags -Winvalid-pch -DENABLE_PCH"
app_cv_compiler_options_cxxflags="$app_cv_compiler_options_cxxflags -Winvalid-pch -DENABLE_PCH"
fi
# ---- Compiler options for Mingw's mwindows/mconsole
# -mwindows - hide console window. possibly suppresses any std output / error.
# -mconsole - opposite of -mwindows, default.
AC_ARG_ENABLE(windows-console, AS_HELP_STRING([--enable-windows-console=yes|no|auto],
[enable windows console (MinGW and Cygwin only). Accepted values are yes, no, auto. ]
[Auto means disabled for optimized builds, enabled for all others. (Default: auto)]),
[app_cv_compiler_windows_console=${enableval}], [app_cv_compiler_windows_console=auto])
if test "x$app_cv_compiler_windows_console" = "xauto"; then
# disable console for optimized builds.
if test "x$app_cv_compiler_optimize_options" != "xnone"; then
app_cv_compiler_windows_console="no";
else
app_cv_compiler_windows_console="yes";
fi
fi
if test "x$app_cv_target_os_env" = "xmingw32" || test "x$app_cv_target_os_env" = "xmingw64" \
|| test "x$app_cv_target_os_env" = "xcygwin"; then
if test "x$app_cv_compiler_windows_console" = "xno"; then
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -mwindows";
else
# specify -mconsole even if it's the default - it should override the user-supplied setting
app_cv_compiler_options_ldflags="$app_cv_compiler_options_ldflags -mconsole";
fi
AC_MSG_NOTICE([Enable windows console: $app_cv_compiler_windows_console])
fi
# ---- Export our variables
if test "x$$1[]CFLAGS" = "x"; then
$1[]CFLAGS="$app_cv_compiler_options_cflags";
else
$1[]CFLAGS="$$1[]CFLAGS $app_cv_compiler_options_cflags";
fi
if test "x$$1[]CXXFLAGS" = "x"; then
$1[]CXXFLAGS="$app_cv_compiler_options_cxxflags";
else
$1[]CXXFLAGS="$$1[]CXXFLAGS $app_cv_compiler_options_cxxflags";
fi
if test "x$$1[]LDFLAGS" = "x"; then
$1[]LDFLAGS="$app_cv_compiler_options_ldflags";
else
$1[]LDFLAGS="$$1[]LDFLAGS $app_cv_compiler_options_ldflags";
fi
AC_MSG_NOTICE([Compiler-specific build options:])
AC_MSG_NOTICE([CFLAGS: $app_cv_compiler_options_cflags])
AC_MSG_NOTICE([CXXFLAGS: $app_cv_compiler_options_cxxflags])
AC_MSG_NOTICE([LDFLAGS: $app_cv_compiler_options_ldflags])
])
-51
View File
@@ -1,51 +0,0 @@
############################################################################
# Copyright:
# (C) 2008 - 2009 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# Check whether C++ compiler supports overloading of functions
# with function pointer argument differing only in extern "C" specification,
# that is, extern "C" function pointer and C++ function pointer. GCC and
# Intel treat them equally, so no overloads are needed (or accepted)
# there.
# SunCC accepts C++-to-C function pointer assignment in function
# parameters, but not in constructor parameters. To make such
# code work an additional C-function-pointer constructor must be
# specified. Then the constructor itself can make the conversion
# (with a compiler warning though).
# SunCC also disallows C-to-C++ function pointer specification
# for template parameters (I don't remember the exact details).
# If such overloading support is found,
# HAVE_CXX_EXTERN_C_OVERLOAD is defined.
AC_DEFUN([APP_CXX_EXTERN_C_OVERLOAD], [
AC_CACHE_CHECK(whether $CXX accepts extern C function pointer overload, ac_cv_cxx_extern_c_overload, [
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
extern "C" { typedef void (*c_func_t)(void); }
typedef void (*cpp_func_t)(void);
void f1(c_func_t f) { }
void f1(cpp_func_t f) { }
]], [[]])],
[ac_cv_cxx_extern_c_overload=yes], [ac_cv_cxx_extern_c_overload=no])
AC_LANG_POP([])
])
if test "x$ac_cv_cxx_extern_c_overload" = "xyes"; then
AC_DEFINE(HAVE_CXX_EXTERN_C_OVERLOAD, 1,
[Defined to 1 if the C++ complier accepts extern C function pointer overload, 0 otherwise])
else
AC_DEFINE(HAVE_CXX_EXTERN_C_OVERLOAD, 0,
[Defined to 1 if the C++ complier accepts extern C function pointer overload, 0 otherwise])
fi
])
-50
View File
@@ -1,50 +0,0 @@
############################################################################
# Copyright:
# (C) 2008 - 2009 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# Check whether C++ compiler supports C99 __func__.
AC_DEFUN([APP_CXX___func__], [
AC_CACHE_CHECK(whether $CXX recognizes __func__, app_cv_cxx___func__, [
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
[[const char* s = __func__;]])],
[app_cv_cxx___func__=yes], [app_cv_cxx___func__=no])
AC_LANG_POP([])
])
if test "x$app_cv_cxx___func__" = "xyes"; then
AC_DEFINE(HAVE_CXX___func__, 1,
[Defined to 1 if the C++ complier supports __func__, 0 otherwise])
else
AC_DEFINE(HAVE_CXX___func__, 0,
[Defined to 1 if the C++ complier supports __func__, 0 otherwise])
fi
])
# Check whether C++ compiler supports __FUNCTION__.
AC_DEFUN([APP_CXX___FUNCTION__], [
AC_CACHE_CHECK(whether $CXX recognizes __FUNCTION__, app_cv_cxx___FUNCTION__, [
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
[[const char* s = __FUNCTION__;]])],
[app_cv_cxx___FUNCTION__=yes], [app_cv_cxx___FUNCTION__=no])
AC_LANG_POP([])
])
if test "x$app_cv_cxx___FUNCTION__" = "xyes"; then
AC_DEFINE(HAVE_CXX___FUNCTION__, 1,
[Defined to 1 if the C++ complier supports __FUNCTION__, 0 otherwise])
else
AC_DEFINE(HAVE_CXX___FUNCTION__, 0,
[Defined to 1 if the C++ complier supports __FUNCTION__, 0 otherwise])
fi
])
-375
View File
@@ -1,375 +0,0 @@
############################################################################
# Copyright:
# (C) 2008 - 2009 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# APP_DETECT_OS_KERNEL(triplet_name, define_macro_prefix)
# Check target OS kernel.
# triplet_name is target, host or build.
# You must call AX_COMPILER_VENDOR before using this macro.
# If you call
# APP_DETECT_OS_KERNEL([target], [CONFIG_KERNEL])
# you will get CONFIG_KERNEL_LINUX C macro exported to config.h
# (on gcc/linux).
# If no define_macro_prefix is specified, no C macro prefix will be used.
# app_cv_target_os_kernel will be set to kernel name (lowercase).
# app_cv_target_os_kernel_macro will be set to kernel name (all caps).
# TARGET_OS_KERNEL_LINUX automake conditional will be set to true.
# Note: Some operating systems / compilers have built-in defines.
# For gcc, check with
# $ gcc -dM -E - < /dev/null
AC_DEFUN([APP_DETECT_OS_KERNEL], [
# These requirements check compile-time presence, not that they were called
AC_REQUIRE([AX_COMPILER_VENDOR])
AC_MSG_CHECKING([for $1 OS kernel])
app_cv_[]$1[]_os_kernel="";
app_cv_[]$1[]_os_kernel_macro="";
# If vendor is not recognized, it's set to "unknown".
# NOTE: This works only on target compilers!
if test "x${ax_cv_cxx_compiler_vendor}" = "x"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[ax_cv_cxx_compiler_vendor] not set.])
fi
# "build" - the type of system on which the package is being configured and compiled.
# "host" - the type of system on which the package runs. Specifying it enables the
# cross-compilation mode. "target" defaults to this too.
if test "x$1" != "xbuild" && test "x$1" != "xhost" && test "x$1" != "xtarget"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[Triplet name must be build, host or target.]])
fi
case "$$1" in
*linux*)
# gcc defines __linux__ on linux. Other defines include: __linux, __unix__, __gnu_linux__,
# linux, unix, __i386__, i386.
app_cv_[]$1[]_os_kernel="linux";
app_cv_[]$1[]_os_kernel_macro="LINUX";
;;
i*86-*mingw* | i*86-*cygwin*)
# mingw defines _WIN32. msvc defines _WIN32 (built-in), and WIN32 via windows.h.
# Other mingw defines include: __WINNT, __WINNT__, __WIN32__, __i386, _X86_,
# i386, __i386__, WIN32, __MINGW32__, WINNT (all equal to 1).
app_cv_[]$1[]_os_kernel="windows32";
app_cv_[]$1[]_os_kernel_macro="WINDOWS32";
;;
x86_64-*-mingw* | x86_64-*-cygwin*)
# mingw64 defines the same stuff as 32-bit one, plus _WIN64, __MINGW64__, etc... .
# Keep in mind that if you're generating a 32-bit application, the kernel will
# be windows32 even if you run it on 64-bit Windows.
app_cv_[]$1[]_os_kernel="windows64";
app_cv_[]$1[]_os_kernel_macro="WINDOWS64";
;;
*interix*)
# Interix is a kernel on top of windows, so we treat it separately.
app_cv_[]$1[]_os_kernel="interix";
app_cv_[]$1[]_os_kernel_macro="INTERIX";
;;
# This includes debian gnu/kfreebsd. Dragonfly is checked separately.
*freebsd*)
# gcc built-in defines (to check for freebsd kernel):
# defined(__FreeBSD__) || defined(__FreeBSD_kernel__).
# See http://glibc-bsd.alioth.debian.org/porting/PORTING .
app_cv_[]$1[]_os_kernel="freebsd";
app_cv_[]$1[]_os_kernel_macro="FREEBSD";
;;
*dragonfly*)
app_cv_[]$1[]_os_kernel="dragonfly";
app_cv_[]$1[]_os_kernel_macro="DRAGONFLY";
;;
*openbsd*)
app_cv_[]$1[]_os_kernel="openbsd";
app_cv_[]$1[]_os_kernel_macro="OPENBSD";
;;
# This includes debian gnu/netbsd.
*netbsd*)
app_cv_[]$1[]_os_kernel="netbsd";
app_cv_[]$1[]_os_kernel_macro="NETBSD";
;;
*solaris*)
app_cv_[]$1[]_os_kernel="solaris";
app_cv_[]$1[]_os_kernel_macro="SOLARIS";
;;
*darwin*)
app_cv_[]$1[]_os_kernel="darwin";
app_cv_[]$1[]_os_kernel_macro="DARWIN";
;;
*qnx*)
app_cv_[]$1[]_os_kernel="qnx";
app_cv_[]$1[]_os_kernel_macro="QNX";
;;
*)
app_cv_[]$1[]_os_kernel="unknown";
app_cv_[]$1[]_os_kernel_macro="UNKNOWN";
;;
esac
# Assign this - we may use this in configure itself.
if test "x$2" != "x"; then
app_cv_[]$1[]_os_kernel_macro="$2[]_${app_cv_[]$1[]_os_kernel_macro}";
fi
# config.h macros (yes, we need this many. otherwise config.h will be incorrect).
if test "x${app_cv_[]$1[]_os_kernel}" = "xlinux"; then
AC_DEFINE($2[]LINUX, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xwindows32"; then
AC_DEFINE($2[]WINDOWS32, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xwindows64"; then
AC_DEFINE($2[]WINDOWS64, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xinterix"; then
AC_DEFINE($2[]INTERIX, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xfreebsd"; then
AC_DEFINE($2[]FREEBSD, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xdragonfly"; then
AC_DEFINE($2[]DRAGONFLY, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xopenbsd"; then
AC_DEFINE($2[]OPENBSD, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xnetbsd"; then
AC_DEFINE($2[]NETBSD, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xsolaris"; then
AC_DEFINE($2[]SOLARIS, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xdarwin"; then
AC_DEFINE($2[]DARWIN, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xqnx"; then
AC_DEFINE($2[]QNX, 1, [$1 OS kernel])
fi
if test "x${app_cv_[]$1[]_os_kernel}" = "xunknown"; then
AC_DEFINE($2[]UNKNOWN, 1, [$1 OS kernel])
fi
# Export to Makefile.am's.
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_LINUX, [test "x${app_cv_[]$1[]_os_kernel}" = "xlinux"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_WINDOWS32, [test "x${app_cv_[]$1[]_os_kernel}" = "xwindows32"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_WINDOWS64, [test "x${app_cv_[]$1[]_os_kernel}" = "xwindows64"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_INTERIX, [test "x${app_cv_[]$1[]_os_kernel}" = "xinterix"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_FREEBSD, [test "x${app_cv_[]$1[]_os_kernel}" = "xfreebsd"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_DRAGONFLY, [test "x${app_cv_[]$1[]_os_kernel}" = "xdragonfly"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_OPENBSD, [test "x${app_cv_[]$1[]_os_kernel}" = "xopenbsd"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_NETBSD, [test "x${app_cv_[]$1[]_os_kernel}" = "xnetbsd"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_SOLARIS, [test "x${app_cv_[]$1[]_os_kernel}" = "xsolaris"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_DARWIN, [test "x${app_cv_[]$1[]_os_kernel}" = "xdarwin"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_QNX, [test "x${app_cv_[]$1[]_os_kernel}" = "xqnx"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_UNKNOWN, [test "x${app_cv_[]$1[]_os_kernel}" = "xunknown"])
# composite ones, for easy checking
AM_CONDITIONAL(m4_toupper($1)[]_OS_KERNEL_FAMILY_WINDOWS, \
[test "x${app_cv_[]$1[]_os_kernel}" = "xwindows32" || test "x${app_cv_[]$1[]_os_kernel}" = "xwindows64" \
|| test "x${app_cv_[]$1[]_os_kernel}" = "xinterix"])
if test "x${app_cv_[]$1[]_os_kernel}" = "xwindows32" || test "x${app_cv_[]$1[]_os_kernel}" = "xwindows64" \
|| test "x${app_cv_[]$1[]_os_kernel}" = "xinterix"; then
AC_DEFINE($2[]FAMILY_WINDOWS, 1, [$1 OS kernel family])
fi
AC_MSG_RESULT([${app_cv_[]$1[]_os_kernel}])
])
# APP_DETECT_OS_ENV(triplet_name, define_macro_prefix)
# Check target OS userland environment (mainly glibc).
# triplet_name is target, host or build.
# You must call AX_COMPILER_VENDOR before using this macro.
# If you call
# APP_DETECT_OS_ENV([target], [COMPILER], [CONFIG_OS_ENV])
# you will get CONFIG_OS_ENV_LINUX C macro exported to config.h
# (on gcc/linux).
# If no define_macro_prefix is specified, no C macro prefix will be used.
# app_cv_target_os_env will be set to env name (lowercase).
# app_cv_target_os_env_macro will be set to env name (all caps).
# TARGET_OS_ENV_LINUX automake conditional will be set to true.
AC_DEFUN([APP_DETECT_OS_ENV], [
# These requirements check compile-time presence, not that they were called
AC_REQUIRE([AX_COMPILER_VENDOR])
AC_MSG_CHECKING([for $1 OS userland environment])
app_cv_[]$1[]_os_env="";
app_cv_[]$1[]_os_env_macro="";
# If vendor is not recognized, it's set to "unknown".
# NOTE: This works only on target compilers!
if test "x${ax_cv_cxx_compiler_vendor}" = "x"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[ax_cv_cxx_compiler_vendor] not set.])
fi
# "build" - the type of system on which the package is being configured and compiled.
# "host" - the type of system on which the package runs. Specifying it enables the
# cross-compilation mode. "target" defaults to this too.
if test "x$1" != "xbuild" && test "x$1" != "xhost" && test "x$1" != "xtarget"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[Triplet name must be build, host or target.]])
fi
case "$$1" in
*cygwin*)
app_cv_[]$1[]_os_env="cygwin";
app_cv_[]$1[]_os_env_macro="CYGWIN";
;;
i*86-*mingw*)
app_cv_[]$1[]_os_env="mingw32";
app_cv_[]$1[]_os_env_macro="MINGW32";
;;
x86_64-*-mingw*)
app_cv_[]$1[]_os_env="mingw64";
app_cv_[]$1[]_os_env_macro="MINGW64";
;;
*interix*)
app_cv_[]$1[]_os_env="interix";
app_cv_[]$1[]_os_env_macro="INTERIX";
;;
# This includes gnu/linux, debian gnu/kfreebsd, debian gnu/netbsd...
*-gnu | gnu*)
app_cv_[]$1[]_os_env="gnu";
app_cv_[]$1[]_os_env_macro="GNU";
;;
# Freebsd libc
*freebsd*)
app_cv_[]$1[]_os_env="freebsd";
app_cv_[]$1[]_os_env_macro="FREEBSD";
;;
*dragonfly*)
app_cv_[]$1[]_os_env="dragonfly";
app_cv_[]$1[]_os_env_macro="DRAGONFLY";
;;
*openbsd*)
app_cv_[]$1[]_os_env="openbsd";
app_cv_[]$1[]_os_env_macro="OPENBSD";
;;
*netbsd*)
app_cv_[]$1[]_os_env="netbsd";
app_cv_[]$1[]_os_env_macro="NETBSD";
;;
*solaris*)
app_cv_[]$1[]_os_env="solaris";
app_cv_[]$1[]_os_env_macro="SOLARIS";
;;
*darwin*)
app_cv_[]$1[]_os_env="darwin";
app_cv_[]$1[]_os_env_macro="DARWIN";
;;
*qnx*)
app_cv_[]$1[]_os_env="qnx";
app_cv_[]$1[]_os_env_macro="QNX";
;;
*)
app_cv_[]$1[]_os_env="unknown";
app_cv_[]$1[]_os_env_macro="UNKNOWN";
;;
esac
# Assign this even if not using flags - we may use this in configure itself.
if test "x$2" != "x"; then
app_cv_[]$1[]_os_env_macro="$2[]_${app_cv_[]$1[]_os_env_macro}";
fi
# config.h macros (yes, we need this many. otherwise config.h will be incorrect).
if test "x${app_cv_[]$1[]_os_env}" = "xcygwin"; then
AC_DEFINE($2[]CYGWIN, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xmingw32"; then
AC_DEFINE($2[]MINGW32, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xmingw64"; then
AC_DEFINE($2[]MINGW64, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xinterix"; then
AC_DEFINE($2[]INTERIX, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xgnu"; then
AC_DEFINE($2[]GNU, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xfreebsd"; then
AC_DEFINE($2[]FREEBSD, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xdragonfly"; then
AC_DEFINE($2[]DRAGONFLY, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xopenbsd"; then
AC_DEFINE($2[]OPENBSD, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xnetbsd"; then
AC_DEFINE($2[]NETBSD, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xsolaris"; then
AC_DEFINE($2[]SOLARIS, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xdarwin"; then
AC_DEFINE($2[]DARWIN, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xqnx"; then
AC_DEFINE($2[]QNX, 1, [$1 OS userspace environment])
fi
if test "x${app_cv_[]$1[]_os_env}" = "xunknown"; then
AC_DEFINE($2[]UNKNOWN, 1, [$1 OS userspace environment])
fi
# Export to Makefile.am's.
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_CYGWIN, [test "x${app_cv_[]$1[]_os_env}" = "xcygwin"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_MINGW32, [test "x${app_cv_[]$1[]_os_env}" = "xmingw32"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_MINGW64, [test "x${app_cv_[]$1[]_os_env}" = "xmingw64"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_INTERIX, [test "x${app_cv_[]$1[]_os_env}" = "xinterix"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_GNU, [test "x${app_cv_[]$1[]_os_env}" = "xgnu"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_FREEBSD, [test "x${app_cv_[]$1[]_os_env}" = "xfreebsd"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_DRAGONFLY, [test "x${app_cv_[]$1[]_os_env}" = "xdragonfly"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_OPENBSD, [test "x${app_cv_[]$1[]_os_env}" = "xopenbsd"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_NETBSD, [test "x${app_cv_[]$1[]_os_env}" = "xnetbsd"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_SOLARIS, [test "x${app_cv_[]$1[]_os_env}" = "xsolaris"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_DARWIN, [test "x${app_cv_[]$1[]_os_env}" = "xdarwin"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_QNX, [test "x${app_cv_[]$1[]_os_env}" = "xqnx"])
AM_CONDITIONAL(m4_toupper($1)[]_OS_ENV_UNKNOWN, [test "x${app_cv_[]$1[]_os_env}" = "xunknown"])
AC_MSG_RESULT([${app_cv_[]$1[]_os_env}])
])
-208
View File
@@ -1,208 +0,0 @@
############################################################################
# Copyright:
# (C) 2008 - 2009 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# APP_GET_MT_FLAGS(flags_prefix[, action-if-not-found])
# This macro detects compiler flags which are needed to compile a multi-threaded
# (preferably pthreads-based) applications on target OS. flags_prefixCFLAGS,
# flags_prefixCXXFLAGS and flags_prefixLIBS will be initialized (or appended to)
# with the correct flags.
# You must call AX_COMPILER_VENDOR, APP_DETECT_OS_KERNEL([target], ...)
# and APP_DETECT_OS_ENV([target], ...) before using this macro.
AC_DEFUN([APP_GET_MT_FLAGS], [
# These requirements check compile-time presence, not that they were called
AC_REQUIRE([AX_COMPILER_VENDOR])
AC_REQUIRE([APP_DETECT_OS_KERNEL])
AC_REQUIRE([APP_DETECT_OS_ENV])
AC_MSG_CHECKING([for target thread support flags])
app_cv_target_thread_cflags="";
app_cv_target_thread_cxxflags="";
app_cv_target_thread_libs="";
app_cv_target_thread_found="no";
# If vendor is not recognized, it's set to "unknown".
# NOTE: This works only on target compilers!
if test "x${ax_cv_cxx_compiler_vendor}" = "x"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[ax_cv_cxx_compiler_vendor] not set.])
fi
if test "x${app_cv_target_os_kernel}" = "x"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[app_cv_target_os_kernel] not set.])
fi
if test "x${app_cv_target_os_env}" = "x"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[app_cv_target_os_env] not set.])
fi
# Compilers use at least 3 defines to enable thread-safe support:
# _THREAD_SAFE, _MT, _REENTRANT.
# We use the ones that are required for detected platform.
case "$app_cv_target_os_kernel" in
linux)
# glibc manual says that defining either _REENTRANT or _THREAD_SAFE
# enables some thread-safe implementations of glibc functions.
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang" \
|| test "$ax_cv_cxx_compiler_vendor" = "intel" || test "$ax_cv_cxx_compiler_vendor" = "pathscale"; then
app_cv_target_thread_cflags="-pthread -D_MT -D_THREAD_SAFE"
app_cv_target_thread_cxxflags="-pthread -D_MT -D_THREAD_SAFE"
app_cv_target_thread_libs="-pthread"
app_cv_target_thread_found="yes";
elif test "$ax_cv_cxx_compiler_vendor" = "sun"; then
# suncc's -mt expands to:
# "-D_REENTRANT -lpthread" on Linux, uses pthreads (pthread.h);
# "-D_REENTRANT -lthread" on Solaris, uses Solaris threads (thread.h).
# To use pthreads on Solaris, use "-mt -lpthread".
# http://docs.sun.com/app/docs/doc/820-7598/bjapp?a=view
app_cv_target_thread_cflags="-mt"
app_cv_target_thread_cxxflags="-mt"
app_cv_target_thread_libs="-mt"
app_cv_target_thread_found="yes";
fi
;;
windows*)
# NOTE: Not sure about cygwin or clang.
# NOTE: This only enables multithreaded code generation. For linking
# with pthreads-win32 you need additional flags.
# gcc man page: -mthreads: Support thread-safe exception handling on Mingw32.
# -mthreads defines -D_MT, and links with -lmingwthrd.
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang"; then
app_cv_target_thread_cflags="-mthreads -D_THREAD_SAFE"
app_cv_target_thread_cxxflags="-mthreads -D_THREAD_SAFE"
app_cv_target_thread_libs="-mthreads"
app_cv_target_thread_found="yes"
fi
;;
interix)
# Interix kernel is implemented on top of windows kernel.
# Interix uses -D_REENTRANT for pthreads, automatically enabling -lpthread.
if test "$ax_cv_cxx_compiler_vendor" = "gnu"; then
app_cv_target_thread_cflags="-D_REENTRANT"
app_cv_target_thread_cxxflags="-D_REENTRANT"
app_cv_target_thread_found="yes"
fi
;;
freebsd | dragonfly)
# NOTE: Not sure about debian gnu/kfreebsd and gnu/netbsd.
# Freebsd had -kthread, but it has been discontinued (afaik).
# For freebsd -pthread replaces libc with libc_r.
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang"; then
app_cv_target_thread_cflags="-pthread -D_MT -D_THREAD_SAFE"
app_cv_target_thread_cxxflags="-pthread -D_MT -D_THREAD_SAFE"
app_cv_target_thread_libs="-pthread"
app_cv_target_thread_found="yes";
fi
;;
openbsd)
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang"; then
app_cv_target_thread_cflags="-pthread -D_REENTRANT"
app_cv_target_thread_cxxflags="-pthread -D_REENTRANT"
app_cv_target_thread_libs="-pthread"
app_cv_target_thread_found="yes";
fi
;;
netbsd)
# See sys/featuretest.h
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang"; then
app_cv_target_thread_cflags="-pthread -D_REENTRANT"
app_cv_target_thread_cxxflags="-pthread -D_REENTRANT"
app_cv_target_thread_libs="-pthread"
app_cv_target_thread_found="yes";
fi
;;
solaris)
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang"; then
# gnu documentation mentions -threads (and its aliases, -pthreads and -pthread).
# _REENTRANT is needed to enable some thread-safe equivalents of standard
# functions.
# http://docs.sun.com/app/docs/doc/805-8005-04/6j7hcvqs4?l=ko&a=view
app_cv_target_thread_cflags="-pthreads -D_MT -D_THREAD_SAFE -D_REENTRANT"
app_cv_target_thread_cxxflags="-pthreads -D_MT -D_THREAD_SAFE -D_REENTRANT"
app_cv_target_thread_libs="-pthreads"
app_cv_target_thread_found="yes"
elif test "$ax_cv_cxx_compiler_vendor" = "sun"; then
# suncc's -mt expands to:
# "-D_REENTRANT -lpthread" on Linux, uses pthreads (pthread.h);
# "-D_REENTRANT -lthread" on Solaris, uses Solaris threads (thread.h).
# To use pthreads on Solaris, use "-mt -lpthread".
# http://docs.sun.com/app/docs/doc/820-7598/bjapp?a=view
# http://docs.sun.com/app/docs/doc/816-5175/pthreads-5?a=view
# http://docs.sun.com/app/docs/doc/816-5137/compile-74765?a=view
# We use POSIX threads, so append -lpthread.
app_cv_target_thread_cflags="-mt -lpthread"
app_cv_target_thread_cxxflags="-mt -lpthread"
app_cv_target_thread_libs="-mt -lpthread"
app_cv_target_thread_found="yes"
fi
;;
darwin)
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang"; then
# Darwin produces mt code by default, and -pthread is an error.
app_cv_target_thread_found="yes"
fi
;;
qnx)
if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang"; then
# afaik, gcc/qnx produces mt code by default (at least on newer qnx releases),
# so no flags are needed.
app_cv_target_thread_found="yes"
fi
;;
esac
if test "$app_cv_target_thread_found" = "no"; then
AC_MSG_WARN([Cannot detect compiler thread support. Set CFLAGS, CXXFLAGS and LIBS manually.])
m4_ifvaln([$2],[$2])dnl
else
AC_MSG_RESULT([CFLAGS: $app_cv_target_thread_cflags; CXXFLAGS: $app_cv_target_thread_cxxflags; LIBS: $app_cv_target_thread_libs])
if test "x$$1[]CFLAGS" = "x"; then
$1[]CFLAGS="$app_cv_target_thread_cflags";
else
$1[]CFLAGS="$$1[]CFLAGS $app_cv_target_thread_cflags";
fi
if test "x$$1[]CXXFLAGS" = "x"; then
$1[]CXXFLAGS="$app_cv_target_thread_cxxflags";
else
$1[]CXXFLAGS="$$1[]CXXFLAGS $app_cv_target_thread_cxxflags";
fi
if test "x$$1[]LIBS" = "x"; then
$1[]LIBS="$app_cv_target_thread_libs";
else
$1[]LIBS="$$1[]LIBS $app_cv_target_thread_libs";
fi
fi
])
-137
View File
@@ -1,137 +0,0 @@
############################################################################
# Copyright:
# (C) 2008 - 2009 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# APP_USE_SYSTEM_EXTENSIONS([flags_prefix])
# This macro detects compiler flags which are needed to enable
# system-specific library extensions. For example, on GNU platforms
# it's -D_GNU_SOURCE, on solaris it's -D__EXTENSIONS__, etc...
# Basically, it's the same as AC_USE_SYSTEM_EXTENSIONS,
# but uses compiler flag approach instead of config.h.
# The extensions used bring the system closer to the GNU,
# X/Open (a superset of POSIX) and POSIX systems.
# You must call AX_COMPILER_VENDOR
# and APP_DETECT_OS_ENV([target], ...) before using this macro.
# More info:
# http://www.gnu.org/software/autoconf/manual/autoconf.html#Posix-Variants
# http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
# http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.predefined
# http://docs.sun.com/app/docs/doc/817-3946/6mjgmt4o8?l=en&a=view
AC_DEFUN([APP_USE_SYSTEM_EXTENSIONS], [
# These requirements check compile-time presence, not that they were called
AC_REQUIRE([AX_COMPILER_VENDOR])
AC_REQUIRE([APP_DETECT_OS_ENV])
AC_MSG_CHECKING([for target system extension flags])
app_cv_target_extension_cflags="";
app_cv_target_extension_cxxflags="";
app_cv_target_extension_libs="";
# If vendor is not recognized, it's set to "unknown".
# NOTE: This works only on target compilers!
if test "x${ax_cv_cxx_compiler_vendor}" = "x"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[ax_cv_cxx_compiler_vendor] not set.])
fi
if test "x${app_cv_target_os_kernel}" = "x"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[app_cv_target_os_kernel] not set.])
fi
if test "x${app_cv_target_os_env}" = "x"; then
# msg_result is needed to print the checking... message.
AC_MSG_RESULT([error])
AC_MSG_ERROR([[app_cv_target_os_env] not set.])
fi
case "$app_cv_target_os_env" in
gnu)
# glibc all-extensions macro: _GNU_SOURCE.
# gcc automatically defines it in later versions.
# suncc needs the flag explicitly.
# http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
app_cv_target_extension_cflags="-D_GNU_SOURCE"
app_cv_target_extension_cxxflags="-D_GNU_SOURCE"
;;
solaris)
# The problem with solaris is that it has too many incompatible
# feature test macros, and there is no enable-all macro. Autoconf
# assumes that __EXTENSIONS__ is the one, but it should be defined
# _in addition_ to feature test macros. Note that on its own, __EXTENSIONS__
# still enables some useful stuff like _LARGEFILE64_SOURCE.
# To support some posix macros, additional link objects are also required.
# Some *_SOURCE feature test macros may be incompatible with C++.
# http://docs.sun.com/app/docs/doc/816-5175/standards-5?a=view
app_cv_target_extension_cflags="-D__EXTENSIONS__"
app_cv_target_extension_cxxflags="-D__EXTENSIONS__"
;;
netbsd)
# There is no enable-all macro.
# (_XOPEN_SOURCE >= 500 || _NETBSD_SOURCE) is recommended.
# The default is _NETBSD_SOURCE, _XOPEN_SOURCE overrides it.
# The manual says that rename() will behave posix-like if _POSIX_C_SOURCE
# is defined. However, stdio.h uses (_XOPEN_SOURCE <= 2) condition,
# which is really bogus.
# See sys/featuretest.h
;;
mingw*)
# This enables standards-compliant stdio behaviour (regarding printf and
# friends), as opposed to msvc-compatible one. This is usually enabled
# by default if one of the usual macros are encountered (_XOPEN_SOURCE,
# _GNU_SOURCE, etc...).
# Also, we make the win2k API available (includes console functions, etc...).
# Other things to consider: _NO_OLDNAMES (disable "deprecated"
# non-underscored names like chdir (use _chdir), etc...).
# See _mingw.h for details.
app_cv_target_extension_cflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0600" # Since Vista
app_cv_target_extension_cxxflags="-D__USE_MINGW_ANSI_STDIO=1 -DWINVER=0x0600"
;;
interix)
# As per AC_USE_SYSTEM_EXTENSIONS.
app_cv_target_extension_cflags="-D_ALL_SOURCE"
app_cv_target_extension_cxxflags="-D_ALL_SOURCE"
;;
esac
AC_MSG_RESULT([CFLAGS: $app_cv_target_extension_cflags; CXXFLAGS: $app_cv_target_extension_cxxflags; LIBS: $app_cv_target_extension_libs])
if test "x$$1[]CFLAGS" = "x"; then
$1[]CFLAGS="$app_cv_target_extension_cflags";
else
$1[]CFLAGS="$$1[]CFLAGS $app_cv_target_extension_cflags";
fi
if test "x$$1[]CXXFLAGS" = "x"; then
$1[]CXXFLAGS="$app_cv_target_extension_cxxflags";
else
$1[]CXXFLAGS="$$1[]CXXFLAGS $app_cv_target_extension_cxxflags";
fi
if test "x$$1[]LIBS" = "x"; then
$1[]LIBS="$app_cv_target_extension_libs";
else
$1[]LIBS="$$1[]LIBS $app_cv_target_extension_libs";
fi
])
-65
View File
@@ -1,65 +0,0 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ax_compiler_vendor.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_COMPILER_VENDOR
#
# DESCRIPTION
#
# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
# watcom, etc. The vendor is returned in the cache variable
# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2008 Matteo Frigo
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Macro Archive. When you make and
# distribute a modified version of the Autoconf Macro, you may extend this
# special exception to the GPL to apply to your modified version as well.
AC_DEFUN([AX_COMPILER_VENDOR],
[
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
# note: don't check for gcc first since some other compilers define __GNUC__
for ventest in clang:__clang__ intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
#if !($vencpp)
thisisanerror;
#endif
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
done
])
])
-982
View File
@@ -1,982 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the specified
# version of the C++ standard. If necessary, add switches to CXX and
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
# or '14' (for the C++14 standard).
#
# The second argument, if specified, indicates whether you insist on an
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
# -std=c++11). If neither is specified, you get whatever works, with
# preference for an extended mode.
#
# The third argument, if specified 'mandatory' or if left unspecified,
# indicates that baseline support for the specified C++ standard is
# required and that the macro should error out if no mode with that
# support is found. If specified 'optional', then configuration proceeds
# regardless, after defining HAVE_CXX${VERSION} if and only if a
# supporting mode is found.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
# Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 7
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
AX_REQUIRE_DEFINED([AC_MSG_WARN])
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
[$1], [17], [ax_cxx_compile_alternatives="17 1z"],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
[$2], [noext], [],
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
[$3], [optional], [ax_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
for alternative in ${ax_cxx_compile_alternatives}; do
switch="-std=gnu++${alternative}"
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
done
fi])
m4_if([$2], [ext], [], [dnl
if test x$ac_success = xno; then
dnl HP's aCC needs +std=c++11 according to:
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf
dnl Cray's crayCC needs "-h std=c++11"
for alternative in ${ax_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
done
if test x$ac_success = xyes; then
break
fi
done
fi])
AC_LANG_POP([C++])
if test x$ax_cxx_compile_cxx$1_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
fi
fi
if test x$ac_success = xno; then
HAVE_CXX$1=0
AC_MSG_NOTICE([No compiler with C++$1 support was found])
else
HAVE_CXX$1=1
AC_DEFINE(HAVE_CXX$1,1,
[define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
])
dnl Test body for checking C++11 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
)
dnl Test body for checking C++14 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
)
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17
)
dnl Tests for new features in C++11
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
// If the compiler admits that it is not ready for C++11, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201103L
#error "This is not a C++11 compiler"
#else
namespace cxx11
{
namespace test_static_assert
{
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
}
namespace test_final_override
{
struct Base
{
virtual void f() {}
};
struct Derived : public Base
{
virtual void f() override {}
};
}
namespace test_double_right_angle_brackets
{
template < typename T >
struct check {};
typedef check<void> single_type;
typedef check<check<void>> double_type;
typedef check<check<check<void>>> triple_type;
typedef check<check<check<check<void>>>> quadruple_type;
}
namespace test_decltype
{
int
f()
{
int a = 1;
decltype(a) b = 2;
return a + b;
}
}
namespace test_type_deduction
{
template < typename T1, typename T2 >
struct is_same
{
static const bool value = false;
};
template < typename T >
struct is_same<T, T>
{
static const bool value = true;
};
template < typename T1, typename T2 >
auto
add(T1 a1, T2 a2) -> decltype(a1 + a2)
{
return a1 + a2;
}
int
test(const int c, volatile int v)
{
static_assert(is_same<int, decltype(0)>::value == true, "");
static_assert(is_same<int, decltype(c)>::value == false, "");
static_assert(is_same<int, decltype(v)>::value == false, "");
auto ac = c;
auto av = v;
auto sumi = ac + av + 'x';
auto sumf = ac + av + 1.0;
static_assert(is_same<int, decltype(ac)>::value == true, "");
static_assert(is_same<int, decltype(av)>::value == true, "");
static_assert(is_same<int, decltype(sumi)>::value == true, "");
static_assert(is_same<int, decltype(sumf)>::value == false, "");
static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
return (sumf > 0.0) ? sumi : add(c, v);
}
}
namespace test_noexcept
{
int f() { return 0; }
int g() noexcept { return 0; }
static_assert(noexcept(f()) == false, "");
static_assert(noexcept(g()) == true, "");
}
namespace test_constexpr
{
template < typename CharT >
unsigned long constexpr
strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
{
return *s ? strlen_c_r(s + 1, acc + 1) : acc;
}
template < typename CharT >
unsigned long constexpr
strlen_c(const CharT *const s) noexcept
{
return strlen_c_r(s, 0UL);
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("1") == 1UL, "");
static_assert(strlen_c("example") == 7UL, "");
static_assert(strlen_c("another\0example") == 7UL, "");
}
namespace test_rvalue_references
{
template < int N >
struct answer
{
static constexpr int value = N;
};
answer<1> f(int&) { return answer<1>(); }
answer<2> f(const int&) { return answer<2>(); }
answer<3> f(int&&) { return answer<3>(); }
void
test()
{
int i = 0;
const int c = 0;
static_assert(decltype(f(i))::value == 1, "");
static_assert(decltype(f(c))::value == 2, "");
static_assert(decltype(f(0))::value == 3, "");
}
}
namespace test_uniform_initialization
{
struct test
{
static const int zero {};
static const int one {1};
};
static_assert(test::zero == 0, "");
static_assert(test::one == 1, "");
}
namespace test_lambdas
{
void
test1()
{
auto lambda1 = [](){};
auto lambda2 = lambda1;
lambda1();
lambda2();
}
int
test2()
{
auto a = [](int i, int j){ return i + j; }(1, 2);
auto b = []() -> int { return '0'; }();
auto c = [=](){ return a + b; }();
auto d = [&](){ return c; }();
auto e = [a, &b](int x) mutable {
const auto identity = [](int y){ return y; };
for (auto i = 0; i < a; ++i)
a += b--;
return x + identity(a + b);
}(0);
return a + b + c + d + e;
}
int
test3()
{
const auto nullary = [](){ return 0; };
const auto unary = [](int x){ return x; };
using nullary_t = decltype(nullary);
using unary_t = decltype(unary);
const auto higher1st = [](nullary_t f){ return f(); };
const auto higher2nd = [unary](nullary_t f1){
return [unary, f1](unary_t f2){ return f2(unary(f1())); };
};
return higher1st(nullary) + higher2nd(nullary)(unary);
}
}
namespace test_variadic_templates
{
template <int...>
struct sum;
template <int N0, int... N1toN>
struct sum<N0, N1toN...>
{
static constexpr auto value = N0 + sum<N1toN...>::value;
};
template <>
struct sum<>
{
static constexpr auto value = 0;
};
static_assert(sum<>::value == 0, "");
static_assert(sum<1>::value == 1, "");
static_assert(sum<23>::value == 23, "");
static_assert(sum<1, 2>::value == 3, "");
static_assert(sum<5, 5, 11>::value == 21, "");
static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
}
// http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
// Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
// because of this.
namespace test_template_alias_sfinae
{
struct foo {};
template<typename T>
using member = typename T::member_type;
template<typename T>
void func(...) {}
template<typename T>
void func(member<T>*) {}
void test();
void test() { func<foo>(0); }
}
} // namespace cxx11
#endif // __cplusplus >= 201103L
]])
dnl Tests for new features in C++14
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
// If the compiler admits that it is not ready for C++14, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#error "This is not a C++14 compiler"
#else
namespace cxx14
{
namespace test_polymorphic_lambdas
{
int
test()
{
const auto lambda = [](auto&&... args){
const auto istiny = [](auto x){
return (sizeof(x) == 1UL) ? 1 : 0;
};
const int aretiny[] = { istiny(args)... };
return aretiny[0];
};
return lambda(1, 1L, 1.0f, '1');
}
}
namespace test_binary_literals
{
constexpr auto ivii = 0b0000000000101010;
static_assert(ivii == 42, "wrong value");
}
namespace test_generalized_constexpr
{
template < typename CharT >
constexpr unsigned long
strlen_c(const CharT *const s) noexcept
{
auto length = 0UL;
for (auto p = s; *p; ++p)
++length;
return length;
}
static_assert(strlen_c("") == 0UL, "");
static_assert(strlen_c("x") == 1UL, "");
static_assert(strlen_c("test") == 4UL, "");
static_assert(strlen_c("another\0test") == 7UL, "");
}
namespace test_lambda_init_capture
{
int
test()
{
auto x = 0;
const auto lambda1 = [a = x](int b){ return a + b; };
const auto lambda2 = [a = lambda1(x)](){ return a; };
return lambda2();
}
}
namespace test_digit_separators
{
constexpr auto ten_million = 100'000'000;
static_assert(ten_million == 100000000, "");
}
namespace test_return_type_deduction
{
auto f(int& x) { return x; }
decltype(auto) g(int& x) { return x; }
template < typename T1, typename T2 >
struct is_same
{
static constexpr auto value = false;
};
template < typename T >
struct is_same<T, T>
{
static constexpr auto value = true;
};
int
test()
{
auto x = 0;
static_assert(is_same<int, decltype(f(x))>::value, "");
static_assert(is_same<int&, decltype(g(x))>::value, "");
return x;
}
}
} // namespace cxx14
#endif // __cplusplus >= 201402L
]])
dnl Tests for new features in C++17
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
// If the compiler admits that it is not ready for C++17, why torture it?
// Hopefully, this will speed up the test.
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus <= 201402L
#error "This is not a C++17 compiler"
#else
#if defined(__clang__)
#define REALLY_CLANG
#else
#if defined(__GNUC__)
#define REALLY_GCC
#endif
#endif
#include <initializer_list>
#include <utility>
#include <type_traits>
namespace cxx17
{
#if !defined(REALLY_CLANG)
namespace test_constexpr_lambdas
{
// TODO: test it with clang++ from git
constexpr int foo = [](){return 42;}();
}
#endif // !defined(REALLY_CLANG)
namespace test::nested_namespace::definitions
{
}
namespace test_fold_expression
{
template<typename... Args>
int multiply(Args... args)
{
return (args * ... * 1);
}
template<typename... Args>
bool all(Args... args)
{
return (args && ...);
}
}
namespace test_extended_static_assert
{
static_assert (true);
}
namespace test_auto_brace_init_list
{
auto foo = {5};
auto bar {5};
static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
static_assert(std::is_same<int, decltype(bar)>::value);
}
namespace test_typename_in_template_template_parameter
{
template<template<typename> typename X> struct D;
}
namespace test_fallthrough_nodiscard_maybe_unused_attributes
{
int f1()
{
return 42;
}
[[nodiscard]] int f2()
{
[[maybe_unused]] auto unused = f1();
switch (f1())
{
case 17:
f1();
[[fallthrough]];
case 42:
f1();
}
return f1();
}
}
namespace test_extended_aggregate_initialization
{
struct base1
{
int b1, b2 = 42;
};
struct base2
{
base2() {
b3 = 42;
}
int b3;
};
struct derived : base1, base2
{
int d;
};
derived d1 {{1, 2}, {}, 4}; // full initialization
derived d2 {{}, {}, 4}; // value-initialized bases
}
namespace test_general_range_based_for_loop
{
struct iter
{
int i;
int& operator* ()
{
return i;
}
const int& operator* () const
{
return i;
}
iter& operator++()
{
++i;
return *this;
}
};
struct sentinel
{
int i;
};
bool operator== (const iter& i, const sentinel& s)
{
return i.i == s.i;
}
bool operator!= (const iter& i, const sentinel& s)
{
return !(i == s);
}
struct range
{
iter begin() const
{
return {0};
}
sentinel end() const
{
return {5};
}
};
void f()
{
range r {};
for (auto i : r)
{
[[maybe_unused]] auto v = i;
}
}
}
namespace test_lambda_capture_asterisk_this_by_value
{
struct t
{
int i;
int foo()
{
return [*this]()
{
return i;
}();
}
};
}
namespace test_enum_class_construction
{
enum class byte : unsigned char
{};
byte foo {42};
}
namespace test_constexpr_if
{
template <bool cond>
int f ()
{
if constexpr(cond)
{
return 13;
}
else
{
return 42;
}
}
}
namespace test_selection_statement_with_initializer
{
int f()
{
return 13;
}
int f2()
{
if (auto i = f(); i > 0)
{
return 3;
}
switch (auto i = f(); i + 4)
{
case 17:
return 2;
default:
return 1;
}
}
}
#if !defined(REALLY_CLANG)
namespace test_template_argument_deduction_for_class_templates
{
// TODO: test it with clang++ from git
template <typename T1, typename T2>
struct pair
{
pair (T1 p1, T2 p2)
: m1 {p1},
m2 {p2}
{}
T1 m1;
T2 m2;
};
void f()
{
[[maybe_unused]] auto p = pair{13, 42u};
}
}
#endif // !defined(REALLY_CLANG)
namespace test_non_type_auto_template_parameters
{
template <auto n>
struct B
{};
B<5> b1;
B<'a'> b2;
}
#if !defined(REALLY_CLANG)
namespace test_structured_bindings
{
// TODO: test it with clang++ from git
int arr[2] = { 1, 2 };
std::pair<int, int> pr = { 1, 2 };
auto f1() -> int(&)[2]
{
return arr;
}
auto f2() -> std::pair<int, int>&
{
return pr;
}
struct S
{
int x1 : 2;
volatile double y1;
};
S f3()
{
return {};
}
auto [ x1, y1 ] = f1();
auto& [ xr1, yr1 ] = f1();
auto [ x2, y2 ] = f2();
auto& [ xr2, yr2 ] = f2();
const auto [ x3, y3 ] = f3();
}
#endif // !defined(REALLY_CLANG)
#if !defined(REALLY_CLANG)
namespace test_exception_spec_type_system
{
// TODO: test it with clang++ from git
struct Good {};
struct Bad {};
void g1() noexcept;
void g2();
template<typename T>
Bad
f(T*, T*);
template<typename T1, typename T2>
Good
f(T1*, T2*);
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
}
#endif // !defined(REALLY_CLANG)
namespace test_inline_variables
{
template<class T> void f(T)
{}
template<class T> inline T g(T)
{
return T{};
}
template<> inline void f<>(int)
{}
template<> int g<>(int)
{
return 5;
}
}
} // namespace cxx17
#endif // __cplusplus <= 201402L
]])
-67
View File
@@ -1,67 +0,0 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ax_cxx_gcc_abi_demangle.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CXX_GCC_ABI_DEMANGLE
#
# DESCRIPTION
#
# If the compiler supports GCC C++ ABI name demangling (has header
# cxxabi.h and abi::__cxa_demangle() function), define
# HAVE_GCC_ABI_DEMANGLE
#
# Adapted from AC_CXX_RTTI by Luc Maisonobe
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
#
# Copyright (c) 2008 Neil Ferguson <nferguso@eso.org>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
AC_DEFUN([AX_CXX_GCC_ABI_DEMANGLE],
[AC_CACHE_CHECK(whether the compiler supports GCC C++ ABI name demangling,
ac_cv_cxx_gcc_abi_demangle,
[AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <typeinfo>
#include <cxxabi.h>
#include <string>
#include <stdlib.h> /* not cstdlib */
template<typename TYPE>
class A {};
]], [[
A<int> instance;
int status = 0;
char* c_name = 0;
c_name = abi::__cxa_demangle(typeid(instance).name(), 0, 0, &status);
std::string name(c_name);
free(c_name); /* not std::free() */
return name == "A<int>";
]])],
[ac_cv_cxx_gcc_abi_demangle=yes], [ac_cv_cxx_gcc_abi_demangle=no])
AC_LANG_POP([])
])
if test "$ac_cv_cxx_gcc_abi_demangle" = yes; then
AC_DEFINE(HAVE_GCC_ABI_DEMANGLE, 1,
[defined to 1 if the compiler supports GCC C++ ABI name demangling, 0 otherwise])
else
AC_DEFINE(HAVE_GCC_ABI_DEMANGLE, 0,
[defined to 1 if the compiler supports GCC C++ ABI name demangling, 0 otherwise])
fi
])
-27
View File
@@ -1,27 +0,0 @@
#! /bin/sh
#echo "Adding libtools..."
#libtoolize --automake --copy
# echo "Running aclocal (builds aclocal.m4)..."
# aclocal -I ./autoconf_m4
# echo "Running autoheader (generates config.h.in)..."
# autoheader
# echo "Running automake..."
# automake --add-missing --copy --foreign
# echo "Running autoconf..."
# autoconf
autoreconf --verbose --install -W all --force
rm -f config.cache
echo
echo 'run "./configure ; make ; make install"'
echo
-57
View File
@@ -1,57 +0,0 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
INSTALL = @INSTALL@
host_triplet = @host@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
PACKAGE = @PACKAGE@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__quote = @am__quote@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
install_sh = @install_sh@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
target_alias = @target_alias@
+145 -68
View File
@@ -1,83 +1,160 @@
#!/bin/bash
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2012 - 2021 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
# Configure a build directory according to developer flags
# Configure a build directory for development
type="$1";
configure_script="$2";
if [ "$type" == "" ]; then
echo "Usage: $0 <type> [<configure_script>]"
echo "where <type> is one of:"
echo "none debug optimized gcc-debug clang-debug icc-debug sun win32-cross win32-cross-debug \
win64-cross win64-cross-debug win32-msys win32-msys-debug win64-msys win64-msys-debug";
echo "<configure_script> is ../configure by default"
function print_usage() {
echo -e "Usage:"
echo -e " ${0} [-t <toolchain_name>] [-c <compiler>] [-b <build_type>]"
echo -e " [-s <source_dir>] [-g <generator>] [-o <cmake_options>]"
echo -e "\nDetails:"
echo -e "-t <toolchain_name> - toolchain_name can be e.g. \"win32-mingw64\"."
echo -e " A toolchain file \"toolchains/<toolchain_name>.cmake\" will be used."
echo -e "-c <compiler> - compiler is one of:"
echo -e " gcc, gcc-<version>, clang, intel."
echo -e " The gcc version is the suffix of gcc and g++ executables, e.g. \"4.8\" in"
echo -e " \"gcc-4.8\"."
echo -e " If unspecified, CC and CXX environment variables are used."
echo -e "-b <build_type> - build_type is one of:"
echo -e " Debug, Release, RelWithDebInfo, MinSizeRel, none. The default is Debug."
echo -e "-s <source_dir> - source_dir is \"..\" by default."
echo -e "-g <cmake_generator> - cmake uses \"Unix Makefiles\" by default."
echo -e "-o <cmake_options> - options to pass directly to cmake."
}
compiler=""
build_type="";
source_dir=".."
toolchain_name=""
generator=""
cmake_options=""
while getopts "t:c:b:s:g:o:h:" opt; do
case $opt in
t)
echo "Requested toolchain: $OPTARG"
toolchain_name="$OPTARG";
;;
c)
echo "Requested compiler: $OPTARG"
compiler="$OPTARG";
;;
b)
echo "Requested build type: $OPTARG"
build_type="$OPTARG";
;;
s)
echo "Requested source directory type: $OPTARG"
source_dir="$OPTARG";
;;
g)
echo "Requested generator: $OPTARG"
generator="$OPTARG";
;;
o)
echo "Requested cmake options: $OPTARG"
cmake_options="$OPTARG";
;;
h)
print_usage;
exit 1;
;;
\?)
echo "Invalid option: $opt";
print_usage;
exit 1;
;;
esac
done
if [ "$compiler" != "" ] && [ "$toolchain_name" != "" ]; then
echo "Error: Conflicting options -c and -t specified."
exit 1;
fi
if [ "$configure_script" == "" ]; then
configure_script="../configure";
cmake_flags="-Wdev";
if [ "$build_type" = "none" ]; then
build_type="";
fi
if [ "$build_type" != "" ]; then
cmake_flags="$cmake_flags -DCMAKE_BUILD_TYPE=$build_type";
fi
if [ "$generator" != "" ]; then
cmake_flags="$cmake_flags -G${generator}";
fi
flags="";
case $type in
none)
flags="--enable-tests" ;;
debug)
flags="--enable-debug-options --enable-tests" ;;
optimized)
flags="--enable-optimize-options --enable-tests" ;;
gcc-debug)
flags="CC=gcc CXX=g++ --enable-common-options=gnu --enable-debug-options --enable-tests" ;;
clang-debug)
flags="CC=clang CXX=clang++ --enable-common-options=clang --enable-debug-options --enable-tests" ;;
icc-debug)
flags="CC=icc64 CXX=icpc64 --enable-common-options=intel --enable-debug-options --enable-tests" ;;
sun)
flags="CC=suncc CXX=sunCC --enable-common-options=sun CFLAGS=\"-errwarn=%all -I/opt/sun/target64/include\" \
CXXFLAGS=\"-I/opt/sun/target64/include\" PATH=\"/opt/sun/sunstudio/bin:$PATH\" \
LDFLAGS=\"-R/opt/sun/target64/lib64 -L/opt/sun/target64/lib64\" \
PKG_CONFIG_PATH=\"/opt/sun/target64/lib64/pkgconfig:/usr/lib64/pkgconfig\" \
PKG_CONFIG_LIBDIR=\"\" --enable-tests" ;;
win32-cross)
flags="PATH=\"/usr/i686-w64-mingw32/bin:/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH\" \
--with-nsis=/usr/bin/makensis --with-windows-sysroot=/usr/i686-w64-mingw32/sys-root/mingw \
--enable-optimize-options --enable-tests --host=i686-w64-mingw32" ;;
win32-cross-debug)
flags="PATH=\"/usr/i686-w64-mingw32/bin:/usr/i686-w64-mingw32/sys-root/mingw/bin:$PATH\" \
--enable-debug-options --enable-tests --host=i686-w64-mingw32" ;;
win64-cross)
flags="PATH=\"/usr/x86_64-w64-mingw32/bin:/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH\" \
--with-nsis=/usr/bin/makensis --with-windows-sysroot=/usr/x86_64-w64-mingw32/sys-root/mingw \
--enable-optimize-options --enable-tests --host=x86_64-w64-mingw32" ;;
win64-cross-debug)
flags="PATH=\"/usr/x86_64-w64-mingw32/bin:/usr/x86_64-w64-mingw32/sys-root/mingw/bin:$PATH\" \
--enable-debug-options --enable-tests --host=x86_64-w64-mingw32" ;;
win32-msys)
flags="PATH=\"/mingw32/i686-w64-mingw32:/mingw32/bin:$PATH\" \
--with-nsis=/mingw32/bin/makensis.exe --with-windows-sysroot=/mingw32 \
--enable-optimize-options --enable-tests --host=i686-w64-mingw32" ;;
win32-msys-debug)
flags="PATH=\"/mingw32/i686-w64-mingw32:/mingw32/bin:$PATH\" \
--enable-debug-options --enable-tests --host=i686-w64-mingw32" ;;
win64-msys)
flags="PATH=\"/mingw64/x86_64-w64-mingw32:/mingw64/bin:$PATH\" \
--with-nsis=/mingw64/bin/makensis.exe --with-windows-sysroot=/mingw64 \
--enable-optimize-options --enable-tests --host=x86_64-w64-mingw32" ;;
win64-msys-debug)
flags="PATH=\"/mingw64/x86_64-w64-mingw32:/mingw64/bin:$PATH\" \
--enable-debug-options --enable-tests --host=x86_64-w64-mingw32" ;;
esac
status=1
echo "Running:"
echo $configure_script $flags;
# Toolchain mode
if [ "$toolchain_name" != "" ]; then
cmake_flags="$cmake_flags -DCMAKE_TOOLCHAIN_FILE='${source_dir}/data/cmake/toolchains/${toolchain_name}.cmake'"
$configure_script $flags
echo "Running:"
echo "cmake $cmake_flags $source_dir";
cmake $cmake_flags $cmake_options $source_dir
status=$?
else # Compiler mode
c_compiler="";
cxx_compiler="";
# Detect gcc suffix like "-4.7"
if [ "${compiler:0:4}" = "gcc-" ]; then
suffix=${compiler:4};
c_compiler="gcc-${suffix}";
cxx_compiler="g++-${suffix}";
compiler="gcc";
fi
case $compiler in
gcc)
if [ "$c_compiler" = "" ]; then
c_compiler="gcc${machine_bits_switch}";
cxx_compiler="g++${machine_bits_switch}";
fi
;;
intel)
if [ $machine_bits_precise = "64" ]; then
c_compiler="icc64";
cxx_compiler="icpc64";
else
c_compiler="icc32";
cxx_compiler="icpc32";
fi
;;
clang)
c_compiler="clang${machine_bits_switch}";
cxx_compiler="clang++${machine_bits_switch}";
;;
"")
c_compiler="$CC"
cxx_compiler="$CXX"
;;
*)
echo "Unsupported compiler given; use CC and CXX instead."
exit 1;
;;
esac
echo "Running:"
echo "CC=\"$c_compiler\" CXX=\"$cxx_compiler\" cmake $cmake_flags $source_dir";
CC="$c_compiler" CXX="$cxx_compiler" cmake $cmake_flags $cmake_options $source_dir
status=$?
fi
exit $?
exit $status
-498
View File
@@ -1,498 +0,0 @@
AC_INIT([GSmartControl],[1.1.3],[],[gsmartcontrol])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-bzip2 -Wall])
# Clear *FLAGS, LIBS, LDFLAGS if requested through configure option.
APP_AUTO_CLEAR_FLAGS()
# C compiler, C preprocessor
AC_PROG_CC
#AM_PROG_CC_STDC
#AC_PROG_CPP
# C++ compiler
AC_PROG_CXX
#AC_PROG_CXXCPP
#AM_PROG_LIBTOOL
AM_PROG_AR
# C++ support in checks
#AC_LANG([C])
AC_LANG([C++])
# Needed for generating static libs
AC_CHECK_TOOL(RANLIB, ranlib)
# Win32 resource file compilation
AC_CHECK_TOOL(WINDRES, windres)
# Win32 external dll stripping (already detected by autoconf)
# AC_CHECK_TOOL(STRIP, strip)
# Defines LN_S, needed for man page installation.
AC_PROG_LN_S
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# ------------- Detect compiler, OS, environment. Enable system features.
# detect compiler vendor (sets $ax_cv_cxx_compiler_vendor)
AX_COMPILER_VENDOR
# Detect target OS kernel and userspace and export to config.h
# (also define automake conditionals).
APP_DETECT_OS_KERNEL([target], [CONFIG_KERNEL_])
APP_DETECT_OS_ENV([target], [CONFIG_OS_ENV_])
APP_DETECT_OS_KERNEL([build], [CONFIG_HOST_KERNEL_])
# Detect common (warning, debug, optimize) compiler flags and
# export them to C(XX)FLAGS, LDFLAGS.
# We don't use prefix because this way the flags will be used for tests,
# which is important for some compatibility flags (e.g. __func__ visibility, etc...).
APP_COMPILER_OPTIONS([])
# Enable C++11 support. This is implied by gtkmm3, but CentOS7 fails to add it
# to gtkmm flags, so we have to enable it manually. Make it optional for Debian 7 (gcc 4.7).
AX_CXX_COMPILE_STDCXX([11], [], [optional])
# Thread support for known configurations.
# Sun compiler (at least on linux) has some runtime issues with stringstream
# unless we use the thread flags. Also, Linux-based gdb fails to debug
# a gcc-compiled binary for some reason.
# Do this for all systems except mingw.
if test "$app_cv_target_os_env" != "mingw32" && test "$app_cv_target_os_env" != "mingw64"; then
APP_GET_MT_FLAGS([])
fi
# Enable _GNU_SOURCE, etc...
APP_USE_SYSTEM_EXTENSIONS([])
# Arrange large file support (define _FILE_OFFSET_BITS 64, etc...)
AC_SYS_LARGEFILE
# ------------- Correct incomplete standard libraries
# define int8_t and friends if the standard doesn't have them
AC_TYPE_INT8_T
AC_TYPE_UINT8_T
AC_TYPE_INT16_T
AC_TYPE_UINT16_T
AC_TYPE_INT32_T
AC_TYPE_UINT32_T
AC_TYPE_INT64_T
AC_TYPE_UINT64_T
AC_TYPE_INTMAX_T
AC_TYPE_UINTMAX_T
AC_TYPE_LONG_LONG_INT
AC_TYPE_UNSIGNED_LONG_LONG_INT
# ------------- Language / Standard Library checks
# detect RTTI (defines HAVE_RTTI)
AC_CXX_RTTI
# detect exception support (defines HAVE_EXCEPTIONS)
AC_CXX_EXCEPTIONS
# detect abi::__cxa_demangle (defines HAVE_GCC_ABI_DEMANGLE)
AX_CXX_GCC_ABI_DEMANGLE
# detect __gnu_cxx::__verbose_terminate_handler (defines HAVE_VERBOSE_TERMINATE_HANDLER.)
AC_CXX_VERBOSE_TERMINATE_HANDLER
# detect __func__ support (defines HAVE_CXX___func__)
APP_CXX___func__
# detect __FUNCTION__ support (defines HAVE_CXX___FUNCTION__)
APP_CXX___FUNCTION__
# detect if the compiler accepts extern "C" function pointer overloads
# (defines HAVE_CXX_EXTERN_C_OVERLOAD)
APP_CXX_EXTERN_C_OVERLOAD
# This may be needed for pch support
AC_CHECK_HEADERS([stdc++.h])
# Non-C99 systems don't have strtof and strtold. some have strtodf for strtof,
# but let's ignore it. Note: They may be supported by system libc,
# but not enabled by default (e.g. by glibc feature macros). In that case,
# defining them still leads to undefined symbols at link time, so we don't do it.
# Header check is the best way to determine availability.
# This defines HAVE_DECL_<symbol> to 1 or 0.
AC_CHECK_DECLS([strtof, strtold], [], [], [[#include <stdlib.h>]])
# link check only:
# AC_CHECK_FUNCS([strtof strtold])
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Non-standard feature checks
# getrawpartition() for netbsd and openbsd in -lutil.
AC_CHECK_LIB(util, getrawpartition, [ LIBS="$LIBS -lutil" ])
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# enable / disable compilation of tests
AC_ARG_ENABLE([tests], AS_HELP_STRING([--enable-tests],
[enable compilation of test programs (default: no)]), [with_tests=${enableval}], [with_tests=no])
# export to automake.am-s
AM_CONDITIONAL([ENABLE_TESTS], [test "$with_tests" = "yes"])
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
AC_ARG_ENABLE(abort-if-no-gtkmm, AS_HELP_STRING([--disable-abort-if-no-gtkmm],
[disable abort if no gtkmm is found (default: configure aborts when gtkmm is not found)]),
[app_cv_abort_if_no_gtkmm=${enableval}], [app_cv_abort_if_no_gtkmm=yes])
AC_MSG_NOTICE([Abort if no gtkmm is found: $app_cv_abort_if_no_gtkmm])
pkg_modules="gtkmm-3.0 >= 3.4.0"
# define ENABLE_GLIB and friends if it's found.
gtkmm_found="no"
PKG_CHECK_MODULES([GTKMM], [$pkg_modules],
[gtkmm_found="yes"], [gtkmm_found="no"])
if test "x$gtkmm_found" = "xyes"; then
AC_DEFINE([ENABLE_GLIB], [1], [Defined to 1 if GLib is installed, 0 otherwise])
AC_DEFINE([ENABLE_GLIBMM], [1], [Defined to 1 if glibmm is installed, 0 otherwise])
else
AC_DEFINE([ENABLE_GLIB], [0], [Defined to 1 if GLib is installed, 0 otherwise])
AC_DEFINE([ENABLE_GLIBMM], [0], [Defined to 1 if glibmm is installed, 0 otherwise])
fi
if test "x$gtkmm_found" = "xno"; then
if test "x$app_cv_abort_if_no_gtkmm" = "xno"; then
AC_MSG_WARN([$GTKMM_PKG_ERRORS])
AC_MSG_WARN([The program will be unable to compile fully.])
else
AC_MSG_ERROR([$GTKMM_PKG_ERRORS])
fi
fi
#CFLAGS="$GTKMM_CFLAGS $CFLAGS"
CXXFLAGS="$GTKMM_CFLAGS $CXXFLAGS"
LIBS="$GTKMM_LIBS $LIBS"
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
PCRECPP_CFLAGS="";
PCRECPP_LIBS="";
# try pkg-config first
PKG_CHECK_MODULES(PCRECPP, [libpcrecpp], [pcrecpp_found=yes], [pcrecpp_found=no])
# if not found, try pcre-config (solaris had it but not pkg-config).
if test "x$pcrecpp_found" = "xno"; then
AC_PATH_PROG(pcre_config_binary, [pcre-config])
if test "x$pcre_config_binary" != "x"; then
PCRE_CFLAGS="`pcre-config --cflags`"
PCRE_LIBS="`pcre-config --libs-cpp`"
else
# AC_MSG_ERROR([Could not find pcrecpp through pkg-config and pcre-config. Make sure the pcre and pcrecpp libraries are installed])
AC_MSG_ERROR([$PCRECPP_PKG_ERRORS])
fi
fi
CFLAGS="$CFLAGS $PCRECPP_CFLAGS"
CXXFLAGS="$CXXFLAGS $PCRECPP_CFLAGS"
LIBS="$LIBS $PCRECPP_LIBS"
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Win32 distribution support (NSIS, zip)
AC_ARG_WITH([nsis], [AS_HELP_STRING([--with-nsis=<location>|auto],
[specify makensis.exe location to support making NSIS packages]
[ (default: "C:\Program Files\NSIS\makensis.exe" for windows, ]
["~/.wine/drive_c/Program Files/NSIS/Unicode/makensis.exe" for others)])],
[with_nsis=${withval}], [with_nsis=auto])
AC_ARG_ENABLE([nsis-wine], [AS_HELP_STRING([--enable-nsis-wine=yes|no],
[use wine to run makensis.exe when making NSIS packages (default: no)])],
[with_nsis_wine=${enableval}], [with_nsis_wine=no])
AC_ARG_WITH([windows-sysroot], [AS_HELP_STRING([--with-windows-sysroot],
[specify location of Windows system root directory when making Windows packages (default: /mingw32)])],
[with_windows_sysroot=${withval}], [with_windows_sysroot=auto])
if test "x$with_nsis" = "xauto" || test "x$with_nsis" = "x"; then
# if building on windows, use native paths
if test "x$app_cv_build_os_kernel" = "xwindows32" || test "x$app_cv_build_os_kernel" = "xwindows64"; then
with_nsis="\"C:\\Program Files\\NSIS\\makensis.exe\"";
else
with_nsis="~/\".wine/drive_c/Program Files/NSIS/Unicode/makensis.exe\"";
fi
fi
NSIS_EXEC="$with_nsis";
if test "x$with_nsis_wine" = "xyes"; then
NSIS_EXEC="wine $with_nsis";
fi
if test "x$with_windows_sysroot" = "xauto" || test "x$with_windows_sysroot" = "x"; then
with_windows_sysroot="/mingw32"
fi
WINDOWS_SYSROOT="$with_windows_sysroot";
WINDOWS_SUFFIX="";
if test "x$app_cv_target_os_kernel" = "xwindows32"; then
WINDOWS_SUFFIX="win32"
elif test "x$app_cv_target_os_kernel" = "xwindows64"; then
WINDOWS_SUFFIX="win64"
fi
AC_SUBST(NSIS_EXEC)
AC_SUBST(WINDOWS_SYSROOT)
AC_SUBST(WINDOWS_SUFFIX)
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Win32 security manifest support
WINDOWS_ARCH=""
if test "x$app_cv_target_os_kernel" = "xwindows32"; then
WINDOWS_ARCH="x86"
elif test "x$app_cv_target_os_kernel" = "xwindows64"; then
WINDOWS_ARCH="amd64"
fi
AC_SUBST(WINDOWS_ARCH)
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
RES_FILES="src/res/gsc_about_dialog.ui \
src/res/gsc_add_device_window.ui \
src/res/gsc_executor_log_window.ui \
src/res/gsc_info_window.ui \
src/res/gsc_main_window.ui \
src/res/gsc_preferences_window.ui \
src/res/gsc_text_window.ui \
AUTHORS.txt LICENSE_gsmartcontrol.txt"
# Unfortunately, _SOURCES can't contain substitutions, so we use LIBADD.
RES_LIBADD="" # .o file to put into .a, libres_a_LIBADD, libres_a_DEPENDENCIES.
RES_DIST="" # only files in "res" directory, EXTRA_DIST
RES_TARGETS="" # entry for each file in makefile
for RES_FILE in $RES_FILES;
do # on separate line for portability
RES_BASE=`echo "$RES_FILE" | sed 's/.*\///'` # "a/b/c" -> "c", "c" -> "c"
RES_DIR=`AS_DIRNAME(["$RES_FILE"])` # "a/b/c" -> "a/b"
RES_BASE_NOEXT=`expr "$RES_BASE" : '\(.*\)\..*'` # "a.b.c" -> "a.b"
RES_BASE_EXT=`expr "$RES_BASE" : '.*\.\(.*\)'` # "a.b.c" -> "c"
# Add to EXTRA_DIST only if it's in the same directory. Other files should
# be added in their own directories.
RES_FILE_CANON="\$(top_srcdir)/$RES_FILE"
if test "$RES_DIR" = "src/res"; then
RES_DIST="$RES_DIST $RES_BASE"
RES_FILE_CANON="\$(srcdir)/$RES_BASE" # shorter path, better make behaviour
fi
if test "$RES_BASE_EXT" = "ui"; then
RES_LIBADD="$RES_LIBADD $RES_BASE_NOEXT.ui.$ac_objext" # file.ui.o
RES_TARGETS="$RES_TARGETS
$RES_BASE_NOEXT.ui.cpp: $RES_FILE_CANON
\"\$(top_srcdir)/file2csource.sh\" \"$RES_FILE_CANON\" \"$RES_BASE_NOEXT.ui.cpp\" \"$RES_BASE_NOEXT\"_ui
"
else # txt, etc...
SRC_FILE="$RES_BASE.cpp"
RES_LIBADD="$RES_LIBADD $RES_BASE.$ac_objext" # file.txt.o
RES_TARGETS="$RES_TARGETS
$SRC_FILE: $RES_FILE_CANON
\"\$(top_srcdir)/file2csource.sh\" \"$RES_FILE_CANON\" \"$SRC_FILE\" \"$RES_BASE_NOEXT\"_$RES_BASE_EXT
"
fi
done
# export to makefile.am
AC_SUBST(RES_LIBADD)
AC_SUBST(RES_DIST)
AC_SUBST(RES_TARGETS)
# Don't put this one into Makefile.in by default - it's multiline and causes havoc.
_AM_SUBST_NOTMAKE([RES_TARGETS])
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# Export some configure variables as defines for the source code.
# Note: Autoconf manual says that AC_DEFINE won't work here.
ADDITIONAL_FLAGS="-DPACKAGE_PKGDATA_DIR=\"\\\"\$(pkgdatadir)\\\"\" \
-DPACKAGE_SYSCONF_DIR=\"\\\"\$(sysconfdir)\\\"\" \
-DTOP_SRC_DIR=\"\\\"\$(top_srcdir)\\\"\" \
-DHZ_USE_GLOBAL_MACROS=1"
#CFLAGS="$CFLAGS $ADDITIONAL_FLAGS"
CXXFLAGS="$CXXFLAGS $ADDITIONAL_FLAGS"
# Top src dir should always be in include path, before other includes.
# Add global configuration file. Note: It must be searched in top_builddir
# first (that's why -I is the first flag), for precompiled headers to work.
ADDITIONAL_INCLUDES="-I\$(top_builddir) -I\$(top_srcdir)/src"
# -include works with gcc, intel, pathscale and sunstudio since 12u1, but doesn't work
# with pgi and older sunstudio (the one in solaris10, for example).
# Note: some gcc-frontend-based compilers may have to be added here
# (e.g. gccfss (gcc frontend / sun backend), etc...).
# We use -include only when using pch.
# if test "x$app_cv_compiler_gcc_pch" = "xyes"; then
# if test "$ax_cv_cxx_compiler_vendor" = "gnu" || test "$ax_cv_cxx_compiler_vendor" = "clang" \
# || test "$ax_cv_cxx_compiler_vendor" = "intel" || test "$ax_cv_cxx_compiler_vendor" = "pathscale"; then
# # This auto-includes this file when compiling any file. Benefits include pch support.
# ADDITIONAL_INCLUDES="$ADDITIONAL_INCLUDES -include global_macros.h"
# fi
# fi
# our flags must be before all the others
#CFLAGS="$ADDITIONAL_INCLUDES $CFLAGS"
CXXFLAGS="$ADDITIONAL_INCLUDES $CXXFLAGS"
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# final setup
# This macro should be defined by ./configure automatically.
# However, sometimes it's not (e.g. win32, why?), so we define it manually.
CXXFLAGS="$CXXFLAGS -DHAVE_CONFIG_H"
#CFLAGS="$CFLAGS $USER_INCLUDES"
#CXXFLAGS="$CXXFLAGS $USER_INCLUDES"
#LIBS="$LIBS $USER_LDFLAGS"
# make them available in Makefile.am
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(LIBS)
AC_SUBST(LDFLAGS)
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
# all_includes="$all_includes $ALL_CXXFLAGS"
# all_libraries="$all_libraries $ALL_LIBS"
#all_includes="$all_includes $USER_INCLUDES"
#all_libraries="$all_libraries $LIBS"
# substitude them in makefile.am-s
#AC_SUBST(all_includes)
#AC_SUBST(all_libraries)
# print them out for debug purposes
AC_MSG_NOTICE([
CXX:
$CXX
CXXFLAGS:
$CXXFLAGS
LDFLAGS:
$LDFLAGS
LIBS:
$LIBS
])
# substitude autotools' predefined dir names in makefile.am-s
AC_SUBST(AUTODIRS)
# -------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------
AC_CONFIG_FILES([ data/gsmartcontrol.desktop data/gsmartcontrol.appdata.xml \
data/nsis/distribution.txt data/nsis/gsmartcontrol.nsi \
debian.dist/changelog \
src/gsc_winres.rc src/gsmartcontrol.exe.manifest \
gsmartcontrol.spec version compilation_flags ])
AC_CONFIG_FILES([data/gsmartcontrol-root], [chmod +x data/gsmartcontrol-root])
# these are all the makefiles to generate
AC_CONFIG_FILES([Makefile src/Makefile src/applib/Makefile src/res/Makefile src/hz/Makefile \
src/libdebug/Makefile src/rconfig/Makefile src/rmn/Makefile \
data/Makefile data/16/Makefile data/22/Makefile data/24/Makefile data/32/Makefile \
data/48/Makefile data/64/Makefile data/128/Makefile data/256/Makefile data/nsis/Makefile \
debian.dist/Makefile])
AC_OUTPUT
+10
View File
@@ -0,0 +1,10 @@
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2021 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
if (NOT WIN32)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/contrib" TYPE DOC
PATTERN "CMakeLists.txt" EXCLUDE)
endif()
@@ -1,10 +1,10 @@
#!/bin/bash
############################################################################
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2008 - 2010 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
# (C) 2008 - 2010 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_unlicense.txt file
############################################################################
# (C) 2008 - 2024 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
# (C) 2008 - 2024 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
device="$1";
@@ -13,10 +13,10 @@ if [ "$device" = "" ]; then
exit 1;
fi
dev_base="`basename \"$device\"`"
dev_base=$(basename "$device")
out_file=/var/run/smart-"$dev_base"
# Change the path to smartctl if necessary.
smartctl -a "$device" 2>&1 > "$out_file"
smartctl -x --json=o "$device" > "$out_file" 2>&1
chmod 644 "$out_file"
@@ -1,2 +1,9 @@
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2008 - 2021 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
# (C) 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
*/10 * * * * root /usr/local/bin/cron-smart.sh /dev/sda
*/10 * * * * root /usr/local/bin/cron-smart.sh /dev/sdb
+6 -6
View File
@@ -1,10 +1,10 @@
#!/bin/bash
############################################################################
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2008 - 2010 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
# (C) 2008 - 2010 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_unlicense.txt file
############################################################################
# (C) 2008 - 2022 Alex Butcher <alex dot butcher 'at' assursys.co.uk>
# (C) 2008 - 2022 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
if [ "$1" = "-V" ]; then
smartctl -V 2>&1
@@ -21,7 +21,7 @@ if [ "$device" = "" ]; then
exit 1;
fi
dev_base="`basename \"$device\"`"
dev_base=$(basename "$device")
out_file=/var/run/smart-"$dev_base"
cat "$out_file"
-4
View File
@@ -1,4 +0,0 @@
appicondir = $(datadir)/icons/hicolor/128x128/apps
appicon_DATA = gsmartcontrol.png
EXTRA_DIST = $(appicon_DATA)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

-4
View File
@@ -1,4 +0,0 @@
appicondir = $(datadir)/icons/hicolor/16x16/apps
appicon_DATA = gsmartcontrol.png
EXTRA_DIST = $(appicon_DATA)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 632 B

-4
View File
@@ -1,4 +0,0 @@
appicondir = $(datadir)/icons/hicolor/22x22/apps
appicon_DATA = gsmartcontrol.png
EXTRA_DIST = $(appicon_DATA)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

-4
View File
@@ -1,4 +0,0 @@
appicondir = $(datadir)/icons/hicolor/24x24/apps
appicon_DATA = gsmartcontrol.png
EXTRA_DIST = $(appicon_DATA)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

-4
View File
@@ -1,4 +0,0 @@
appicondir = $(datadir)/icons/hicolor/256x256/apps
appicon_DATA = gsmartcontrol.png
EXTRA_DIST = $(appicon_DATA)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 24 KiB

-4
View File
@@ -1,4 +0,0 @@
appicondir = $(datadir)/icons/hicolor/32x32/apps
appicon_DATA = gsmartcontrol.png
EXTRA_DIST = $(appicon_DATA)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

-4
View File
@@ -1,4 +0,0 @@
appicondir = $(datadir)/icons/hicolor/48x48/apps
appicon_DATA = gsmartcontrol.png
EXTRA_DIST = $(appicon_DATA)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

-4
View File
@@ -1,4 +0,0 @@
appicondir = $(datadir)/icons/hicolor/64x64/apps
appicon_DATA = gsmartcontrol.png
EXTRA_DIST = $(appicon_DATA)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

+63
View File
@@ -0,0 +1,63 @@
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2021 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
# Generate files
configure_file("gsmartcontrol.appdata.in.xml" "gsmartcontrol.appdata.xml" ESCAPE_QUOTES @ONLY)
configure_file("gsmartcontrol.in.desktop" "gsmartcontrol.desktop" ESCAPE_QUOTES @ONLY)
configure_file("gsmartcontrol-root.in.sh" "gsmartcontrol-root.sh" ESCAPE_QUOTES @ONLY)
configure_file("org.gsmartcontrol.in.policy" "org.gsmartcontrol.policy" ESCAPE_QUOTES @ONLY)
# Install app icons
if (NOT WIN32)
foreach(dir 16 22 24 32 48 64 128 256)
install(FILES "${dir}/gsmartcontrol.png"
DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/${dir}x${dir}/apps/")
endforeach()
# Don't run update-icon-cache, cpack is mostly for packaging.
# install(CODE "execute_process (COMMAND gtk-update-icon-cache-3.0 -t -f \"@CMAKE_INSTALL_DATADIR@/icons/hicolor\")")
endif()
if (WIN32)
# .ico file
install(FILES gsmartcontrol.ico DESTINATION .)
endif()
set (DATA_ICONS
icons/drive-optical.png
icons/drive-harddisk.png
icons/drive-removable-media-usb.png
)
# Install internal icons
if (WIN32)
install(FILES ${DATA_ICONS} DESTINATION icons)
else()
install(FILES ${DATA_ICONS}
DESTINATION "${CMAKE_INSTALL_DATADIR}/gsmartcontrol/icons")
endif()
# Desktop file
if (NOT WIN32)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.desktop"
DESTINATION "${CMAKE_INSTALL_DATADIR}/applications/")
# Appdata file
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol.appdata.xml"
DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo/")
# PolKit file
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/org.gsmartcontrol.policy"
DESTINATION "${CMAKE_INSTALL_DATADIR}/polkit-1/actions/")
# Man pages
install(FILES "man1/gsmartcontrol.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")
install(FILES "man1/gsmartcontrol.1" DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" RENAME "gsmartcontrol-root.1")
# Scripts (this goes to bin, not sbin, as it doesn't require root privileges before running)
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/gsmartcontrol-root.sh" TYPE BIN RENAME "gsmartcontrol-root")
endif()
-65
View File
@@ -1,65 +0,0 @@
SUBDIRS = 16 22 24 32 48 64 128 256 nsis
dist_man_MANS = gsmartcontrol.1
install-extra-mans:
cd $(DESTDIR)$(mandir)/man1 && $(LN_S) -f gsmartcontrol.1 gsmartcontrol-root.1
uninstall-extra-mans:
cd $(DESTDIR)$(mandir)/man1 && rm -f gsmartcontrol-root.1
# This command is needed if installing with make install (the cache
# file is ignored for rpms).
gtk_update_icon_cache = gtk-update-icon-cache-3.0 -f -t $(datadir)/icons/hicolor
install-data-hook: install-extra-mans update-icon-cache
uninstall-hook: uninstall-extra-mans update-icon-cache
update-icon-cache:
@-if test -z "$(DESTDIR)"; then \
echo "Updating GTK icon cache."; \
$(gtk_update_icon_cache); \
else \
echo "*** Icon cache not updated. After (un)install, run this:"; \
echo "*** $(gtk_update_icon_cache)"; \
fi
# Application data, installs to /usr/share/appname
appdatadir = $(pkgdatadir)
appdata_DATA = icon_cddvd.png icon_hdd.png
# pkgdatadir = $(datadir)/gsmartcontrol
# pkgdata_DATA =
# Desktop files
desktopdir = $(datadir)/applications
desktop_DATA = gsmartcontrol.desktop
# Appdata files
metainfodir = $(datadir)/metainfo
metainfo_DATA = gsmartcontrol.appdata.xml
# PolKit files
polkitdir = $(datadir)/polkit-1/actions
polkit_DATA = org.gsmartcontrol.policy
# Application pixmap (fallback icon for desktop files).
# Same as 48/gsmartcontrol.png.
# Also, xpm for debian menu, 32x32.
pixmapsdir = $(datadir)/pixmaps
pixmaps_DATA = 48/gsmartcontrol.png gsmartcontrol.xpm
# Put everything inside the distribution
EXTRA_DIST = $(appdata_DATA) $(polkit_DATA) gsmartcontrol.ico gsmartcontrol.xpm
bin_SCRIPTS = gsmartcontrol-root
CLEANFILES = $(bin_SCRIPTS)
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
png_name="gsmartcontrol.png"
# needs imagemagick
convert 16/$png_name 22/$png_name 24/$png_name 32/$png_name \
48/$png_name 64/$png_name 128/$png_name 256/$png_name gsmartcontrol.ico
@@ -1,8 +1,8 @@
/**************************************************************************
Copyright:
(C) 2012 Alexander Shaduri <ashaduri 'at' gmail.com>
License: See LICENSE_gsmartcontrol.txt
***************************************************************************/
/******************************************************************************
License: GNU General Public License v3.0 only
Copyright:
(C) 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com>
******************************************************************************/
// This file is for generating documentation only. Do NOT include it.
/// \file
@@ -20,15 +20,13 @@ This is GSmartControl internal documentation.
/**
\addtogroup applib Application-Specific Components
\addtogroup applib_tests Tests of Application-Specific Components
\addtogroup applib_examples Examples of Application-Specific Components
\addtogroup hz HZ Common System Components
\addtogroup hz_tests Tests for HZ Common System Components
\addtogroup hz_examples Examples for HZ Common System Components
\addtogroup libdebug LibDebug Flexible Debug Logging
\addtogroup libdebug_tests Tests for LibDebug Flexible Debug Logging
\addtogroup rmn Resource Manager
\addtogroup rmn_tests Tests for Resource Manager
\addtogroup libdebug_examples Examples for LibDebug Flexible Debug Logging
\addtogroup rconfig Resource Manager-Based Configuration
\addtogroup rconfig_tests Tests for Resource Manager-Based Configuration
\addtogroup rconfig_examples Examples for Resource Manager-Based Configuration
\addtogroup gsc GSmartControl Application
*/
@@ -1,15 +1,15 @@
#!/usr/bin/env bash
############################################################################
#!/bin/bash
###############################################################################
# License: Zlib
# Copyright:
# (C) 2008 - 2014 Alexander Shaduri <ashaduri 'at' gmail.com>
# License: See LICENSE_zlib.txt file
############################################################################
# (C) 2008 - 2022 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
# Run gsmartcontrol with root, asking for root password first.
# export GSMARTCONTROL_SU to override a su command (e.g. "kdesu -c").
EXEC_BIN="@prefix@/sbin/gsmartcontrol";
prog_name="gsmartcontrol"
EXEC_BIN="@CMAKE_INSTALL_FULL_SBINDIR@/gsmartcontrol";
program_name="gsmartcontrol"
# Preserve quotes in arguments
@@ -30,7 +30,7 @@ else
# New syntax:
# gsmartcontrol-root [--desktop=<auto|kde|gnome|other>] [program_options]
for arg in $*; do
for arg in "$@"; do
case $arg in
--desktop=*)
DESKTOP="${arg#*=}";
@@ -45,7 +45,7 @@ fi
if [ "$DESKTOP" != "auto" ] && [ "$DESKTOP" != "kde" ] && \
[ "$DESKTOP" != "gnome" ] && [ "$DESKTOP" != "other" ]; then
echo "Usage: $0 [--desktop=<auto|kde|gnome|other>] [<${prog_name}_options>]";
echo "Usage: $0 [--desktop=<auto|kde|gnome|other>] [<${program_name}_options>]";
exit 1;
fi
@@ -93,7 +93,7 @@ fi
if [ "$GSMARTCONTROL_SU" = "" ]; then
for subin in $candidates; do
which $subin &>/dev/null
which "$subin" &>/dev/null
if [ $? -eq 0 ]; then
found_su="$subin";
break;
@@ -101,7 +101,7 @@ if [ "$GSMARTCONTROL_SU" = "" ]; then
done
if [ "$found_su" = "" ]; then
xmessage "Error launching ${prog_name}: No suitable su mechanism found.
xmessage "Error launching ${program_name}: No suitable su mechanism found.
Try installing PolKit, kdesu, gnomesu, gksu, beesu or sux first.";
exit 1;
fi
@@ -115,10 +115,10 @@ fi
# Add these directories _before_ existing PATH, so that the user is not
# tricked into running it from some other path (we're running as root with
# the user's env after all).
# Add @prefix@/sbin as well (freebsd seems to require it).
# Add sbindir as well (freebsd seems to require it).
# Note that beesu won't show a GUI login box if /usr/sbin is before /usr/bin,
# so add it first as well.
EXTRA_PATHS="/usr/bin:/usr/sbin:/usr/local/sbin:@prefix@/sbin";
EXTRA_PATHS="/usr/bin:/usr/sbin:/usr/local/sbin:@CMAKE_INSTALL_FULL_SBINDIR@";
export PATH="$EXTRA_PATHS:$PATH"
@@ -164,8 +164,5 @@ fi
# echo $full_cmd
eval $full_cmd
eval "$full_cmd"
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2017 GSmartControl developers -->
<component type="desktop">
<id>gsmartcontrol</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0 and GPL-3.0</project_license>
<project_license>GPL-3.0</project_license>
<name>GSmartControl</name>
<summary>Hard Disk and SSD Health Inspection</summary>
<description>
@@ -16,19 +15,19 @@
</p>
</description>
<launchable type="desktop-id">gsmartcontrol.desktop</launchable>
<url type="homepage">https://gsmartcontrol.sourceforge.io</url>
<url type="homepage">https://gsmartcontrol.shaduri.dev</url>
<screenshots>
<screenshot type="default">
<caption>Main window</caption>
<image>https://gsmartcontrol.sourceforge.io/home/images/main_ok.png</image>
<image>https://gsmartcontrol.shaduri.dev/screenshots/main_ok.png</image>
</screenshot>
<screenshot>
<caption>Drive identity information</caption>
<image>https://gsmartcontrol.sourceforge.io/home/images/info_identity.png</image>
<image>https://gsmartcontrol.shaduri.dev/screenshots/info_identity.png</image>
</screenshot>
<screenshot>
<caption>Attribute list of a failing drive</caption>
<image>https://gsmartcontrol.sourceforge.io/home/images/info_failing.png</image>
<image>https://gsmartcontrol.shaduri.dev/screenshots/info_failing.png</image>
</screenshot>
</screenshots>
</component>
-29
View File
@@ -1,29 +0,0 @@
[Desktop Entry]
# desktop file version
Version=1.0
Type=Application
Categories=System;Monitor;
Name=GSmartControl
# short description, usually shown in parentheses after Name
GenericName=Hard Disk and SSD Health Inspection
GenericName[fr]=Inspecteur de santé de disque dur et de SSD
# tooltip
Comment=Monitor and control SMART data on hard disk and solid-state drives
Comment[fr]=Surveille et contrôle les données SMART des disques durs et des SSD
# If it's a name only, it looks for "name.[png|xpm]" file in
# $XDG_DATA_DIRS/icons and /usr/share/pixmaps.
# An absolute file path is also supported.
Icon=gsmartcontrol
# Run with root permissions. This should work with newer GNOME too.
# It _should_ work with kde, but it hangs on mine, so use plain kdesu.
#X-KDE-SubstituteUID=true
#X-KDE-RootOnly=true
# Run with root permissions.
Exec="@prefix@/bin/gsmartcontrol-root"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 130 KiB

+66
View File
@@ -0,0 +1,66 @@
###############################################################################
# License: BSD Zero Clause License file
# Copyright:
# (C) 2008 - 2021 Alexander Shaduri <ashaduri@gmail.com>
###############################################################################
[Desktop Entry]
# desktop file version
Version=1.0
Type=Application
Categories=System;Monitor;
Name=GSmartControl
Name[ca]=GSControlIntel
Name[cs]=GSmartControl
Name[es]=GSmartControl
Name[id]=GSmartControl
Name[it]=GSmartControl
Name[ja]=GSmartControl
Name[pt_BR]=GSmartControl
Name[ru]=GSmartControl
Name[sk]=GSmartControl
Name[sv]=GSmartControl
Name[zh_CN]=GSmartControl
# short description, usually shown in parentheses after Name
GenericName=Hard Disk and SSD Health Inspection
GenericName[ca]=Inspecció de salut del disc dur i de l'SSD
GenericName[cs]=Prohlídka zdraví pevných a SSD disků
GenericName[es]=Inspección de la salud de discos duros y SSD
GenericName[fr]=Inspecteur de santé de disque dur et de SSD
GenericName[id]=Pemeriksaan Kesehatan Cakram Keras dan SSD
GenericName[it]=Ispezione della salute del disco rigido e dell'SSD
GenericName[ja]=ハードディスクと SSD の健全状態の調査
GenericName[pt_BR]=Inspeção da integridade de disco rígido e SSD
GenericName[ru]=Проверка состояния жёстких и твердотельных дисков
GenericName[sk]=Zdravotná inšpekcia pevného disku a SSD
GenericName[zh_CN]=机械及固态硬盘健康检测
# tooltip
Comment=Monitor and control SMART data on hard disk and solid-state drives
Comment[ca]=Monitoreu i controleu les dades SMART dels discs durs i dels discs sòlids.
Comment[cs]=Sleduje a nastavuje SMART data na pevném disku a na polovodičových discích
Comment[es]=Monitorice y controle datos de SMART sobre discos duros y unidades de estado sólido
Comment[fr]=Surveille et contrôle les données SMART des disques durs et des SSD
Comment[id]=Pantau dan kendalikan data cerdas pada cakram keras dan SSD
Comment[it]=Monitora e controlla i dati SMART sui dischi rigidi e a stato solido
Comment[ja]=ハードディスクや SSD 内の SMART データの監視と制御
Comment[pt_BR]=Monitorar e controlar dados do SMART em discos rígidos e unidades de estado sólido
Comment[ru]=Мониторинг и контроль данных SMART на жёстких и твердотельных дисках
Comment[sk]=Monitorovanie a kontrola údajov SMART na pevných diskoch a diskoch SSD
Comment[zh_CN]=监测及控制机械硬盘和固态硬盘上的SMART数据
# If it's a name only, it looks for "name.[png|xpm]" file in
# $XDG_DATA_DIRS/icons.
# An absolute file path is also supported.
Icon=gsmartcontrol
# Run with root permissions. This should work with newer GNOME too.
# It _should_ work with kde, but it hangs on mine, so use plain kdesu.
#X-KDE-SubstituteUID=true
#X-KDE-RootOnly=true
# Run with root permissions.
Exec="@CMAKE_INSTALL_FULL_BINDIR@/gsmartcontrol-root"
-394
View File
@@ -1,394 +0,0 @@
/* XPM */
static char * gsmartcontrol_xpm[] = {
"32 32 359 2",
" c None",
". c #ABAAAA",
"+ c #CCCCCC",
"@ c #C5C4C4",
"# c #C2C1C1",
"$ c #D2D1D1",
"% c #C8C7C7",
"& c #C8C7C8",
"* c #C9C8C8",
"= c #CAC8C9",
"- c #CAC9C9",
"; c #C8C6C7",
"> c #C7C6C6",
", c #CFCDCE",
"' c #D1D0D0",
") c #C6C5C6",
"! c #CFCECE",
"~ c #B9B7B7",
"{ c #D4D4D4",
"] c #DCDBDC",
"^ c #D8D7D7",
"/ c #D6D5D5",
"( c #D6D5D6",
"_ c #D7D6D6",
": c #D9D8D8",
"< c #DBDADB",
"[ c #DAD9DA",
"} c #D7D7D7",
"| c #D6D6D6",
"1 c #DAD9D9",
"2 c #E2E1E1",
"3 c #B0AFAF",
"4 c #D3D2D2",
"5 c #CDCCCC",
"6 c #CDCDCD",
"7 c #CECDCD",
"8 c #CECECE",
"9 c #CFCFCF",
"0 c #D0CFCF",
"a c #C0BFBF",
"b c #9C9A9B",
"c c #6E6B6B",
"d c #807E7F",
"e c #C8C8C8",
"f c #CAC9CA",
"g c #CACACA",
"h c #CBCACA",
"i c #CCCBCB",
"j c #CCCBCC",
"k c #D0CECF",
"l c #C3C2C2",
"m c #A09E9F",
"n c #B5B4B4",
"o c #AFADAE",
"p c #787576",
"q c #8D8B8B",
"r c #D4D3D3",
"s c #C7C6C7",
"t c #C7C7C7",
"u c #C9C8C9",
"v c #C9C9C9",
"w c #CACAC9",
"x c #BFBEBE",
"y c #A3A1A2",
"z c #A09D9E",
"A c #B4B2B2",
"B c #B6B4B4",
"C c #827F80",
"D c #969595",
"E c #C4C3C3",
"F c #C4C4C4",
"G c #C5C5C5",
"H c #C6C5C5",
"I c #C6C6C6",
"J c #C9C7C8",
"K c #B9B7B8",
"L c #A5A4A4",
"M c #A4A3A3",
"N c #A7A5A5",
"O c #B3B1B2",
"P c #BFBDBD",
"Q c #8D8A8B",
"R c #A09F9F",
"S c #DDDCDC",
"T c #C0C0C0",
"U c #C3C1C2",
"V c #C3C2C3",
"W c #C3C3C3",
"X c #C4C3C4",
"Y c #B2B1B1",
"Z c #A8A7A7",
"` c #ABA9A9",
" . c #CFCECF",
".. c #C2C0C1",
"+. c #989697",
"@. c #A8A6A7",
"#. c #DEDDDD",
"$. c #DEDDDE",
"%. c #C1C0C0",
"&. c #C2C1C2",
"*. c #B1B0B0",
"=. c #ADACAC",
"-. c #AFAEAE",
";. c #BDBCBC",
">. c #B3B2B2",
",. c #B4B3B4",
"'. c #B8B8B8",
"). c #D5D4D4",
"!. c #C0BFBE",
"~. c #C1C0C1",
"{. c #C3C1C1",
"]. c #C4C4C3",
"^. c #B2B0B1",
"/. c #B3B2B3",
"(. c #B4B3B3",
"_. c #A1A0A0",
":. c #B9B8B8",
"<. c #C4C2C3",
"[. c #BDBBBC",
"}. c #B5B4B3",
"|. c #B6B4B5",
"1. c #B7B5B6",
"2. c #B7B6B7",
"3. c #B8B7B7",
"4. c #B8B7B8",
"5. c #BCBABB",
"6. c #BBBABA",
"7. c #BFBEBF",
"8. c #C1C1C1",
"9. c #C1BFC0",
"0. c #BCBBBB",
"a. c #BEBCBD",
"b. c #BEBDBD",
"c. c #9B999A",
"d. c #9D9B9B",
"e. c #C2C2C2",
"f. c #D4D3D4",
"g. c #CECDCE",
"h. c #C7C5C5",
"i. c #A4A2A3",
"j. c #A19F9F",
"k. c #C6C4C5",
"l. c #DCDCDC",
"m. c #D0CFD0",
"n. c #CECCCD",
"o. c #A2A1A1",
"p. c #939292",
"q. c #E1E0E0",
"r. c #E3E3E3",
"s. c #B3B3B3",
"t. c #CCCACB",
"u. c #D2D2D2",
"v. c #D5D3D4",
"w. c #A7A6A6",
"x. c #959494",
"y. c #E3E2E2",
"z. c #DCDBDB",
"A. c #CBC9CA",
"B. c #E1E0E1",
"C. c #DFDEDE",
"D. c #CECCCC",
"E. c #CDCCCD",
"F. c #D2D0D0",
"G. c #D2D0D1",
"H. c #B5B4B5",
"I. c #B1AFB0",
"J. c #EDECEC",
"K. c #D1CFCF",
"L. c #CDCBCC",
"M. c #D5D5D5",
"N. c #DCDADA",
"O. c #C5C4C5",
"P. c #D2D1D2",
"Q. c #D5D4D5",
"R. c #DADADA",
"S. c #DBDADA",
"T. c #DDDCDD",
"U. c #D7D6D7",
"V. c #E8E7E7",
"W. c #D8D8D8",
"X. c #D8D6D6",
"Y. c #D9D8D9",
"Z. c #DBDBDB",
"`. c #DDDDDD",
" + c #474747",
".+ c #ECEBEB",
"++ c #F3F3F3",
"@+ c #E4E3E3",
"#+ c #E0DFDF",
"$+ c #E5E5E5",
"%+ c #EFEFEF",
"&+ c #EBEAEB",
"*+ c #E6E5E5",
"=+ c #E0E0E0",
"-+ c #E4E4E4",
";+ c #E5E4E4",
">+ c #ECECEC",
",+ c #666666",
"'+ c #585757",
")+ c #D9D9DA",
"!+ c #E2E2E2",
"~+ c #E6E5E6",
"{+ c #E1E1E1",
"]+ c #E6E6E6",
"^+ c #E7E7E7",
"/+ c #898989",
"(+ c #767575",
"_+ c #E0DFE0",
":+ c #E9E9E9",
"<+ c #BDBDBD",
"[+ c #B6B6B6",
"}+ c #B0B0B0",
"|+ c #ACACAC",
"1+ c #ACABAC",
"2+ c #A7A7A7",
"3+ c #DFDFDF",
"4+ c #E5E5E4",
"5+ c #E9E8E8",
"6+ c #E8E8E8",
"7+ c #E3E2E3",
"8+ c #D7D5D5",
"9+ c #8E8D8D",
"0+ c #807F7F",
"a+ c #494848",
"b+ c #5A5758",
"c+ c #605E5F",
"d+ c #646262",
"e+ c #555354",
"f+ c #1F1F1F",
"g+ c #282626",
"h+ c #323031",
"i+ c #3D3C3C",
"j+ c #494748",
"k+ c #555353",
"l+ c #5A5959",
"m+ c #3E3D3D",
"n+ c #434242",
"o+ c #444343",
"p+ c #414041",
"q+ c #3E3E3E",
"r+ c #4A4949",
"s+ c #706D6E",
"t+ c #6B6969",
"u+ c #6A6869",
"v+ c #696469",
"w+ c #656065",
"x+ c #595757",
"y+ c #A5A5A5",
"z+ c #767676",
"A+ c #8A8888",
"B+ c #4B4849",
"C+ c #5C5A5A",
"D+ c #686565",
"E+ c #524F50",
"F+ c #000000",
"G+ c #090607",
"H+ c #171415",
"I+ c #262324",
"J+ c #363334",
"K+ c #454343",
"L+ c #4A4748",
"M+ c #212020",
"N+ c #2A292A",
"O+ c #2C2B2B",
"P+ c #272626",
"Q+ c #242424",
"R+ c #242323",
"S+ c #3C3B3B",
"T+ c #726F70",
"U+ c #6C696A",
"V+ c #6B676A",
"W+ c #7A916C",
"X+ c #7B926B",
"Y+ c #605F60",
"Z+ c #9C9B9C",
"`+ c #606060",
" @ c #8F8D8D",
".@ c #494747",
"+@ c #595657",
"@@ c #615E5F",
"#@ c #656162",
"$@ c #525050",
"%@ c #020101",
"&@ c #0C0A0A",
"*@ c #1A1818",
"=@ c #282525",
"-@ c #454243",
";@ c #494647",
">@ c #2A2929",
",@ c #393838",
"'@ c #363536",
")@ c #323131",
"!@ c #2B292A",
"~@ c #282727",
"{@ c #444243",
"]@ c #696666",
"^@ c #666268",
"/@ c #709D48",
"(@ c #7BAD4A",
"_@ c #68686A",
":@ c #8F8E8F",
"<@ c #4E4D4E",
"[@ c #8E8C8D",
"}@ c #484546",
"|@ c #555253",
"1@ c #5D595A",
"2@ c #5F5B5C",
"3@ c #514F50",
"4@ c #0F0D0D",
"5@ c #211E1F",
"6@ c #312E2F",
"7@ c #413D3E",
"8@ c #222121",
"9@ c #2E2D2D",
"0@ c #312F30",
"a@ c #262425",
"b@ c #464344",
"c@ c #696667",
"d@ c #666263",
"e@ c #5F5E5F",
"f@ c #5A5B5B",
"g@ c #797577",
"h@ c #7A7A7A",
"i@ c #4C4A4A",
"j@ c #2A2728",
"k@ c #2C292A",
"l@ c #302D2E",
"m@ c #312F2F",
"n@ c #2E2C2C",
"o@ c #100F0F",
"p@ c #110F10",
"q@ c #141212",
"r@ c #1B1919",
"s@ c #242222",
"t@ c #2D2B2B",
"u@ c #322F30",
"v@ c #2F2D2D",
"w@ c #2B2829",
"x@ c #292728",
"y@ c #363233",
"z@ c #332F30",
"A@ c #312D2F",
"B@ c #2A2627",
"C@ c #424040",
"D@ c #454444",
"E@ c #737373",
"F@ c #828282",
"G@ c #939293",
"H@ c #9C9C9C",
"I@ c #A3A3A3",
"J@ c #A9A9A9",
"K@ c #ADADAD",
"L@ c #B2B2B2",
"M@ c #B5B5B5",
"N@ c #A4A4A4",
"O@ c #959595",
"P@ c #8C8C8C",
"Q@ c #707070",
"R@ c #FFFFFF",
" ",
" . + @ # $ % & * = - ; > * - - - * , ' ) ! ~ ",
" = { ' ] ^ { / / ( _ : < [ ^ ^ } ^ | 1 2 } 3 ",
" - 4 ' ' 5 6 6 6 7 7 8 9 ! ! 9 9 0 0 $ 5 a b c ",
" d 4 [ * e - - f g h h h i i j + 5 5 k l m n o p ",
" q _ r @ > > s s t % % * * u v - w 5 x y z A B C ",
" D 1 7 l E F @ @ G H H I > > > J * K L M N O P Q ",
" R S % T U U l V W E X F @ @ > E Y Z ` > .* ..+. ",
" @.#.$.W %.# # # &.l l V E G T *.=.-.*.5 ;.>.,.Z ",
" n '.).[ !.T ~.# ..{.U l ].x Y ^.>.A /.(.x ;.O _. ",
" :.^.<.h a %.%.# # # &.U [.}.|.1.2.3.4.K K a 5.N ",
" 6.i H 7.%.8.# &.# l * % E 9.[.5.0.[.;.a.b.;., %.c. ",
" d.> 0 a # &.e.V V % ^ f.j g - % %.....&.l V l g.h.i. ",
" j./ i # E E @ k.H l.g.%.# l E H <.b.; > % % % m.n.o. ",
" p.q.7 @ ) > % % - r.) > % * * g f s.5 t.i i i u.v.w. ",
" x.y.z.> u - g A.- B.C.D.E.! 0 7 (.6.$ ' ' F.G.).^ H. ",
" I.7 J.K.L.7 7 ! ! m.S 1 m.- %.3.8./ ).M./ | _ : N.; ",
" O., F.f.P.4 4 4 f.f.r / Q.4 4 ^ R.: : 1 [ S.< S T.U. ",
" 4 V.| ).| _ W._ X.^ : Y.1 S.Z.z.] S S `.#.C.C.2 V.q. + ",
" S..+++@+`.#+$+%+&+*+2 #+=+q.y.-+-+-+;+$+$+*+>+++Z.*+,+ ",
" '+S.# $ >+r.m.e.# 6 )+!+~+*+@+B.=+{+-+]+]+^+]+^+j 5 y./+ ",
" (+b.3 _+! m.#+:+q.r > <+[+}+|+3 '.b.8.> e 5 7 ! ^+j 1+2+ ",
" x.] ! r / ^ W.R.S 3+2 y.@+4+5+6+^+~+*+;+7+#+C.#.S.8+: V ",
" 9+0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+n+p+q+r+s+t+u+v+w+x+y+ ",
" z+A+B+C+d+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+V+W+X+Y+Z+ ",
" `+ @.@+@@@#@$@%@&@*@=@J+-@;@>@,@'@)@!@~@{@c ]@^@/@(@_@:@ ",
" <@[@}@|@1@2@3@F+%@4@5@6@7@-@8@9@9@0@~@a@b@c@#@d@e@f@g@h@ ",
" i@j@k@l@m@n@o@p@q@r@s@t@u@!@l@v@v@w@x@l@y@z@6@A@B@C@D@ ",
" E@F@G@H@I@J@K@}+L@M@M@M@s.}+|+N@H@O@P@F@Q@ ",
" R@R@R@R@R@R@R@R@R@ ",
" ",
" "};
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

@@ -45,9 +45,6 @@ Display version information
\fB\-\-no\-scan\fP
Don't scan devices on startup
.TP
\fB\-\-no\-hide\-tabs\fP
Don't hide non\-identity tabs when SMART is disabled. Useful for debugging.
.TP
\fB\-\-add\-virtual\fP
Load smartctl data from file, creating a virtual drive. You
can specify this option multiple times.
@@ -61,6 +58,9 @@ can specify this option multiple times. Example:\fR
\-\-add\-device /dev/sda \-\-add\-device /dev/twa0::3ware,2 \-\-add\-device '/dev/sdb::::-T permissive'
.fi
.TP
\fB\-\-forget\-devices\fP
Forget all previously manually added devices
.TP
\fB\-\-display\fP=\fIDISPLAY\fP
X display to use
.TP
@@ -74,7 +74,7 @@ Disable logging; same as \fB\-\-verbosity\-level\fP 0
Set verbosity level [0\-5]
.PP
.SH COPYRIGHT
Copyright \(co 2008 \- 2012 Alexander Shaduri <ashaduri \'at\' gmail.com>
Copyright \(co 2008 \- 2021 Alexander Shaduri <ashaduri@gmail.com>
.PP
.SH AUTHOR
This manual page was originally written by Giuseppe Iuculano
-2
View File
@@ -1,2 +0,0 @@
EXTRA_DIST = distribution.txt.in gsmartcontrol.nsi.in nsi_install.ico nsi_uninstall.ico
-24
View File
@@ -1,24 +0,0 @@
GSmartControl - Hard disk drive and SSD health inspection tool
Version @VERSION@
The latest version of this distribution, as well as the source code of
GSmartControl, can be found at
https://gsmartcontrol.sourceforge.io
and
https://sourceforge.net/projects/gsmartcontrol/files/
This distribution includes:
* GSmartControl binary (gsmartcontrol.exe) and associated resources.
The binary was compiled against Gtkmm (http://www.gtkmm.org/), GTK+
(http://gtk.org/) and related libraries, and PCRE (http://www.pcre.org/).
* Smartctl binaries (from smartmontools 6.6, http://smartmontools.sf.net/)
- smartctl-nc.exe (compiled without console output), smartctl.exe (compiled
with console output), update-smart-drivedb.exe (drive database updater).
The combined distribution is multi-licensed under GNU GPL versions 2 and 3.
See LICENSE_gpl2.txt and LICENSE_gpl3.txt for details.
@@ -2,6 +2,13 @@
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<!--
License: BSD Zero Clause License file
Copyright:
(C) 2008 - 2021 GSmartControl developers
-->
<policyconfig>
<action id="org.gsmartcontrol">
@@ -12,7 +19,7 @@
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gsmartcontrol</annotate>
<annotate key="org.freedesktop.policykit.exec.path">@CMAKE_INSTALL_FULL_SBINDIR@/gsmartcontrol</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
-6
View File
@@ -1,6 +0,0 @@
noinst_DATA = changelog.in compat control copyright menu postinst postrm rules
# include the generated file too
EXTRA_DIST=changelog.in changelog compat control copyright menu postinst \
postrm rules
-5
View File
@@ -1,5 +0,0 @@
gsmartcontrol (@VERSION@+nmu1) unstable; urgency=low
* Permanently Initial Release.
-- Alexander Shaduri <ashaduriREMOVETHIS@gmail.com> Sat, 15 Nov 2008 00:12:04 +0400
-1
View File
@@ -1 +0,0 @@
5
-32
View File
@@ -1,32 +0,0 @@
This package was debianized by Alexander Shaduri <ashaduri 'at' gmail.com> on
Sat, 15 Nov 2008 00:12:04 +0400.
It was downloaded from <https://gsmartcontrol.sourceforge.io/>
Copyright:
Copyright (C) 2008 - 2017 Alexander Shaduri <ashaduri 'at' gmail.com>
License:
This product is multi-licensed under GNU GPL versions 2 and 3.
You are free to choose which one you use.
This program is free software: you can redistribute it and/or modify it under
the terms of either version 2 or (at your option) version 3 of the GNU General
Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public Licenses for more details.
You should have received copies of these licenses along with this program.
If not, see <http://www.gnu.org/licenses/>.
On Debian systems, the complete text of the GNU General
Public Licenses can be found in `/usr/share/common-licenses/GPL-2' and
`/usr/share/common-licenses/GPL-3'.
The Debian packaging is (C) 2008 - 2017 Alexander Shaduri <ashaduri 'at' gmail.com> and
is licensed under the GPLv2 and GPLv3, see above.

Some files were not shown because too many files have changed in this diff Show More