- win32: Makefile: install binaries into standard "bin" directory as done on unix and make standard value for INSTALL variable work on win32/msys as well (INSTALL=install somehow calls the wrong install binary for me)
- win32: main.c: simplify locating the locales directory
This commit is contained in:
parent
b2670d098c
commit
902e9ce6ab
21
Makefile
21
Makefile
|
@ -104,7 +104,7 @@ MANDIRMODE = 755
|
||||||
INCLUDEDIR = $(INSTALLROOT)/include
|
INCLUDEDIR = $(INSTALLROOT)/include
|
||||||
INCLUDEMODE = 644
|
INCLUDEMODE = 644
|
||||||
INCLUDEDIRMODE = 755
|
INCLUDEDIRMODE = 755
|
||||||
INSTALL ?= install
|
INSTALL ?= $(shell which install)
|
||||||
PKGCONFIGDIR ?= $(INSTALLROOT)/lib/pkgconfig
|
PKGCONFIGDIR ?= $(INSTALLROOT)/lib/pkgconfig
|
||||||
LOCALEDIR ?= $(INSTALLROOT)/share/locale
|
LOCALEDIR ?= $(INSTALLROOT)/share/locale
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ gkrellm.pc_win: Makefile
|
||||||
echo "Name: GKrellM" >> gkrellm.pc
|
echo "Name: GKrellM" >> gkrellm.pc
|
||||||
echo "Description: Extensible GTK system monitoring application" >> gkrellm.pc
|
echo "Description: Extensible GTK system monitoring application" >> gkrellm.pc
|
||||||
echo "Version: $(VERSION)" >> gkrellm.pc
|
echo "Version: $(VERSION)" >> gkrellm.pc
|
||||||
echo "Requires: gtk+-2.0 >= 2.0.0" >> gkrellm.pc
|
echo "Requires: gtk+-2.0 >= 2.4.0" >> gkrellm.pc
|
||||||
echo 'Cflags: -I$${prefix}/include' >> gkrellm.pc
|
echo 'Cflags: -I$${prefix}/include' >> gkrellm.pc
|
||||||
echo 'Libs: -L$${prefix}/lib -lgkrellm' >> gkrellm.pc
|
echo 'Libs: -L$${prefix}/lib -lgkrellm' >> gkrellm.pc
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ gkrellm.pc: Makefile
|
||||||
echo "Name: GKrellM" >> gkrellm.pc
|
echo "Name: GKrellM" >> gkrellm.pc
|
||||||
echo "Description: Extensible GTK system monitoring application" >> gkrellm.pc
|
echo "Description: Extensible GTK system monitoring application" >> gkrellm.pc
|
||||||
echo "Version: $(VERSION)" >> gkrellm.pc
|
echo "Version: $(VERSION)" >> gkrellm.pc
|
||||||
echo "Requires: gtk+-2.0 >= 2.0.0" >> gkrellm.pc
|
echo "Requires: gtk+-2.0 >= 2.4.0" >> gkrellm.pc
|
||||||
echo "Cflags: -I$(INCLUDEDIR)" >> gkrellm.pc
|
echo "Cflags: -I$(INCLUDEDIR)" >> gkrellm.pc
|
||||||
|
|
||||||
install: install_gkrellm.pc
|
install: install_gkrellm.pc
|
||||||
|
@ -186,17 +186,10 @@ install_solaris: install_gkrellm.pc
|
||||||
(cd src && ${MAKE} install_solaris)
|
(cd src && ${MAKE} install_solaris)
|
||||||
(cd server && ${MAKE} install_solaris)
|
(cd server && ${MAKE} install_solaris)
|
||||||
|
|
||||||
install_windows:
|
install_windows: install_gkrellm.pc
|
||||||
(${MAKE} INSTALL=/bin/install install_gkrellm.pc)
|
(cd po && ${MAKE} install)
|
||||||
(cd po && ${MAKE} \
|
(cd src && ${MAKE} install_windows)
|
||||||
INSTALL=/bin/install INSTALLDIR=$(INSTALLROOT) LOCALEDIR=$(INSTALLROOT)/share/locale \
|
(cd server && ${MAKE} install_windows)
|
||||||
install)
|
|
||||||
(cd src && ${MAKE} \
|
|
||||||
INSTALL=/bin/install INSTALLDIR=$(INSTALLROOT) LOCALEDIR=$(INSTALLROOT)/share/locale \
|
|
||||||
install_windows)
|
|
||||||
(cd server && ${MAKE} \
|
|
||||||
INSTALL=/bin/install SINSTALLDIR=$(INSTALLROOT) LOCALEDIR=$(INSTALLROOT)/share/locale \
|
|
||||||
install_windows)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
(cd po && ${MAKE} clean)
|
(cd po && ${MAKE} clean)
|
||||||
|
|
|
@ -1609,23 +1609,20 @@ int main(int argc, char* argv[])
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
#ifdef LOCALEDIR
|
#ifdef LOCALEDIR
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
/*
|
gchar *install_path;
|
||||||
Prepend app install path to relative locale dir, don't rely on CWD being correct
|
gchar *locale_dir;
|
||||||
*/
|
// Prepend app install path to locale dir
|
||||||
if (!G_IS_DIR_SEPARATOR(LOCALEDIR[0]))
|
install_path = g_win32_get_package_installation_directory_of_module(NULL);
|
||||||
|
if (install_path != NULL)
|
||||||
|
{
|
||||||
|
locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
|
||||||
|
if (locale_dir != NULL)
|
||||||
{
|
{
|
||||||
gchar* locale_dir;
|
bindtextdomain(PACKAGE_D, locale_dir);
|
||||||
locale_dir = g_win32_get_package_installation_subdirectory(NULL, NULL, LOCALEDIR);
|
g_free(locale_dir);
|
||||||
if (locale_dir != NULL)
|
|
||||||
{
|
|
||||||
bindtextdomain(PACKAGE_D, locale_dir);
|
|
||||||
g_free(locale_dir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bindtextdomain(PACKAGE_D, LOCALEDIR);
|
|
||||||
}
|
}
|
||||||
|
g_free(install_path);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
bindtextdomain(PACKAGE_D, LOCALEDIR);
|
bindtextdomain(PACKAGE_D, LOCALEDIR);
|
||||||
#endif /* !WIN32 */
|
#endif /* !WIN32 */
|
||||||
|
|
27
src/main.c
27
src/main.c
|
@ -2061,23 +2061,20 @@ main(gint argc, gchar **argv)
|
||||||
#ifdef ENABLE_NLS
|
#ifdef ENABLE_NLS
|
||||||
#ifdef LOCALEDIR
|
#ifdef LOCALEDIR
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
/*
|
gchar *install_path;
|
||||||
Prepend app install path to relative locale dir, don't rely on CWD being correct
|
gchar *locale_dir;
|
||||||
*/
|
// Prepend app install path to locale dir
|
||||||
if (!G_IS_DIR_SEPARATOR(LOCALEDIR[0]))
|
install_path = g_win32_get_package_installation_directory_of_module(NULL);
|
||||||
|
if (install_path != NULL)
|
||||||
|
{
|
||||||
|
locale_dir = g_build_filename(install_path, LOCALEDIR, NULL);
|
||||||
|
if (locale_dir != NULL)
|
||||||
{
|
{
|
||||||
gchar* locale_dir;
|
bindtextdomain(PACKAGE, locale_dir);
|
||||||
locale_dir = g_win32_get_package_installation_subdirectory(NULL, NULL, LOCALEDIR);
|
g_free(locale_dir);
|
||||||
if (locale_dir != NULL)
|
|
||||||
{
|
|
||||||
bindtextdomain(PACKAGE, locale_dir);
|
|
||||||
g_free(locale_dir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
|
||||||
}
|
}
|
||||||
|
g_free(install_path);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||||
#endif /* !WIN32 */
|
#endif /* !WIN32 */
|
||||||
|
|
Loading…
Reference in New Issue