- 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,22 +1609,19 @@ 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
|
|
||||||
*/
|
|
||||||
if (!G_IS_DIR_SEPARATOR(LOCALEDIR[0]))
|
|
||||||
{
|
|
||||||
gchar *locale_dir;
|
gchar *locale_dir;
|
||||||
locale_dir = g_win32_get_package_installation_subdirectory(NULL, NULL, LOCALEDIR);
|
// Prepend app install path to locale dir
|
||||||
|
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)
|
if (locale_dir != NULL)
|
||||||
{
|
{
|
||||||
bindtextdomain(PACKAGE_D, locale_dir);
|
bindtextdomain(PACKAGE_D, locale_dir);
|
||||||
g_free(locale_dir);
|
g_free(locale_dir);
|
||||||
}
|
}
|
||||||
}
|
g_free(install_path);
|
||||||
else
|
|
||||||
{
|
|
||||||
bindtextdomain(PACKAGE_D, LOCALEDIR);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
bindtextdomain(PACKAGE_D, LOCALEDIR);
|
bindtextdomain(PACKAGE_D, LOCALEDIR);
|
||||||
|
|
17
src/main.c
17
src/main.c
|
@ -2061,22 +2061,19 @@ 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
|
|
||||||
*/
|
|
||||||
if (!G_IS_DIR_SEPARATOR(LOCALEDIR[0]))
|
|
||||||
{
|
|
||||||
gchar *locale_dir;
|
gchar *locale_dir;
|
||||||
locale_dir = g_win32_get_package_installation_subdirectory(NULL, NULL, LOCALEDIR);
|
// Prepend app install path to locale dir
|
||||||
|
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)
|
if (locale_dir != NULL)
|
||||||
{
|
{
|
||||||
bindtextdomain(PACKAGE, locale_dir);
|
bindtextdomain(PACKAGE, locale_dir);
|
||||||
g_free(locale_dir);
|
g_free(locale_dir);
|
||||||
}
|
}
|
||||||
}
|
g_free(install_path);
|
||||||
else
|
|
||||||
{
|
|
||||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||||
|
|
Loading…
Reference in New Issue