Add version information to the lyx executable on Windows.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19538 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2007-08-14 01:38:12 +00:00
parent 6084e59610
commit e70cf8eec0
4 changed files with 88 additions and 0 deletions

View File

@ -717,3 +717,20 @@ do
break],
[AC_MSG_RESULT(no)])
done])
dnl Extract the single digits from PACKAGE_VERSION and make them available.
dnl Defines LYX_MAJOR_VERSION, LYX_MINOR_VERSION, LYX_RELEASE_LEVEL, and
dnl LYX_RELEASE_PATCH, the latter being possibly equal to 0.
AC_DEFUN([LYX_SET_VERSION_INFO],
[lyx_major=`echo $PACKAGE_VERSION | sed -e 's/[[.]].*//'`
lyx_patch=`echo $PACKAGE_VERSION | sed -e "s/^$lyx_major//" -e 's/^.//'`
lyx_minor=`echo $lyx_patch | sed -e 's/[[.]].*//'`
lyx_patch=`echo $lyx_patch | sed -e "s/^$lyx_minor//" -e 's/^.//'`
lyx_release=`echo $lyx_patch | sed -e 's/[[^0-9]].*//'`
lyx_patch=`echo $lyx_patch | sed -e "s/^$lyx_release//" -e 's/^[[.]]//' -e 's/[[^0-9]].*//'`
test "x$lyx_patch" = "x" && lyx_patch=0
AC_SUBST(LYX_MAJOR_VERSION,$lyx_major)
AC_SUBST(LYX_MINOR_VERSION,$lyx_minor)
AC_SUBST(LYX_RELEASE_LEVEL,$lyx_release)
AC_SUBST(LYX_RELEASE_PATCH,$lyx_patch)
])

View File

@ -281,6 +281,13 @@ LIBS="$save_LIBS"
AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir)
AC_LANG_POP(C)
lyx_win_res=false;
case ${host} in
*mingw*|*cygwin*) lyx_win_res=true;;
esac
AM_CONDITIONAL(LYX_WIN_RESOURCE, $lyx_win_res)
LYX_SET_VERSION_INFO
AC_FUNC_SELECT_ARGTYPES
### Some information on what just happened
@ -400,6 +407,11 @@ int mkstemp(char*);
#endif
])
AC_DEFINE_UNQUOTED([LYX_MAJOR_VERSION],$lyx_major,[Major version number])
AC_DEFINE_UNQUOTED([LYX_MINOR_VERSION],$lyx_minor,[Minor version number])
AC_DEFINE_UNQUOTED([LYX_RELEASE_LEVEL],$lyx_release,[Release version number])
AC_DEFINE_UNQUOTED([LYX_RELEASE_PATCH],$lyx_patch,[Patch version number])
### Finish the work.
AC_CONFIG_FILES([Makefile
boost/Makefile \

View File

@ -41,6 +41,13 @@ lyx$(EXEEXT): $(FRONTENDS_PROGS)
rm -f $@
$(LN_S) $< $@
if LYX_WIN_RESOURCE
lyx_qt4_SOURCES += lyxwinres.rc
.rc.o:
cp $(top_srcdir)/development/Win32/packaging/icons/lyx_*32x32.ico .
windres -I. --preprocessor "$(CPP) -xc-header -DRC_INVOKED" $< -o $@
endif
#lyx_LDFLAGS=-Wl,-O1
BUILT_SOURCES = $(PCH_FILE) version.cpp

52
src/lyxwinres.rc Normal file
View File

@ -0,0 +1,52 @@
/* Icons */
IDI_ICON1 ICON DISCARDABLE "lyx_32x32.ico"
IDI_ICON2 ICON DISCARDABLE "lyx_doc_32x32.ico"
#include "config.h"
#include <winver.h>
#ifdef _WIN32
#define PLATFORM "Windows"
#define PRODNAME "LyX/Win"
#else
#define PLATFORM "Cygwin"
#define PRODNAME "LyX/Cygwin"
#endif
#if LYX_RELEASE_PATCH > 0
#define PATCH_TAG ".LYX_RELEASE_PATCH"
#else
#define PATCH_TAG ""
#endif
LANGUAGE 0x9, 0x1 /* LANG_ENGLISH, SUBLANG_DEFAULT */
VS_VERSION_INFO VERSIONINFO
FILEVERSION LYX_MAJOR_VERSION,LYX_MINOR_VERSION,LYX_RELEASE_LEVEL,LYX_RELEASE_PATCH
PRODUCTVERSION LYX_MAJOR_VERSION,LYX_MINOR_VERSION,LYX_RELEASE_LEVEL,LYX_RELEASE_PATCH
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0x0L
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0x0L
{
BLOCK "StringFileInfo"
{
BLOCK "040904b0"
{
VALUE "FileDescription", "LyX for " PLATFORM "\0"
VALUE "OriginalFilename", "lyx.exe\0"
VALUE "CompanyName", "LyX Team\0"
VALUE "FileVersion", "LYX_MAJOR_VERSION.LYX_MINOR_VERSION.LYX_RELEASE_LEVEL" PATCH_TAG "\0"
VALUE "InternalName", "LyX\0"
VALUE "LegalCopyright", "Copyright \251 1995 by Matthias Ettrich, 1995-2006 LyX Team\0"
VALUE "ProductName", PRODNAME "\0"
VALUE "ProductVersion", PACKAGE_VERSION "\0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1200
}
}