Skip to content

Commit

Permalink
Smartmontools in Windows uses update-smart-drivedb.ps1 now, so use that.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashaduri committed Apr 23, 2024
1 parent 68576e9 commit 531d39d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake-tier1.yml
Expand Up @@ -132,7 +132,7 @@ jobs:
7z -bb1 e $SMARTMONTOOLS_INSTALLER
bin64/smartctl.exe
bin64/smartctl-nc.exe
bin/update-smart-drivedb.exe
bin/update-smart-drivedb.ps1
bin/drivedb.h
- name: Extract Package Requirements (32-bit)
Expand All @@ -143,7 +143,7 @@ jobs:
7z -bb1 e $SMARTMONTOOLS_INSTALLER
bin/smartctl.exe
bin/smartctl-nc.exe
bin/update-smart-drivedb.exe
bin/update-smart-drivedb.ps1
bin/drivedb.h
- name: Package ZIP
Expand Down
8 changes: 4 additions & 4 deletions packaging/cpack_options.cmake
Expand Up @@ -57,7 +57,7 @@ set(CPACK_PACKAGE_VENDOR "Alexander Shaduri")
#endif()

set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
set(CPACK_STRIP_FILES FALSE) # update-smart-drivedb doesn't like this
set(CPACK_STRIP_FILES FALSE) # update-smart-drivedb doesn't like this. TODO re-enable now that it's a script
set(CPACK_SOURCE_STRIP_FILES FALSE)

# Icon in Add/Remove Programs
Expand Down Expand Up @@ -120,7 +120,7 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "${CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS}
# ---------------------------------------------- Windows Dependencies

# Install GTK+ and other dependencies in Windows.
# Requires installed smartctl-nc.exe, smartctl.exe, update-smart-drivedb.exe in bin subdirectory of sysroot.
# Requires installed smartctl-nc.exe, smartctl.exe, update-smart-drivedb.ps1 in bin subdirectory of sysroot.
# The following packages when cross-compiling from opensuse:
# mingw64-cross-gcc-c++ mingw64-gtkmm3-devel mingw64-pcre-devel adwaita-icon-theme
if (WIN32)
Expand Down Expand Up @@ -185,7 +185,7 @@ if (WIN32)
# GitHub extract location. The files are extracted without relative paths in archive (7z e).
install(FILES
"${CMAKE_BINARY_DIR}/smartmontools/drivedb.h"
"${CMAKE_BINARY_DIR}/smartmontools/update-smart-drivedb.exe"
"${CMAKE_BINARY_DIR}/smartmontools/update-smart-drivedb.ps1"
"${CMAKE_BINARY_DIR}/smartmontools/smartctl-nc.exe"
"${CMAKE_BINARY_DIR}/smartmontools/smartctl.exe"
DESTINATION .
Expand All @@ -196,7 +196,7 @@ if (WIN32)
"${APP_WINDOWS_SMARTCTL_ROOT}/bin/drivedb.h"
"${APP_WINDOWS_SMARTCTL_ROOT}/bin/smartctl-nc.exe"
"${APP_WINDOWS_SMARTCTL_ROOT}/bin/smartctl.exe"
"${APP_WINDOWS_SMARTCTL_ROOT}/bin/update-smart-drivedb.exe"
"${APP_WINDOWS_SMARTCTL_ROOT}/bin/update-smart-drivedb.ps1"
DESTINATION .
)
endif()
Expand Down
4 changes: 2 additions & 2 deletions packaging/nsis/distribution.in.txt
Expand Up @@ -15,9 +15,9 @@ This distribution includes:
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 binaries (from smartmontools 7.4, http://smartmontools.sf.net/)
- smartctl-nc.exe (compiled without console output), smartctl.exe (compiled
with console output), update-smart-drivedb.exe (drive database updater).
with console output), update-smart-drivedb.ps1 (drive database updater).


The combined distribution is licensed under GNU GPL version 3.
Expand Down
3 changes: 3 additions & 0 deletions src/gsc_main_window.cpp
Expand Up @@ -1085,6 +1085,9 @@ void GscMainWindow::run_update_drivedb()
}

hz::fs::path update_binary_path = hz::fs_path_from_string("update-smart-drivedb");
if constexpr (BuildEnv::is_kernel_family_windows()) {
update_binary_path += ".ps1";
}
if (smartctl_binary.is_absolute()) {
update_binary_path = smartctl_binary.parent_path() / update_binary_path;
}
Expand Down

0 comments on commit 531d39d

Please sign in to comment.