Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0927f5c45 | ||
|
|
9ca8ba43fa | ||
|
|
49b3d2b992 | ||
|
|
35c8efa686 | ||
|
|
3788c0f3f3 | ||
|
|
f2f9e6939a | ||
|
|
21bb4cf58a | ||
|
|
b73b813eba | ||
|
|
95db883018 | ||
|
|
08c8026fde | ||
|
|
48bef0f50b | ||
|
|
a459490e8d | ||
|
|
98b0c8a22d | ||
|
|
be8fd896da | ||
|
|
5f4d7883eb | ||
|
|
faa1d1f296 | ||
|
|
61d84eebbe | ||
|
|
bc321ec7eb | ||
|
|
9852b4de81 | ||
|
|
d508db41c3 | ||
|
|
50e8464ecf | ||
|
|
e8494efb5f | ||
|
|
3e5588229b | ||
|
|
4c00270d09 | ||
|
|
b5dc08eee6 | ||
|
|
d6ebc54ab8 | ||
|
|
19ffb580af | ||
|
|
fc90686903 | ||
|
|
3c031b4ee9 | ||
|
|
fdcdba1731 | ||
|
|
12da26e47a | ||
|
|
de2b93d990 | ||
|
|
1cbc491003 | ||
|
|
26a2fd9dde | ||
|
|
7e0a8a2b62 | ||
|
|
ca974f3dfa | ||
|
|
850c18b25b | ||
|
|
2ca024237d | ||
|
|
939914a5ab | ||
|
|
0fedc62c25 | ||
|
|
defdb35655 | ||
|
|
e3ee616acc | ||
|
|
37fb4dc096 | ||
|
|
1637a39577 | ||
|
|
142b458aeb | ||
|
|
7cccb06950 | ||
|
|
bcc2ef5a06 | ||
|
|
40eacbbb90 | ||
|
|
ff4b9abf27 | ||
|
|
e9662d800f | ||
|
|
71273f9021 | ||
|
|
235f79c88f | ||
|
|
b2c0fe2190 | ||
|
|
66822e5900 | ||
|
|
2bb98a4ebe | ||
|
|
8a5b411057 | ||
|
|
0531c20e7d | ||
|
|
6e8628b1df | ||
|
|
2b19afe66d | ||
|
|
7236841d64 | ||
|
|
49fb65ce71 | ||
|
|
ad87baee70 | ||
|
|
5e8fef98ec | ||
|
|
83baafa615 | ||
|
|
9f39db9517 | ||
|
|
19f2bcf286 | ||
|
|
02e8876acc | ||
|
|
4f78e3dd90 | ||
|
|
6888d0862d |
@@ -0,0 +1,3 @@
|
||||
|
||||
# Make sure github recognizes header files as C++, not C.
|
||||
*.h linguist-language=C++
|
||||
@@ -0,0 +1,171 @@
|
||||
name: Build - 1.1 Branch (Tier 1 platforms)
|
||||
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the branch
|
||||
push:
|
||||
branches: [ release/1.1 ]
|
||||
pull_request:
|
||||
branches: [ release/1.1 ]
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
env:
|
||||
SMARTMONTOOLS_INSTALLER: smartmontools-7.2-1.win32-setup.exe
|
||||
SMARTMONTOOLS_URL: https://nav.dl.sourceforge.net/project/smartmontools/smartmontools/7.2/smartmontools-7.2-1.win32-setup.exe
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
linux-ubuntu:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: release/1.1
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get install libpcre3-dev libgtkmm-3.0-dev gettext autoconf automake
|
||||
|
||||
- name: Run Autogen
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/gsmartcontrol
|
||||
run: ./autogen.sh
|
||||
|
||||
- name: Create Build Directory
|
||||
shell: bash
|
||||
run: mkdir -p ${{runner.workspace}}/build
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: >
|
||||
$GITHUB_WORKSPACE/configure --prefix=/usr --enable-tests
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: make check
|
||||
|
||||
- name: Pack Source
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: make dist
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Source Packages (1.1 Branch)
|
||||
path: ${{runner.workspace}}/build/gsmartcontrol-*.tar.bz2
|
||||
|
||||
|
||||
windows-msys2:
|
||||
# Disable for now, as the configure stage errors out with "The directory name is invalid."
|
||||
if: ${{ false }}
|
||||
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include: [
|
||||
{ msystem: MINGW64, arch: x86_64, root: /mingw64 },
|
||||
{ msystem: MINGW32, arch: i686, root: /mingw32 }
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: release/1.1
|
||||
|
||||
- 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
|
||||
autoconf
|
||||
automake
|
||||
mingw-w64-${{ matrix.arch }}-gcc
|
||||
mingw-w64-${{ matrix.arch }}-fontconfig
|
||||
make
|
||||
p7zip
|
||||
|
||||
- name: Run Autogen
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{runner.workspace}}/gsmartcontrol
|
||||
run: ./autogen.sh
|
||||
|
||||
- name: Create Build Directory
|
||||
shell: cmd
|
||||
working-directory: ${{runner.workspace}}
|
||||
run: md build
|
||||
|
||||
- name: Configure
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: ../gsmartcontrol/configure --enable-tests
|
||||
|
||||
- name: Build
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: msys2 {0}
|
||||
run: make check
|
||||
|
||||
- name: Download Package Requirements
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: |
|
||||
mkdir smartmontools
|
||||
cd smartmontools
|
||||
wget $SMARTMONTOOLS_URL
|
||||
|
||||
- name: Extract Package Requirements (64-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW64' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{runner.workspace}}/build/smartmontools
|
||||
run: >
|
||||
7z -bb1 e $SMARTMONTOOLS_INSTALLER
|
||||
bin64/smartctl.exe
|
||||
bin64/smartctl-nc.exe
|
||||
bin/update-smart-drivedb.exe
|
||||
bin/drivedb.h
|
||||
|
||||
- name: Extract Package Requirements (32-bit)
|
||||
if: ${{ matrix.msystem == 'MINGW32' }}
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{runner.workspace}}/build/smartmontools
|
||||
run: >
|
||||
7z -bb1 e $SMARTMONTOOLS_INSTALLER
|
||||
bin/smartctl.exe
|
||||
bin/smartctl-nc.exe
|
||||
bin/update-smart-drivedb.exe
|
||||
bin/drivedb.h
|
||||
|
||||
- name: Package ZIP
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: make win-zip-dist
|
||||
|
||||
- name: Package NSIS
|
||||
shell: msys2 {0}
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: make win-dist
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Windows Packages (1.1 Branch)
|
||||
path: ${{runner.workspace}}/build/gsmartcontrol-*-win*.*
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
name: Build - 1.1 Branch (Tier 2 platforms)
|
||||
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the branch
|
||||
push:
|
||||
branches: [ release/1.1 ]
|
||||
pull_request:
|
||||
branches: [ release/1.1 ]
|
||||
# Allows you to run this workflow manually from the Actions tab.
|
||||
# This does not work for non-default branches, that's why we use the push / pull_request triggers above.
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: RelWithDebInfo
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
macos-homebrew:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: release/1.1
|
||||
|
||||
- name: Install Dependencies
|
||||
run: brew install pkg-config gtkmm3 pcre automake autoconf
|
||||
|
||||
- name: Run Autogen
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/gsmartcontrol
|
||||
run: ./autogen.sh
|
||||
|
||||
- name: Create Build Directory
|
||||
shell: bash
|
||||
run: mkdir -p ${{runner.workspace}}/build
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: >
|
||||
$GITHUB_WORKSPACE/configure --prefix=/usr --enable-tests
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: make
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
shell: bash
|
||||
run: make check
|
||||
|
||||
|
||||
freebsd:
|
||||
# Disable for now, make cannot find file2csource.sh for some reason.
|
||||
if: ${{ false }} # disable for now
|
||||
|
||||
runs-on: macos-10.15
|
||||
# env:
|
||||
# variables to pass to VM
|
||||
# MYTOKEN : ${{ secrets.MYTOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: release/1.1
|
||||
|
||||
- name: Build and test in FreeBSD
|
||||
id: test
|
||||
uses: vmactions/freebsd-vm@v0.1.5
|
||||
with:
|
||||
usesh: true
|
||||
mem: 2048
|
||||
prepare: >
|
||||
pkg install -y pkgconf gtkmm30 gettext pcre libiconv autoconf automake
|
||||
|
||||
run: >
|
||||
./autogen.sh
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
../configure --prefix=/usr --enable-tests
|
||||
|
||||
make
|
||||
|
||||
make check
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
# Builds
|
||||
/0*
|
||||
/doxygen_doc*
|
||||
/win32*
|
||||
/win64*
|
||||
/cmake-build-*
|
||||
|
||||
# Build system artifacts
|
||||
/autom4te.cache
|
||||
/aclocal.m4
|
||||
/ar-lib
|
||||
/compilation_flags
|
||||
/compile
|
||||
/config.guess
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.status
|
||||
/config.sub
|
||||
/configure
|
||||
/depcomp
|
||||
/gsmartcontrol.spec
|
||||
/install-sh
|
||||
Makefile
|
||||
Makefile.in
|
||||
/missing
|
||||
/stamp-h1
|
||||
/version.txt
|
||||
*.glade.cpp
|
||||
*.ui.cpp
|
||||
*.txt.cpp
|
||||
/data/gsmartcontrol.appdata.xml
|
||||
/data/gsmartcontrol.desktop
|
||||
/data/gsmartcontrol-root
|
||||
/data/nsis/distribution.txt
|
||||
/data/nsis/gsmartcontrol.nsi
|
||||
/debian.dist/changelog
|
||||
/src/gsc_winres.rc
|
||||
/src/gsmartcontrol.exe.manifest
|
||||
.deps
|
||||
|
||||
|
||||
# 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
|
||||
/.kdev4
|
||||
|
||||
# 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
|
||||
|
||||
# Backup files
|
||||
*~
|
||||
@@ -0,0 +1,306 @@
|
||||
|
||||
# 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+.
|
||||
# This includes both MSYS and OpenSUSE/mingw patterns.
|
||||
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 \
|
||||
libbrotlidec.dll \
|
||||
libbrotlicommon.dll \
|
||||
libbz2-*.dll \
|
||||
libcairo-*.dll \
|
||||
libcairomm-1*.dll \
|
||||
libdatrie-*.dll \
|
||||
libepoxy-*.dll \
|
||||
libffi-*.dll \
|
||||
libexpat-*.dll \
|
||||
libfontconfig-*.dll \
|
||||
libfreetype-*.dll \
|
||||
libfribidi-*.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 \
|
||||
libssp-*.dll \
|
||||
libstdc++-*.dll \
|
||||
libthai-*.dll \
|
||||
libtiff-*.dll \
|
||||
libwinpthread-*.dll \
|
||||
libxml2-*.dll \
|
||||
zlib1.dll \
|
||||
libz.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
|
||||
|
||||
# The manifest is already embedded in exe
|
||||
# cp src/gsmartcontrol.exe src/gsmartcontrol.exe.manifest win-dist/
|
||||
cp src/gsmartcontrol.exe 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/
|
||||
|
||||
# Without loaders, images and native file dialog do not work.
|
||||
$(MKDIR_P) win-dist/lib
|
||||
$(MKDIR_P) win-dist/lib/gdk-pixbuf-2.0
|
||||
cp -p -r "@WINDOWS_SYSROOT@"/lib/gdk-pixbuf-2.0/2.10.0 win-dist/lib/gdk-pixbuf-2.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.
|
||||
# Note that the current Adwaita uses "ui" directory, while win32 theme expects "actions".
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/index.theme win-dist/share/icons/Adwaita
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/16x16/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/ui/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/ui/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/ui/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/ui/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/ui/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/ui/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-symbolic.symbolic.png win-dist/share/icons/Adwaita/16x16/status
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/16x16/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/devices/drive-harddisk.png win-dist/share/icons/Adwaita/16x16/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/16x16/devices/media-optical.png win-dist/share/icons/Adwaita/16x16/devices
|
||||
# $(MKDIR_P) win-dist/share/icons/Adwaita/22x22/status
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/22x22/status/dialog-information-symbolic.symbolic.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/ui/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/ui/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/ui/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/ui/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/ui/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/ui/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/24x24/actions
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/24x24/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/devices/drive-harddisk.png win-dist/share/icons/Adwaita/24x24/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/devices/media-optical.png win-dist/share/icons/Adwaita/24x24/devices
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/24x24/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/24x24/status/dialog-information-symbolic.symbolic.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/ui/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/ui/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/ui/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/ui/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/ui/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/ui/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/32x32/actions
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/32x32/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/devices/drive-harddisk.png win-dist/share/icons/Adwaita/32x32/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/devices/media-optical.png win-dist/share/icons/Adwaita/32x32/devices
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/32x32/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/32x32/status/dialog-information-symbolic.symbolic.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/ui/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/ui/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/ui/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/ui/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/ui/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/ui/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/48x48/actions
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/48x48/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/devices/drive-harddisk.png win-dist/share/icons/Adwaita/48x48/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/devices/media-optical.png win-dist/share/icons/Adwaita/48x48/devices
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/48x48/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/48x48/status/dialog-information-symbolic.symbolic.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/ui/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/ui/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/ui/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/ui/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/ui/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/ui/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/64x64/actions
|
||||
# $(MKDIR_P) win-dist/share/icons/Adwaita/64x64/devices
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/devices/drive-harddisk.png win-dist/share/icons/Adwaita/64x64/devices
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/devices/media-optical.png win-dist/share/icons/Adwaita/64x64/devices
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/64x64/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/64x64/status/dialog-information-symbolic.symbolic.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/ui/window-close-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/ui/window-maximize-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/ui/window-minimize-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/ui/window-restore-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/ui/pan-down-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/ui/pan-up-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/actions
|
||||
# $(MKDIR_P) win-dist/share/icons/Adwaita/96x96/devices
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/devices/drive-harddisk.png win-dist/share/icons/Adwaita/96x96/devices
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/devices/media-optical.png win-dist/share/icons/Adwaita/96x96/devices
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/96x96/status
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/96x96/status/dialog-information-symbolic.symbolic.png win-dist/share/icons/Adwaita/96x96/status
|
||||
# $(MKDIR_P) win-dist/share/icons/Adwaita/256x256/devices
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/256x256/devices/drive-harddisk.png win-dist/share/icons/Adwaita/256x256/devices
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/256x256/devices/media-optical.png win-dist/share/icons/Adwaita/256x256/devices
|
||||
# $(MKDIR_P) win-dist/share/icons/Adwaita/256x256/status
|
||||
# cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/256x256/status/dialog-information-symbolic.symbolic.png win-dist/share/icons/Adwaita/256x256/status
|
||||
$(MKDIR_P) win-dist/share/icons/Adwaita/512x512/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/512x512/devices/drive-harddisk.png win-dist/share/icons/Adwaita/512x512/devices
|
||||
cp -p "@WINDOWS_SYSROOT@"/share/icons/Adwaita/512x512/devices/media-optical.png win-dist/share/icons/Adwaita/512x512/devices
|
||||
|
||||
# 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 -9r $(WIN_ZIP_NAME).zip $(WIN_ZIP_NAME)
|
||||
# Only when cross-compiling:
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,40 @@
|
||||
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.
|
||||
|
||||
Version 1.1.2, released on 2017-11-11
|
||||
Fixed gsmartcontrol-root not passing GDK_SCALE and GDK_DPI_SCALE variables
|
||||
to gsmartcontrol when using PolKit.
|
||||
Fixed blurriness of icons in the main window with GDK_SCALE=2.
|
||||
Tweaked the main window interface.
|
||||
Windows: Show volume labels beside drive letters in icon tooltips.
|
||||
|
||||
Version 1.1.1, released on 2017-09-25
|
||||
Windows: Use Adwaita GTK+ theme for systems which support Classic Windows
|
||||
theme, since the default win32 GTK+ theme is broken in it; this
|
||||
includes Windows 7 and Windows Server.
|
||||
Statistics entry values are formatted with commas for readability.
|
||||
Moved help information to website.
|
||||
|
||||
Version 1.1.0, released on 2017-09-07
|
||||
New Statistics, Temperature Log, Error Recovery, Physical and Directory
|
||||
tabs.
|
||||
@@ -25,7 +25,7 @@ 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/
|
||||
https://gsmartcontrol.shaduri.dev
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ local scope destruction also works if using stack variables.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,982 @@
|
||||
# ===========================================================================
|
||||
# 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
|
||||
|
||||
]])
|
||||
@@ -48,6 +48,7 @@ case $type in
|
||||
--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\" \
|
||||
--with-windows-sysroot=/usr/i686-w64-mingw32/sys-root/mingw \
|
||||
--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\" \
|
||||
@@ -55,6 +56,7 @@ case $type in
|
||||
--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\" \
|
||||
--with-windows-sysroot=/usr/x86_64-w64-mingw32/sys-root/mingw \
|
||||
--enable-debug-options --enable-tests --host=x86_64-w64-mingw32" ;;
|
||||
|
||||
win32-msys)
|
||||
@@ -63,6 +65,7 @@ case $type in
|
||||
--enable-optimize-options --enable-tests --host=i686-w64-mingw32" ;;
|
||||
win32-msys-debug)
|
||||
flags="PATH=\"/mingw32/i686-w64-mingw32:/mingw32/bin:$PATH\" \
|
||||
--with-windows-sysroot=/mingw32 \
|
||||
--enable-debug-options --enable-tests --host=i686-w64-mingw32" ;;
|
||||
win64-msys)
|
||||
flags="PATH=\"/mingw64/x86_64-w64-mingw32:/mingw64/bin:$PATH\" \
|
||||
@@ -70,6 +73,7 @@ case $type in
|
||||
--enable-optimize-options --enable-tests --host=x86_64-w64-mingw32" ;;
|
||||
win64-msys-debug)
|
||||
flags="PATH=\"/mingw64/x86_64-w64-mingw32:/mingw64/bin:$PATH\" \
|
||||
--with-windows-sysroot=/mingw64 \
|
||||
--enable-debug-options --enable-tests --host=x86_64-w64-mingw32" ;;
|
||||
esac
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
AC_INIT([GSmartControl],[1.1.1],[],[gsmartcontrol])
|
||||
AC_INIT([GSmartControl],[1.1.4],[],[gsmartcontrol])
|
||||
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
@@ -64,6 +64,10 @@ APP_DETECT_OS_KERNEL([build], [CONFIG_HOST_KERNEL_])
|
||||
# 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
|
||||
@@ -336,7 +340,7 @@ do # on separate line for portability
|
||||
fi
|
||||
|
||||
if test "$RES_BASE_EXT" = "ui"; then
|
||||
RES_LIBADD="$RES_LIBADD $RES_BASE_NOEXT.ui.$ac_objext" # file.ui.o or file.glade.o
|
||||
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
|
||||
@@ -449,6 +453,8 @@ AC_SUBST(LDFLAGS)
|
||||
# print them out for debug purposes
|
||||
|
||||
AC_MSG_NOTICE([
|
||||
CXX:
|
||||
$CXX
|
||||
CXXFLAGS:
|
||||
$CXXFLAGS
|
||||
LDFLAGS:
|
||||
@@ -468,11 +474,7 @@ 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.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.txt compilation_flags])
|
||||
|
||||
|
||||
AC_CONFIG_FILES([data/gsmartcontrol-root], [chmod +x data/gsmartcontrol-root])
|
||||
@@ -480,11 +482,7 @@ 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_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
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@@ -71,7 +71,7 @@ fi
|
||||
|
||||
|
||||
# They're basically the same, only the order is different.
|
||||
# pkexec is for PolKit
|
||||
# pkexec is for PolKit.
|
||||
# sux requires xterm to ask for the password.
|
||||
# xdg-su is basically like this script, except worse :)
|
||||
# su-to-root is a debian/ubuntu official method (although gksu is available).
|
||||
@@ -102,7 +102,7 @@ if [ "$GSMARTCONTROL_SU" = "" ]; then
|
||||
|
||||
if [ "$found_su" = "" ]; then
|
||||
xmessage "Error launching ${prog_name}: No suitable su mechanism found.
|
||||
Try installing kdesu, gnomesu, gksu, beesu or sux first.";
|
||||
Try installing PolKit, kdesu, gnomesu, gksu, beesu or sux first.";
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
@@ -138,6 +138,12 @@ if [ "$GSMARTCONTROL_SU" != "" ]; then
|
||||
full_cmd="$GSMARTCONTROL_SU '$EXEC_BIN $final_args_quoted'";
|
||||
|
||||
elif [ "$found_su" = "pkexec" ]; then
|
||||
if [ "$GDK_SCALE" != "" ]; then
|
||||
final_args_quoted="$final_args_quoted --gdk-scale='$GDK_SCALE'"
|
||||
fi
|
||||
if [ "$GDK_DPI_SCALE" != "" ]; then
|
||||
final_args_quoted="$final_args_quoted --gdk-dpi-scale='$GDK_DPI_SCALE'"
|
||||
fi
|
||||
full_cmd="pkexec --disable-internal-agent $EXEC_BIN $final_args_quoted";
|
||||
|
||||
elif [ "$found_su" = "sux" ]; then
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2017 GSmartControl developers -->
|
||||
<!-- Copyright 2017 - 2022 GSmartControl developers -->
|
||||
<component type="desktop">
|
||||
<id>gsmartcontrol</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
@@ -16,7 +16,7 @@
|
||||
</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>
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
@@ -4,7 +4,7 @@ Version @VERSION@
|
||||
|
||||
The latest version of this distribution, as well as the source code of
|
||||
GSmartControl, can be found at
|
||||
https://gsmartcontrol.sourceforge.io
|
||||
https://gsmartcontrol.shaduri.dev
|
||||
and
|
||||
https://sourceforge.net/projects/gsmartcontrol/files/
|
||||
|
||||
@@ -15,7 +15,7 @@ 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.5, http://smartmontools.sf.net/)
|
||||
* 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).
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
; Compatible with NSIS Unicode 2.45.
|
||||
; Public Domain
|
||||
|
||||
Unicode True
|
||||
|
||||
!define PRODUCT_VERSION "@VERSION@"
|
||||
!define PRODUCT_NAME "GSmartControl"
|
||||
!define PRODUCT_NAME_SMALL "gsmartcontrol"
|
||||
!define PRODUCT_PUBLISHER "Alexander Shaduri"
|
||||
!define PRODUCT_WEB_SITE "https://gsmartcontrol.sourceforge.io"
|
||||
!define PRODUCT_WEB_SITE "https://gsmartcontrol.shaduri.dev"
|
||||
|
||||
;!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\AppMainExe.exe"
|
||||
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
||||
@@ -134,7 +136,6 @@ SectionIn 1 RO
|
||||
SetOverwrite On
|
||||
File *.exe
|
||||
File *.dll
|
||||
File gsmartcontrol.exe.manifest
|
||||
File gsmartcontrol.ico
|
||||
File icon_*.png
|
||||
File drivedb.h
|
||||
@@ -145,6 +146,7 @@ SectionIn 1 RO
|
||||
; GTK and stuff
|
||||
File /r etc
|
||||
File /r share
|
||||
File /r lib
|
||||
|
||||
; Add Shortcuts (this inherits the exe's run permissions)
|
||||
CreateShortCut "$SMPROGRAMS\GSmartControl.lnk" "$INSTDIR\gsmartcontrol.exe" "" \
|
||||
@@ -226,7 +228,6 @@ Section Uninstall
|
||||
|
||||
Delete "$INSTDIR\*.exe"
|
||||
Delete "$INSTDIR\*.dll"
|
||||
Delete "$INSTDIR\gsmartcontrol.exe.manifest"
|
||||
Delete "$INSTDIR\gsmartcontrol.ico"
|
||||
Delete "$INSTDIR\icon_*.png"
|
||||
|
||||
@@ -239,6 +240,7 @@ Section Uninstall
|
||||
; GTK and stuff
|
||||
RMDir /r "$INSTDIR\etc"
|
||||
RMDir /r "$INSTDIR\share"
|
||||
RMDir /r "$INSTDIR\lib"
|
||||
|
||||
; clean up generated stuff
|
||||
Delete "$INSTDIR\*stdout.txt"
|
||||
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 766 B |
@@ -0,0 +1 @@
|
||||
9
|
||||
@@ -1,7 +1,7 @@
|
||||
Source: gsmartcontrol
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Homepage: https://gsmartcontrol.sourceforge.io/
|
||||
Homepage: https://gsmartcontrol.shaduri.dev
|
||||
Maintainer: Alexander Shaduri <ashaduriREMOVETHIS@gmail.com>
|
||||
Build-Depends: debhelper (>= 5), autotools-dev,
|
||||
libpcre3-dev, libgtkmm-3.0-dev (>= 3.4.0)
|
||||
@@ -1,11 +1,11 @@
|
||||
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/>
|
||||
It was downloaded from <https://gsmartcontrol.shaduri.dev>
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 2008 - 2017 Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
Copyright (C) 2008 - 2022 Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
|
||||
License:
|
||||
|
||||
@@ -27,6 +27,6 @@ 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
|
||||
The Debian packaging is (C) 2008 - 2022 Alexander Shaduri <ashaduri 'at' gmail.com> and
|
||||
is licensed under the GPLv2 and GPLv3, see above.
|
||||
|
||||
@@ -24,7 +24,12 @@ fi
|
||||
in_file="$1";
|
||||
out_file="$2";
|
||||
sym_name="$3";
|
||||
size=`stat -c "%s" "$in_file"`
|
||||
size="";
|
||||
if [[ $OSTYPE == 'darwin'* ]]; then
|
||||
size=`stat "-f%z" "$in_file"`
|
||||
else
|
||||
size=`stat -c "%s" "$in_file"`
|
||||
fi
|
||||
|
||||
|
||||
# header. extern means "global" in this context (needed because const
|
||||
@@ -6,7 +6,7 @@ Name: gsmartcontrol
|
||||
Version: @VERSION@
|
||||
Release: 0
|
||||
License: GPL-2.0 AND GPL-3.0
|
||||
Url: https://gsmartcontrol.sourceforge.io/
|
||||
Url: https://gsmartcontrol.shaduri.dev
|
||||
Vendor: Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
# Packager: Alexander Shaduri <ashaduri 'at' gmail.com>
|
||||
Source: http://sourceforge.net/projects/gsmartcontrol/files/%{version}/%{name}-%{version}.tar.bz2
|
||||
@@ -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 +0,0 @@
|
||||
svn propset svn:ignore -F .svnignore.txt .
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -1 +0,0 @@
|
||||
5
|
||||
@@ -63,24 +63,6 @@ void app_gtkmm_set_widget_tooltip(Gtk::Widget& widget,
|
||||
|
||||
|
||||
|
||||
bool app_gtkmm_icon_theme_has_icon(Glib::RefPtr<Gtk::IconTheme> theme,
|
||||
const Glib::ustring& icon_name, int size)
|
||||
{
|
||||
if (!theme || !theme->has_icon(icon_name)) // check if it exists first, or exception may be thrown.
|
||||
return false;
|
||||
|
||||
std::vector<int> sizes = theme->get_icon_sizes(icon_name);
|
||||
|
||||
for (std::vector<int>::const_iterator iter = sizes.begin(); iter != sizes.end(); ++iter) {
|
||||
if (*iter == size || *iter == -1) // -1 means scalable
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
/// This has been copied from _g_utf8_make_valid() (glib-2.20.4).
|
||||
@@ -68,11 +68,6 @@ int app_gtkmm_create_tree_view_column(Gtk::TreeModelColumn<T>& mcol, Gtk::TreeVi
|
||||
|
||||
|
||||
|
||||
/// Check whether the icon theme has the specified icon of size \c size.
|
||||
bool app_gtkmm_icon_theme_has_icon(Glib::RefPtr<Gtk::IconTheme> theme,
|
||||
const Glib::ustring& icon_name, int size);
|
||||
|
||||
|
||||
/// Get Glib::ustring from gchar*, freeing gchar*.
|
||||
Glib::ustring app_ustring_from_gchar(gchar* str);
|
||||
|
||||