mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-12-27 09:58:08 +01:00
- Renamed the binaries: eliot is now the Qt interface, whereas wxeliot is the wxWidgets interface
- Embed the program icon into the executable on Windows: the icon is not visible in Windows explorer - Fixed gettext configuration on Windows. The translations now appear, but the accents still don't display correctly. - Fixed a few translation issues
This commit is contained in:
parent
3837e548d4
commit
37359e97c0
15 changed files with 99 additions and 70 deletions
|
@ -18,7 +18,7 @@ package-win32-zip:
|
|||
mkdir -p $(WIN32_PACKAGE_DIR)
|
||||
|
||||
# Copy the binaries and strip them
|
||||
cp $(top_builddir)/wxwin/eliot$(EXEEXT) $(top_builddir)/dic/compdic$(EXEEXT) $(top_builddir)/dic/listdic$(EXEEXT) $(top_builddir)/qt/qeliot$(EXEEXT) $(WIN32_PACKAGE_DIR)
|
||||
cp $(top_builddir)/wxwin/wxeliot$(EXEEXT) $(top_builddir)/dic/compdic$(EXEEXT) $(top_builddir)/dic/listdic$(EXEEXT) $(top_builddir)/qt/eliot$(EXEEXT) $(WIN32_PACKAGE_DIR)
|
||||
$(STRIP) $(WIN32_PACKAGE_DIR)/*
|
||||
|
||||
# Copy the i18n files
|
||||
|
|
|
@ -4,7 +4,7 @@ dnl --------------------------------------------------------------
|
|||
dnl configure.in for Eliot
|
||||
dnl --------------------------------------------------------------
|
||||
AC_INIT(eliot, 1.7-cvs)
|
||||
AC_CONFIG_SRCDIR(wxwin/main.cc)
|
||||
AC_CONFIG_SRCDIR(qt/main.cpp)
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_CANONICAL_HOST
|
||||
|
@ -69,6 +69,9 @@ dnl Regexp / Listdic / Compdic build enable
|
|||
AC_ARG_ENABLE([dictools],AC_HELP_STRING([--enable-dictools],[build independant dictionary tools (default enabled)]))
|
||||
AM_CONDITIONAL([BUILD_DICTOOLS], [test "${enable_dictools}" != "no"])
|
||||
|
||||
dnl Define WIN32_BUILD if the compiler is i586-mingw32msvc-g++
|
||||
AM_CONDITIONAL([WIN32_BUILD], [test "${CXX}" = "i586-mingw32msvc-g++"])
|
||||
|
||||
dnl --------------------------------------------------------------
|
||||
dnl Checks for header files.
|
||||
dnl --------------------------------------------------------------
|
||||
|
|
|
@ -22,9 +22,6 @@ noinst_LIBRARIES = libdic.a
|
|||
localedir = $(datadir)/locale
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir) -I../intl -I$(top_srcdir)/intl $(INCICONV)
|
||||
|
||||
libdic_a_CFLAGS=
|
||||
libdic_a_YFLAGS=-d
|
||||
libdic_a_LFLAGS=
|
||||
libdic_a_SOURCES = \
|
||||
dic_exception.cpp dic_exception.h \
|
||||
header.cpp header.h \
|
||||
|
|
|
@ -443,15 +443,16 @@ int main(int argc, char* argv[])
|
|||
// Set the message domain
|
||||
#ifdef WIN32
|
||||
// Get the absolute path, as returned by GetFullPathName()
|
||||
char localeDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, localeDir, NULL);
|
||||
char *pos = strrchr(localeDir, L'\\');
|
||||
char baseDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, baseDir, NULL);
|
||||
char *pos = strrchr(baseDir, L'\\');
|
||||
if (pos)
|
||||
*pos = '\0';
|
||||
const string localeDir = baseDir + string("\\locale");
|
||||
#else
|
||||
static const char *localeDir = LOCALEDIR;
|
||||
static const string localeDir = LOCALEDIR;
|
||||
#endif
|
||||
bindtextdomain(PACKAGE, localeDir);
|
||||
bindtextdomain(PACKAGE, localeDir.c_str());
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -130,15 +130,16 @@ int main(int argc, char *argv[])
|
|||
// Set the message domain
|
||||
#ifdef WIN32
|
||||
// Get the absolute path, as returned by GetFullPathName()
|
||||
char localeDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, localeDir, NULL);
|
||||
char *pos = strrchr(localeDir, L'\\');
|
||||
char baseDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, baseDir, NULL);
|
||||
char *pos = strrchr(baseDir, L'\\');
|
||||
if (pos)
|
||||
*pos = '\0';
|
||||
const string localeDir = baseDir + string("\\locale");
|
||||
#else
|
||||
static const char *localeDir = LOCALEDIR;
|
||||
static const string localeDir = LOCALEDIR;
|
||||
#endif
|
||||
bindtextdomain(PACKAGE, localeDir);
|
||||
bindtextdomain(PACKAGE, localeDir.c_str());
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -66,15 +66,16 @@ int main(int argc, char* argv[])
|
|||
// Set the message domain
|
||||
#ifdef WIN32
|
||||
// Get the absolute path, as returned by GetFullPathName()
|
||||
char localeDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, localeDir, NULL);
|
||||
char *pos = strrchr(localeDir, L'\\');
|
||||
char baseDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, baseDir, NULL);
|
||||
char *pos = strrchr(baseDir, L'\\');
|
||||
if (pos)
|
||||
*pos = '\0';
|
||||
const string localeDir = baseDir + string("\\locale");
|
||||
#else
|
||||
static const char *localeDir = LOCALEDIR;
|
||||
static const string localeDir = LOCALEDIR;
|
||||
#endif
|
||||
bindtextdomain(PACKAGE, localeDir);
|
||||
bindtextdomain(PACKAGE, localeDir.c_str());
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
|
|
33
po/eliot.pot
33
po/eliot.pot
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2008-09-06 16:02+0200\n"
|
||||
"POT-Creation-Date: 2008-09-07 10:38+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -192,29 +192,29 @@ msgstr ""
|
|||
msgid "? 0 2 1 1"
|
||||
msgstr ""
|
||||
|
||||
#: dic/compdic.cpp:511
|
||||
#: dic/compdic.cpp:512
|
||||
msgid "A mandatory option is missing"
|
||||
msgstr ""
|
||||
|
||||
#: dic/compdic.cpp:519
|
||||
#: dic/compdic.cpp:520
|
||||
msgid "Cannot stat uncompressed dictionary "
|
||||
msgstr ""
|
||||
|
||||
#: dic/compdic.cpp:527
|
||||
#: dic/compdic.cpp:528
|
||||
msgid "Cannot open output file "
|
||||
msgstr ""
|
||||
|
||||
#: dic/compdic.cpp:575
|
||||
#, c-format
|
||||
msgid " Load time: %.3f s\n"
|
||||
msgstr ""
|
||||
|
||||
#: dic/compdic.cpp:576
|
||||
#, c-format
|
||||
msgid " Load time: %.3f s\n"
|
||||
msgstr ""
|
||||
|
||||
#: dic/compdic.cpp:577
|
||||
#, c-format
|
||||
msgid " Compression time: %.3f s\n"
|
||||
msgstr ""
|
||||
|
||||
#: dic/compdic.cpp:578
|
||||
#: dic/compdic.cpp:579
|
||||
#, c-format
|
||||
msgid " Maximum recursion level reached: %d\n"
|
||||
msgstr ""
|
||||
|
@ -258,15 +258,15 @@ msgstr ""
|
|||
msgid " dictionary: path to eliot dawg dictionary"
|
||||
msgstr ""
|
||||
|
||||
#: dic/regexpmain.cpp:94 dic/regexpmain.cpp:118
|
||||
#: dic/regexpmain.cpp:95 dic/regexpmain.cpp:119
|
||||
msgid "Enter a regular expression:"
|
||||
msgstr ""
|
||||
|
||||
#: dic/regexpmain.cpp:105
|
||||
#: dic/regexpmain.cpp:106
|
||||
msgid "result:"
|
||||
msgstr ""
|
||||
|
||||
#: dic/regexpmain.cpp:114 wxwin/searchpanel.cc:296
|
||||
#: dic/regexpmain.cpp:115 wxwin/searchpanel.cc:296
|
||||
msgid "Invalid regular expression: "
|
||||
msgstr ""
|
||||
|
||||
|
@ -1455,7 +1455,8 @@ msgstr ""
|
|||
msgid "History"
|
||||
msgstr ""
|
||||
|
||||
#: qt/main_window.cpp:681 qt/ui/main_window.ui:136
|
||||
#: qt/main_window.cpp:681 qt/ui/dic_tools_widget.ui:13
|
||||
#: qt/ui/main_window.ui:136
|
||||
msgid "Dictionary tools"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1608,6 +1609,10 @@ msgstr ""
|
|||
msgid "Pass"
|
||||
msgstr ""
|
||||
|
||||
#: qt/ui/prefs_dialog.ui:13
|
||||
msgid "Preferences"
|
||||
msgstr ""
|
||||
|
||||
#: qt/ui/prefs_dialog.ui:19
|
||||
msgid "Interface"
|
||||
msgstr ""
|
||||
|
|
32
po/fr.po
32
po/fr.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: eliot 1.7\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2008-09-06 16:02+0200\n"
|
||||
"POT-Creation-Date: 2008-09-07 10:38+0200\n"
|
||||
"PO-Revision-Date: 2008-08-31 10:43+0100\n"
|
||||
"Last-Translator: Olivier Teuliere <ipkiss@via.ecp.fr>\n"
|
||||
"Language-Team: French <traduc@traduc.org>\n"
|
||||
|
@ -210,29 +210,29 @@ msgstr "Z 10 1 0 1"
|
|||
msgid "? 0 2 1 1"
|
||||
msgstr "? 0 2 1 1"
|
||||
|
||||
#: dic/compdic.cpp:511
|
||||
#: dic/compdic.cpp:512
|
||||
msgid "A mandatory option is missing"
|
||||
msgstr "Une option obligatoire est manquante"
|
||||
|
||||
#: dic/compdic.cpp:519
|
||||
#: dic/compdic.cpp:520
|
||||
msgid "Cannot stat uncompressed dictionary "
|
||||
msgstr "Impossible de trouver le dictionnaire non compressé "
|
||||
|
||||
#: dic/compdic.cpp:527
|
||||
#: dic/compdic.cpp:528
|
||||
msgid "Cannot open output file "
|
||||
msgstr "Impossible d'ouvrir le fichier d'output "
|
||||
|
||||
#: dic/compdic.cpp:575
|
||||
#: dic/compdic.cpp:576
|
||||
#, c-format
|
||||
msgid " Load time: %.3f s\n"
|
||||
msgstr " Temps de chargement : %.3f s\n"
|
||||
|
||||
#: dic/compdic.cpp:576
|
||||
#: dic/compdic.cpp:577
|
||||
#, c-format
|
||||
msgid " Compression time: %.3f s\n"
|
||||
msgstr " Temps de compression : %.3f s\n"
|
||||
|
||||
#: dic/compdic.cpp:578
|
||||
#: dic/compdic.cpp:579
|
||||
#, c-format
|
||||
msgid " Maximum recursion level reached: %d\n"
|
||||
msgstr " Niveau maximum de rcursion atteint : %d\n"
|
||||
|
@ -276,15 +276,15 @@ msgstr "Usage : %s dictionnaire"
|
|||
msgid " dictionary: path to eliot dawg dictionary"
|
||||
msgstr " dictionnaire : chemin vers un dictionnaire de type dawg pour Eliot"
|
||||
|
||||
#: dic/regexpmain.cpp:94 dic/regexpmain.cpp:118
|
||||
#: dic/regexpmain.cpp:95 dic/regexpmain.cpp:119
|
||||
msgid "Enter a regular expression:"
|
||||
msgstr "Entrer une expression régulière :"
|
||||
|
||||
#: dic/regexpmain.cpp:105
|
||||
#: dic/regexpmain.cpp:106
|
||||
msgid "result:"
|
||||
msgstr "résultat :"
|
||||
|
||||
#: dic/regexpmain.cpp:114 wxwin/searchpanel.cc:296
|
||||
#: dic/regexpmain.cpp:115 wxwin/searchpanel.cc:296
|
||||
msgid "Invalid regular expression: "
|
||||
msgstr "Expression régulière invalide : "
|
||||
|
||||
|
@ -1379,7 +1379,7 @@ msgstr "&Préférences..."
|
|||
|
||||
#: qt/main_window.cpp:326
|
||||
msgid "Ctrl+F"
|
||||
msgstr "Ctrl-F"
|
||||
msgstr "Ctrl+F"
|
||||
|
||||
#: qt/main_window.cpp:327
|
||||
msgid "Edit the preferences"
|
||||
|
@ -1487,7 +1487,8 @@ msgstr ""
|
|||
msgid "History"
|
||||
msgstr "Historique"
|
||||
|
||||
#: qt/main_window.cpp:681 qt/ui/main_window.ui:136
|
||||
#: qt/main_window.cpp:681 qt/ui/dic_tools_widget.ui:13
|
||||
#: qt/ui/main_window.ui:136
|
||||
msgid "Dictionary tools"
|
||||
msgstr "Outils du dictionnaire"
|
||||
|
||||
|
@ -1648,6 +1649,10 @@ msgstr "Changer"
|
|||
msgid "Pass"
|
||||
msgstr "Passer"
|
||||
|
||||
#: qt/ui/prefs_dialog.ui:13
|
||||
msgid "Preferences"
|
||||
msgstr "Préférences"
|
||||
|
||||
#: qt/ui/prefs_dialog.ui:19
|
||||
msgid "Interface"
|
||||
msgstr "Interface"
|
||||
|
@ -1729,9 +1734,6 @@ msgstr "Complément"
|
|||
#~ msgid "New..."
|
||||
#~ msgstr "&Nouvelle partie..."
|
||||
|
||||
#~ msgid "Preferences..."
|
||||
#~ msgstr "&Préférences..."
|
||||
|
||||
#~ msgid "Save"
|
||||
#~ msgstr "Sauver"
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" @QT_CFLAGS@ -DQT4LOCALEDIR=\"@QT4LOCA
|
|||
|
||||
SUFFIXES=.ui.h .moc.cpp
|
||||
|
||||
bin_PROGRAMS = qeliot
|
||||
bin_PROGRAMS = eliot
|
||||
|
||||
RESOURCES = \
|
||||
images/eliot.xpm
|
||||
|
@ -37,7 +37,8 @@ EXTRA_DIST = \
|
|||
ui/prefs_dialog.ui \
|
||||
ui/training_widget.ui \
|
||||
eliot.qrc \
|
||||
$(RESOURCES)
|
||||
$(RESOURCES) \
|
||||
images/eliot.ico
|
||||
|
||||
BUILT_SOURCES = \
|
||||
ui/main_window.ui.h \
|
||||
|
@ -59,7 +60,7 @@ BUILT_SOURCES = \
|
|||
main_window.moc.cpp \
|
||||
resources.cpp
|
||||
|
||||
qeliot_SOURCES = \
|
||||
eliot_SOURCES = \
|
||||
qtcommon.h \
|
||||
bag_widget.cpp bag_widget.h \
|
||||
dic_tools_widget.cpp dic_tools_widget.h \
|
||||
|
@ -73,9 +74,9 @@ qeliot_SOURCES = \
|
|||
aux_window.cpp aux_window.h \
|
||||
main_window.cpp main_window.h \
|
||||
main.cpp
|
||||
qeliot_SOURCES += $(BUILT_SOURCES)
|
||||
eliot_SOURCES += $(BUILT_SOURCES)
|
||||
|
||||
qeliot_LDADD = @QT_LIBS@ ../game/libgame.a ../dic/libdic.a @LIBINTL@
|
||||
eliot_LDADD = @QT_LIBS@ ../game/libgame.a ../dic/libdic.a @LIBINTL@
|
||||
|
||||
# Generate a cpp file from the resources
|
||||
resources.cpp: eliot.qrc $(RESOURCES)
|
||||
|
@ -97,6 +98,18 @@ resources.cpp: eliot.qrc $(RESOURCES)
|
|||
sed 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.tmp >$@
|
||||
rm -f $@.tmp
|
||||
|
||||
# Embed the icon in the win32 binary, see http://doc.trolltech.com/4.4/appicon.html
|
||||
if WIN32_BUILD
|
||||
BUILT_SOURCES += win32icon.rc
|
||||
eliot_SOURCES += win32icon.rc
|
||||
eliot_LDADD += win32icon.o
|
||||
|
||||
win32icon.rc: images/eliot.ico
|
||||
echo "IDI_ICON1 ICON DISCARDABLE \"$(top_srcdir)/qt/images/eliot.ico\"" > $@
|
||||
|
||||
win32icon.o: win32icon.rc
|
||||
i586-mingw32msvc-windres -o $@ -i $<
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
|
BIN
qt/images/eliot.ico
Normal file
BIN
qt/images/eliot.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
17
qt/main.cpp
17
qt/main.cpp
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <string>
|
||||
#include <QApplication>
|
||||
#include <QLocale>
|
||||
#include <QTranslator>
|
||||
|
@ -28,6 +29,9 @@
|
|||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
using std::string;
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
#ifdef HAVE_SETLOCALE
|
||||
|
@ -42,22 +46,23 @@ int main(int argc, char **argv)
|
|||
// Set the message domain
|
||||
#ifdef WIN32
|
||||
// Get the absolute path, as returned by GetFullPathName()
|
||||
char localeDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, localeDir, NULL);
|
||||
char *pos = strrchr(localeDir, L'\\');
|
||||
char baseDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, baseDir, NULL);
|
||||
char *pos = strrchr(baseDir, L'\\');
|
||||
if (pos)
|
||||
*pos = '\0';
|
||||
const string localeDir = baseDir + string("\\locale");
|
||||
#else
|
||||
static const char *localeDir = LOCALEDIR;
|
||||
static const string localeDir = LOCALEDIR;
|
||||
#endif
|
||||
bindtextdomain(PACKAGE, localeDir);
|
||||
bindtextdomain(PACKAGE, localeDir.c_str());
|
||||
textdomain(PACKAGE);
|
||||
|
||||
// Translations for Qt's own strings
|
||||
QTranslator translator;
|
||||
// Set the path for the translation file
|
||||
#ifdef WIN32
|
||||
QString path = localeDir;
|
||||
QString path = QString(localeDir.c_str()) + "\\qt4";
|
||||
#else
|
||||
QString path = QString(QT4LOCALEDIR);
|
||||
#endif
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Form</string>
|
||||
<string>_("Dictionary tools")</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
||||
<item>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Preferences</string>
|
||||
<string>_("Preferences")</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
|
|
|
@ -1123,15 +1123,16 @@ int main(int argc, char ** argv)
|
|||
// Set the message domain
|
||||
#ifdef WIN32
|
||||
// Get the absolute path, as returned by GetFullPathName()
|
||||
char localeDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, localeDir, NULL);
|
||||
char *pos = strrchr(localeDir, L'\\');
|
||||
char baseDir[MAX_PATH];
|
||||
GetFullPathName(argv[0], MAX_PATH, baseDir, NULL);
|
||||
char *pos = strrchr(baseDir, L'\\');
|
||||
if (pos)
|
||||
*pos = '\0';
|
||||
const string localeDir = baseDir + string("\\locale");
|
||||
#else
|
||||
static const char *localeDir = LOCALEDIR;
|
||||
static const string localeDir = LOCALEDIR;
|
||||
#endif
|
||||
bindtextdomain(PACKAGE, localeDir);
|
||||
bindtextdomain(PACKAGE, localeDir.c_str());
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ localedir = $(datadir)/locale
|
|||
|
||||
if BUILD_WXWIDGETS
|
||||
|
||||
bin_PROGRAMS = eliot
|
||||
bin_PROGRAMS = wxeliot
|
||||
|
||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" @WX_CPPFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/dic -I$(top_srcdir)/game
|
||||
|
||||
eliot_SOURCES = \
|
||||
wxeliot_SOURCES = \
|
||||
configdb.cc configdb.h \
|
||||
gfxboard.cc gfxboard.h \
|
||||
gfxresult.cc gfxresult.h \
|
||||
|
@ -36,7 +36,7 @@ eliot_SOURCES = \
|
|||
mainframe.cc mainframe.h \
|
||||
main.cc ewx.h
|
||||
|
||||
eliot_LDADD = @WX_LIBS@ ../game/libgame.a ../dic/libdic.a @LIBINTL@
|
||||
wxeliot_LDADD = @WX_LIBS@ ../game/libgame.a ../dic/libdic.a @LIBINTL@
|
||||
|
||||
EXTRA_DIST = \
|
||||
eliot.xpm \
|
||||
|
|
Loading…
Reference in a new issue