This patch distinguishes between the data directory path for GUI and the one for non-GUI by allowing to set the former path. highlight package has two outputs: out and gui. Both outputs have files which will be in the same directory /share/highlight/ without this patch (see also install and install-gui tasks in makefile). In the gui's data directory, there are GUI specific files in /share/highlight/gui-files/{l10n,ext}/. diff --git a/src/gui-qt/main.cpp b/src/gui-qt/main.cpp index 4700dc1..3567745 100644 --- a/src/gui-qt/main.cpp +++ b/src/gui-qt/main.cpp @@ -47,8 +47,8 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); QTranslator translator; -#ifdef DATA_DIR - translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(DATA_DIR).arg(QLocale::system().name())); +#ifdef GUI_DATA_DIR + translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(GUI_DATA_DIR).arg(QLocale::system().name())); #else translator.load(QString("%1/gui_files/l10n/highlight_%2").arg(QDir::currentPath()).arg(QLocale::system().name())); #endif diff --git a/src/gui-qt/mainwindow.cpp b/src/gui-qt/mainwindow.cpp index 3a21ad2..f060431 100644 --- a/src/gui-qt/mainwindow.cpp +++ b/src/gui-qt/mainwindow.cpp @@ -2131,8 +2131,8 @@ QString MainWindow::getDistFileFilterPath(){ #ifdef Q_OS_OSX return QCoreApplication::applicationDirPath()+"/../Resources/gui_files/ext/fileopenfilter.conf"; #else - #ifdef DATA_DIR - return QString(DATA_DIR) + "/gui_files/ext/fileopenfilter.conf"; + #ifdef GUI_DATA_DIR + return QString(GUI_DATA_DIR) + "/gui_files/ext/fileopenfilter.conf"; #else return QDir::currentPath()+"/gui_files/ext/fileopenfilter.conf"; #endif diff --git a/src/makefile b/src/makefile index b1d7988..2963105 100644 --- a/src/makefile +++ b/src/makefile @@ -118,7 +118,7 @@ gui-qt: highlight-gui highlight-gui: libhighlight.a ${GUI_OBJECTS} cd gui-qt && \ - ${QMAKE} 'DEFINES+=DATA_DIR=\\\"${HL_DATA_DIR}\\\" CONFIG_DIR=\\\"${HL_CONFIG_DIR}\\\" DOC_DIR=\\\"${HL_DOC_DIR}\\\" ' && \ + ${QMAKE} 'DEFINES+=DATA_DIR=\\\"${HL_DATA_DIR}\\\" CONFIG_DIR=\\\"${HL_CONFIG_DIR}\\\" DOC_DIR=\\\"${HL_DOC_DIR}\\\" GUI_DATA_DIR=\\\"${GUI_DATA_DIR}\\\" ' && \ $(MAKE) $(OBJECTFILES) : makefile sh?id=478b9ccea854ec4407643a44d40ee61584fbc73d'>guix-build-branch.sh
AgeCommit message (Expand)Author
2023-04-21tests: Fix checks for expected failures....Addresses <https://issues.guix.gnu.org/62406>. With 'set -e', a return status inverted with '!' does not cause the shell to exit immediately. Instead use '&& false' to indicate an expected failure. * tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment-container.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-home.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh, tests/guix-refresh.sh, tests/guix-shell.sh, tests/guix-style.sh, tests/guix-system.sh: Replace uses of '! ...' with '... && false' or `test ! ...` as appropriate. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Eric Bavier
2022-10-22tests: 'guix build --with-commit' output no longer refers to the tag ID....This is a followup to 46f7011591601b4783b2dc2c7252c41564ca0140. * tests/guix-build-branch.sh: Replace tag ID by commit ID. Ludovic Courtès