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 172caa334b484c'>test-env.in
AgeCommit message (Expand)Author
2024-10-24build: Restrict access to daemon socket in tests....With the weak isolation available to the test daemon, it is essential to disallow untrusted access to it, as otherwise another local user can gain our user's credentials easily. * build-aux/test-env.in: ensure the daemon-socket directory is freshly-created with 0700 permissions. Change-Id: I742f70fc6fc28e5b4dc88d590eef3daf1b964670 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Reepca Russelstein
2021-12-22tests: Move keys into ./tests/keys/ and add a third ed25519 key....The third key will be used in an upcoming commit. Rename public keys to .pub. * guix/tests/gnupg.scm (%ed25519-3-public-key-file): New variable. (%ed25519-3-secret-key-file): New variable. (%ed25519-2-public-key-file): Renamed from %ed25519bis-public-key-file. (%ed25519-2-secret-key-file): Renamed from %ed25519bis-secret-key-file. * tests/keys/ed25519-3.key: New file. * tests/keys/ed25519-3.sec: New file. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Attila Lendvai