LyX 1.5 Windows installer

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15734 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Joost Verburg 2006-11-04 14:28:11 +00:00
parent 60059d0c08
commit b61b9cc6a4
103 changed files with 6791 additions and 14986 deletions

View File

@ -1,126 +1,56 @@
=================
INSTALL for Win32
=================
Compiling LyX 1.5 for Win32
===========================
LyX can be built with either MinGW/MSYS or Microsoft Visual Studio. The
instructions below describe the detailed steps needed to set up a MinGW/MSYS
environment ready to compile LyX. Several of these steps (installation of the
third-party libraries) need to be performed for a MSVS build also but, of
course, the details of how to do so are different. Nonetheless, we hope that
the description below provides the MSVS developer with enough info to get
started.
LyX 1.5 can be compiled with Microsoft Visual C++ 2005.
Building LyX the first time can appear to be a daunting task but much of that
is knowing which packages to download in the first place. Once you've set up
the build environment, actually building LyX should be straightforward.
Compiling
=========
The instructions below should guide you through the installation of the
MinGW/MSYS build environment, together with details on how to grab and build
gettext, libiconv, qtwin, and aspell.
1 Install MSVC 2005
If you don't have MSVC 2005 installed, download and install the free
Express edition from http://msdn.microsoft.com/vstudio/express/visualc/
You also need to install the Platform SDK, see
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
2 Install Python
Get the latest Python 2.5 version at
http://www.python.org/download/releases/2.5/
Install in C:\Python25 and add this directory to the PATH environment
variable (Start > Settings > Control Panel > System > Advanced >
Environment Variables).
3 Install SCons
Download and install SCons 0.96.92 from http://www.scons.org/download.php
4 Install the dependencies
Download ftp://ftp.lyx.org/pub/lyx/contrib/lyx-windows-deps-msvc-qt4.zip
and extract in the root directory of your LyX files (so you will get
a directory called lyx-windows-deps-msvc next to the other directories
like src, development etc.).
5 Compile
Run development\Win32\packaging\build_msvc.bat
Once you've done all that, you should go read the README in
development/Win32/packaging/ (MSVS users just open up development/Win32/lyx.sln
and click Build) The two scripts in the same directory, build_lyxwin.sh and
package_lyxwin.sh should automate the entire build process. If not and you
really can't figure out what to do next, then please, please drop a mail to
lyx-devel@lists.lyx.org.
Enjoy!
The LyX Team
=============================================================================
1 MinGW & MSYS
1.1 Download the following packages from http://www.mingw.org/download.shtml:
binutils-2.16.91-...tar.gz
gcc-core-3.4.5-...tar.gz
gcc-g++-3.4.5-...tar.gz
mingw32-make-3.80.0-3.tar.gz
mingw-runtime-3.9.tar.gz
mingw-utils-0.3.tar.gz
MSYS-1.0.11-...exe
msys-autoconf-2.59.tar.bz2
msys-automake-1.8.2.tar.bz2
msysDTK-1.0.1.exe
msys-libtool-1.5.tar.bz2
w32api-3.6.tar.gz
1.2 Install in C:\MinGW
binutils, gcc-core, gcc-g++, mingw32-make, mingw-runtime,
mingw-utils, w32api
1.3 Install in C:\msys
MSYS, msys-autoconf, msys-automake, msysDTK, msys-libtool
2 Gettext
2.1 Download the following package from http://www.gnu.org/software/gettext:
gettext-0.14.5.tar.gz
2.2 Extract the package in your home directory and run
./configure --disable-shared --prefix=/mingw
make
make install
3 Libiconv
3.1 Download the following package from http://www.gnu.org/software/libiconv:
libiconv-1.10.tar.gz
3.2 Extract the package in your home directory and run
./configure --prefix=/mingw
make
make install
4 QTWIN (see http://sourceforge.net/projects/qtwin)
4.1 Get the latest CVS version
Using the cvs executable that is packaged with MSYS,
from the MSYS command prompt:
cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/qtwin login
<return> (i.e., no password)
cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/qtwin co \
-r QT_WIN32_3_3_BRANCH qt-3
4.2 Compile the qtwin library
Open a Windows command line (run cmd.exe) and enter
cd <path_to_your_qtwin_dir>
set QMAKESPEC=win32-g++
setenv.bat
configure.bat -release
5. Aspell
5.1 Download the following package from http://aspell.net/
aspell-0.60.4.tar.gz
5.2 Extract the package in your home directory.
Use development/Win32/packaging/build_aspell.sh to build Aspell now.
5.3 You can download pre-compiled aspell dictionaries from
http://wiki.lyx.org/Windows/Aspell6
6. LyX
6.1 As mentioned above, read the README in development/Win32/packaging.
=============================================================================
Creating the Installer
======================
To create an installer with LyX and all related components, download
and install the latest NSIS from http://nsis.sourceforge.net
Also download the InetLoad plug-in from
http://nsis.sourceforge.net/InetLoad_plug-in and save InetLoad.dll in
the NSIS Plugins directory.
Open development\Win32\packaging\installer\setttings.user.nsh and modify
the settings depending on your build environment.
Finally, go to development\Win32\packaging\installer
(in a normal Windows Explorer), right-click on lyx.nsi and click
"Compile NSIS Script".

View File

@ -1,32 +1,17 @@
================
README for Win32
================
LyX for Windows
===============
If you just want to use LyX, get the official Windows installer and
use that. More detailed help can be found on the wiki at
http://wiki.lyx.org/Windows.
Since July 2005, an official native Windows version of LyX is available.
It requires Windows 2000, XP, Server 2003 or later.
If you want to compile LyX yourself, there are a number of ways to do
that.
Binary Releases
===============
LyX has been ported to Win32 using three different compilers:
Microsoft Visual Studio C++ compiler (VC). MinGW gcc, or Cygwin gcc.
Ready-to-use installers can be downloaded from http://wiki.lyx.org/Windows
Additional information and tips are also available on this site.
There are also three different build solutions avaiable: Scons, Cmake
or using the traditional Unix autoconf machinery.
INSTALL.scons covers how to build using SCons, using any of the three
compilers.
development/cmake/README.cmake explains how to build using CMake. This
is especially good with VC, because it produces real .sln files.
See INSTALL.win32 for info about how to build using Cygwin.
Joost has prepared a .zip package with most of the stuff that you'll
need to compile LyX yourself. Get that from
ftp://ftp.lyx.org/pub/lyx/contrib/lyx-windows-deps-msvc.zip.
Unzip in c:\program files\ and rename the directory to gnuwin32, and
you will find that the CMake solution works almost out of the box,
if you have Visual Studio.
Compiling
=========
If you want to participate in the development of LyX and need to compile
LyX for Windows yourself, please follow the instructions in INSTALL.Win32

View File

@ -1,221 +0,0 @@
project(aspell)
# default: build rel_0_60-branch
# -DCVS_HEAD=1: build cvs HEAD version
set(ASPELL_LIB_NAME libaspell)
set(ASPELL_EXE_NAME aspell)
if(${LINK} MATCHES "shared" OR ASPELL_LINK)
set(ASPELL_SHARED_LIB 1)
set(ASPELL_LINK SHARED CACHE TYPE STRING)
else(${LINK} MATCHES "shared" OR ASPELL_LINK)
#MESSAGE(STATUS)
#MESSAGE(STATUS "Use -DLINK=shared to build the libraries as shared")
#MESSAGE(STATUS)
set(ASPELL_LINK STATIC)
endif(${LINK} MATCHES "shared" OR ASPELL_LINK)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
########################################################################
#
# Aspell Library
#
set(libaspell_sources
../common/cache.cpp
../common/string.cpp
../common/getdata.cpp
../common/itemize.cpp
../common/file_util.cpp
../common/string_map.cpp
../common/string_list.cpp
../common/config.cpp
../common/posib_err.cpp
../common/errors.cpp
../common/error.cpp
../common/fstream.cpp
../common/iostream.cpp
../common/info.cpp
../common/can_have_error.cpp
../common/convert.cpp
../common/speller.cpp
../common/filter.cpp
../common/objstack.cpp
../common/strtonum.cpp
../common/gettext_init.cpp
../common/file_data_util.cpp
../modules/speller/default/readonly_ws.cpp
../modules/speller/default/suggest.cpp
../modules/speller/default/data.cpp
../modules/speller/default/multi_ws.cpp
../modules/speller/default/phonetic.cpp
../modules/speller/default/writable.cpp
../modules/speller/default/speller_impl.cpp
../modules/speller/default/phonet.cpp
../modules/speller/default/typo_editdist.cpp
../modules/speller/default/editdist.cpp
../modules/speller/default/primes.cpp
../modules/speller/default/leditdist.cpp
../modules/speller/default/affix.cpp
../lib/word_list-c.cpp
../lib/info-c.cpp
../lib/mutable_container-c.cpp
../lib/error-c.cpp
../lib/string_map-c.cpp
../lib/new_config.cpp
../lib/config-c.cpp
../lib/string_enumeration-c.cpp
../lib/can_have_error-c.cpp
../lib/dummy.cpp
../lib/new_filter.cpp
../lib/new_fmode.cpp
../lib/string_list-c.cpp
../lib/find_speller.cpp
../lib/speller-c.cpp
../lib/string_pair_enumeration-c.cpp
../lib/new_checker.cpp
# This is for filters which are ALWAYS static.
# The url filter is always usefull and fairly simple.
# The genconv filter is mostly defined in the main aspell libarary
# since it is used by other filters. The actual genconv filter
# is just a small wrapper.
../modules/filter/url.cpp
)
if(NOT CVS_HEAD)
set(libaspell_sources ${libaspell_sources}
../common/tokenizer.cpp
../common/document_checker.cpp
../modules/speller/default/language.cpp
../modules/tokenizer/basic.cpp
../lib/filter-c.cpp
../lib/document_checker-c.cpp
# msvc win32 support
)
if(MSVC)
set(libaspell_sources ${libaspell_sources} ../win32/dirent.c)
endif(MSVC)
else(NOT CVS_HEAD)
set(libaspell_sources ${libaspell_sources}
../common/convert_filter.cpp
../common/checker.cpp
../modules/speller/default/checker_impl.cpp
../modules/speller/default/lang_impl.cpp
../lib/speller-cm.cpp
../lib/checker-c.cpp
../lib/document_checker-c.cpp
../lib/convert-c.cpp
../lib/language-c.cpp
../lib/language_types-c.cpp
../lib/language-cm.cpp
../lib/munch_list.cpp
../modules/filter/genconv.cpp
# msvc win32 support
../win32/libstub.cpp
)
set(CVS_HEAD 1 CACHE TYPE STRING)
endif(NOT CVS_HEAD)
file(GLOB commons_headers ../common/*.hpp )
set(commons_headers ${commons_headers} ../interfaces/cc/aspell.h)
if(COMPILE_IN_FILTERS)
### Add your filter sources here,
### starting with file containing filter class definition followed by
### file containing filter member implementation.
set(libaspell_sources
${libaspell_sources}
../modules/filter/email.cpp
../modules/filter/tex.cpp
../modules/filter/sgml.cpp
../modules/filter/context.cpp
../modules/filter/nroff.cpp
../modules/filter/texinfo.cpp
)
endif(COMPILE_IN_FILTERS)
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/../win32
${CMAKE_SOURCE_DIR}/../gen
${CMAKE_SOURCE_DIR}/../lib
${CMAKE_SOURCE_DIR}/../common
${CMAKE_SOURCE_DIR}/../modules
${CMAKE_SOURCE_DIR}/../modules/filter
${CMAKE_SOURCE_DIR}/../modules/speller
${CMAKE_SOURCE_DIR}/../modules/speller/default
${CMAKE_SOURCE_DIR}/../interfaces/cc
)
if(MSVC)
# debug library name: aspelld.lib
# release library name: aspell.lib
set(CMAKE_DEBUG_POSTFIX "d")
if(MSVC_IDE)
else(MSVC_IDE)
SET(CMAKE_EXE_LINKER_FLAGS /MANIFEST)
endif(MSVC_IDE)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Zi -wd4522 -wd4521 -wd4996 -wd4800")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -wd4522 -wd4521 -wd4996 -wd4800")
SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
endif(MSVC)
if(WIN32)
add_definitions(-DWIN32PORT)
endif(WIN32)
if(ASPELL_SHARED_LIB)
add_definitions(-DASPELL_MAKE_LIB -DASPELL_USE_SHARED)
endif(ASPELL_SHARED_LIB)
add_library(${ASPELL_LIB_NAME} ${ASPELL_LINK} ${libaspell_sources} ${commons_headers})
if(WIN32)
target_link_libraries(${ASPELL_LIB_NAME} ole32)
endif(WIN32)
########################################################################
#
# Aspell Program
#
add_subdirectory(prog)
########################################################################
#
# Install
#
set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/../gnuwin32)
install(TARGETS ${ASPELL_LIB_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(FILES ../interfaces/cc/aspell.h
DESTINATION include)
if(ASPELL_SHARED_LIB)
install(FILES ../win32/aspellexport.h
DESTINATION include)
endif(ASPELL_SHARED_LIB)

View File

@ -1,43 +0,0 @@
Aspell on Windows
Use the rel_0_60-branch, HEAD is not stable.
You need cmake and cygwin (cvs-HEAD:with Unix line endings!!).
- check out the rel_0_60-branch version of Aspell
http://savannah.gnu.org/cvs/?group=aspell
cvs -z9 -d:pserver:anonymous@cvs.savannah.gnu.org:\
/sources/aspell co -r rel_0_60-branch aspell
- first build with cygwin to autogenerate
all required files:
./autogen
./configure
./make
- copy the files from the LyX SVN aspell/win32
- with cygwin patch aspell, call in aspell/:
patch -p0 -i win32/win32-aspell-0.60.patch
- make a separate build directory and run
on a standard Windows command promp
cmake <Aspell source directory>\win32
build and install debug AND release libraries
- build mingw makefiles files in
- cmd.exe shell:
cmake -G"MinGW Makefiles" <Aspell source directory>\win32
- in a MSYS shell
cmake -G"MSYS Makefiles" <Aspell source directory>\win32
- add "" to fix the msvc error in the generated file gen/static_filters.src.cpp
The patched Aspell reads the location of the dictonary from
the registry. You can either install the dictionaries using
the official 1.4.2 installer or download them at:
http://wiki.lyx.org/Windows/Aspell6

View File

@ -1,157 +0,0 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* Portions of this software are based upon public domain software
* originally written at the National Center for Supercomputing Applications,
* University of Illinois, Urbana-Champaign.
*/
#include <windows.h>
#include <malloc.h>
#include <string.h>
#include <errno.h>
#include "dirent.h"
/**********************************************************************
* Implement dirent-style opendir/readdir/closedir on Window 95/NT
*
* Functions defined are opendir(), readdir() and closedir() with the
* same prototypes as the normal dirent.h implementation.
*
* Does not implement telldir(), seekdir(), rewinddir() or scandir().
* The dirent struct is compatible with Unix, except that d_ino is
* always 1 and d_off is made up as we go along.
*
* The DIR typedef is not compatible with Unix.
**********************************************************************/
#ifndef __MINGW32__
KDEWIN32_EXPORT DIR * opendir(const char *dir)
{
DIR *dp;
char *filespec;
long handle;
int index;
filespec = malloc(strlen(dir) + 2 + 1);
strcpy(filespec, dir);
index = strlen(filespec) - 1;
if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\'))
filespec[index] = '\0';
strcat(filespec, "\\*");
dp = (DIR *)malloc(sizeof(DIR));
dp->offset = 0;
dp->finished = 0;
dp->dir = strdup(dir);
if ((handle = _findfirst(filespec, &(dp->fileinfo))) < 0) {
if (errno == ENOENT)
dp->finished = 1;
else
return NULL;
}
dp->handle = handle;
free(filespec);
return dp;
}
KDEWIN32_EXPORT struct dirent * readdir(DIR *dp)
{
if (!dp || dp->finished) return NULL;
if (dp->offset != 0) {
if (_findnext(dp->handle, &(dp->fileinfo)) < 0) {
dp->finished = 1;
/* posix does not set errno in this case */
errno = 0;
return NULL;
}
}
dp->offset++;
strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME);
#ifdef KDEWIN32_HAVE_DIRENT_D_TYPE
dp->dent.d_type = DT_UNKNOWN;
#endif
dp->dent.d_ino = 1;
dp->dent.d_reclen = strlen(dp->dent.d_name);
dp->dent.d_off = dp->offset;
return &(dp->dent);
}
KDEWIN32_EXPORT int closedir(DIR *dp)
{
if (!dp) return 0;
_findclose(dp->handle);
if (dp->dir) free(dp->dir);
if (dp) free(dp);
return 0;
}
#endif // #ifndef __MINGW32__
KDEWIN32_EXPORT struct dirent* readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
{
//todo: remove this when readdir_r.c will be ported
result = 0;
return 0;
}

View File

@ -1,97 +0,0 @@
/* This file is part of the KDE project
Copyright (C) 2000 Werner Almesberger
libc/sys/linux/sys/dirent.h - Directory entry as returned by readdir
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDEWIN_SYS_DIRENT_H
#define KDEWIN_SYS_DIRENT_H
// include everywhere
#include <sys/types.h>
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
//#include <sys/lock.h>
# define F_OK 0 //does the file exist?
#ifdef __cplusplus
extern "C" {
#endif
#define HAVE_NO_D_NAMLEN /* no struct dirent->d_namlen */
#define HAVE_DD_LOCK /* have locking mechanism */
#define MAXNAMLEN 255 /* sizeof(struct dirent.d_name)-1 */
#define __dirfd(dir) (dir)->dd_fd
/* struct dirent - same as Unix */
struct dirent {
long d_ino; /* inode (always 1 in WIN32) */
off_t d_off; /* offset to this dirent */
unsigned short d_reclen; /* length of d_name */
char d_name[_MAX_FNAME+1]; /* filename (null terminated) */
};
/* typedef DIR - not the same as Unix */
typedef struct {
long handle; /* _findfirst/_findnext handle */
short offset; /* offset into directory */
short finished; /* 1 if there are not more files */
struct _finddata_t fileinfo; /* from _findfirst/_findnext */
char *dir; /* the dir we are reading */
struct dirent dent; /* the dirent to return */
} DIR;
/* --- redundant --- */
//DIR *opendir(const char *);
//struct dirent *readdir(DIR *);
//void rewinddir(DIR *);
//int closedir(DIR *);
/* internal prototype */
void _seekdir(DIR *dir,off_t offset);
//#ifndef _POSIX_SOURCE
//long telldir (DIR *);
//void seekdir (DIR *, off_t loc);
#define KDEWIN32_EXPORT
KDEWIN32_EXPORT int scandir (const char *__dir,
struct dirent ***__namelist,
int (*select) (const struct dirent *),
int (*compar) (const struct dirent **, const struct dirent **));
KDEWIN32_EXPORT DIR * opendir(const char *);
KDEWIN32_EXPORT int closedir(DIR *);
KDEWIN32_EXPORT struct dirent* readdir(DIR *);
KDEWIN32_EXPORT struct dirent* readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
int alphasort (const struct dirent **__a, const struct dirent **__b);
#ifdef __cplusplus
}
#endif
#endif // KDEWIN_SYS_DIRENT_H

View File

@ -1,51 +0,0 @@
#ifndef minimum_windows_declarations_h
#define minimum_windows_declarations_h
//Tell windows.h not to make declarations that we do not use
//See windows.h for descriptions of what is turned off by what.
#define NOGDICAPMASKS
#define NOVIRTUALKEYCODES
#define NOWINMESSAGES
#define NOWINSTYLES
#define NOSYSMETRICS
#define NOMENUS
#define NOICONS
#define NOKEYSTATES
#define NOSYSCOMMANDS
#define NORASTEROPS
#define NOSHOWWINDOW
#define OEMRESOURCE
#define NOATOM
#define NOCLIPBOARD
#define NOCOLOR
#define NOCTLMGR
#define NODRAWTEXT
#define NOGDI
#define NOKERNEL
#define NOUSER
#define NONLS
#define NOMB
#define NOMEMMGR
#define NOMETAFILE
#ifndef NOMINMAX
#define NOMINMAX
#endif
#define NOMSG
#define NOOPENFILE
#define NOSCROLL
#define NOSERVICE
#define NOSOUND
#define NOTEXTMETRIC
#define NOWH
#define NOWINOFFSETS
#define NOCOMM
#define NOKANJI
#define NOHELP
#define NOPROFILER
#define NODEFERWINDOWPOS
#define NOCRYPT
#define NOMCX
# include <windows.h>
#endif

View File

@ -1,36 +0,0 @@
project(aspell)
########################################################################
#
# Aspell Program
#
set(aspell_SOURCES
../../prog/aspell.cpp
../../prog/check_funs.cpp
../../prog/checker_string.cpp
)
add_executable(${ASPELL_EXE_NAME} ${aspell_SOURCES})
if(WIN32)
target_link_libraries(${ASPELL_EXE_NAME} ${ASPELL_LIB_NAME} ole32)
endif(WIN32)
########################################################################
#
# Install
#
set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/../gnuwin32)
install(TARGETS ${ASPELL_EXE_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
install(FILES ../interfaces/cc/aspell.h
DESTINATION include)

View File

@ -1,388 +0,0 @@
Index: common/config.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/config.cpp,v
retrieving revision 1.72.2.1
diff -u -B -b -r1.72.2.1 config.cpp
--- common/config.cpp 22 Jun 2005 05:32:29 -0000 1.72.2.1
+++ common/config.cpp 18 Sep 2006 17:42:40 -0000
@@ -1521,3 +1521,61 @@
}
}
+
+
+
+
+#ifdef WIN32PORT
+
+#include "string.hpp"
+
+
+namespace acommon {
+
+ String ReadRegString(HKEY hive, String key, String name)
+ {
+
+ // Reads a string from the Windows registry (used to get paths)
+
+ HKEY hKey;
+ unsigned long lType;
+ DWORD dwSize;
+ unsigned char* szValue = NULL;
+
+ if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
+ {
+ szValue = new unsigned char[dwSize + 1];
+ ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
+ String RegistryReturn((char*)szValue);
+ delete[] szValue;
+ return RegistryReturn;
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+
+ }
+
+ HKEY GetRegHive()
+ {
+
+ // Check whether Aspell is installed for the current user or for all users
+
+ String value;
+
+ if (ReadRegString(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Dictionary Path") == "")
+ {
+ return HKEY_CURRENT_USER;
+ } else {
+ return HKEY_LOCAL_MACHINE;
+ }
+
+ }
+
+}
+
+#endif //WIN32PORT
Index: common/config.hpp
===================================================================
RCS file: /sources/aspell/aspell/common/config.hpp,v
retrieving revision 1.25
diff -u -B -b -r1.25 config.hpp
--- common/config.hpp 18 Nov 2004 02:01:53 -0000 1.25
+++ common/config.hpp 18 Sep 2006 17:42:41 -0000
@@ -277,5 +277,20 @@
}
+#ifdef WIN32PORT
+
+#include "minwin.h"
+
+
+
+namespace acommon {
+
+ extern HKEY GetRegHive();
+ extern String ReadRegString(HKEY type, String key, String name);
+
+}
+
+#endif
+
#endif
Index: common/file_util.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/file_util.cpp,v
retrieving revision 1.10
diff -u -B -b -r1.10 file_util.cpp
--- common/file_util.cpp 15 Nov 2004 12:29:53 -0000 1.10
+++ common/file_util.cpp 18 Sep 2006 17:42:41 -0000
@@ -30,6 +30,8 @@
# define ACCESS _access
# include <windows.h>
# include <winbase.h>
+# include <dirent.h>
+# include <asc_ctype.hpp>
#else
Index: common/gettext_init.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/gettext_init.cpp,v
retrieving revision 1.4
diff -u -B -b -r1.4 gettext_init.cpp
--- common/gettext_init.cpp 9 Nov 2004 08:20:24 -0000 1.4
+++ common/gettext_init.cpp 18 Sep 2006 17:42:41 -0000
@@ -16,7 +16,20 @@
if (did_init) return;
did_init = true;
}
+#ifdef WIN32PORT
+ // Registry key for Locale Path
+
+ aspell::String value;
+ HKEY hive;
+
+ hive = acommon::GetRegHive();
+ value = acommon::ReadRegString(hive, "Software\\Aspell", "Locale Path");
+ if (value == "") value = LOCALEDIR;
+
+ bindtextdomain("aspell", value.c_str());
+#else
bindtextdomain("aspell", LOCALEDIR);
+#endif
}
#else
Index: common/info.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/info.cpp,v
retrieving revision 1.34
diff -u -B -b -r1.34 info.cpp
--- common/info.cpp 10 Nov 2004 06:18:45 -0000 1.34
+++ common/info.cpp 18 Sep 2006 17:42:42 -0000
@@ -493,7 +493,17 @@
StringList & lst)
{
lst.clear();
- lst.add(config->retrieve("data-dir"));
+ String dictpath;
+
+#ifdef WIN32PORT
+ HKEY hive = acommon::GetRegHive();
+ // Registry key for dictionary path
+ dictpath =acommon::ReadRegString(hive, "Software\\Aspell", "Dictionary Path");;
+ if (dictpath == "") dictpath = config->retrieve("data-dir");
+#else
+ dictpath = config->retrieve("data-dir");
+#endif
+ lst.add(dictpath);
lst.add(config->retrieve("dict-dir"));
}
Index: common/objstack.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/objstack.cpp,v
retrieving revision 1.5
diff -u -B -b -r1.5 objstack.cpp
--- common/objstack.cpp 29 Jun 2004 00:18:16 -0000 1.5
+++ common/objstack.cpp 18 Sep 2006 17:42:42 -0000
@@ -1,6 +1,7 @@
#include "objstack.hpp"
+namespace std {}
namespace acommon {
using namespace std;
Index: common/posib_err.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/posib_err.cpp,v
retrieving revision 1.16
diff -u -B -b -r1.16 posib_err.cpp
--- common/posib_err.cpp 21 Nov 2004 02:52:22 -0000 1.16
+++ common/posib_err.cpp 18 Sep 2006 17:42:42 -0000
@@ -4,6 +4,7 @@
// license along with this library if you did not you can find
// it at http://www.gnu.org/.
+#include <settings.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
Index: common/vector.hpp
===================================================================
RCS file: /sources/aspell/aspell/common/vector.hpp,v
retrieving revision 1.12
diff -u -B -b -r1.12 vector.hpp
--- common/vector.hpp 21 Jun 2004 02:40:07 -0000 1.12
+++ common/vector.hpp 18 Sep 2006 17:42:42 -0000
@@ -36,13 +36,13 @@
}
T * data() {return &*this->begin();}
T * data(int pos) {return &*this->begin() + pos;}
- T * data_end() {return &*this->end();}
+ T * data_end() {return &this->back()+1;}
T * pbegin() {return &*this->begin();}
- T * pend() {return &*this->end();}
+ T * pend() {return &this->back()+1;}
const T * pbegin() const {return &*this->begin();}
- const T * pend() const {return &*this->end();}
+ const T * pend() const {return &this->back()+1;}
template <typename U>
U * datap() {
Index: modules/speller/default/affix.hpp
===================================================================
RCS file: /sources/aspell/aspell/modules/speller/default/affix.hpp,v
retrieving revision 1.19
diff -u -B -b -r1.19 affix.hpp
--- modules/speller/default/affix.hpp 29 Nov 2004 17:50:06 -0000 1.19
+++ modules/speller/default/affix.hpp 18 Sep 2006 17:42:42 -0000
@@ -109,7 +109,7 @@
}
WordAff * expand_suffix(ParmString word, const unsigned char * new_aff,
ObjStack &, int limit = INT_MAX,
- unsigned char * new_aff = 0, WordAff * * * l = 0,
+ unsigned char * new_aff2 = 0, WordAff * * * l = 0,
ParmString orig_word = 0) const;
private:
Index: win32/settings.h
===================================================================
RCS file: /sources/aspell/aspell/win32/settings.h,v
retrieving revision 1.2
diff -u -B -b -r1.2 settings.h
--- win32/settings.h 3 Jan 2004 12:06:25 -0000 1.2
+++ win32/settings.h 18 Sep 2006 17:42:43 -0000
@@ -1,44 +1,43 @@
-/* common/settings.h. Generated by configure. */
/* common/settings.h.in. Generated from configure.ac by autoheader. */
/* Defined if no special Workarounds are needed for Curses headers */
-/* #undef CURSES_INCLUDE_STANDARD */
+#undef CURSES_INCLUDE_STANDARD
/* Defined if special Wordaround I is need for Curses headers */
-/* #undef CURSES_INCLUDE_WORKAROUND_1 */
+#undef CURSES_INCLUDE_WORKAROUND_1
/* Defined if curses like POSIX Functions should be used */
-/* #undef CURSES_ONLY */
+#undef CURSES_ONLY
/* Defined if win32 relocation should be used */
-/* #undef ENABLE_WIN32_RELOCATABLE */
+#define ENABLE_WIN32_RELOCATABLE 1
/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
+#undef HAVE_DLFCN_H
/* Defined if msdos getch is supported */
-/* #undef HAVE_GETCH */
+#undef HAVE_GETCH
/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
+#undef HAVE_INTTYPES_H
/* Defined if the curses library is available */
-/* #undef HAVE_LIBCURSES */
+#undef HAVE_LIBCURSES
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Defined if mmap and friends is supported */
-/* #undef HAVE_MMAP */
+#undef HAVE_MMAP
/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
+#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
+#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
@@ -50,43 +49,73 @@
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
+#undef HAVE_UNISTD_H
/* Name of package */
-#define PACKAGE "aspell"
+#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
+#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
+#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
+#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
+#undef PACKAGE_TARNAME
/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
+#undef PACKAGE_VERSION
/* Defined if Posix Termios is Supported */
-/* #undef POSIX_TERMIOS */
+#undef POSIX_TERMIOS
/* Defined if STL rel_ops polute the global namespace */
-/* #undef REL_OPS_POLLUTION */
+#undef REL_OPS_POLLUTION
/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
+#undef STDC_HEADERS
/* Defined if file ino is supported */
-/* #undef USE_FILE_INO */
+#undef USE_FILE_INO
/* Defined if file locking and truncating is supported */
-/* #undef USE_FILE_LOCKS */
+#undef USE_FILE_LOCKS
/* Defined if Posix locales are supported */
-/* #undef USE_LOCALE */
+#undef USE_LOCALE
/* Version number of package */
-#define VERSION "0.50.3"
+#define VERSION "0.50.4.1"
+
+#define PACKAGE_VERSION "aspell-6.0"
+
+#define C_EXPORT extern "C"
+
+#if defined(ASPELL_NO_EXPORTS)
+# define ASPELL_API
+#elif defined(_WINDLL) || defined(_USRDLL) || defined(__DLL__)
+# define ASPELL_API __declspec(dllexport)
+#else
+# define ASPELL_API __declspec(dllimport)
+#endif /*_DLL */
+
+// Microsoft VC6.0 does not allow typename except when directly
+// declaring a template param. The other supporte compilers (Borlands
+// BCB5.5 and GNU C++) require or allow it anywhere in the template
+// decl. The macro TYPENAME is defines to whatever works.
+#if defined(_MSC_VER) && (_MSC_VER<1300)
+#define TYPENAME
+#else
+#define TYPENAME typename
+#endif
+
+// Microsoft Visual C 6.0 stdio.h does not declare snprintf, rather
+// it declares _snprintf. We define snprintf for VC builds here.
+// snprintf is not standard, but it is common.
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+#endif

View File

@ -1,205 +0,0 @@
Index: common/config.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/config.cpp,v
retrieving revision 1.78
diff -u -b -B -p -r1.78 config.cpp
--- common/config.cpp 21 Oct 2005 12:16:03 -0000 1.78
+++ common/config.cpp 30 Aug 2006 22:05:30 -0000
@@ -1581,3 +1581,61 @@ namespace aspell {
}
}
+
+
+#ifdef WIN32PORT
+
+#include "string.hpp"
+
+using namespace aspell;
+namespace acommon {
+
+ String ReadRegString(HKEY hive, String key, String name)
+ {
+
+ // Reads a string from the Windows registry (used to get paths)
+
+ HKEY hKey;
+ unsigned long lType;
+ DWORD dwSize;
+ unsigned char* szValue = NULL;
+
+ if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
+ {
+ szValue = new unsigned char[dwSize + 1];
+ ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
+ String RegistryReturn((char*)szValue);
+ delete[] szValue;
+ return RegistryReturn;
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+
+ }
+
+ HKEY GetRegHive()
+ {
+
+ // Check whether Aspell is installed for the current user or for all users
+
+ String value;
+
+ if (ReadRegString(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Dictionary Path") == "")
+ {
+ return HKEY_CURRENT_USER;
+ } else {
+ return HKEY_LOCAL_MACHINE;
+ }
+
+ }
+
+}
+
+#endif //WIN32PORT
+
+
Index: common/config.hpp
===================================================================
RCS file: /sources/aspell/aspell/common/config.hpp,v
retrieving revision 1.27
diff -u -b -B -p -r1.27 config.hpp
--- common/config.hpp 3 May 2005 05:08:19 -0000 1.27
+++ common/config.hpp 30 Aug 2006 22:05:30 -0000
@@ -277,5 +277,21 @@ namespace aspell {
}
+#ifdef WIN32PORT
+
+#include "minwin.h"
+
+namespace aspell {
+ class String;
+}
+
+namespace acommon {
+
+ extern HKEY GetRegHive();
+ extern aspell::String ReadRegString(HKEY type, aspell::String key, aspell::String name);
+
+}
+
+#endif
#endif
Index: common/gettext_init.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/gettext_init.cpp,v
retrieving revision 1.5
diff -u -b -B -p -r1.5 gettext_init.cpp
--- common/gettext_init.cpp 3 May 2005 05:08:19 -0000 1.5
+++ common/gettext_init.cpp 30 Aug 2006 22:05:30 -0000
@@ -16,7 +15,21 @@ extern "C" void aspell_gettext_init()
if (did_init) return;
did_init = true;
}
+#ifdef WIN32PORT
+ // Registry key for Locale Path
+
+ aspell::String value;
+ HKEY hive;
+
+ hive = acommon::GetRegHive();
+ value = acommon::ReadRegString(hive, "Software\\Aspell", "Locale Path");
+ if (value == "") value = LOCALEDIR;
+
+ bindtextdomain("aspell", value.c_str());
+#else
bindtextdomain("aspell", LOCALEDIR);
+#endif
+
}
#else
Index: common/info.cpp
===================================================================
RCS file: /sources/aspell/aspell/common/info.cpp,v
retrieving revision 1.39
diff -u -b -B -p -r1.39 info.cpp
--- common/info.cpp 3 May 2005 05:08:19 -0000 1.39
+++ common/info.cpp 30 Aug 2006 22:05:30 -0000
@@ -17,9 +17,6 @@
/* BSDi defines u_intXX_t types in machine/types.h */
#include <machine/types.h>
#endif
-#if defined(WIN32) || defined(_WIN32)
-#include "minwin.h" //minimum windows declarations.
-#endif
#include "iostream.hpp"
@@ -574,7 +571,17 @@ namespace aspell {
StringList & lst)
{
lst.clear();
- lst.add(config->retrieve("data-dir"));
+ String dictpath;
+
+#ifdef WIN32PORT
+ HKEY hive = acommon::GetRegHive();
+ // Registry key for dictionary path
+ dictpath =acommon::ReadRegString(hive, "Software\\Aspell", "Dictionary Path");;
+ if (dictpath == "") dictpath = config->retrieve("data-dir");
+#else
+ dictpath = config->retrieve("data-dir");
+#endif
+ lst.add(dictpath);
lst.add(config->retrieve("dict-dir"));
}
Index: common/vector.hpp
===================================================================
RCS file: /sources/aspell/aspell/common/vector.hpp,v
retrieving revision 1.15
diff -u -b -B -p -r1.15 vector.hpp
--- common/vector.hpp 3 May 2005 05:08:19 -0000 1.15
+++ common/vector.hpp 30 Aug 2006 22:05:30 -0000
@@ -47,13 +47,13 @@ namespace aspell
}
T * data() {return &*this->begin();}
T * data(int pos) {return &*this->begin() + pos;}
- T * data_end() {return &*this->end();}
+ T * data_end() {return &this->back()+1;}
T * pbegin() {return &*this->begin();}
- T * pend() {return &*this->end();}
+ T * pend() {return &this->back()+1;}
const T * pbegin() const {return &*this->begin();}
- const T * pend() const {return &*this->end();}
+ const T * pend() const {return &this->back()+1;}
template <typename U>
U * datap() {
Index: win32/settings.h
===================================================================
RCS file: /sources/aspell/aspell/win32/settings.h,v
retrieving revision 1.5
diff -u -b -B -p -r1.5 settings.h
--- win32/settings.h 15 Feb 2005 08:52:58 -0000 1.5
+++ win32/settings.h 30 Aug 2006 22:05:30 -0000
@@ -106,7 +106,7 @@
// declaring a template param. The other supporte compilers (Borlands
// BCB5.5 and GNU C++) require or allow it anywhere in the template
// decl. The macro TYPENAME is defines to whatever works.
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && (_MSC_VER<1300)
#define TYPENAME
#else
#define TYPENAME typename

View File

@ -1,203 +0,0 @@
/* -*- C -*- */
/**
* \file hidecmd.c
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author hasherfrog
* \author Bo Peng
* \author Enrico Forestieri
*
* Full author contact details are available in file CREDITS.
*/
/**
* This is a wrapper program to start lyx under windows hiding its
* console window. It is adapted from program hidec at
* http://www.msfn.org/board/index.php?showtopic=49184&mode=threaded
*
* This wrapper should be named lyx.exe and placed in the same directory
* as the real lyx executable which _must_ be renamed as lyxc.exe
*
* Usage:
* hidecmd [VAR=val ...] [<params>]
* where:
* VAR=val set VAR=val (multiple settings may be specified)
* <params> parameters for the real lyx executable
*
* How to build this program:
* msvc:
* cl.exe hidecmd.c /GA /O1 /Felyx.exe /link /subsystem:windows \
* kernel32.lib advapi32.lib user32.lib libcmt.lib
* mingw/gcc:
* gcc -mwindows hidecmd.c -o lyx.exe
*
*/
#include <process.h>
#include <windows.h>
#ifdef _MSC_VER
//
// Using msvc, the following pragmas can reduce executable size from
// 44k to 6k. I am not sure if mingw/gcc can take advantage of them
// though.
//
// do not link to default libraries
#pragma comment(linker,"/NODEFAULTLIB")
// unite code and data section (make the program smaller)
#pragma comment(linker,"/MERGE:.rdata=.text")
// open code section for writing
#pragma comment(linker,"/SECTION:.text,EWR")
// redefine an entry point of the executable
// Must be used, if entry point 'void NewWinMain(void)' is used,
// instead of the standart 'int WINAPI WinMain(HINSTANCE hInst, ...)'
#pragma comment(linker,"/ENTRY:NewWinMain")
void NewWinMain(void)
#else // mingw/gcc uses this entry point
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpszCmd, int nCmd)
#endif
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
DWORD exitcode = 0;
char delim = ' ';
char * var;
char * val;
// two " are needed here: the first one quotes the entire
// command, the second one the executable name
char cmd[1024] = "cmd /c \"\"";
// i0 = strlen(cmd);
int i0 = 9;
int i;
int err = 0;
int inquote;
char * cmdLine = GetCommandLine();
// the name of the executable to be launched
// (must be in the same directory)
char * lyxc = "lyxc.exe";
// When using GetCommandLine(), command name is included
// but the full path may be missing, so skip it.
if (*cmdLine == '\"') {
delim = '\"';
cmdLine++;
}
while (*cmdLine != delim && *cmdLine != 0)
cmdLine++;
if (*cmdLine == delim)
cmdLine++;
// skip over ' ' or '\t'
while (*cmdLine != 0 && (*cmdLine == ' ' || *cmdLine == '\t'))
cmdLine++;
// Use GetModuleFileName() to get the path to lyxc.exe
GetModuleFileName(0, cmd + i0, sizeof(cmd) / 2);
// substitute executable name
for (i = i0; cmd[i] != 0; ++i);
for (--i; i >= i0 && cmd[i] != '\\' && cmd[i] != '/'; --i);
for (++i; *lyxc && i < sizeof(cmd); )
cmd[i++] = *lyxc++;
// check whether lyxc.exe is there
cmd[i] = '\0';
lyxc = cmd + i0;
if (GetFileAttributesA(lyxc) == 0xFFFFFFFF) {
exitcode = GetLastError();
MessageBox(0, lyxc, "Error: cannot find the real LyX executable below", 0);
ExitProcess(exitcode);
}
// it's there, so finish quoting filename
cmd[i++] = '\"';
// parse remainder of command line
while (*cmdLine != 0 && !err) {
if (i < sizeof(cmd))
cmd[i++] = ' ';
else
err = 1;
if ((*cmdLine >= 'A' && *cmdLine <= 'Z') ||
(*cmdLine >= 'a' && *cmdLine <= 'z'))
var = cmd + i;
else
var = NULL;
val = NULL;
inquote = 0;
while (!err && ((*cmdLine != 0 && *cmdLine != ' ' &&
*cmdLine != '\t') || inquote))
{
if (*cmdLine == '\"')
inquote = 1 - inquote;
if (var && *cmdLine == '=' && !inquote)
val = cmd + i;
if (i < sizeof(cmd))
cmd[i++] = *cmdLine;
else
err = 1;
cmdLine++;
}
if (var && val && !err) {
*val++ = '\0'; // mark end of var
if (*val == '\"') { // account for quoted val
++val;
--i;
}
cmd[i] = '\0'; // mark end of val
i = var - cmd - 1; // reset pointer
SetEnvironmentVariable(var, val);
// MessageBox(0, val, var, 0);
}
// skip spaces
while (*cmdLine != 0 && (*cmdLine == ' ' || *cmdLine == '\t'))
cmdLine++;
}
if (i < sizeof(cmd) - 1) {
// finish quoting the entire command
cmd[i++] = '\"';
cmd[i] = '\0';
} else
err = 1;
if (err) {
MessageBox(0, "Please, use a shorter command line.",
"Error: command line is too long", 0);
ExitProcess(0);
}
// create process with new console
// memset(&si, 0, sizeof(si));
val = (char *) &si;
for (i = 0; i < sizeof(si); ++i)
val[i] = 0x00;
si.cb = sizeof(si);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_HIDE;
if (CreateProcess(NULL, cmd,
NULL, NULL, FALSE, CREATE_NEW_CONSOLE,
NULL, NULL, &si, &pi))
{
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
else
exitcode = GetLastError();
/* terminate this */
ExitProcess(exitcode);
}

View File

@ -0,0 +1,223 @@
/*
LyX for Windows Launcher
Author: Joost Verburg
This will be installed as lyx.exe.
The application will setup the environment variables and geometry based
on registry settings and obtain the command line output of lyxc.exe,
which can be shown in case of a crash. Version information and an icon are
also included.
*/
!include "MUI.nsh"
!include "LogicLib.nsh"
!include "FileFunc.nsh"
!insertmacro GetParameters
!include "..\packaging\installer\settings.nsh" ;Version info from installer
Caption "${APP_NAME} ${APP_VERSION}"
OutFile lyx.exe
BrandingText " "
;--------------------------------
;User interface for debug output
!define MUI_ICON "..\packaging\icons\lyx_32x32.ico"
!define MUI_CUSTOMFUNCTION_GUIINIT InitInterface
!define MUI_INSTFILESPAGE_FINISHHEADER_TEXT "Error Information"
!define MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT "See Chapter 3 of the LyX Introduction \
(Help > Introduction) for information about reporting this issue."
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English
ShowInstDetails show
;--------------------------------
;Windows API constants
!define SWP_NOSIZE 0x1
!define MONITOR_DEFAULTTONEAREST 0x2
!define SM_CYCAPTION 4
!define SM_CXSIZEFRAME 32
!define SM_CYSIZEFRAME 33
;--------------------------------
;Variables
Var Parameters
Var LyXLanguage
Var Geometry
Var ReturnValue
;--------------------------------
;Version information
VIProductVersion "${APP_VERSION_NUMBER}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APP_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${APP_INFO}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${APP_COPYRIGHT}"
;--------------------------------
;Macros
!macro SystemCall STACK
Push "${STACK}"
CallInstDLL "$EXEDIR\System.dll" Call
!macroend
!macro GetLyXSetting NAME VAR
Push "${NAME}"
Call GetLyXSetting
Pop "${VAR}"
!macroend
;--------------------------------
;Main application
Section -Prepare
HideWindow
;Command line parameters
Call GetParameters
Pop $Parameters
;LyX Language
!insertmacro GetLyXSetting "Language" $LyXLanguage
;Set language for gettext
${if} $LyXLanguage != ""
Push LC_ALL
Push $LyXLanguage
Call SetEnvironmentVariable
${endif}
;Apparently the output charset needs to be set to some value,
;otherwise no non-ASCII characters will be displayed
Push OUTPUT_CHARSET
Push -
Call SetEnvironmentVariable
;Point to the Aiksaurus data in the LyX folder
Push AIK_DATA_DIR
Push "$EXEDIR\..\aiksaurus"
Call SetEnvironmentVariable
SectionEnd
Section -Launch
;Start LyX and capture the command line output
Push '"$EXEDIR\lyxc.exe" $Parameters'
CallInstDLL "$EXEDIR\nsExec.dll" ExecToLog
Pop $ReturnValue ;Return value
SectionEnd
Section -Debug
;Check whether something went wrong
${if} $ReturnValue == "error"
;Probably the file does not exist
MessageBox MB_OK|MB_ICONSTOP "Failed to start LyX."
${elseif} $ReturnValue != 0
;LyX has crashed
MessageBox MB_YESNO|MB_ICONSTOP \
"LyX has been closed because of an unexpected situation.$\n\
This is most likely caused by a flaw in the software.$\n$\n\
When you open your documents again, you will be able$\n\
to restore an emergency save and continue working.$\n$\n\
Would you like to view detailed information about this error?" \
IDYES debug IDNO no_debug
${endif}
no_debug:
Quit
debug:
;The interface with debug information will be shown
SetDetailsPrint textonly
DetailPrint "The following details are available about the error:"
SetDetailsPrint none
;Hide controls we don't need
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R0 $R0 1004
ShowWindow $R0 ${SW_HIDE}
;Put the log window on the screen again
Push "user32::SetWindowPos(i $HWNDPARENT, i 0, i 133, i 100, i 0, i 0, i ${SWP_NOSIZE})"
CallInstDLL "$EXEDIR\System.dll" Call
BringToFront
SectionEnd
;--------------------------------
;Functions
Function InitInterface
;Keep the log window outside the screen to ensure that there will be no flickering
Push "user32::SetWindowPos(i $HWNDPARENT, i 0, i -32000, i -32000, i 0, i 0, i ${SWP_NOSIZE})"
CallInstDLL "$EXEDIR\System.dll" Call
FunctionEnd
Function GetLyXSetting
;Get a LyX setting from the registry
;First try a current user setting, then a system setting
Exch $R0
Push $R1
ReadRegStr $R1 HKCU ${APP_REGKEY_SETTINGS} $R0
${if} $R1 == ""
ReadRegStr $R1 HKLM ${APP_REGKEY_SETTINGS} $R0
${endif}
Exch $R1
Exch 1
Pop $R0
FunctionEnd
Function SetEnvironmentVariable
;Sets the value of an environment variable
;Input on stack: name of variable, value
Exch $R0
Exch 1
Exch $R1
Push 'kernel32::SetEnvironmentVariable(t, t) i("$R1", "$R0")'
CallInstDLL "$EXEDIR\System.dll" Call
Pop $R1
Pop $R0
FunctionEnd

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright © 1981-2001 Microsoft Corporation -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable/>
<assemblyIdentity
type="win32"
name="Microsoft.VC80.CRT"
version="8.0.50608.0"
processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"
/>
<file name="msvcr80.dll"/>
<file name="msvcp80.dll"/>
<file name="msvcm80.dll"/>
</assembly>

View File

@ -1,119 +0,0 @@
Packaging LyX for Windows
===============================
Angus Leeming, 07 March 2006
===============================
Preparing the way
=================
The very first thing to do on the way to creating a LyX/Win package is
to build the sources and install them somewhere accessible. I've written
a script, build_lyxwin.sh, that performs all the necessary steps. Please
read the preamble and (un)comment those steps that are necessary at the
end of the script.
The (eventual --- mingw is a *very* slow compiler) result is a lyx
package that's almost ready to go in $LYX_SRCS/build/installprefix.
Thereafter, the contents of this tree must be manipulated a
little. I've written a little script, package_lyxwin.sh, to automate
the process:
* Copy the DLLs qt-mt3.dll, libiconv-2.dll, mingwm10.dll to the
$PREFIX/bin/ directory. These are needed by the LyX executable.
* Strip the binaries in $PREFIX/bin/ of all debugging info.
* Copy dt2dv.exe and dv2dt.exe to $PREFIX/bin/. These are needed to enable
dvips, yap et al. to cope with "file names with spaces".
* Remove all stuff generated by running configure. It makes sense on
your machine only, not for whoever is installing LyX. Specifically
xfonts/fonts.dir, xfonts/fonts.scale, doc/LaTeXConfig.lyx,
lyxrc.defaults, packages.lst and textclass.lst
should all be removed.
Creating the LyX icons
======================
All icons are to be found in sub-directory icons/.
The LyX icons, lyx_32x32.ico and lyx_doc_32x32.ico, are based on .svg
files written and realease into the public domain by Andy Fitzsimon:
http://openclipart.org/clipart/computer/icons/etiquette-theme/aps/LyX.svg
http://openclipart.org/clipart/computer/icons/etiquette-theme/mimetype.svg
lyx.svg is Andy's original.
lyx_doc.svg is a merger of LyX.svg with mimetype.svg
Working on a linux box, I used sodipodi (http://www.sodipodi.com/) to
create the .svg file and to export these vector graphics images to
32x32 pixel bitmaps (.png format). Thereafter I used gimp
(http://www.gimp.org/) to generate reduced color depth versions (16,
256 colors).
Finally, on a WindowsXP machine, I used IconXP
(http://www.aha-soft.com/iconxp/) to build the .ico files from these
.png files at differing resolutions.
Adding the LyX icons to lyx.exe
===============================
********************************************************************
NOTE: Run 'strip' on lyx.exe before adding any images to it. 'strip'
will not work after images have been added.
$ strip lyx.exe
j:\mingw\bin\strip.exe: lyx.exe: File in wrong format
********************************************************************
Windows executables can store various "resources", including images. I
used ResourceHacker (http://rpi.net.au/~ajohnson/resourcehacker) to
add the LyX icons to the .exe file.
Fire up ResHacker.exe and load lyx.exe
File>Open... lyx.exe
Action>Add a new Resource...
Open file with resource ... lyx_32x32.ico
Resource Type will be set to "ICONGROUP"
Set Resource Name to "1". (No inverted commas.)
Add Resource
The icon will be shown in the main Resource Hacker window under
Icon Group>1>0 and as Icon>5[0-3].
Repeat for lyx_doc_32x32.ico, setting the Resource Name to "2".
Save the modified lyx.exe. Resource Hacker will copy the original to
lyx_original.exe. Remove it.
Building the LyX installer
==========================
At this point my build/installprefix tree now contains everything that is
to be released as a LyX/Win package. All that remains to do is to
generate a Windows installer for it. I've written a script for NSIS
(http://nsis.sourceforge.net/) to compile into an installer.
You'll need to compile and install lyx_path_prefix.dll. From the
comments in lyx_path_prefix.C:
/* Compile the code with
*
* g++ -I/c/Program\ Files/NSIS/Contrib -Wall -shared \
* lyx_path_prefix.c -o lyx_path_prefix.dll
*
* Move resulting .dll to /c/Program\ Files/NSIS/Plugins
*/
Thereafter, you'll be able to build the installer itself:
$ <PATH to>/makensis lyx_installer.nsi
creating lyx_setup_136.exe ready to ship.
END README

View File

@ -0,0 +1,38 @@
BaKoMa Fonts Licence
--------------------
This licence covers two font packs (known as BaKoMa Fonts Colelction,
which is available at `CTAN:fonts/cm/ps-type1/bakoma/'):
1) BaKoMa-CM (1.1/12-Nov-94)
Computer Modern Fonts in PostScript Type 1 and TrueType font formats.
2) BaKoMa-AMS (1.2/19-Jan-95)
AMS TeX fonts in PostScript Type 1 and TrueType font formats.
Copyright (C) 1994, 1995, Basil K. Malyshev. All Rights Reserved.
Permission to copy and distribute these fonts for any purpose is
hereby granted without fee, provided that the above copyright notice,
author statement and this permission notice appear in all copies of
these fonts and related documentation.
Permission to modify and distribute modified fonts for any purpose is
hereby granted without fee, provided that the copyright notice,
author statement, this permission notice and location of original
fonts (http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma)
appear in all copies of modified fonts and related documentation.
Permission to use these fonts (embedding into PostScript, PDF, SVG
and printing by using any software) is hereby granted without fee.
It is not required to provide any notices about using these fonts.
Basil K. Malyshev
INSTITUTE FOR HIGH ENERGY PHYSICS
IHEP, OMVT
Moscow Region
142281 PROTVINO
RUSSIA
E-Mail: bakoma@mail.ru
or malyshev@mail.ihep.ru

View File

@ -0,0 +1,56 @@
BaKoMa Fonts for LyX-Win
==============================
ANY DISTRIBUTION OF ONE OF THESE FONTS MUST INCLUDE THE LICENCE FILE
THAT IS PART OF THIS PACKAGE
The fonts included in this package are intended for Windows ports
of Lyx, see http://www.lyx.org/download. The fonts are replacements
that solve some display problems of math symbols.
The fonts included in this package are taken from
http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/ttf/
and have been modified for use with LyX.
The most recent versions of the original fonts are available
with the complete BaKoMa TeX distribution at
http://www.ctan.org/tex-archive/systems/win32/bakoma/
The author of these fonts, Basil K. Malyshev, has kindly
granted permission to use and modify these fonts.
The changes made are simple remappings of glyphs. These mappings
are:
cmsy10.ttf char 8728 mapped to char 183 (\leq)
cmsy10.ttf char 196 mapped to char 127 (\spadesuit)
msbm10.ttf char 8728 mapped to char 183 (\nleqq)
msbm10.ttf char 196 mapped to char 127 (\backepsilon)
cmmi10.ttf char 8728 mapped to char 183 (\kapp)
msam10.ttf char 196 mapped to char 127 (\circleddash)
msam10.ttf char 8728 mapped to char 183 (\uparrows)
The mappings do not change any glyph but make the glyphs mentioned
available under new codes, too. So the functionality of the fonts
will not be affected in any other application.
In addition to the BaKoMa fonts, this font bundle contains the wasy font
'wasy10.ttf' from the latex-xft font bundle:
http://packages.qa.debian.org/l/latex-xft-fonts.html.
The latex-xft bundle is published under the GPL.
Ekkehart Schlicht
schlicht@lmu.de
June 20, 2005.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,55 +0,0 @@
#! /bin/sh
grab_sources() {
wget ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.4.tar.gz
}
unpack() {
gunzip aspell-0.60.4.tar.gz
tar xvf aspell-0.60.4.tar
}
build_it() {
(
cd aspell-0.60.4
# Add a missing #include.
grep '^# include "asc_ctype\.hpp"' common/file_util.cpp >/dev/null || {
sed '/^#ifdef WIN32 *$/,/^# *include <io\.h> *$/{
/<io\.h>/i\
# include "asc_ctype.hpp"
}' common/file_util.cpp > tmp
cmp -s common/file_util.cpp tmp || {
diff -u common/file_util.cpp tmp
mv -i tmp common/file_util.cpp
}
rm -f tmp
}
./configure \
--enable-static \
--disable-shared \
--prefix=c:/Aspell || {
echo 'configure failed' >&2
exit 1
}
make
)
}
install_it() {
(
cd aspell-0.60.4
make install
)
}
build_it
install_it
# The end

View File

@ -1,224 +0,0 @@
#! /bin/sh
# This script aims to do everything necessary to automate the building
# of a LyX/Win package.
# Invocation:
# sh build_lyxwin.sh "1.3.6-pre23"
# The string will be shown in the "About LyX" dialog.
# Notes:
# It uses the MSYS environment and MinGW compiler.
# It asks whether the Qt and LyX cvs trees are up to date.
# It asks whether the Qt library has been compiled.
# It checks that qt-mt3.dll and mingw10.dll exist.
# It compiles the dv2dt and dt2dv utilites.
# It compiles and installs LyX.
# Once all this is done, you're ready to "package" LyX.
# See the README for details.
# The script compiles the .dll version of the Qt libraries. Linking of LyX
# against this will, therefore, take "some time".
# You may need to change these four variables.
MINGW_DIR="/j/MinGW"
QT_DIR="${HOME}"/Qt/3x-msys
# Everything from here on down should be OK "as is".
LYX_DIR="../../.."
PACKAGING_DIR="$LYX_DIR/development/Win32/packaging"
DTL_DIR="$PACKAGING_DIR/dtl"
ASPELL_INSTALL_DIR="c:/Aspell"
LYX_ASPELL_DIR="/c/Aspell" # the Autotools don't like "C:/" syntax.
LYX_RELATIVE_BUILDDIR=build
LYX_INSTALL_DIR=installprefix
# These are all installed in the final LyX package
QT_DLL="${QT_DIR}/bin/qt-mt3.dll"
MINGW_DLL="${MINGW_DIR}/bin/mingwm10.dll"
DT2DV="${DTL_DIR}/dt2dv.exe"
DV2DT="${DTL_DIR}/dv2dt.exe"
# Change this to 'mv -f' when you are confident that
# the various sed scripts are working correctly.
MV='mv -f'
check_dirs_exist()
{
for dir in "$QT_DIR" "$LYX_DIR" "$DTL_DIR"
do
test -d "$dir" || {
echo "$dir does not exist" >&2
exit 1
}
done
}
query_qt()
{
echo "Please ensure that the Qt and LyX cvs trees are up to date"
echo "and that the Qt library is compiled and ready to go."
echo "Press any key to continue"
read ans
}
check_files_exist()
{
# Check that the dlls exist
for file in "${QT_DLL}" "${MINGW_DLL}"
do
test -r "${file}" || {
echo "$file does not exist" >&2
exit 1
}
done
}
build_dtl()
{
# dt2dv and dv2dt
(
cd "$DTL_DIR" || {
echo "Unable to cd $DTL_DIR" >&2
exit 1
}
make || {
echo "Failed to make $DTL_DIR" >&2
exit 1
}
)
for file in "${DT2DV}" "${DV2DT}"
do
test -x "$file" || {
echo "${file} does not exist or is not executable" >&2
exit 1
}
done
}
modify_version_C()
{
VERSION_C="src/version.C"
test -r "${VERSION_C}" || {
echo "Unable to find ${VERSION_C}"
return
}
test "${LYX_VERSION_STR}" == "" && return
sed '/char const \* lyx_version = /s/"[^"]*"/"'${LYX_VERSION_STR}'"/' \
${VERSION_C} > tmp.$$
diff -u ${VERSION_C} tmp.$$
${MV} tmp.$$ ${VERSION_C}
}
run_automake()
{
(
cd "${LYX_DIR}" || {
echo "Unable to cd ${LYX_DIR}" >&2
exit 1
}
# Check the line endings of configure.ac
# The configure script will be unable to create config.h if it
# contains Win32-style line endings.
sed 's/\r$//' configure.ac > configure.ac.$$
cmp -s configure.ac configure.ac.$$ && {
rm -f configure.ac.$$
} || {
mv -f configure.ac.$$ configure.ac
cat <<EOF >&2
configure.ac has Win32-style line endings. Corrected
Please use the Cygwin flavours of the autotools to
run autogen.sh
EOF
exit 1
}
# ./autogen.sh || {
# echo "autogen.sh failed" >&2
# exit 1
# }
)
}
build_lyx()
{
(
cd "${LYX_DIR}" || {
echo "Unable to cd ${LYX_DIR}" >&2
exit 1
}
BUILDDIR="${LYX_RELATIVE_BUILDDIR}"
test ! -d "${BUILDDIR}" && {
mkdir "${BUILDDIR}" || \
Error "Unable to create build dir, ${BUILDDIR}."
}
CONFIGURE="../configure --without-x --with-included-gettext --with-extra-prefix='${LYX_ASPELL_DIR}' --with-frontend=qt QTDIR='$QT_DIR' --disable-maintainer-mode --disable-debug --enable-optimization --disable-pch --disable-concept-checks --disable-stdlib-debug"
echo "${CONFIGURE}"
cd "${BUILDDIR}"
echo "${PWD}"
eval "${CONFIGURE}" || {
echo "Failed to configure LyX" >&2
exit 1
}
# Modify the "lyx_version" string in build/src/version.C
modify_version_C
# Build LyX
make || {
echo "Failed to make $LYX_DIR" >&2
exit 1
}
)
}
install_lyx()
{
(
BUILDDIR="${LYX_RELATIVE_BUILDDIR}"
cd "${LYX_DIR}/${BUILDDIR}" || {
echo "Unable to cd ${LYX_DIR}/${BUILDDIR}" >&2
exit 1
}
rm -fr "$LYX_INSTALL_DIR" || {
echo "Failed to remove $LYX_INSTALL_DIR prior to installing LyX" >&2
exit 1
}
make install || {
echo "Failed to install" >&2
exit 1
}
)
}
LYX_VERSION_STR=""
test $# -ne 0 && LYX_VERSION_STR=$1
check_dirs_exist || exit 1
query_qt || exit 1
check_files_exist || exit 1
build_dtl || exit 1
run_automake || exit 1
build_lyx || exit 1
install_lyx || exit 1
# The end

View File

@ -0,0 +1,2 @@
cd ..\..\scons
scons install prefix=..\..\build-msvc use_vc=yes frontend=qt4 mode=release version_suffix=15 gettext=system nls=yes extra_inc_path=..\..\lyx-windows-deps-msvc-qt4\include extra_lib_path=..\..\lyx-windows-deps-msvc-qt4\lib extra_bin_path=..\..\lyx-windows-deps-msvc-qt4\bin qt_dir=..\..\lyx-windows-deps-msvc-qt4\qt-4

View File

@ -1,168 +0,0 @@
# Makefile for dv2dt, dt2dv
# Version 0.6.1
# Thu 9 March 1995
# Geoffrey Tobin
# Nelson H. F. Beebe
#
# Changes 27 July 2005 by Angus Leeming to enable the Makefile to
# work out of the box on both *nix and Windows machines under
# the MinSYS environment.
#
# The Makefile can also be used unaltered to build a Windows executable
# from a Linux box if make is invoked as:
# $ make EXEEXT='.exe' CC='i386-mingw32-gcc'
#=======================================================================
BINDIR = /usr/local/bin
CATDIR = $(MANDIR)/../cat$(MANEXT)
CC = gcc
CFLAGS = -O2 -Wall
# Some compilers don't optimise correctly; for those, don't use `-O2' :
# CFLAGS = -Wall
CHMOD = /bin/chmod
COL = col -b
CP = /bin/cp
DITROFF = ditroff
DITROFF = groff
# This is a GNU make extension.
# If your flavour of make refuses to accept it,
# then simply hardcode EXEEXT.
ifeq ($(WINDIR),)
EXEEXT =
else
EXEEXT = .exe
endif
DT2DV = dt2dv$(EXEEXT)
DV2DT = dv2dt$(EXEEXT)
EXES = $(DT2DV) $(DV2DT)
LDFLAGS = -s
LDFLAGS =
MAN2PS = sh ./man2ps
MANDIR = /usr/local/man/man$(MANEXT)
MANEXT = 1
OBJS = dt2dv.o dv2dt.o
RM = /bin/rm -f
SHELL = /bin/sh
DOCS = README dtl.doc dvi.doc dt2dv.man dv2dt.man
SRC = Makefile dtl.h dt2dv.c dv2dt.c man2ps
TESTS = hello.tex example.tex tripvdu.tex edited.txt
DTL_DBN = $(DOCS) $(SRC) $(TESTS)
#=======================================================================
.SUFFIXES: .hlp .ps .man
.man.hlp:
$(DITROFF) -man -Tascii $< | $(COL) >$@
.man.ps:
$(MAN2PS) $< > $@
#=======================================================================
all: dtl check doc
doc: dt2dv.hlp dv2dt.hlp dt2dv.ps dv2dt.ps
dtl: dv2dt dt2dv
check tests: hello example tripvdu edited
dv2dt: dv2dt.o dtl.h
$(CC) $(CFLAGS) $(LDFLAGS) -o $(DV2DT) dv2dt.o
dt2dv: dt2dv.o dtl.h
$(CC) $(CFLAGS) $(LDFLAGS) -o $(DT2DV) dt2dv.o
hello: hello.dtl dv2dt dt2dv
./$(DT2DV) hello.dtl hello2.dvi
./$(DV2DT) hello2.dvi hello2.dtl
-@diff hello.dtl hello2.dtl > hello.dif
@if [ -s hello.dif ] ; \
then echo ERROR: differences in hello.dif ; \
else $(RM) hello.dif ; \
fi
hello.dtl: hello.tex
tex hello
./$(DV2DT) hello.dvi hello.dtl
example: example.dtl dv2dt dt2dv
./$(DT2DV) example.dtl example2.dvi
./$(DV2DT) example2.dvi example2.dtl
-@diff example.dtl example2.dtl > example.dif
@if [ -s example.dif ] ; \
then echo ERROR: differences in example.dif ; \
else $(RM) example.dif ; \
fi
example.dtl: example.tex
tex example
./$(DV2DT) example.dvi example.dtl
tripvdu: tripvdu.dtl dv2dt dt2dv
./$(DT2DV) tripvdu.dtl tripvdu2.dvi
./$(DV2DT) tripvdu2.dvi tripvdu2.dtl
-@diff tripvdu.dtl tripvdu2.dtl > tripvdu.dif
@if [ -s tripvdu.dif ] ; \
then echo ERROR: differences in tripvdu.dif ; \
else $(RM) tripvdu.dif ; \
fi
tripvdu.dtl: tripvdu.tex
tex tripvdu
./$(DV2DT) tripvdu.dvi tripvdu.dtl
# edited.txt is already a dtl file.
edited: edited.txt dv2dt dt2dv
./$(DT2DV) edited.txt edited.dvi
./$(DV2DT) edited.dvi edited2.dtl
./$(DT2DV) edited2.dtl edited2.dvi
./$(DV2DT) edited2.dvi edited3.dtl
@if [ -s edited.dif ] ; \
then echo ERROR : differences in edited.dif ; \
else $(RM) edited.dif ; \
fi
clean mostlyclean:
-$(RM) $(OBJS)
clobber: clean
-$(RM) $(EXES) *~ core *.log *.dvi *.dtl *.dif
distclean realclean: clobber
-$(RM) dt2dv.hlp dv2dt.hlp dt2dv.ps dv2dt.ps
install: dtl
-$(MAKE) uninstall
$(CP) dt2dv $(BINDIR)/dt2dv
$(CHMOD) 775 $(BINDIR)/dt2dv
$(CP) dv2dt $(BINDIR)/dv2dt
$(CHMOD) 775 $(BINDIR)/dv2dt
$(CP) dt2dv.man $(MANDIR)/dt2dv.$(MANEXT)
$(CHMOD) 664 $(MANDIR)/dt2dv.$(MANEXT)
$(CP) dv2dt.man $(MANDIR)/dv2dt.$(MANEXT)
$(CHMOD) 664 $(MANDIR)/dv2dt.$(MANEXT)
uninstall:
-$(RM) $(BINDIR)/dt2dv
-$(RM) $(BINDIR)/dv2dt
-$(RM) $(CATDIR)/dt2dv.$(MANEXT)
-$(RM) $(CATDIR)/dv2dt.$(MANEXT)
dist: dtl.tar.gz
dtl.tar.gz: $(DTL_DBN)
tar -czf dtl.tar.gz $(DTL_DBN)
zip: dtl.zip
dtl.zip: $(DTL_DBN)
zip dtl.zip $(DTL_DBN)
# EOF Makefile

View File

@ -1,143 +0,0 @@
README for DTL package - Thu 9 March 1995
-----------------------------------------
Author: Geoffrey Tobin <G.Tobin@latrobe.edu.au>
Version: 0.6.1
CTAN Archive-path: dviware/dtl
Brief Description:
DTL (DVI Text Language) files are equivalent to TeX's DVI files,
but are humanly readable, instead of binary. Two programs are
provided to translate between DVI and DTL: dv2dt, dt2dv.
dt2dv warns if byte addresses or string lengths recorded in a DTL
file are incorrect, then overrides them. This makes DTL files
editable. It also allows quoted apostrophes (\') and quoted quotes
(\\) in strings. The current DTL variety, sequences-6, separates
font paths into directory and font, which makes them freely editable.
In this release, DTL line numbers are correctly calculated, and three
memory leaks have been fixed.
Keywords: dvi, TeX
Includes:
Makefile README dt2dv.c dtl.h dv2dt.c
man2ps dtl.doc dvi.doc dt2dv.man dv2dt.man
hello.tex example.tex tripvdu.tex edited.txt
Motivation:
When TeX has typeset a document, it writes its handiwork to a DVI
file, for DVI processing software (such as viewers, printer drivers,
dvidvi, and dvicopy) to read.
The file dvi.doc lists the DVI file commands, with their opcodes
(byte values), nominal command names, arguments, and meanings. For a
detailed description of DVI file structure, see one of these:
1. Donald E. Knuth's book _TeX: The Program_;
2. The file tex.web, which contains source and documentation for TeX:
CTAN: systems/knuth/tex/tex.web
3. The source for Knuth's dvitype program:
CTAN: systems/knuth/texware/dvitype.web
4. Joachim Schrod's DVI drivers standard document, the relevant part
of which is at
CTAN: dviware/driv-standard/level-0
Sometimes human beings are interested to see exactly what TeX has
produced, for example when viewing or printing of the DVI file gives
unexpected results. However, a DVI file is a compact binary
representation, so we need software to display its contents.
Binary file editors, when available, can show the DVI bytes, but not
their meanings, except for the portions that represent embedded text.
In particular, the command names are not shown, and the command
boundaries are not respected.
By contrast, Knuth's dvitype program is designed as an example of a
DVI driver. However, dvitype is inconvenient for studying the DVI
file alone, for the following reasons:
1. Being a DVI driver, dvitype endeavors to read the TFM font metric
files referenced in the DVI file. If a TFM file is absent, dvitype
quits with an error message.
2. When it starts, it prompts the user interactively for each of a
series of options.
3. Even the least verbose option gives masses of information that is
not contained in the DVI file, coming instead from a combination of
the data in the DVI file and TFM files.
4. It does NOT show the DVI information in a way that accurately
reflects the structure of the DVI file.
5. Its output, if redirected to a file, produces a very large file.
6. There is no automated procedure for converting the output of
dvitype back to a DVI file, and doing it by hand is totally
unreasonable.
The first disadvantage is a killer if a TFM file is absent.
Disadvantages two to four make dvitype very inconvenient for studying
a DVI file. The fifth problem makes dvitype's output tedious,
disk-hungry (so one deletes it almost immediately), and unsuitable for
file transfer.
The sixth disadvantage of dvitype is important to those people who are
interested in editing DVI files. Since the DVI files refer explicitly
to their own internal byte addresses, it's very easy to mess up a DVI
file if one were to try to edit it directly, even apart from the problem
of how to recognise a command.
So an exact, concise, textual representation of a DVI file is needed,
but dvitype does not produce one.
Resolution:
Therefore, working from Joachim Schrod's description, I designed DTL
and its conversion programs dv2dt (DVI -> DTL) and dt2dv (DTL -> DVI),
which are provided as C sources:
dtl.h
dv2dt.c
dt2dv.c
Although I was motivated by the TFM <-> PL conversion provided by
Knuth's tftopl and pltotf programs, I deliberately designed DTL to be
a much more concise and literal translation than the `property list'
structure exemplified by PL. The result is that a DTL file is
typically three times the size of its equivalent DVI file. The
document dtl.doc lists the correspondence between the DTL command
names and the (nominal) DVI command names.
A clear advantage of an exact two-way conversion is that we can check
(and prove) whether the converters worked truly on a given DVI file.
The provided plain TeX files:
example.tex
tripvdu.tex
can be used to test whether the compiled programs are behaving
sensibly. Whereas example.tex is a simple document that uses a
variety of plain TeX commands, tripvdu.tex provides a kind of
`trip test' for DVI processor programs. Both documents are taken,
with permission, from Andrew K. Trevorrow's dvitovdu (alias dvi2vdu)
distribution (and are also part of the dvgt viewer distribution).
The Makefile might have to be edited for your site, as it assumes
gcc for your C compiler. Makefile compiles dv2dt and dt2dv, then
runs tex on example.tex and tripvdu.tex, and also converts the
resulting DVI files to DTL files, back to DVI files (with a change
of name), then back again to DTL files, so that the results can be
compared using a textual differencing program. (Many computer systems
have such a program; on unix, as assumed by Makefile, this is named
`diff'; ms-dos has one named `comp'.) This should produce a
zero-length .dif file for each document, proving that the two DTL
files are identical.
A keen tester might also use a binary difference program on the DVI
files, to check that they are identical, as they need to be. (On unix
systems, the `diff' program suffices for that purpose.)
Note:
In representing numeric quantities, I have mainly opted to use
decimal notation, as this is how most of us are trained to think.
However, for the checksums in the `fd' (font definition) commands, I
chose octal notation, as this is used for checksums in Knuth's PL
files, against which DVI files must be compared when a DVI driver
loads a font.
Caveat:
The length of DTL commands is limited by the size of the line buffer
in dt2dv.c.
End of README

File diff suppressed because it is too large Load Diff

View File

@ -1,156 +0,0 @@
.\" ====================================================================
.\" @Troff-man-file{
.\" author = "Nelson H. F. Beebe and Geoffrey R. D. Tobin",
.\" version = "0.6.0",
.\" date = "08 March 1995",
.\" time = "19:57:00 GMT +11",
.\" filename = "dt2dv.man",
.\" address = "Center for Scientific Computing
.\" Department of Mathematics
.\" University of Utah
.\" Salt Lake City, UT 84112
.\" USA",
.\" telephone = "+1 801 581 5254",
.\" FAX = "+1 801 581 4148",
.\" checksum = "03708 156 634 4989",
.\" email = "beebe@math.utah.edu (Internet)",
.\" codetable = "ISO/ASCII",
.\" keywords = "DVI, TeX",
.\" supported = "no",
.\" docstring = "This file contains the UNIX manual pages
.\" for the dt2dv utility, a program for
.\" converting a DTL text representation of a TeX
.\" DVI file, usually produced by the companion
.\" dv2dt utility, back to a binary DVI file.
.\"
.\" The checksum field above contains a CRC-16
.\" checksum as the first value, followed by the
.\" equivalent of the standard UNIX wc (word
.\" count) utility output of lines, words, and
.\" characters. This is produced by Robert
.\" Solovay's checksum utility.",
.\" }
.\" ====================================================================
.if t .ds Te T\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X
.if n .ds Te TeX
.TH DT2DV 1 "08 March 1995" "Version 0.6.0"
.\"======================================================================
.SH NAME
dt2dv \- convert a DTL text representation of a TeX DVI file to a binary DVI file
.\"======================================================================
.SH SYNOPSIS
.B dt2dv
.RB [ \-debug ]
.RB [ \-group ]
.RB [ \-si ]
.RB [ \-so ]
.I [input-DTL-file]
.I [output-DVI-file]
.PP
In the absence of the
.B \-si
and
.B \-so
options,
both file arguments are
.IR required
in the order
.B input-DTL-file output-DVI-file .
But also see the OPTIONS section below.
No default file extensions are supplied.
.\"======================================================================
.SH DESCRIPTION
.B dt2dv
converts a text representation of a \*(Te\& DVI
file, usually produced by the companion
.BR dv2dt (1)
utility, back to a binary DVI file. DTL
.RI ( "DVI Text Language" )
files can be edited, with care, and then restored
to DVI form for processing by any \*(Te\& DVI
driver program. In DTL files, font directory names
and font names are preceded by a length field,
which must be updated if the names are modified.
.PP
.BR dvitype (1)
can also display a textual representation of DVI
files, but in some implementations at least, it
cannot be used in batch mode, and its output is
not well-suited for conversion back to a DVI file.
.PP
The format of \*(Te\& DVI files is fully described
in
Donald E. Knuth,
.IR "\*(Te\&: The Program" ,
Addison-Wesley (1986), ISBN 0-201-13437-3, as well
as in the
.BR dvitype (1)
literate program source code. Brief descriptions
of the DTL and DVI formats are given in
.BR dv2dt (1).
.\"======================================================================
.SH OPTIONS
.\"-----------------------------------------------
.TP \w'\-debug'u+3n
.B \-debug
Turn on detailed debugging output.
.\"-----------------------------------------------
.TP
.B \-group
Expect each DTL command to be in parentheses.
.\"-----------------------------------------------
.TP
.B \-si
Read all DTL commands from standard input.
.\"-----------------------------------------------
.TP
.B \-so
Write all DVI commands to standard output.
.\"======================================================================
.SH "SEE ALSO"
.BR dv2dt (1),
.BR dvitype (1),
.BR tex (1).
.\"======================================================================
.SH FILES
.TP \w'\fI*.dvi\fP'u+3n
.I *.dvi
binary \*(Te\& DVI file.
.TP
.I *.dtl
text representation of a \*(Te\& DVI file in
.I "DVI Text Language"
format.
.\"======================================================================
.SH AUTHOR
.B dt2dv
and
.BR dv2dt (1)
were written by
.RS
.nf
Geoffrey Tobin
Department of Electronic Engineering
La Trobe University
Bundoora, Victoria 3083
Australia
Tel: +61 3 479 3736
FAX: +61 3 479 3025
Email: <G.Tobin@latrobe.edu.au>
.fi
.RE
.PP
These manual pages were written primarily by
.RS
.nf
Nelson H. F. Beebe, Ph.D.
Center for Scientific Computing
Department of Mathematics
University of Utah
Salt Lake City, UT 84112
Tel: +1 801 581 5254
FAX: +1 801 581 4148
Email: <beebe@math.utah.edu>
.fi
.RE
.\"==============================[The End]==============================

View File

@ -1,77 +0,0 @@
``dtl.doc''
Wed 8 March 1995
Geoffrey Tobin
Correspondence between DTL and DVI files.
-----------------------------------------
DTL variety sequences-6, version 0.6.0
--------------------------------------
Note: `DTL' stands for `Device-Independent Text Language', and is an
ASCII text representation of a DVI file.
References for DVI file structure:
----------------------------------
In this distribution:
dvi.doc
In the TeX archives:
CTAN: dviware/driv-standard/level-0/dvistd0.tex
"The DVI Driver Standard, Level 0",
by The TUG DVI Driver Standards Committee (now defunct)
chaired by Joachim Schrod.
Appendix A, "Device-Independent File Format",
section A.2, "Summary of DVI commands".
DTL Commands
------------
variety <variety-name> Specifies name of DTL file type.
Naturally, `variety' has no DVI equivalent.
The other DTL commands correspond one-to-one with DVI commands, but I
have used briefer names (except for `special') than those used in the
DVI standards document.
DTL : DVI
(text) : series of set_char commands, for printable ASCII text
\( : literal ASCII left parenthesis in (text)
\) : literal ASCII right parenthesis in (text)
\\ : literal ASCII backslash in (text)
\" : literal ASCII double quote in (text)
\XY : set_char for character with hexadecimal code XY,
not in parentheses, but by itself for readability
s1, s2, s2, s3 : set, with (1,2,3,4)-byte charcodes
sr : set_rule
p1, p2, p2, p3 : put, with (1,2,3,4)-byte charcodes
pr : put_rule
nop : nop (do nothing)
bop : bop (beginning of page)
eop : eop (end of page)
[ : push
] : pop
r1, r2, r3, r4 : right, with (1,2,3,4)-byte argument
w0, w1, w2, w3, w4 : as in DVI
x0, x1, x2, x3, x4 : as in DVI
d1, d2, d3, d4 : down, with (1,2,3,4)-byte argument
y0, y1, y2, y3, y4 : as in DVI
z0, z1, z2, z3, z4 : as in DVI
fn : fnt_num (set current font to font number in 0 to 63)
f1, f2, f3, f4 : fnt (set current font to (1,2,3,4)-byte font number)
special : xxx (special commands with (1,2,3,4)-byte string length)
fd : fnt_def (assign a number to a named font)
pre : preamble
post : post (begin postamble)
post_post : post_post (end postamble)
opcode : undefined DVI command (250 to 255)
---------------
EOF ``dtl.doc''
---------------

View File

@ -1,174 +0,0 @@
/* dtl.h
- header for dv2dt.c and dt2dv.c, conversion programs
for human-readable "DTL" <-> DVI.
- (ANSI C) version 0.6.0 - 18:31 GMT +11 Wed 8 March 1995
- author: Geoffrey Tobin G.Tobin@latrobe.edu.au
- patch: Michal Tomczak-Jaegermann ntomczak@vm.ucs.ualberta.ca
- Reference: "The DVI Driver Standard, Level 0",
by The TUG DVI Driver Standards Committee.
Appendix A, "Device-Independent File Format".
*/
/* variety of DTL produced */
#define VARIETY "sequences-6"
/* version of DTL programs */
#define VERSION "0.6.0"
/* Test for ANSI/ISO Standard C */
#if (defined(__cplusplus) || defined(__STDC__) || defined(c_plusplus))
#define STDC 1
#else
#define STDC 0
#endif
/* Version (Traditional or ANSI) of C affects prototype and type definitions */
#if STDC
#define ARGS(parenthesized_list) parenthesized_list
#else /* NOT STDC */
#define ARGS(parenthesized_list) ()
#endif /* NOT STDC */
#if STDC
#define Void void
#define VOID void
#define FILE_BEGIN SEEK_SET
#else /* NOT STDC */
#define Void int
#define VOID
#define FILE_BEGIN 0
#endif /* NOT STDC */
/* types to store 4 byte signed and unsigned integers */
typedef long S4;
typedef unsigned long U4;
/* scanf and printf formats to read or write those */
#define SF4 "%ld"
#define UF4 "%lu"
/* 4 byte hexadecimal */
/* #define XF4 "%04lx" */
#define XF4 "%lx"
/* 4 byte octal */
#define OF4 "%lo"
/* type for byte count for DVI file */
/* COUNT must be large enough to hold a U4 (unsigned 4 byte) value */
typedef U4 COUNT;
/* size of a TeX and DVI word is 32 bits; in some systems a `long int' is needed */
typedef long int word_t;
/* format for a DVI word */
#define WF "%ld"
/* string of 8-bit characters for machine: keyboard, screen, memory */
#define MAXSTRLEN 256
typedef char String[MAXSTRLEN+1];
/* string s of length l and maximum length m */
typedef struct {int l; int m; char * s;} Lstring;
int debug = 0; /* normally, debugging is off */
/* Is each DTL command parenthesised by a BCOM and an ECOM? */
int group = 0; /* by default, no grouping */
/* signals of beginning and end of a command and its arguments */
/* these apply only if group is nonzero */
# define BCOM "{"
# define ECOM "}"
# define BCOM_CHAR '{'
# define ECOM_CHAR '}'
/* beginning and end of a message string */
#define BMES "'"
#define EMES BMES
#define BMES_CHAR '\''
#define EMES_CHAR BMES_CHAR
/* beginning and end of sequence of font characters */
#define BSEQ "("
#define ESEQ ")"
#define BSEQ_CHAR '('
#define ESEQ_CHAR ')'
/* escape and quote characters */
#define ESC_CHAR '\\'
#define QUOTE_CHAR '\"'
/* command names in DTL */
#define SETCHAR "\\"
#define SET "s"
#define SET1 "s1"
#define SET2 "s2"
#define SET3 "s3"
#define SET4 "s4"
#define SETRULE "sr"
#define PUT "p"
#define PUT1 "p1"
#define PUT2 "p2"
#define PUT3 "p3"
#define PUT4 "p4"
#define PUTRULE "pr"
#define NOP "nop"
#define BOP "bop"
#define EOP "eop"
#define PUSH "["
#define POP "]"
#define RIGHT "r"
#define RIGHT1 "r1"
#define RIGHT2 "r2"
#define RIGHT3 "r3"
#define RIGHT4 "r4"
#define W "w"
#define W0 "w0"
#define W1 "w1"
#define W2 "w2"
#define W3 "w3"
#define W4 "w4"
#define X "x"
#define X0 "x0"
#define X1 "x1"
#define X2 "x2"
#define X3 "x3"
#define X4 "x4"
#define DOWN "d"
#define DOWN1 "d1"
#define DOWN2 "d2"
#define DOWN3 "d3"
#define DOWN4 "d4"
#define Y "y"
#define Y0 "y0"
#define Y1 "y1"
#define Y2 "y2"
#define Y3 "y3"
#define Y4 "y4"
#define Z "z"
#define Z0 "z0"
#define Z1 "z1"
#define Z2 "z2"
#define Z3 "z3"
#define Z4 "z4"
#define FONT "f"
#define FONT1 "f1"
#define FONT2 "f2"
#define FONT3 "f3"
#define FONT4 "f4"
#define FONTDEF "fd"
#define FONTNUM "fn"
#define SPECIAL "special"
#define PRE "pre"
#define POST "post"
#define POSTPOST "post_post"
#define OPCODE "opcode"
/* end dtl.h */

View File

@ -1,919 +0,0 @@
/* dv2dt - convert DVI file to human-readable "DTL" format.
- (ANSI C) version 0.6.0 - 17:54 GMT +11 Wed 8 March 1995
- author: Geoffrey Tobin ecsgrt@luxor.latrobe.edu.au
- patch: Michal Tomczak-Jaegermann ntomczak@vm.ucs.ualberta.ca
- Reference: "The DVI Driver Standard, Level 0",
by The TUG DVI Driver Standards Committee.
Appendix A, "Device-Independent File Format".
*/
/* unix version; read from stdin, write to stdout, by default. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "dtl.h"
#define PRINT_BCOM if (group) fprintf (dtl, "%s", BCOM)
#define PRINT_ECOM if (group) fprintf (dtl, "%s", ECOM)
/*
operation's:
opcode,
name,
number of args,
string of arguments.
*/
struct op_info_st {int code; char * name; int nargs; char * args; };
typedef struct op_info_st op_info;
/*
table's:
name,
first opcode,
last opcode,
pointer to opcode info.
*/
struct op_table_st {char * name; int first; int last; op_info * list; };
typedef struct op_table_st op_table;
/* Table for opcodes 128 to 170 inclusive. */
op_info op_info_128_170 [] =
{
{128, "s1", 1, "1"},
{129, "s2", 1, "2"},
{130, "s3", 1, "3"},
{131, "s4", 1, "-4"},
{132, "sr", 2, "-4 -4"},
{133, "p1", 1, "1"},
{134, "p2", 1, "2"},
{135, "p3", 1, "3"},
{136, "p4", 1, "-4"},
{137, "pr", 2, "-4 -4"},
{138, "nop", 0, ""},
{139, "bop", 11, "-4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4"},
{140, "eop", 0, ""},
{141, "[", 0, ""},
{142, "]", 0, ""},
{143, "r1", 1, "-1"},
{144, "r2", 1, "-2"},
{145, "r3", 1, "-3"},
{146, "r4", 1, "-4"},
{147, "w0", 0, ""},
{148, "w1", 1, "-1"},
{149, "w2", 1, "-2"},
{150, "w3", 1, "-3"},
{151, "w4", 1, "-4"},
{152, "x0", 0, ""},
{153, "x1", 1, "-1"},
{154, "x2", 1, "-2"},
{155, "x3", 1, "-3"},
{156, "x4", 1, "-4"},
{157, "d1", 1, "-1"},
{158, "d2", 1, "-2"},
{159, "d3", 1, "-3"},
{160, "d4", 1, "-4"},
{161, "y0", 0, ""},
{162, "y1", 1, "-1"},
{163, "y2", 1, "-2"},
{164, "y3", 1, "-3"},
{165, "y4", 1, "-4"},
{166, "z0", 0, ""},
{167, "z1", 1, "-1"},
{168, "z2", 1, "-2"},
{169, "z3", 1, "-3"},
{170, "z4", 1, "-4"}
}; /* op_info op_info_128_170 [] */
op_table op_128_170 = {"op_128_170", 128, 170, op_info_128_170};
/* Table for font with 1 to 4 bytes (opcodes 235 to 238) inclusive. */
op_info fnt_n [] =
{
{235, "f1", 1, "1"},
{236, "f2", 1, "2"},
{237, "f3", 1, "3"},
{238, "f4", 1, "-4"}
}; /* op_info fnt_n [] */
op_table fnt = {"f", 235, 238, fnt_n};
/* function prototypes */
int open_dvi ARGS((char * dvi_file, FILE ** dvi));
int open_dtl ARGS((char * dtl_file, FILE ** dtl));
int dv2dt ARGS((FILE * dvi, FILE * dtl));
COUNT wunsigned ARGS((int n, FILE * dvi, FILE * dtl));
COUNT wsigned ARGS((int n, FILE * dvi, FILE * dtl));
S4 rsigned ARGS((int n, FILE * dvi));
U4 runsigned ARGS((int n, FILE * dvi));
COUNT wtable ARGS((op_table table, int opcode, FILE * dvi, FILE * dtl));
COUNT setseq ARGS((int opcode, FILE * dvi, FILE * dtl));
Void setpchar ARGS((int charcode, FILE * dtl));
Void xferstring ARGS((int k, FILE * dvi, FILE * dtl));
COUNT special ARGS((FILE * dvi, FILE * dtl, int n));
COUNT fontdef ARGS((FILE * dvi, FILE * dtl, int n));
COUNT preamble ARGS((FILE * dvi, FILE * dtl));
COUNT postamble ARGS((FILE * dvi, FILE * dtl));
COUNT postpost ARGS((FILE * dvi, FILE * dtl));
String program; /* name of dv2dt program */
int
main
#ifdef STDC
(int argc, char * argv[])
#else
(argc, argv)
int argc;
char * argv[];
#endif
{
FILE * dvi = stdin;
FILE * dtl = stdout;
/* Watch out: C's standard library's string functions are dicey */
strncpy (program, argv[0], MAXSTRLEN);
if (argc > 1)
open_dvi (argv[1], &dvi);
if (argc > 2)
open_dtl (argv[2], &dtl);
dv2dt (dvi, dtl);
return 0; /* OK */
}
/* end main */
int
open_dvi
#ifdef STDC
(char * dvi_file, FILE ** pdvi)
#else
(dvi_file, pdvi)
char * dvi_file;
FILE ** pdvi;
#endif
/* I: dvi_file; I: pdvi; O: *pdvi. */
{
if (pdvi == NULL)
{
fprintf (stderr, "%s: address of dvi variable is NULL.\n", program);
exit (1);
}
*pdvi = fopen (dvi_file, "rb");
if (*pdvi == NULL)
{
fprintf (stderr, "%s: Cannot open \"%s\" for binary reading.\n",
program, dvi_file);
exit (1);
}
return 1; /* OK */
}
/* open_dvi */
int
open_dtl
#ifdef STDC
(char * dtl_file, FILE ** pdtl)
#else
(dtl_file, pdtl)
char * dtl_file;
FILE ** pdtl;
#endif
/* I: dtl_file; I: pdtl; O: *pdtl. */
{
if (pdtl == NULL)
{
fprintf (stderr, "%s: address of dtl variable is NULL.\n", program);
exit (1);
}
*pdtl = fopen (dtl_file, "w");
if (*pdtl == NULL)
{
fprintf (stderr, "%s: Cannot open \"%s\" for text writing.\n",
program, dtl_file);
exit (1);
}
return 1; /* OK */
}
/* open_dtl */
int
dv2dt
#ifdef STDC
(FILE * dvi, FILE * dtl)
#else
(dvi, dtl)
FILE * dvi;
FILE * dtl;
#endif
{
int opcode;
COUNT count; /* intended to count bytes to DVI file; as yet unused. */
PRINT_BCOM;
fprintf (dtl, "variety ");
/* fprintf (dtl, BMES); */
fprintf (dtl, VARIETY);
/* fprintf (dtl, EMES); */
PRINT_ECOM;
fprintf (dtl, "\n");
/* start counting DVI bytes */
count = 0;
while ((opcode = fgetc (dvi)) != EOF)
{
PRINT_BCOM; /* start of command and parameters */
if (opcode < 0 || opcode > 255)
{
count += 1;
fprintf (stderr, "%s: Non-byte from \"fgetc()\"!\n", program);
exit (1);
}
else if (opcode <= 127)
{
/* setchar commands */
/* count += 1; */
/* fprintf (dtl, "%s%d", SETCHAR, opcode); */
count +=
setseq (opcode, dvi, dtl);
}
else if (opcode >= 128 && opcode <= 170)
{
count +=
wtable (op_128_170, opcode, dvi, dtl);
}
else if (opcode >= 171 && opcode <= 234)
{
count += 1;
fprintf (dtl, "%s%d", FONTNUM, opcode - 171);
}
else if (opcode >= 235 && opcode <= 238)
{
count +=
wtable (fnt, opcode, dvi, dtl);
}
else if (opcode >= 239 && opcode <= 242)
{
count +=
special (dvi, dtl, opcode - 238);
}
else if (opcode >= 243 && opcode <= 246)
{
count +=
fontdef (dvi, dtl, opcode - 242);
}
else if (opcode == 247)
{
count +=
preamble (dvi, dtl);
}
else if (opcode == 248)
{
count +=
postamble (dvi, dtl);
}
else if (opcode == 249)
{
count +=
postpost (dvi, dtl);
}
else if (opcode >= 250 && opcode <= 255)
{
count += 1;
fprintf (dtl, "opcode%d", opcode);
}
else
{
count += 1;
fprintf (stderr, "%s: unknown byte.\n", program);
exit (1);
}
PRINT_ECOM; /* end of command and parameters */
fprintf (dtl, "\n");
if (fflush (dtl) == EOF)
{
fprintf (stderr, "%s: fflush on dtl file gave write error!\n", program);
exit (1);
}
} /* end while */
return 1; /* OK */
}
/* dv2dt */
COUNT
wunsigned
#ifdef STDC
(int n, FILE * dvi, FILE * dtl)
#else
(n, dvi, dtl)
int n;
FILE * dvi;
FILE * dtl;
#endif
{
U4 unum;
fprintf (dtl, " ");
unum = runsigned (n, dvi);
fprintf (dtl, UF4, unum);
return n;
}
/* end wunsigned */
COUNT
wsigned
#ifdef STDC
(int n, FILE * dvi, FILE * dtl)
#else
(n, dvi, dtl)
int n;
FILE * dvi;
FILE * dtl;
#endif
{
S4 snum;
fprintf (dtl, " ");
snum = rsigned (n, dvi);
fprintf (dtl, SF4, snum);
return n;
}
/* end wsigned */
U4
runsigned
#ifdef STDC
(int n, FILE * dvi)
#else
(n, dvi)
int n;
FILE * dvi;
#endif
/* read 1 <= n <= 4 bytes for an unsigned integer from dvi file */
/* DVI format uses Big-endian storage of numbers. */
{
U4 integer;
int ibyte = 0;
int i;
if (n < 1 || n > 4)
{
fprintf (stderr,
"%s: runsigned() asked for %d bytes. Must be 1 to 4.\n", program, n);
exit (1);
}
/* Following calculation works iff storage is big-endian. */
integer = 0;
for (i = 0; i < n; i++)
{
integer *= 256;
ibyte = fgetc (dvi);
integer += ibyte;
}
return integer;
}
/* end runsigned */
S4
rsigned
#ifdef STDC
(int n, FILE * dvi)
#else
(n, dvi)
int n;
FILE * dvi;
#endif
/* read 1 <= n <= 4 bytes for a signed integer from dvi file */
/* DVI format uses Big-endian storage of numbers. */
{
S4 integer;
int ibyte = 0;
int i;
if (n < 1 || n > 4)
{
fprintf (stderr,
"%s: rsigned() asked for %d bytes. Must be 1 to 4.\n", program, n);
exit (1);
}
/* Following calculation works iff storage is big-endian. */
integer = 0;
for (i = 0; i < n; i++)
{
integer *= 256;
ibyte = fgetc (dvi);
/* Big-endian implies sign byte is first byte. */
if (i == 0 && ibyte >= 128)
{
ibyte -= 256;
}
integer += ibyte;
}
return integer;
}
/* end rsigned */
COUNT
wtable
#ifdef STDC
(op_table table, int opcode, FILE * dvi, FILE * dtl)
#else
(table, opcode, dvi, dtl)
op_table table;
int opcode;
FILE * dvi;
FILE * dtl;
#endif
/* write command with given opcode in given table */
/* return number of DVI bytes in this command */
{
op_info op; /* pointer into table of operations and arguments */
COUNT bcount = 0; /* number of bytes in arguments of this opcode */
String args; /* arguments string */
int i; /* count of arguments read from args */
int pos; /* position in args */
/* Defensive programming. */
if (opcode < table.first || opcode > table.last)
{
fprintf (stderr,
"%s: opcode %d is outside table %s [ %d to %d ] !\n",
program, opcode, table.name, table.first, table.last);
exit (1);
}
op = table.list [opcode - table.first];
/* Further defensive programming. */
if (op.code != opcode)
{
fprintf (stderr, "%s: internal table %s wrong!\n", program, table.name);
exit (1);
}
bcount = 1;
fprintf (dtl, "%s", op.name);
/* NB: sscanf does an ungetc, */
/* so args must be writable. */
strncpy (args, op.args, MAXSTRLEN);
pos = 0;
for (i = 0; i < op.nargs; i++)
{
int argtype; /* sign and number of bytes in current argument */
int nconv; /* number of successful conversions from args */
int nread; /* number of bytes read from args */
nconv = sscanf (args + pos, "%d%n", &argtype, &nread);
/* internal consistency checks */
if (nconv != 1 || nread <= 0)
{
fprintf (stderr,
"%s: internal read of table %s failed!\n", program, table.name);
exit (1);
}
pos += nread;
bcount += ( argtype < 0 ?
wsigned (-argtype, dvi, dtl) :
wunsigned (argtype, dvi, dtl) ) ;
} /* end for */
return bcount;
}
/* wtable */
COUNT
setseq
#ifdef STDC
(int opcode, FILE * dvi, FILE * dtl)
#else
(opcode, dvi, dtl)
int opcode;
FILE * dvi;
FILE * dtl;
#endif
/* write a sequence of setchar commands */
/* return count of DVI bytes interpreted into DTL */
{
int charcode = opcode; /* fortuitous */
int ccount = 0;
if (!isprint (charcode))
{
ccount = 1;
fprintf (dtl, "%s%02X", SETCHAR, opcode);
}
else
{
/* start of sequence of font characters */
fprintf (dtl, BSEQ);
/* first character */
ccount = 1;
setpchar (charcode, dtl);
/* subsequent characters */
while ((opcode = fgetc (dvi)) != EOF)
{
if (opcode < 0 || opcode > 127)
{
break; /* not a setchar command, so sequence has ended */
}
charcode = opcode; /* fortuitous */
if (!isprint (charcode)) /* not printable ascii */
{
break; /* end of font character sequence, as for other commands */
}
else /* printable ASCII */
{
ccount += 1;
setpchar (charcode, dtl);
}
} /* end for loop */
/* prepare to reread opcode of next DVI command */
if (ungetc (opcode, dvi) == EOF)
{
fprintf (stderr, "setseq: cannot push back a byte\n");
exit (1);
}
/* end of sequence of font characters */
fprintf (dtl, ESEQ);
}
return ccount;
}
/* setseq */
Void
setpchar
#ifdef STDC
(int charcode, FILE * dtl)
#else
(charcode, dtl)
int charcode;
FILE * dtl;
#endif
/* set printable character */
{
switch (charcode)
{
case ESC_CHAR:
fprintf (dtl, "%c", ESC_CHAR);
fprintf (dtl, "%c", ESC_CHAR);
break;
case QUOTE_CHAR:
fprintf (dtl, "%c", ESC_CHAR);
fprintf (dtl, "%c", QUOTE_CHAR);
break;
case BSEQ_CHAR:
fprintf (dtl, "%c", ESC_CHAR);
fprintf (dtl, "%c", BSEQ_CHAR);
break;
case ESEQ_CHAR:
fprintf (dtl, "%c", ESC_CHAR);
fprintf (dtl, "%c", ESEQ_CHAR);
break;
default:
fprintf (dtl, "%c", charcode);
break;
}
}
/* setpchar */
Void
xferstring
#ifdef STDC
(int k, FILE * dvi, FILE * dtl)
#else
(k, dvi, dtl)
int k;
FILE * dvi;
FILE * dtl;
#endif
/* copy string of k characters from dvi file to dtl file */
{
int i;
int ch;
fprintf (dtl, " ");
fprintf (dtl, "'");
for (i=0; i < k; i++)
{
ch = fgetc (dvi);
if (ch == ESC_CHAR || ch == EMES_CHAR)
{
fprintf (dtl, "%c", ESC_CHAR);
}
fprintf (dtl, "%c", ch);
}
fprintf (dtl, "'");
}
/* xferstring */
COUNT
special
#ifdef STDC
(FILE * dvi, FILE * dtl, int n)
#else
(dvi, dtl, n)
FILE * dvi;
FILE * dtl;
int n;
#endif
/* read special 1 .. 4 from dvi and write in dtl */
/* return number of DVI bytes interpreted into DTL */
{
U4 k;
if (n < 1 || n > 4)
{
fprintf (stderr, "%s: special %d, range is 1 to 4.\n", program, n);
exit (1);
}
fprintf (dtl, "%s%d", SPECIAL, n);
/* k[n] = length of special string */
fprintf (dtl, " ");
k = runsigned (n, dvi);
fprintf (dtl, UF4, k);
/* x[k] = special string */
xferstring (k, dvi, dtl);
return (1 + n + k);
}
/* end special */
COUNT
fontdef
#ifdef STDC
(FILE * dvi, FILE * dtl, int n)
#else
(dvi, dtl, n)
FILE * dvi;
FILE * dtl;
int n;
#endif
/* read fontdef 1 .. 4 from dvi and write in dtl */
/* return number of DVI bytes interpreted into DTL */
{
U4 ku, c, s, d, a, l;
S4 ks;
if (n < 1 || n > 4)
{
fprintf (stderr, "%s: font def %d, range is 1 to 4.\n", program, n);
exit (1);
}
fprintf (dtl, "%s%d", FONTDEF, n);
/* k[n] = font number */
fprintf (dtl, " ");
if (n == 4)
{
ks = rsigned (n, dvi);
fprintf (dtl, SF4, ks);
}
else
{
ku = runsigned (n, dvi);
fprintf (dtl, UF4, ku);
}
/* c[4] = checksum */
fprintf (dtl, " ");
c = runsigned (4, dvi);
#ifdef HEX_CHECKSUM
fprintf (dtl, XF4, c);
#else /* NOT HEX_CHECKSUM */
/* write in octal, to allow quick comparison with tftopl's output */
fprintf (dtl, OF4, c);
#endif
/* s[4] = scale factor */
fprintf (dtl, " ");
s = runsigned (4, dvi);
fprintf (dtl, UF4, s);
/* d[4] = design size */
fprintf (dtl, " ");
d = runsigned (4, dvi);
fprintf (dtl, UF4, d);
/* a[1] = length of area (directory) name */
a = runsigned (1, dvi);
fprintf (dtl, " ");
fprintf (dtl, UF4, a);
/* l[1] = length of font name */
l = runsigned (1, dvi);
fprintf (dtl, " ");
fprintf (dtl, UF4, l);
/* n[a+l] = font pathname string => area (directory) + font */
xferstring (a, dvi, dtl);
xferstring (l, dvi, dtl);
return (1 + n + 4 + 4 + 4 + 1 + 1 + a + l);
}
/* end fontdef */
COUNT
preamble
#ifdef STDC
(FILE * dvi, FILE * dtl)
#else
(dvi, dtl)
FILE * dvi;
FILE * dtl;
#endif
/* read preamble from dvi and write in dtl */
/* return number of DVI bytes interpreted into DTL */
{
U4 id, num, den, mag, k;
fprintf (dtl, "pre");
/* i[1] = DVI format identification */
fprintf (dtl, " ");
id = runsigned (1, dvi);
fprintf (dtl, UF4, id);
/* num[4] = numerator of DVI unit */
fprintf (dtl, " ");
num = runsigned (4, dvi);
fprintf (dtl, UF4, num);
/* den[4] = denominator of DVI unit */
fprintf (dtl, " ");
den = runsigned (4, dvi);
fprintf (dtl, UF4, den);
/* mag[4] = 1000 x magnification */
fprintf (dtl, " ");
mag = runsigned (4, dvi);
fprintf (dtl, UF4, mag);
/* k[1] = length of comment */
fprintf (dtl, " ");
k = runsigned (1, dvi);
fprintf (dtl, UF4, k);
/* x[k] = comment string */
xferstring (k, dvi, dtl);
return (1 + 1 + 4 + 4 + 4 + 1 + k);
}
/* end preamble */
COUNT
postamble
#ifdef STDC
(FILE * dvi, FILE * dtl)
#else
(dvi, dtl)
FILE * dvi;
FILE * dtl;
#endif
/* read postamble from dvi and write in dtl */
/* return number of bytes */
{
U4 p, num, den, mag, l, u, s, t;
fprintf (dtl, "post");
/* p[4] = pointer to final bop */
fprintf (dtl, " ");
p = runsigned (4, dvi);
fprintf (dtl, UF4, p);
/* num[4] = numerator of DVI unit */
fprintf (dtl, " ");
num = runsigned (4, dvi);
fprintf (dtl, UF4, num);
/* den[4] = denominator of DVI unit */
fprintf (dtl, " ");
den = runsigned (4, dvi);
fprintf (dtl, UF4, den);
/* mag[4] = 1000 x magnification */
fprintf (dtl, " ");
mag = runsigned (4, dvi);
fprintf (dtl, UF4, mag);
/* l[4] = height + depth of tallest page */
fprintf (dtl, " ");
l = runsigned (4, dvi);
fprintf (dtl, UF4, l);
/* u[4] = width of widest page */
fprintf (dtl, " ");
u = runsigned (4, dvi);
fprintf (dtl, UF4, u);
/* s[2] = maximum stack depth */
fprintf (dtl, " ");
s = runsigned (2, dvi);
fprintf (dtl, UF4, s);
/* t[2] = total number of pages (bop commands) */
fprintf (dtl, " ");
t = runsigned (2, dvi);
fprintf (dtl, UF4, t);
/* return (29); */
return (1 + 4 + 4 + 4 + 4 + 4 + 4 + 2 + 2);
}
/* end postamble */
COUNT
postpost
#ifdef STDC
(FILE * dvi, FILE * dtl)
#else
(dvi, dtl)
FILE * dvi;
FILE * dtl;
#endif
/* read post_post from dvi and write in dtl */
/* return number of bytes */
{
U4 q, id;
int b223; /* hope this is 8-bit clean */
int n223; /* number of "223" bytes in final padding */
fprintf (dtl, "post_post");
/* q[4] = pointer to post command */
fprintf (dtl, " ");
q = runsigned (4, dvi);
fprintf (dtl, UF4, q);
/* i[1] = DVI identification byte */
fprintf (dtl, " ");
id = runsigned (1, dvi);
fprintf (dtl, UF4, id);
/* final padding by "223" bytes */
/* hope this way of obtaining b223 is 8-bit clean */
for (n223 = 0; (b223 = fgetc (dvi)) == 223; n223++)
{
fprintf (dtl, " ");
fprintf (dtl, "%d", 223);
}
if (n223 < 4)
{
fprintf (stderr,
"%s: bad post_post: fewer than four \"223\" bytes.\n", program);
exit (1);
}
if (b223 != EOF)
{
fprintf (stderr,
"%s: bad post_post: doesn't end with a \"223\".\n", program);
exit (1);
}
return (1 + 4 + 1 + n223);
}
/* end postpost */
/* end of "dv2dt.c" */

View File

@ -1,715 +0,0 @@
.\" ====================================================================
.\" @Troff-man-file{
.\" author = "Nelson H. F. Beebe and Geoffrey Tobin",
.\" version = "0.6.0",
.\" date = "08 March 1995",
.\" time = "19:52:00 GMT +11",
.\" filename = "dv2dt.man",
.\" address = "Center for Scientific Computing
.\" Department of Mathematics
.\" University of Utah
.\" Salt Lake City, UT 84112
.\" USA",
.\" telephone = "+1 801 581 5254",
.\" FAX = "+1 801 581 4148",
.\" checksum = "32328 715 2191 12898",
.\" email = "beebe@math.utah.edu (Internet)",
.\" codetable = "ISO/ASCII",
.\" keywords = "DVI, TeX",
.\" supported = "no",
.\" docstring = "This file contains the UNIX manual pages
.\" for the dv2dt utility, a program for
.\" converting a binary TeX DVI file to an
.\" editable text representation in DTL (DVI Text
.\" Language). The companion dt2dv utility can
.\" convert the output DTL file back to a binary
.\" DVI file.
.\"
.\" The checksum field above contains a CRC-16
.\" checksum as the first value, followed by the
.\" equivalent of the standard UNIX wc (word
.\" count) utility output of lines, words, and
.\" characters. This is produced by Robert
.\" Solovay's checksum utility.",
.\" }
.\" ====================================================================
.if t .ds Te T\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'X
.if n .ds Te TeX
.if t .ds Xe X\\h'-0.1667m'\\v'0.20v'E\\v'-0.20v'\\h'-0.125m'T
.if n .ds Xe XeT
.TH DV2DT 1 "08 March 1995" "Version 0.6.0"
.\"======================================================================
.SH NAME
dv2dt \- convert a binary TeX DVI file to DTL text representation
.\"======================================================================
.SH SYNOPSIS
.B dv2dt
.I input-DVI-file
.I output-DTL-file
.PP
If the filenames are omitted, then
.I stdin
and
.I stdout
are assumed.
.\"======================================================================
.SH DESCRIPTION
.B dv2dt
converts a binary \*(Te\& DVI file to an editable
text file in DTL
.RI ( "DVI Text Language" )
format. The companion
.BR dt2dv (1)
utility can convert the DTL file back to a binary
DVI file.
.\"======================================================================
.SH "DVI COMMAND DESCRIPTION"
\*(Te\& DVI files contain a compact binary
description of typeset pages, as a stream of
operation code bytes, each immediately followed by
zero or more parameter bytes. The format of DVI
files is fully described in Donald E. Knuth,
.IR "\*(Te\&: The Program" ,
Addison-Wesley (1986), ISBN 0-201-13437-3, as well
as in the
.BR dvitype (1)
literate program source code.
.PP
For convenience, we provide a summary of DVI
commands here. In the following list, operation
code bytes are given as unsigned decimal values,
followed by their symbolic names (not present in
the DVI file), and a short description. A
designation like
.I b[+n]
means that the operation code byte is followed by
a parameter
.I b
which uses
.I n
bytes, and is signed. Without the plus sign, the
parameter is unsigned. Signed integer parameter
values are always represented in two's complement
arithmetic, which is the system followed by most
computers manufactured today, including all
personal computers and workstations.
.if n .TP \w'\fI128_set1__c[1]\fP'u+3n
.if t .TP \w'\fI243_fnt_def1__k[1]_c[4]_s[4]_d[4]_a[1]_l[1]_n[a+l]\fP'u+3n
.I "0 set_char_0"
Set character 0 from current font.
.TP
.I .\|.\|.
.TP
.I "127 set_char_127"
Set character 127 from current font.
.TP
.I "128 set1 c[1]"
Set 1-byte unsigned character (uchar) number
.IR c .
.TP
.I "129 set2 c[2]"
Set 2-byte uchar number
.IR c .
.TP
.I "130 set3 c[3]"
Set 3-byte uchar number
.IR c .
.TP
.I "131 set4 c[+4]"
Set 4-byte signed character (schar) number
.IR c .
.TP
.I "132 set_rule a[+4] b[+4]"
Set rule, height
.IR a ,
width
.IR b .
.TP
.I "133 put1 c[1]"
Put 1-byte uchar
.IR c .
.TP
.I "134 put2 c[2]"
Put 2-byte uchar
.IR c .
.TP
.I "135 put3 c[3]"
Put 3-byte uchar
.IR c .
.TP
.I "136 put4 c[+4]"
Put 4-byte schar
.IR c .
.TP
.I "137 put_rule a[+4] b[+4]"
Put rule, height
.IR a ,
width
.IR b .
.TP
.I "138 nop"
Do nothing.
.TP
.I "139 bop c0[+4] .\|.\|. c9[+4] p[+4]"
Beginning of page. The parameters
.I "c0 .\|.\|. c9"
are the \*(Te\& page counters, the contents of
\*(Te\& count registers
.IR "\ecount0 .\|.\|. \ecount9" .
The parameter
.I p
is the byte offset from the beginning of the DVI
file of the previous
.I bop
operation code byte. The first such command in
the file has
.IR "p = \-1" .
.TP
.I "140 eop"
End of page.
.TP
.I "141 push"
Push
.RI ( h,v,w,x,y,z )
onto stack.
.TP
.I "142 pop"
Pop
.RI ( h,v,w,x,y,z )
from stack.
.TP
.I "143 right1 b[+1]"
Move right
.I b
units.
.TP
.I "144 right2 b[+2]"
Move right
.I b
units.
.TP
.I "145 right3 b[+3]"
Move right
.I b
units.
.TP
.I "146 right4 b[+4]"
Move right
.I b
units.
.TP
.I "147 w0"
Move right
.I w
units.
.TP
.I "148 w1 b[+1]"
Move right
.I b
units, and set
.IR "w = b" .
.TP
.I "149 w2 b[+2]"
Move right
.I b
units, and set
.IR "w = b" .
.TP
.I "150 w3 b[+3]"
Move right
.I b
units, and set
.IR "w = b" .
.TP
.I "151 w4 b[+4]"
Move right
.I b
units, and set
.IR "w = b" .
.TP
.I "152 x0"
Move right
.I x
units.
.TP
.I "153 x1 b[+1]"
Move right
.I b
units, and set
.IR "x = b" .
.TP
.I "154 x2 b[+2]"
Move right
.I b
units, and set
.IR "x = b" .
.TP
.I "155 x3 b[+3]"
Move right
.I b
units, and set
.IR "x = b" .
.TP
.I "156 x4 b[+4]"
Move right
.I b
units, and set
.IR "x = b" .
.TP
.I "157 down1 a[+1]"
Move down
.I a
units.
.TP
.I "158 down2 a[+2]"
Move down
.I a
units.
.TP
.I "159 down3 a[+3]"
Move down
.I a
units.
.TP
.I "160 down4 a[+4]"
Move down
.I a
units.
.TP
.I "161 y0"
Move right
.I y
units.
.TP
.I "162 y1 a[+1]"
Move right
.I a
units, and set
.IR "y = a" .
.TP
.I "163 y2 a[+2]"
Move right
.I a
units, and set
.IR "y = a" .
.TP
.I "164 y3 a[+3]"
Move right
.I a
units, and set
.IR "y = a" .
.TP
.I "165 y4 a[+4]"
Move right
.I a
units, and set
.IR "y = a" .
.TP
.I "166 z0"
Move right
.I z
units.
.TP
.I "167 z1 a[+1]"
Move right
.I a
units, and set
.IR "z = a" .
.TP
.I "168 z2 a[+2]"
Move right
.I a
units, and set
.IR "z = a" .
.TP
.I "169 z3 a[+3]"
Move right
.I a
units, and set
.IR "z = a" .
.TP
.I "170 z4 a[+4]"
Move right
.I a
units, and set
.IR "z = a" .
.TP
.I "171 fnt_num_0"
Set current font number
.IR "(f) = 0" .
.TP
.I .\|.\|.
.TP
.I "234 fnt_num_63"
Set
.IR "f = 63" .
.TP
.I "235 fnt1 k[1]"
Set
.IR "f = k" .
.TP
.I "236 fnt2 k[2]"
Set
.IR "f = k" .
.TP
.I "237 fnt3 k[3]"
Set
.IR "f = k" .
.TP
.I "238 fnt4 k[+4]"
Set
.IR "f = k" .
.TP
.I "239 xxx1 k[1] x[k]"
Special string
.I x
with
.I k
bytes.
.TP
.I "240 xxx2 k[2] x[k]"
Special string
.I x
with
.I k
bytes.
.TP
.I "241 xxx3 k[3] x[k]"
Special string
.I x
with
.I k
bytes.
.TP
.I "242 xxx4 k[4] x[k]"
Special string
.I x
with (unsigned)
.I k
bytes.
.TP
.I "243 fnt_def1 k[1] c[4] s[4] d[4] a[1] l[1] n[a+l]"
Define font
.IR k .
The parameters are:
.RS
.TP \w'\fIm\fP'u+3n
.I c
Checksum for TFM file.
.TP
.I s
Scale factor, in DVI units.
.TP
.I d
Design size, in DVI units.
.TP
.I a
Length of the ``area'' or directory.
.TP
.I l
Length of the font name.
.TP
.I n
Area and font name string(s).
.RE
.TP
.I "244 fnt_def2 k[2] c[4] s[4] d[4] a[1] l[1] n[a+l]"
Define font
.IR k .
.TP
.I "245 fnt_def3 k[3] c[4] s[4] d[4] a[1] l[1] n[a+l]"
Define font
.IR k .
.TP
.I "246 fnt_def4 k[+4] c[4] s[4] d[4] a[1] l[1] n[a+l]"
Define font
.IR k .
.TP
.I "247 pre i[1] num[4] den[4] mag[4] k[1] x[k]"
Begin preamble. The parameters are:
.RS
.TP \w'\fInum\fP'u+3n
.I i
DVI format. Standard \*(Te\& has
.IR "ID = 2" ,
and \*(Te\&-\*(Xe\& has
.IR "ID = 3" .
.TP
.I num
Numerator of 100 nm / DVI unit.
.TP
.I den
Denominator of 100 nm / DVI unit.
.TP
.I mag
1000 * magnification.
.TP
.I k
Comment length.
.TP
.I x
Comment string.
.RE
.TP
.I "248 post p[4] num[4] den[4] mag[4] l[4] u[4] s[2] t[2]"
Begin postamble. The parameters are:
.RS
.TP \w'\fInum\fP'u+3n
.I p
Pointer to final bop.
.TP
.I "num, den, mag"
Duplicates of values in preamble.
.TP
.I l
Height-plus-depth of tallest page, in DVI units.
.TP
.I u
Width of widest page, in DVI units.
.TP
.I s
Maximum stack depth needed to process this DVI file.
.TP
.I t
Total number of pages
.RI ( bop
commands) present.
.RE
.TP
.I "249 post_post q[4] i[1] 223 .\|.\|. 223"
End postamble. The parameters are:
.RS
.TP \w'\fI223\fP'u+3n
.I q
Byte offset from the beginning of the DVI file to
the
.I post
command that started the postamble.
.TP
.I i
DVI format ID, as in the preamble.
.TP
.I
223
At least four
.I 223
bytes.
.RE
.TP
.I "250"
Undefined.
.TP
.I .\|.\|.
.TP
.I "255"
Undefined.
.\"======================================================================
.SH "DTL COMMAND DESCRIPTION"
A DTL file contains one line per command, with a
limit of 1024 characters per line. Each command
contains a symbolic operation name, followed by
zero or more parameter values. The parameter
value descriptions are not repeated here; they can
be found in the previous section.
.TP \w'\fIw0,_w1,_w2,_w3,_w4\fP'u+3n
variety <variety-name>
This command specifies the name of the DTL file
type; it has no DVI file equivalent.
.TP
.I (text)
Series of set_char commands, for printable ASCII text.
.TP
.I \e(
Literal ASCII left parenthesis in (text).
.TP
.I \e)
Literal ASCII right parenthesis in (text).
.TP
.I \e\e
Literal ASCII backslash in (text).
.TP
.I \e"
Literal ASCII double quote in (text).
.TP
.I \eXY
Set_char for character with hexadecimal code XY,
not in parentheses, but by itself for readability.
.TP
.I "s1, s2, s2, s3"
Set, with (1,2,3,4)-byte charcodes.
.TP
.I sr
.IR set_rule .
.TP
.I "p1, p2, p2, p3"
Put, with (1,2,3,4)-byte charcodes.
.TP
.I pr
.IR put_rule .
.TP
.I nop
.I nop
(do nothing).
.TP
.I bop
.I bop
(beginning of page).
.TP
.I eop
.I eop
(end of page).
.TP
.I [
Push.
.TP
.I ]
Pop.
.TP
.I "r1, r2, r3, r4"
Right, with (1,2,3,4)-byte argument.
.TP
.I "w0, w1, w2, w3, w4"
As in DVI.
.TP
.I "x0, x1, x2, x3, x4"
As in DVI.
.TP
.I "d1, d2, d3, d4"
Down, with (1,2,3,4)-byte argument.
.TP
.I "y0, y1, y2, y3, y4"
As in DVI.
.TP
.I "z0, z1, z2, z3, z4"
As in DVI.
.TP
.I fn
.I fnt_num
(set current font to font number in 0 to 63).
.TP
.I "f1, f2, f3, f4"
.I fnt
(set current font to (1,2,3,4)-byte font number).
.TP
.I special
.I xxx
(special commands with (1,2,3,4)-byte string length).
.TP
.I fd
.I fnt_def
(assign a number to a named font).
.TP
.I pre
Preamble.
.TP
.I post
.I post
(begin postamble).
.TP
.I post_post
.I post_post
(end postamble).
.TP
.I opcode
Undefined DVI command (250 to 255).
.\"======================================================================
.SH "SAMPLE DTL FILE"
The following 2-line \*(Te\& file
.RS
.nf
Hello.
\ebye
.fi
.RE
when processed with the commands
.RS
.nf
tex hello.tex
dv2dt hello.dvi hello.dtl
.fi
.RE
produces this DTL file:
.RS
.nf
variety sequences-6
pre 2 25400000 473628672 1000 27 ' TeX output 1995.03.02:2334'
bop 1 0 0 0 0 0 0 0 0 0 -1
[
d3 -917504
]
d4 42152922
[
d4 -41497562
[
r3 1310720
fd1 0 11374260171 655360 655360 0 5 '' 'cmr10'
fn0
(Hello.)
]
]
d3 1572864
[
r4 15229091
(1)
]
eop
post 42 25400000 473628672 1000 43725786 30785863 2 1
fd1 0 11374260171 655360 655360 0 5 'cmr10'
post_post 152 2 223 223 223 223
.fi
.RE
The command
.RS
.nf
dt2dv hello.dtl hello.dvi
.fi
.RE
will reconstruct the original DVI file.
.\"======================================================================
.SH "SEE ALSO"
.BR dt2dv (1),
.BR dvitype (1),
.BR tex (1).
.\"======================================================================
.SH FILES
.TP \w'\fI*.dvi\fP'u+3n
.I *.dvi
binary \*(Te\& DVI file.
.TP
.I *.dtl
text representation of a \*(Te\& DVI file in
.I "DVI Text Language"
format.
.\"======================================================================
.SH AUTHOR
.B dv2dt
and
.BR dt2dv (1)
were written by
.RS
.nf
Geoffrey Tobin
Department of Electronic Engineering
La Trobe University
Bundoora, Victoria 3083
Australia
Tel: +61 3 479 3736
FAX: +61 3 479 3025
Email: <G.Tobin@latrobe.edu.au>
.fi
.RE
.PP
These manual pages were primarily written by
.RS
.nf
Nelson H. F. Beebe, Ph.D.
Center for Scientific Computing
Department of Mathematics
University of Utah
Salt Lake City, UT 84112
Tel: +1 801 581 5254
FAX: +1 801 581 4148
Email: <beebe@math.utah.edu>
.fi
.RE
.\"==============================[The End]==============================

View File

@ -1,154 +0,0 @@
``dvi.doc''
Mon 27 Feb 1995
Geoffrey Tobin
Description of the DVI file structure.
--------------------------------------
Reference:
----------
CTAN: dviware/driv-standard/level-0/dvistd0.tex
"The DVI Driver Standard, Level 0",
by The TUG DVI Driver Standards Committee (now defunct)
chaired by Joachim Schrod.
Appendix A, "Device-Independent File Format",
section A.2, "Summary of DVI commands".
DVI Commands
------------
Listed in the free format:
"Opcode Symbol Parameter[Signed? Bytes] ... Action".
0 set_char_0 - set character 0 from current font
...
127 set_char_127 - set character 127 from current font
128 set1 c[1] - set 1-byte unsigned character (uchar) number c
129 set2 c[2] - set 2-byte uchar number c
130 set3 c[3] - set 3-byte uchar number c
131 set4 c[+4] - set 4-byte signed character (schar) number c
132 set_rule a[+4] b[+4] - set rule, height a, width b
133 put1 c[1] - put 1-byte uchar c
134 put2 c[2] - put 2-byte uchar
135 put3 c[3] - put 3-byte uchar
136 put4 c[+4] - put 4-byte schar
137 put_rule a[+4] b[+4] - put rule, height a, width b
138 nop - do nothing
139 bop c0[+4] ... c9[+4] p[+4] - beginning of page
140 eop - end of page
141 push - push (h,v,w,x,y,z) onto stack
142 pop - pop (h,v,w,x,y,z) from stack
143 right1 b[+1] - move right b units
144 right2 b[+2] - move right b units
145 right3 b[+3] - move right b units
146 right4 b[+4] - move right b units
147 w0 - move right w units
148 w1 b[+1] - move right b units, and set w = b
149 w2 b[+2] - move right b units, and set w = b
150 w3 b[+3] - move right b units, and set w = b
151 w4 b[+4] - move right b units, and set w = b
152 x0 - move right x units
153 x1 b[+1] - move right b units, and set x = b
154 x2 b[+2] - move right b units, and set x = b
155 x3 b[+3] - move right b units, and set x = b
156 x4 b[+4] - move right b units, and set x = b
157 down1 a[+1] - move down a units
158 down2 a[+2] - move down a units
159 down3 a[+3] - move down a units
160 down4 a[+4] - move down a units
161 y0 - move right y units
162 y1 a[+1] - move right a units, and set y = a
163 y2 a[+2] - move right a units, and set y = a
164 y3 a[+3] - move right a units, and set y = a
165 y4 a[+4] - move right a units, and set y = a
166 z0 - move right z units
167 z1 a[+1] - move right a units, and set z = a
168 z2 a[+2] - move right a units, and set z = a
169 z3 a[+3] - move right a units, and set z = a
170 z4 a[+4] - move right a units, and set z = a
171 fnt_num_0 - set current font number (f) = 0
...
234 fnt_num_63 - set f = 63
235 fnt1 k[1] - set f = k
236 fnt2 k[2] - set f = k
237 fnt3 k[3] - set f = k
238 fnt4 k[+4] - set f = k
239 xxx1 k[1] x[k] - special string x with k bytes
240 xxx2 k[2] x[k] - special string x with k bytes
241 xxx3 k[3] x[k] - special string x with k bytes
242 xxx4 k[4] x[k] - special string x with (unsigned) k bytes
243 fnt_def1 k[1] c[4] s[4] d[4] a[1] l[1] n[a+l] - define font k
244 fnt_def2 k[2] c[4] s[4] d[4] a[1] l[1] n[a+l] - define font k
245 fnt_def3 k[3] c[4] s[4] d[4] a[1] l[1] n[a+l] - define font k
246 fnt_def4 k[+4] c[4] s[4] d[4] a[1] l[1] n[a+l] - define font k
247 pre i[1] num[4] den[4] mag[4] k[1] x[k] - begin preamble
248 post p[4] num[4] den[4] mag[4] l[4] u[4] s[2] t[2] - begin postamble
249 post_post q[4] i[1] 223 ... 223 - end postamble
250 - undefined
...
255 - undefined
In bop:
c0[+4] ... c9[+4] = page counters, \`a la TeX.
p[+4] = pointer to previous bop (its byte address); first bop has p = -1 .
In the font definitions:
c[4] = check sum for TFM file.
s[4] = scale factor, in DVI units.
d[4] = design size, in DVI units.
a[1] = length of the "area" or directory.
l[1] = length of the font name.
n[a+l] = area and font name string(s).
In the preamble:
i[1] = DVI format ID = 2, except TeX-XeT has 3.
num[4] = numerator of 100 nm / DVI unit.
den[4] = denominator of 100 nm / DVI unit.
mag[4] = 1000 * magnification.
k[1] = comment length.
x[k] = comment string.
In the postamble:
p[4] = pointer to final bop.
num[4], den[4], mag[4] = duplicates of values in preamble.
l[4] = height-plus-depth of tallest page, in DVI units.
u[4] = width of widest page, in DVI units.
s[2] = maximum stack depth needed to process this DVI file.
t[2] = total number of pages (bop commands) present.
In the post-postamble:
q[4] = pointer to the "post" command that started the postamble.
i[1] = DVI format ID, as in the preamble.
223 ... 223 = at least four "223" bytes.
---------------
EOF ``dvi.doc''
---------------

File diff suppressed because it is too large Load Diff

View File

@ -1,232 +0,0 @@
% This is the TeX source file for the "TeXnical Typesetting" document.
% Notice how you can put in comments? If TeX sees a % it simply ignores
% the rest of the line.
% A4 paper is 8.3in wide and 11.7in high; we set the page dimensions so that
% there are 1in margins all around:
\hsize 6.3in % page width
\vsize 9.7in % page height
\parskip 8pt plus 2pt minus 1pt % glue before a paragraph
% Define a few extra fonts for later use:
\font\bigrm=cmr10 scaled\magstep4 % big version of the standard roman font
\font\ninerm=cmr9 % 9pt roman
\font\fiverm=cmr5 % 5pt roman
\font\sm=cmcsc10 % caps and small caps
\font\ss=cmss10 % sans serif
% Here's a macro that we'll use to produce all subheadings:
\def\subhead#1{\bigskip % extra glue before subheading
\noindent{\bf #1}\par % unindented boldface subheading
\nobreak} % prevent a page break after subheading
\centerline{\bigrm \TeX nical Typesetting}
\vskip 2.5cm % dimensions can be metric
\subhead{What is \TeX?}
\TeX\ (pronounced ``teck'') is a computerized typesetting system developed by
Donald Knuth and others at Stanford University. It is used to create
high-quality documents, particularly those containing mathematics.
The name \TeX\ is an uppercase form of the Greek letters $\tau\epsilon\chi$,
the first three letters of a Greek word meaning {\sl art} as well as
{\sl technology}.
The lowering of the ``E'' is a reminder that \TeX\ is about typesetting,
which can be thought of as the next stage beyond word processing.
On devices where such lowering is difficult or impossible you may see \TeX\
written as {\tt TeX}.
% the above blank line ends the first paragraph
Most word processors allow you to
create and modify a document interactively --- what
you see on the screen is usually what your output will look like.
\TeX\ does {\it not} work in this way.
Like other typesetting systems (such as SCRIBE and
{\sl troff\/}), \TeX\ is known as a ``document compiler''. Using your
favourite text editor you need to create a file containing the
text of your manuscript along with the \TeX\ typesetting commands.
\TeX\ gives you the ability to produce printed matter with a quality
matching that found in books, depending on the output device.
Adelaide University has an {\sm imagen} laser printer
with a resolution of 240 dots per inch.
This publication shows both the capabilities of \TeX\ and
the output quality of the laser printer.
\subhead{Fonts}
One of the more obvious advantages of \TeX\ is the large range of fonts from
which you can choose. A font is a collection of characters each having a
similar size and style. Some of the fonts currently available include:
$$ % enter display math mode just to get space above and below \line
\line
{\hfil % infinitely stretchable glue
\rm roman\hfil \sl slanted\hfil \it italic\hfil \bf boldface\hfil
\tt typewriter\hfil \ss sans serif\hfil \sm small caps\hfil
} % take care to ensure each { has a matching }
$$
Many of these also come in a variety of sizes:
$$
\centerline{{\bigrm from the very big},~ % extra space after comma
{\ninerm to the very small},~
{\fiverm to the ridiculous}.}
$$
Apart from a large selection of mathematical symbols,
many special characters and accents are available:
$$
\vbox
{\tabskip 10pt plus 1fil % glue before and after all columns
\halign to\hsize
{& \hfil#\hfil\cr % specify a variable number of centred columns
\copyright& \it\$& \S& \P& \dag& \ddag&
$\circ$& $\bigcirc$& % some symbols must be accessed from math mode
$\leftarrow$& $\rightarrow$& $\triangle$& $\clubsuit$&
\`a& \'e& \c c& \^o& \"u\cr
}
}
$$
\TeX\ does a few subtle things automatically.
Certain sequences of characters in your text will
be replaced by {\sl ligatures} in the printed output (consider the ``{\tt ffi}''
in ``difficult''), while other pairs of characters need to be {\sl kerned}
(e.g., the ``o'' and ``x'' in ``box'' look better if they are moved closer
together). The range and quality of fonts available will continue to improve.
\subhead{Mathematics}
A major design goal of \TeX\ was to simplify the task of typesetting
mathematics --- and to do it properly. Mathematicians will be pleasantly
surprised at the ease with which formulae and expressions can be created;
from simple in-line equations
such as $e^{i\pi}=-1$ and $f_{n+2}=f_{n+1}+f_n$, to more extravagant displays:
$$
\sum_{k\ge1} \sqrt{x_k-\ln k}\quad\ne\quad
\int_{0}^\infty {e^{-x^3}+\sqrt{x} \over \left(123-x\right)^3} \,dx
$$
\TeX\ looks after most of the nitty gritty details, such as spacing things
correctly and choosing the right sizes for superscripts, parentheses,
square root signs etc. (The discoverer of the above relation wishes to
remain anonymous.)
\subhead{Alignment}
The preparation of tabular material such as in lists and matrices can be a
tedious job for a person armed only with a typewriter and a bottle of
correction fluid. With a little help from \TeX, computers can make it so
much easier:
$$
\vcenter % a vertically centred \vbox
{\tabskip 0pt % no space before column 1
\halign to 3.5in % width of table
{\strut#& % col 1 is a strut
\vrule#\tabskip .5em plus2em& % col 2 is a vrule; also set col spacing
#\hfil& % col 3 is left justified
\vrule#& % col 4 is a vrule
\hfil#\hfil& % col 5 is centred
\vrule#& % col 6 is a vrule
\hfil#& % col 7 is right justified
\vrule#\tabskip 0pt % col 8 is a vrule; no space after it
\cr % end of the preamble
\noalign{\hrule}
& & \multispan5 \hfil Oldest players to represent\hfil& \cr
& & \multispan5 \hfil England in a Test Match\hfil& \cr
\noalign{\hrule}
& & \omit\hfil Name\hfil& & % \omit ignores template in preamble
\omit\hfil Age\hfil& &
\omit\hfil Versus\hfil& \cr
\noalign{\hrule}
& & W.Rhodes& & 52y 165d& & West Indies, 1930& \cr
\noalign{\hrule}
& & W.G.Grace& & 50y 320d& & Australia, 1899& \cr
\noalign{\hrule}
& & G.Gunn& & 50y 303d& & West Indies, 1929& \cr
\noalign{\hrule}
& & J.Southerton{\ninerm*}& & 49y 139d& & Australia, 1877& \cr
\noalign{\hrule\smallskip}
& \multispan7\ninerm* (This was actually his Test debut.)\hfil \cr
}
}
\hskip .5in % space between table and matrix
A=\pmatrix % parenthesized matrix
{a_{11}& a_{12}& \ldots& a_{1n}\cr
a_{21}& a_{22}& \ldots& a_{2n}\cr
\vdots& \vdots& \ddots& \vdots\cr
a_{m1}& a_{m2}& \ldots& a_{mn}\cr
}
$$
\vskip -\the\belowdisplayskip % avoid too much space below display
\subhead{Other features}
Space does not permit examples of all the things \TeX\ can do. Here are some
more features you might like to know about:
\item{$\bullet$}
Multi-column output can be generated.
{\parskip=0pt % temporarily turn off the skipping between paragraphs
\item{$\bullet$}
\TeX\ has a very sophisticated paragraph building algorithm and rarely needs
to resort to hyphenation. Paragraphs can be indented and shaped in many
different ways.
\item{$\bullet$}
Automatic insertion of footnotes,\footnote{\dag}{\ninerm Here is
a footnote.} running heads, page numbers etc.
\item{$\bullet$}
\TeX\ makes provision for generating a table of contents, a bibliography, even
an index. Automatic section numbering and cross referencing are also possible.
\item{$\bullet$}
A powerful macro facility is built into \TeX. This lets you do some very
useful things, like creating an abbreviation for a commonly used phrase, or
defining a new command that will have varying effects depending on the
parameters it is given. A macro package can enhance \TeX\ by making it much
easier to generate a document in a predefined format.
\par % end the last paragraph BEFORE ending the group
} % \parskip will now revert to its previous value
\subhead{What CAN'T \TeX\ do?}
Complex graphics such as diagrams and illustrations pose
a major problem --- at the moment you have to leave an appropriate amount of
blank space and paste them in later.
Graphic facilities are the subject of current research.
\subhead{\TeX\ and VAX/VMS}
The \TeX\ source file used to generate this document is available for
inspection on any VAX node that has \TeX ---
just type `{\tt scroll tex\char'137 inputs:example.tex}'.
A few steps are needed to print such a file:
\item{(1)}
Type `{\tt tex example}' to ``compile'' the file.
(\TeX\ looks for a {\tt .tex} file by default. If it can't find the given
file in your current directory it will look in {\tt tex\char'137 inputs}.)
Two new files will be created in your current directory:
{\tt example.dvi} and {\tt example.lis}.
The former is a device independent description of the document;
the latter is simply a log of the \TeX\ run.
{\parskip=0pt % temporarily turn off \parskip
\item{(2)}
Type `{\tt dvitovdu example}' to preview the document on a terminal screen.
This program can be used to detect a variety of formatting problems,
saving both time and paper.
\item{(3)}
Type `{\tt imprint example}' to print the document.
(Note that the DVIto\kern-.15em VDU and IMPRINT commands
accept a {\tt .dvi} file by default).
} % restore \parskip
Detailed help on all these commands is available on-line --- try typing
`{\tt help tex}' to get started.
\bye

View File

@ -1,2 +0,0 @@
Hello.
\bye

View File

@ -1,45 +0,0 @@
#!/bin/sh
# Filter for converting "troff -mxx" to PostScript. This script is
# normally linked to the names man2ps, ms2ps, me2ps, and mm2ps.
#
# Usage:
# man2ps [<] cc.1 >cc.ps
# me2ps [<] foo.me >foo.ps
# mm2ps [<] foo.mm >foo.ps
# ms2ps [<] foo.ms >foo.ps
#
# [08-May-1993]
# Choose a troff format according to the scrip name.
case `basename $0` in
man*) FORMAT=-man ;;
me*) FORMAT=-me ;;
mm*) FORMAT=-mm ;;
ms*) FORMAT=-ms ;;
*) echo "Unknown troff format:" ; exit 1 ;;
esac
# We can use either GNU groff or Sun Solaris troff + dpost
TROFF=
which groff > /dev/null && {
# GNU groff
TROFF="groff $FORMAT"
TROFF2PS="cat"
}
if [ -z "$TROFF" ]
then
which dpost > /dev/null && {
# Solaris 2.1
TROFF="troff $FORMAT"
TROFF2PS="/usr/lib/lp/postscript/dpost"
}
fi
if [ -z "$TROFF" ]
then
echo "Cannot find troff-to-PostScript filter" >&2
exit 1
fi
tbl $* | eqn | $TROFF | $TROFF2PS

View File

@ -1,279 +0,0 @@
% TeX source file for creating TRIPVDU.DVI, a torture file for DVItoVDU
% (using the same philosophy as Donald Knuth's torture test for TeX).
\nopagenumbers
\topskip 0pt
\parindent 0pt
\parskip 0pt
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 1
% This page is completely empty but has some \special stuff.
\message{Empty page.}
\null
\special{DVItoVDU should warn user that it is ignoring this stuff.}
\special{And this.}
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 2
% This page has 1 black pixel at (0,0).
\message{1 black pixel at (0,0).}
\hrule height 1sp width 1sp depth 0sp
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 3
% This page will fill an A4 sheet with black pixels, assuming A4 paper is
% 8.3in by 11.7in and (0,0) is 1in from the top and left edges.
\message{A4 sheet full of black pixels.}
{% change page size and location temporarily
\hsize 10in
\vsize 12in
\hoffset -1in
\voffset -1in
% Because ref pts of rules are at BOTTOM left corner we first need to output
% a rule that will guarantee Minv = -1in, then output the large rule with
% slightly less than A4 height.
\hrule height 1sp width 8.299in depth 0sp
\hrule height 11.695in width 8.299in depth 0sp
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 4
% This page is 1 pixel wider than page 3.
% DVItoVDU should detect that page is too wide for A4 paper.
\message{As above but 1 pixel too wide.}
\hrule height 1sp width 8.301in depth 0sp
\hrule height 11.695in width 8.301in depth 0sp
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 5
% This page is 1 pixel longer than page 3.
% DVItoVDU should detect that page is too low for A4 paper.
\message{As above but 1 pixel too low.}
\hrule height 11.701in width 8.299in depth 0sp
\vfil\eject
}% reset page size and location
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 6
% This page has a rulelist with a full ruletable (= 300 rules).
% Note that DVItoVDU does not impose any limits
% on the number of rules or characters in a page. Pages 6 to 9
% test the list manipulating code in DVIReader and DVItoVDU.
\message{Page with ruletablesize rules.}
\newcount\temp
\temp=300
\loop\ifnum\temp>0
\hrule height 1sp width \hsize % 1 pixel high
\vfil
\advance\temp by -1
\repeat
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 7
% This page has ruletablesize+1 rules (so rulelist has 2 nodes).
\message{Page with ruletablesize+1 rules.}
\temp=301
\loop\ifnum\temp>0
\hrule height 1sp width \hsize % 1 pixel high
\vfil
\advance\temp by -1
\repeat
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 8
% This page has a charlist with a full chartable (= 3000 characters).
\message{Page with chartablesize characters from one font.}
\font\small=cmr5
{\small \offinterlineskip
\temp=30
\loop\ifnum\temp>0
\leftline{iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii} % 100 chars
\advance\temp by -1
\repeat
}
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 9
% This page has chartablesize+1 characters (so charlist has 2 nodes).
\message{Page with chartablesize+1 characters from one font.}
{\small \offinterlineskip
\temp=30
\loop\ifnum\temp>0
\leftline{iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii} % 100 chars
\advance\temp by -1
\repeat
\leftline{i} % the extra character
}
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 10
\message{Multiple TeX page counters.}
\footline={\hss\tenrm\folio\hss} % turn on page numbers
\pageno=0
\count1=1 \count2=2 \count3=3 \count4=4 \count9=9
\noindent
This is \TeX\ page [0.1.2.3.4.....9].
\vfil\eject
\count1=0 \count2=0 \count3=0 \count4=0 \count9=0 % reset TeX counters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 11
\message{Negative TeX page.}
\pageno=-11
\noindent
This is \TeX\ page [-11].
\vfil\eject
\pageno=12 % DVI page = TeX page again
\nopagenumbers % turn off page numbers again
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 12
% This page has characters from many fonts.
% Note that the page is off the right edge of A4 paper.
\message{Page with characters from many fonts.}
% avoid redefining plain TeX's \i, \j etc.
\font\Fb=cmr5
\font\Fc=cmr5 scaled\magstep5
\font\Fe=cmr10 scaled\magstep5
\font\Fg=cmbx10
\font\Fh=cmbx10 scaled\magstep5
\font\Fj=cmsl10
\font\Fk=cmsl10 scaled\magstep5
\font\Fm=cmtt10
\font\Fn=cmtt10 scaled\magstep5
\font\Fo=cmss10
\font\Fp=cmcsc10
\font\Fq=cmdunh10
\leftline{\Fb These characters are from CMR5 at mag 1000.}
\leftline{\Fc These characters are from CMR5 at mag 2488.}
\leftline{\tenrm These characters are from CMR10 at mag 1000.}
\leftline{\Fe These characters are from CMR10 at mag 2488.}
\leftline{\Fg These characters are from CMBX10 at mag 1000.}
\leftline{\Fh These characters are from CMBX10 at mag 2488.}
\leftline{\Fj These characters are from CMSL10 at mag 1000.}
\leftline{\Fk These characters are from CMSL10 at mag 2488.}
\leftline{\Fm These characters are from CMTT10 at mag 1000.}
\leftline{\Fn These characters are from CMTT10 at mag 2488.}
\leftline{\Fo These characters are from CMSS10 at mag 1000.}
\leftline{\Fp These characters are from CMCSC10 at mag 1000.}
\leftline{\Fq These characters are from CMDUNH10 at mag 1000.}
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 13
% This page has characters from many fonts, some of which have no corresponding
% PXL file. DVItoVDU should warn user about non-existent font files and
% continue as best it can by loading dummy font info.
% Note that the page is off the right edge of A4 paper.
\message{Page with characters from fonts at unknown magnifications.}
% PXL files do not exist at the requested magnifications:
\font\Fr=cmr5 scaled 500
\font\Fs=cmr5 scaled 3000
\font\Ft=cmr10 scaled 200
\font\Fu=cmr10 scaled 5000
\font\Fv=cmsl10 scaled 49
\font\Fw=cmsl10 scaled 10000
\leftline{\Fr CMR5 at mag 500 does not exist.}
\leftline{\Fb These characters are from CMR5 at mag 1000.}
\leftline{\Fs CMR5 at mag 3000 does not exist.}
\leftline{\Ft CMR10 at mag 200 does not exist.}
\leftline{\tenrm These characters are from CMR10 at mag 1000.}
\leftline{\Fu CMR10 at mag 5000 does not exist.}
\leftline{\Fv CMSL10 at mag 49 does not exist.}
\leftline{\Fj These characters are from CMSL10 at mag 1000.}
\leftline{\Fw CMSL10 at mag 10000 does not exist.}
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 14
% This page has a paragraph illustrating most of the characters from the
% standard roman TeX text font.
\message{Standard paragraph.}
\rm
Our task is to create a paragraph illustrating what a typical piece of text
looks like in the standard \TeX\ font. It should be stressed that not all
\TeX\ fonts can be used for typesetting text. We need to show most of the
characters in this font---for instance, something like ``the quick brown fox
jumps over a lazy dog'' would use all the lower-case letters. Hmmm \dots\
how about ``THE QUICK BROWN FOX JUMPS OVER 9876543210 LAZY DOGS'' to make
sure we show all the upper-case letters and digits? Such a paragraph would
hardly be typical! Then there's ligatures (try and fit in words like
fluffy, waffle, firefly, difficult) and examples of kerning (boxer, cooked,
vowel). Not to mention the various accents and other special letters:
prot\'eg\'e, r\^ole, na\"\i ve, \AE sop's \OE vres en fran\c cais.
But how do we put all this stuff into a paragraph that makes sense!?
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 15
\message{Page in bottom half of A4 paper.}
\null\vfil
\centerline{Page in bottom half of A4 paper.}
\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 16
\message{Page completely above left of A4 paper.}
\voffset -3in
\hoffset -9in
\leftline{Page completely above left of A4 paper.}
\vfil\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 17
\message{Page completely below right of A4 paper.}
\voffset 3in
\hoffset 9in
\null\vfil
\rightline{Page completely below right of A4 paper.}
\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DVI page 18
\message{Page beyond all edges of A4 paper.}
\voffset -3in
\hoffset -3in
\vsize 15in
\hsize 15in
\line{Page beyond all edges of A4 paper.\hfil
Page beyond all edges of A4 paper.}
\vfil
\line{Page beyond all edges of A4 paper.\hfil
Page beyond all edges of A4 paper.}
\eject
\voffset 0in \hoffset 0in % offsets back to normal
\bye

View File

@ -1,109 +0,0 @@
;Title AbiWord for Windows, NSIS v2 series installer script
;FileDesc Utility functions to set and save/restore file extension to application associations
!ifndef _ABI_UTIL_FILEASSOC_NSH_
!define _ABI_UTIL_FILEASSOC_NSH_
!ifdef HAVE_SYSTEM_PLUGIN
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; RefreshShellIcons based on
;; http://nsis.sourceforge.net/archive/nsisweb.php?page=236&instances=0
;; by jerome tremblay - april 2003
!define SHCNE_ASSOCCHANGED 0x08000000
!define SHCNF_IDLIST 0
Function RefreshShellIcons
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v \
(${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
FunctionEnd
!define RefreshShellIcons "call RefreshShellIcons"
!else
!define RefreshShellIcons
!endif ; HAVE_SYSTEM_PLUGIN
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; parts from http://nsis.sourceforge.net/archive/viewpage.php?pageid=282 by Vytautas
;; Will add the registry entries to associate the given file extension with the
;; previously set (see CreateApplicationAssociation) appType. I.e. indicate to
;; open documents with this extension using the application specified by appType
;; registry entry. If the extension is currently associated with a different
;; appType, it will store the current association in the "prior_appType" key.
!macro CreateFileAssociation extension appType contentType
!define skipBackupLbl "skipBackup_${__LINE__}"
push $0
; back up old value of extension (.ext) if it exists
ReadRegStr $0 HKCR "${extension}" "" ; read current value
StrCmp $0 "" "${skipBackupLbl}" ; nothing, then skip storing old value
StrCmp $0 "${appType}" "${skipBackupLbl}" ; only store if old is different than current
WriteRegStr HKCR "${extension}" "prior_value" "$0" ; actually store the old association
"${skipBackupLbl}:"
; Write File Associations
WriteRegStr HKCR "${extension}" "" "${appType}"
WriteRegStr HKCR "${extension}" "Content Type" "${contentType}"
; Force shell refresh (so icons updated as needed)
${RefreshShellIcons}
pop $0
!undef skipBackupLbl
!macroend
!define CreateFileAssociation "!insertmacro CreateFileAssociation"
!macro CreateApplicationAssociation appType appName appDesc defIcon exeCmd
WriteRegStr HKCR "${appType}" "" "${appDesc}"
WriteRegStr HKCR "${appType}\shell" "" "open"
WriteRegStr HKCR "${appType}\DefaultIcon" "" "${defIcon}"
; Basic command to open the file (pass filename as argv[1] to program executable)
WriteRegStr HKCR "${appType}\shell\open\command" "" '"${exeCmd}" "%1"'
; To open file via DDE (OLE, ie via already active instance) instead of in a new process
; Here for those who want to locally enable, not normally used as having each document
; open in a new process while more resource intensive means a crash with one document
; won't cause loss of work with other open documents.
; WriteRegStr HKCR "${appType}\shell\open\command" "" "${exeCmd}"
; WriteRegStr HKCR "${appType}\shell\open\ddeexec" "" '[Open("%1")]'
; WriteRegStr HKCR "${appType}\shell\open\ddeexec\application" "" "${appName}"
; WriteRegStr HKCR "${appType}\shell\open\ddeexec\topic" "" "System"
; If editing file is a different action than simply opening file
; WriteRegStr HKCR "${appType}\shell\edit" "" "Edit Options File"
; WriteRegStr HKCR "${appType}\shell\edit\command" "" '"${exeCmd}" "%1"'
!macroend
!define CreateApplicationAssociation "!insertmacro CreateApplicationAssociation"
; check if a file extension is associated with us and if so delete it
!macro RemoveFileAssociation extension appType
push $0
push $1
ReadRegStr $0 HKCR "${extension}" ""
StrCmp "$0" "${appType}" 0 Skip_Del_File_Assoc.${extension}
ReadRegStr $0 HKCR "${extension}" "prior_value"
StrCmp "$0" "" "DeleteFA.${extension}" 0 ; if "prior_value" is not empty
ReadRegStr $1 HKCR "$0" "" ; restore previous association
StrCmp "$1" "" DeleteFA.${extension} ; only if it is still valid (has something defined)
WriteRegStr HKCR "${extension}" "" $0 ; actually restore prior association
DeleteRegValue HKCR "${extension}" "prior_value" ; and remove stored value
Goto Skip_Del_File_Assoc.${extension}
DeleteFA.${extension}: ; else delete file association key
DeleteRegKey HKCR "${extension}" ; actually remove file assoications
Skip_Del_File_Assoc.${extension}:
pop $1
pop $0
!macroend
!define RemoveFileAssociation "!insertmacro RemoveFileAssociation"
!endif ; _ABI_UTIL_FILEASSOC_NSH_

View File

@ -0,0 +1,158 @@
/*
Create uninstaller, file associations and configure LyX
*/
!define SHORTCUT '${APP_NAME} ${APP_SERIES_NAME}.lnk" "$INSTDIR\${APP_RUN}" "" "$INSTDIR\${APP_RUN}" "" "" "" "${APP_INFO}"'
;--------------------------------
;Sections
Section -FileAssociations
;Associate .lyx files with LyX for current user of all users
;Write information about file type
!define REG_FILETYPE 'WriteRegStr SHELL_CONTEXT "Software\Classes\${APP_REGNAME_DOC}'
${REG_FILETYPE}" "" "${APP_NAME} Document"
${REG_FILETYPE}\DefaultIcon" "" "$INSTDIR\bin\lyx_doc_32x32.ico"
${REG_FILETYPE}\Shell\open\command" "" '"$INSTDIR\${APP_RUN}" "%1"'
!define REG_FILEEXT 'WriteRegStr SHELL_CONTEXT "Software\Classes\${APP_EXT}"'
${REG_FILEEXT} "" "${APP_REGNAME_DOC}"
${REG_FILEEXT} "Content Type" "${APP_MIME_TYPE}"
;Refresh shell
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
SectionEnd
Section -InstallData
;Registry information
WriteRegStr SHELL_CONTEXT ${APP_REGKEY} "" $INSTDIR
WriteRegStr SHELL_CONTEXT ${APP_REGKEY} "Version" "${APP_VERSION}"
WriteRegStr SHELL_CONTEXT ${APP_REGKEY_SETUP} "LaTeX Path" $PathLaTeX
WriteRegStr SHELL_CONTEXT ${APP_REGKEY_SETUP} "ImageMagick Path" $PathImageMagick
WriteRegStr SHELL_CONTEXT ${APP_REGKEY_SETUP} "Ghostscript Path" $PathGhostscript
WriteRegStr SHELL_CONTEXT ${APP_REGKEY_SETUP} "LyX Language" $LangName
;Start Menu shortcut
;There is only one shortcut to the application, so it should be in the main group
CreateShortCut "$SMPROGRAMS\${SHORTCUT}
;Uninstaller information
!define REG_UNINSTALL 'WriteRegStr SHELL_CONTEXT "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SETUP_UNINSTALLER_KEY}"'
${if} $CurrentUserInstall == ${TRUE}
${REG_UNINSTALL} "DisplayName" "${APP_NAME} ${APP_VERSION} $(TEXT_INSTALL_CURRENTUSER)"
${else}
${REG_UNINSTALL} "DisplayName" "${APP_NAME} ${APP_VERSION}"
${endif}
${REG_UNINSTALL} "UninstallString" '"$INSTDIR\${SETUP_UNINSTALLER}"'
${REG_UNINSTALL} "DisplayVersion" "${APP_VERSION}"
${REG_UNINSTALL} "DisplayIcon" "$INSTDIR\bin\lyx_32x32.ico"
${REG_UNINSTALL} "URLUpdateInfo" "http://www.lyx.org/"
${REG_UNINSTALL} "URLInfoAbout" "http://www.lyx.org/about/"
${REG_UNINSTALL} "Publisher" "LyX Team"
${REG_UNINSTALL} "HelpLink" "http://www.lyx.org/internet/mailing.php"
SectionEnd
Section -LaTeX
;Let MiKTeX ask the user again to download packages if needed
;MiKTeX 2.5
ReadRegStr $R0 HKCU "Software\MiKTeX.org\MiKTeX\2.5\MPM" "AutoInstall"
${if} $R0 == 0
WriteRegStr HKCU "Software\MiKTeX.org\MiKTeX\2.5\MPM" "AutoInstall" 2
${endif}
;MiKTeX 2.4
ReadRegStr $R0 HKCU "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "InstallPackagesOnTheFly"
${if} $R0 == 0
WriteRegStr HKCU "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "InstallPackagesOnTheFly" 2
${endif}
;dvipost package
Call SearchLaTeXLocalRoot
Pop $R0
${if} $R0 != ""
SetOutPath "$R0\tex\latex\dvipost"
File "${FILES_DVIPOST_PKG}\dvipost.sty"
${endif}
;Update file name database
${if} $PathLaTeX != ""
nsExec::Exec '"$PathLaTeX\initexmf.exe" --update-fndb'
Pop $R0 ;Return value
${endif}
SectionEnd
Section -Configure
;Windows specific configuration in lyxrc.dist
Delete "$INSTDIR\Resources\lyxrc.dist"
FileOpen $R1 "$INSTDIR\Resources\lyxrc.dist" w
;Path prefix
Call GetPathPrefix
Pop $R0
FileWrite $R1 '\path_prefix "$R0"$\r$\n'
;Default screen fonts
FileWrite $R1 '\screen_font_roman "Times New Roman"$\r$\n'
FileWrite $R1 '\screen_font_sans "Arial"$\r$\n'
FileWrite $R1 '\screen_font_typewriter "Courier New"$\r$\n'
FileWrite $R1 '\preview_scale_factor 1.0$\r$\n' ;Fit instant preview font size to screen fonts
;PDF view helper
FileWrite $R1 '\format "pdf" "pdf" "PDF (ps2pdf)" "P" "pdfview" ""$\r$\n'
FileWrite $R1 '\format "pdf2" "pdf" "PDF (pdflatex)" "F" "pdfview" ""$\r$\n'
FileWrite $R1 '\format "pdf3" "pdf" "PDF (dvipdfm)" "m" "pdfview" ""$\r$\n'
FileClose $R1
;Information in the registry for the launcher
;Set language
WriteRegStr SHELL_CONTEXT ${APP_REGKEY_SETTINGS} "Language" $LangISOCode
SectionEnd
;--------------------------------
;Functions
Function CheckDesktopShortcut
;Enable desktop icon creation when there is an icon already
;Old shortcuts need to be updated
${if} ${fileexists} "$DESKTOP\${APP_NAME} ${APP_SERIES_NAME}.lnk"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 5" "State" "1"
${endif}
FunctionEnd
Function CreateDesktopShortcut
;Creating a desktop shortcut is an option on the finish page
CreateShortCut "$DESKTOP\${SHORTCUT}
FunctionEnd

View File

@ -0,0 +1,85 @@
/*
LyX Core
Binaries, Resources, Python, Aspell
*/
;--------------------------------
;Sections
Section -Core SecCore
;Install and register the core LyX files
InitPluginsDir
;Binaries
SetOutPath "$INSTDIR\bin"
File "${FILES_LAUNCHER}\lyx.exe"
File /oname=lyxc.exe "${FILES_LYX}\bin\lyx.exe"
!insertmacro FileListLyXBin File "${FILES_LYX}\bin\"
!insertmacro FileListQtBin File "${FILES_QT}\bin\"
!insertmacro FileListDllMSVCBin File "${FILES_DEPS}\bin\"
!insertmacro FileListMSVCBin File "${FILES_MSVC}\"
!insertmacro FileListMSVCManifest File "..\"
!insertmacro FileListNetpbmBin File "${FILES_NETPBM}\"
!insertmacro FileListDvipostBin File "${FILES_DVIPOST}\"
!insertmacro FileListDTLBin File "${FILES_DTL}\"
!insertmacro FileListPDFViewBin File "${FILES_PDFVIEW}\"
!insertmacro FileListPDFToolsBin File "${FILES_PDFTOOLS}\"
;Icons
SetOutPath "$INSTDIR\bin"
!insertmacro FileListLyXIcons File "${FILES_ICONS}\"
;Resources
SetOutPath "$INSTDIR"
File /r "${FILES_LYX}\Resources"
SetOutPath "$INSTDIR\Resources\fonts"
!insertmacro FileListFonts File "${FILES_FONTS}\"
;Components of Python
SetOutPath "$INSTDIR\python"
!insertmacro FileListPythonBin File "${FILES_PYTHON}\"
SetOutPath "$INSTDIR\python"
!insertmacro FileListPythonDll File "${FILES_WINDOWS}\System32\"
SetOutPath "$INSTDIR\python\Lib"
!insertmacro FileListPythonLib File "${FILES_PYTHON}\Lib\"
SetOutPath "$INSTDIR\python\Lib\encodings"
!insertmacro FileListPythonLibEncodings File "${FILES_PYTHON}\Lib\encodings\"
;Aspell
File /oname=$PLUGINSDIR\AspellData.exe "${FILES_ASPELLDATA}\AspellData.exe"
${if} $CurrentUserInstall == ${TRUE}
ExecWait '"$PLUGINSDIR\AspellData.exe" /S /CurrentUser'
${else}
ExecWait '"$PLUGINSDIR\AspellData.exe" /S /AllUsers'
${endif}
Delete "$PLUGINSDIR\AspellData.exe"
;Aiksarus data
SetOutPath "$INSTDIR\aiksaurus"
!insertmacro FileListAiksaurusData File "${FILES_AIKSAURUS}\"
;Helper DLLs for NSIS-based tools
SetOutPath "$INSTDIR\bin"
!insertmacro FileListNSISDll File "${NSISDIR}\Plugins\"
;Create uninstaller
WriteUninstaller "$INSTDIR\${SETUP_UNINSTALLER}"
SectionEnd

View File

@ -0,0 +1,140 @@
/*
Aspell dictionaries
*/
;--------------------------------
;Macros
!macro Dictionary FILE LANGNAME LANGCODE SIZE
Section /o "${LANGNAME}"
AddSize ${SIZE}
Push ${LANGCODE}
Push "${LANGNAME}"
Push ${FILE}
Call DownloadDictionary
SectionEnd
!macroend
;--------------------------------
;Sections
Section -AspellDicts
Call GetAspellHive
Pop $AspellHive
SectionEnd
!define DICT '!insertmacro Dictionary'
${DICT} af-0.50-0 "Afrikaans" af 916
${DICT} ar-1.2-0 "Arabic" ar 4345
${DICT} no-0.50-2 "Bokmål" no 1283
${DICT} bg-4.0-0 "Bulgarian" bg 5344
${DICT} ca-20040130-1 "Català" ca 1095
${DICT} cs-20040614-1 "Ceština" cs 2069
${DICT} da-1.4.42-1 "Dansk" da 3041
${DICT} de-20030222-1 "Deutsch" de 2874
${DICT} en-6.0-0 "English" en 1130
${DICT} es-0.50-2 "Español" es 2954
${DICT} eo-0.50-2 "Esperanto" eo 3771
${DICT} et-0.1.21-1 "Estonian" et 923
${DICT} fr-0.50-3 "Français" fr 4333
${DICT} gl-0.50-0 "Galego" gl 2973
${DICT} el-0.50-3 "Greek" el 3206
${DICT} he-1.0-0 "Hebrew" he 2026
${DICT} hr-0.51-0 "Hrvatski" hr 1967
${DICT} is-0.51.1-0 "Íslenska" is 1537
${DICT} it-2.2_20050523-0 "Italiano" it 696
${DICT} hu-0.99.4.2-0 "Magyar" hu 1608
${DICT} nl-0.50-2 "Nederlands" nl 1526
${DICT} nn-0.50.1-1 "Nynorsk" nn 1942
${DICT} pl-0.51-0 "Polski" pl 13685
${DICT} pt-0.50-2 "Português" pt 2291
${DICT} ro-0.50-2 "Româna" ro 342
${DICT} ru-0.99f7-1 "Russian" ru 1460
${DICT} gd-0.1.1-1 "Scottish" gd 195
${DICT} sr-0.02 "Serbian" sr 3684
${DICT} sk-0.52-0 "Slovencina" sk 4602
${DICT} sl-0.50-0 "Slovenšcina" sl 5227
${DICT} fi-0.7-0 "Suomi" fi 660
${DICT} sv-0.51-0 "Svenska" sv 1029
${DICT} tr-0.50-0 "Türkçe" tr 549
${DICT} uk-1.1-0 "Ukrainian" uk 582
${DICT} cy-0.50-3 "Welsh" cy 1770
;--------------------------------
;Functions
Function GetAspellHive
;Check whether the system or local version of Aspell should be used
;The patched Aspell uses the same logic
Push $R0
ReadRegStr $R0 HKCU "Software\Aspell" "Base Path"
${if} $R0 == ""
StrCpy $R0 HKLM
${else}
StrCpy $R0 HKCU
${endif}
Exch $R0
FunctionEnd
Function DownloadDictionary
Exch $R0
Exch 1
Exch $R1
Exch 2
Exch $R2
Push $R3
dict_download:
;Download
InetLoad::load "${DOWNLOAD_ASPELLDICTS}/aspell6-$R0.exe" "$PLUGINSDIR\aspell6-$R0.exe" /END
Pop $R3
${if} $R3 != "OK"
;Download failed
MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(TEXT_DOWNLOAD_FAILED_DICT) ($R3)" IDYES dict_download
Goto dict_noinstall
${endif}
install_dict:
ExecWait '"$PLUGINSDIR\aspell6-$R0.exe" /NoDirChange /AutoClose'
${if} $AspellHive == HKLM
ReadRegStr $R3 HKLM "Software\Aspell\Dictionaries" $R2
${else}
ReadRegStr $R3 HKCU "Software\Aspell\Dictionaries" $R2
${endif}
${if} $R3 == ""
MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(TEXT_NOTINSTALLED_DICT)" IDYES install_dict
${endif}
Delete "$PLUGINSDIR\aspell6-$R0.exe"
dict_noinstall:
Pop $R3
Pop $R2
Pop $R1
Pop $R0
FunctionEnd

View File

@ -0,0 +1,218 @@
/*
External Components: MiKTeX, ImageMagick, Ghostscript
*/
;--------------------------------
;Macros
!macro SetComponentState VAR COMPONENT
${if} ${VAR} == "1"
StrCpy $Setup${COMPONENT} ${TRUE}
StrCpy $R1 $Size${COMPONENT}
${if} $Path${COMPONENT} == ""
;Add size of component itself
IntOp $R1 $R1 + ${SIZE_${COMPONENT}}
${endif}
SectionSetSize ${External${COMPONENT}} $R1
${else}
StrCpy $Setup${COMPONENT} ${FALSE}
SectionSetSize ${External${COMPONENT}} 0
${endif}
!macroend
!macro ExternalComponent COMPONENT
;Action depending on type of installer
${if} $Setup${component} == ${TRUE}
StrCpy $Path${component} "" ;A new one will be installed
!ifndef SETUPTYPE_BUNDLE
!insertmacro DownloadComponent ${component}
!else
!insertmacro InstallComponent ${component}
!endif
${endif}
!macroend
!macro SetupComponent COMPONENT
;Run the setup application for a component
install_${COMPONENT}:
ExecWait '"$PLUGINSDIR\${COMPONENT}Setup.exe"'
Call UpdatePathEnvironment
Call Search${COMPONENT}
${if} $Path${COMPONENT} == ""
MessageBox MB_YESNO|MB_ICONEXCLAMATION $(TEXT_NOTINSTALLED_${COMPONENT}) IDYES install_${COMPONENT}
${endif}
Delete "$PLUGINSDIR\${COMPONENT}Setup.exe"
!macroend
!ifndef SETUPTYPE_BUNDLE
!macro DownloadComponent COMPONENT
download_${COMPONENT}:
;Download using HTTP
InetLoad::load "${DOWNLOAD_${COMPONENT}}" "$PLUGINSDIR\${COMPONENT}Setup.exe" /END
Pop $R0
${if} $R0 != "OK"
;Download failed
MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(TEXT_DOWNLOAD_FAILED_${COMPONENT}) ($R0)" IDYES download_${COMPONENT}
Goto noinstall_${COMPONENT}
${endif}
!insertmacro SetupComponent ${COMPONENT}
noinstall_${COMPONENT}:
!macroend
!else
!macro InstallComponent COMPONENT
;Extract
File /oname=$PLUGINSDIR\${COMPONENT}Setup.exe ${INSTALL_${COMPONENT}}
!insertmacro SetupComponent ${COMPONENT}
!macroend
!endif
!macro DialogExternalControl component
;Enable/disable the DirRequest control
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "external_${component}.ini" "Field 3" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "external_${component}.ini" "Field 4" "HWND"
EnableWindow $R1 $R0
!insertmacro MUI_INSTALLOPTIONS_READ $R1 "external_${component}.ini" "Field 4" "HWND2"
EnableWindow $R1 $R0
!macroend
!macro DialogExternalShow COMPONENT
!insertmacro MUI_HEADER_TEXT $(TEXT_EXTERNAL_${COMPONENT}_TITLE) $(TEXT_EXTERNAL_${COMPONENT}_SUBTITLE)
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "external_${COMPONENT}.ini"
!insertmacro DialogExternalControl ${COMPONENT}
!insertmacro MUI_INSTALLOPTIONS_SHOW
!macroend
!macro DialogExternalValidate COMPONENT
Push $R0
Push $R1
;Next button pressed?
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "external_${COMPONENT}.ini" "Settings" "State"
${if} $R0 != "0"
!insertmacro DialogExternalControl ${COMPONENT}
Abort
${endif}
;Download?
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "external_${COMPONENT}.ini" "Field 2" "State"
!insertmacro SetComponentState $R0 ${COMPONENT}
;Folder?
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "external_${COMPONENT}.ini" "Field 3" "State"
${if} $R0 == "1"
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "external_${COMPONENT}.ini" "Field 4" "State"
${unless} ${FileExists} "$R0\${BIN_${COMPONENT}}"
MessageBox MB_OK|MB_ICONEXCLAMATION $(TEXT_EXTERNAL_${COMPONENT}_NOTFOUND)
Abort
${endif}
StrCpy $Path${component} $R0
${endif}
Pop $R1
Pop $R0
!macroend
;--------------------------------
;Sections
Section -LaTeX ExternalLaTeX
!insertmacro ExternalComponent LaTeX
SectionEnd
Section -ImageMagick ExternalImageMagick
!insertmacro ExternalComponent ImageMagick
SectionEnd
Section -Ghostscript ExternalGhostscript
!insertmacro ExternalComponent Ghostscript
SectionEnd
;--------------------------------
;Functions
Function InitSizeExternal
;Get sizes of external component installers
SectionGetSize ${ExternalLaTeX} $SizeLaTeX
SectionGetSize ${ExternalImageMagick} $SizeImageMagick
SectionGetSize ${ExternalGhostscript} $SizeGhostscript
!ifndef SETUPTYPE_BUNDLE
;Add download size
IntOp $SizeLaTeX $SizeLaTeX + ${SIZE_DOWNLOAD_LATEX}
IntOp $SizeImagemagick $SizeImagemagick + ${SIZE_DOWNLOAD_IMAGEMAGICK}
IntOp $SizeGhostscript $SizeGhostscript + ${SIZE_DOWNLOAD_GHOSTSCRIPT}
!endif
FunctionEnd
;--------------------------------
;Page functions
Function PageExternalLaTeX
!insertmacro DialogExternalShow LaTeX
FunctionEnd
Function PageExternalLaTeXValidate
!insertmacro DialogExternalValidate LaTeX
FunctionEnd
Function PageExternalImageMagick
!insertmacro DialogExternalShow ImageMagick
FunctionEnd
Function PageExternalImageMagickValidate
!insertmacro DialogExternalValidate ImageMagick
FunctionEnd
Function PageExternalGhostscript
!insertmacro DialogExternalShow Ghostscript
FunctionEnd
Function PageExternalGhostscriptValidate
!insertmacro DialogExternalValidate Ghostscript
FunctionEnd

View File

@ -0,0 +1,67 @@
/*
Selection of language for LyX interface
*/
;--------------------------------
;Macros
!macro SetSystemLangItem VAR LANGNAME LANGISOCODE LANGID
${if} ${VAR} == ${LANGID}
!insertmacro MUI_INSTALLOPTIONS_WRITE "langselect.ini" "Field 2" "State" "${LANGNAME}"
${endif}
!macroend
!macro SetSystemLang VAR
!insertmacro LanguageList '!insertmacro SetSystemLangItem ${VAR}'
!macroend
!macro GetISOLangCodeItem VAR_LANGNAME VAR_LANGISOCODE LANGNAME LANGISOCODE LANGID
${if} ${VAR_LANGNAME} == "${LANGNAME}"
StrCpy ${VAR_LANGISOCODE} "${LANGISOCODE}"
${endif}
!macroend
!macro GetISOLangCode VAR_LANGNAME VAR_LANGISOCODE
;Get the language code for the selected language name
!insertmacro LanguageList '!insertmacro GetISOLangCodeItem ${VAR_LANGNAME} ${VAR_LANGISOCODE}'
!macroend
;--------------------------------
;Functions
Function InitLanguage
;Set the default for the language selection dialog to the Windows language
System::Call "kernel32::GetUserDefaultUILanguage()i.R0"
!insertmacro SetSystemLang $R0
FunctionEnd
;--------------------------------
;Page functions
Function PageLanguage
!insertmacro MUI_HEADER_TEXT "$(TEXT_LANGUAGE_TITLE)" "$(TEXT_LANGUAGE_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "langselect.ini"
FunctionEnd
Function PageLanguageValidate
!insertmacro MUI_INSTALLOPTIONS_READ $LangName "langselect.ini" "Field 2" "State"
!insertmacro GetISOLangCode $LangName $LangISOCode
FunctionEnd

View File

@ -0,0 +1,35 @@
/*
Reinstall options
*/
;--------------------------------
;Page functions
Function PageReinstall
;Check whether this version is already installed
ReadRegStr $R0 SHELL_CONTEXT ${APP_REGKEY} "Version"
${if} $R0 != "${APP_VERSION}"
Abort
${endif}
!insertmacro MUI_HEADER_TEXT $(TEXT_REINSTALL_TITLE) $(TEXT_REINSTALL_SUBTITLE)
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "reinstall.ini"
FunctionEnd
Function PageReinstallValidate
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "reinstall.ini" "Field 2" "State"
${if} $R0 == "1"
!insertmacro SelectSection ${SecCore}
${else}
!insertmacro UnselectSection ${SecCore}
${endif}
FunctionEnd

View File

@ -0,0 +1,87 @@
/*
Uninstaller
*/
;--------------------------------
;Sections
Section "un.Program Files" un.SecProgramFiles
;Binaries
Delete "$INSTDIR\bin\lyx.exe"
Delete "$INSTDIR\bin\lyxc.exe"
!insertmacro FileListLyXBin Delete "$INSTDIR\bin\"
!insertmacro FileListQtBin Delete "$INSTDIR\bin\"
!insertmacro FileListDllMSVCBin Delete "$INSTDIR\bin\"
!insertmacro FileListMSVCBin Delete "$INSTDIR\bin\"
!insertmacro FileListMSVCManifest Delete "$INSTDIR\bin\"
!insertmacro FileListNetpbmBin Delete "$INSTDIR\bin\"
!insertmacro FileListDvipostBin Delete "$INSTDIR\bin\"
!insertmacro FileListDTLBin Delete "$INSTDIR\bin\"
!insertmacro FileListPDFToolsBin Delete "$INSTDIR\bin\"
!insertmacro FileListPDFViewBin Delete "$INSTDIR\bin\"
;Icons
!insertmacro FileListLyXIcons Delete "$INSTDIR\bin\"
;Resources
RMDir /r "$INSTDIR\Resources"
;Components of Python
RMDir /r "$INSTDIR\python"
;Aiksaurus Data
!insertmacro FileListAiksaurusData Delete "$INSTDIR\aiksaurus\"
RMDir "$INSTDIR\aiksaurus"
;Helper DLLs for NSIS-based tools
!insertmacro FileListNSISDll Delete "$INSTDIR\bin\"
;Shortcuts
Delete "$SMPROGRAMS\${APP_NAME} ${APP_SERIES_NAME}.lnk"
Delete "$DESKTOP\${APP_NAME} ${APP_SERIES_NAME}.lnk"
;Uninstaller itself
Delete "$INSTDIR\${SETUP_UNINSTALLER}"
RMDir "$INSTDIR\bin"
;Application folder
SetOutPath "$PROGRAMFILES"
RMDir "$INSTDIR"
;Registry keys
DeleteRegKey SHELL_CONTEXT "${APP_REGKEY_SETUP}"
DeleteRegKey SHELL_CONTEXT "${APP_REGKEY}"
DeleteRegKey SHELL_CONTEXT "Software\Classes\${APP_REGNAME_DOC}"
DeleteRegKey SHELL_CONTEXT "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SETUP_UNINSTALLER_KEY}"
;File associations
ReadRegStr $R0 SHELL_CONTEXT "Software\Classes\${APP_EXT}" ""
${if} $R0 == "${APP_REGNAME_DOC}"
DeleteRegKey SHELL_CONTEXT "Software\Classes\${APP_EXT}"
${endif}
SectionEnd
Section "un.User Preferences and Custom Files" un.SecUserFiles
SetShellVarContext current
RMDir /r "$APPDATA\${APP_DIR_USERDATA}"
SectionEnd

View File

@ -0,0 +1,87 @@
/*
Install type setting (current user/all users)
*/
;--------------------------------
;Macros
!macro GetDirExternal COMPONENT
ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY_SETUP}" "${COMPONENT} Path"
${if} ${FileExists} "$R0\${BIN_${COMPONENT}}"
${if} $R0 != ""
StrCpy $Path${COMPONENT} $R0
${endif}
${endif}
!macroend
;--------------------------------
;Functions
Function InitUser
;Get directories from registry
ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY}" ""
${if} $R0 != ""
StrCpy $INSTDIR $R0
${endif}
!insertmacro GetDirExternal LaTeX
!insertmacro GetDirExternal ImageMagick
!insertmacro GetDirExternal Ghostscript
;Set directories in dialogs
!insertmacro InitDialogExternalDir latex ${TRUE}
!insertmacro InitDialogExternalDir imagemagick ${FALSE}
!insertmacro InitDialogExternalDir ghostscript ${FALSE}
;Get LyX language
ReadRegStr $R0 SHELL_CONTEXT "${APP_REGKEY_SETUP}" "LyX Language"
${if} $R0 != ""
!insertmacro MUI_INSTALLOPTIONS_WRITE "langselect.ini" "Field 2" "State" $R0
${endif}
FunctionEnd
;--------------------------------
;Page functions
Function PageUser
;Only show page if installing for all users is possible
${if} $AdminOrPowerUser == ${FALSE}
Call InitUser
Abort
${endif}
!insertmacro MUI_HEADER_TEXT $(TEXT_USER_TITLE) $(TEXT_USER_SUBTITLE)
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "user.ini"
FunctionEnd
Function PageUserValidate
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "user.ini" "Field 2" "State"
${if} $R0 == "1"
SetShellVarContext all
StrCpy $CurrentUserInstall ${FALSE}
${else}
SetShellVarContext current
StrCpy $CurrentUserInstall ${TRUE}
${endif}
Call InitUser
FunctionEnd

View File

@ -0,0 +1,60 @@
/*
Option to download GSView (PDF/Postscript viewer)
*/
;--------------------------------
;Sections
Section -Viewer ExternalViewer
!insertmacro ExternalComponent Viewer
SectionEnd
;--------------------------------
;Functions
Function InitSizeViewer
;Get size of viewer installer
SectionGetSize ${ExternalViewer} $SizeViewer
!ifndef SETUPTYPE_BUNDLE
;Add download size
IntOp $SizeViewer $SizeViewer + ${SIZE_DOWNLOAD_VIEWER}
!endif
FunctionEnd
;--------------------------------
;Page functions
Function PageViewer
;Show page if no viewer is installed, the user has Power User or Administrator priviledges and
;Ghostscript is installed or will be installed
${if} $AdminOrPowerUser == ${FALSE}
${orif} $PathViewer == "associated"
Abort
${endif}
${if} $PathGhostscript == ""
${andif} $SetupGhostscript == ${FALSE}
!insertmacro SetComponentState $R0 Viewer
Abort
${endif}
!insertmacro MUI_HEADER_TEXT $(TEXT_VIEWER_TITLE) $(TEXT_VIEWER_SUBTITLE)
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "viewer.ini"
FunctionEnd
Function PageViewerValidate
;Download?
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "viewer.ini" "Field 2" "State"
!insertmacro SetComponentState $R0 Viewer
FunctionEnd

View File

@ -0,0 +1,55 @@
[Settings]
NumFields=6
[Field 1]
Type=Label
Left=0
Top=0
Right=300
Bottom=20
Text=###TEXT_EXTERNAL_INFO###
[Field 2]
Type=RadioButton
Left=0
Top=30
Right=300
Bottom=41
Text=###TEXT_EXTERNAL_DOWNLOAD###
Flags=NOTIFY
[Field 3]
Type=RadioButton
Left=0
Top=50
Right=300
Bottom=61
Text=###TEXT_EXTERNAL_FOLDER###
Flags=NOTIFY
[Field 4]
Type=DirRequest
Left=10
Top=70
Right=300
Bottom=83
Flags=NOTIFY
[Field 6]
Type=RadioButton
Left=0
Top=110
Right=300
Bottom=121
Text=###TEXT_EXTERNAL_NONE###
Flags=NOTIFY
[Field 5]
Type=Label
Left=10
Top=90
Right=285
Bottom=99
Text=###TEXT_EXTERNAL_FOLDER_INFO###

View File

@ -0,0 +1,19 @@
[Settings]
NumFields=2
[Field 1]
Type=Label
Left=0
Top=0
Right=300
Bottom=20
Text=###TEXT_LANGUAGE_INFO###
[Field 2]
Type=DropList
Left=0
Top=30
Right=110
Bottom=130
ListItems=
State=

View File

@ -0,0 +1,18 @@
[Settings]
NumFields=2
[Field 1]
Type=Label
Left=0
Top=0
Right=300
Bottom=40
Text=###TEXT_REINSTALL_INFO###
[Field 2]
Type=CheckBox
Left=20
Top=50
Right=300
Bottom=59
Text=###TEXT_REINSTALL_ENABLE###

View File

@ -0,0 +1,29 @@
[Settings]
NumFields=3
[Field 1]
Type=Label
Left=0
Top=0
Right=300
Bottom=30
Text=###TEXT_USER_INFO###
[Field 3]
Type=RadioButton
Left=20
Top=60
Right=300
Bottom=71
Text=###TEXT_USER_CURRENT###
State=
[Field 2]
Type=RadioButton
Left=20
Top=40
Right=300
Bottom=51
Text=###TEXT_USER_ALL#
State=

View File

@ -0,0 +1,19 @@
[Settings]
NumFields=2
[Field 1]
Type=Label
Left=0
Top=0
Right=300
Bottom=40
Text=###TEXT_VIEWER_INFO###
[Field 2]
Type=CheckBox
Left=20
Top=50
Right=300
Bottom=59
Text=###TEXT_VIEWER_DOWNLOAD###
State=1

View File

@ -1,458 +0,0 @@
; File download.nsh
; This file is part of LyX, the document processor.
; http://www.lyx.org/
; Licence details can be found in the file COPYING or copy at
; http://www.lyx.org/about/license.php3
; Author Angus Leeming
; Full author contact details are available in file CREDITS or copy at
; http://www.lyx.org/about/credits.php
!ifndef _DOWNLOAD_NSH_
!define _DOWNLOAD_NSH_
!include "lyxfunc.nsh"
!include "LogicLib.nsh"
!insertmacro LYX_DEFFUNC `ReadDownloadValues`
!insertmacro LYX_DEFFUNC `EnableBrowseControls`
!insertmacro LYX_DEFFUNC `SearchRegistry`
!insertmacro LYX_DEFFUNC `DownloadEnter`
!insertmacro LYX_DEFFUNC `DownloadLeave`
!macro LYX_FUNCTION_ReadDownloadValues
!insertmacro LYX_FUNC `ReadDownloadValues`
; The stack contains:
; TOP
; FolderPath
; SelectFolder
; Download
; DoNothing
; After this point:
; $0 = FolderPath
; $1 = SelectFolder
; $2 = Download
; $3 = DoNothing
; $4 = temp
Exch $0
Exch
Exch $1
Exch 2
Exch $2
Exch 3
Exch $3
; Populate the registers with the values in the widgets.
; DoNothing.
; If the widget is disabled then set DoNothing ($3) to 0.
; Otherwise, set it equal to the "state" variable of the field.
!insertmacro MUI_INSTALLOPTIONS_READ $3 "io_download.ini" "Field 2" "Flags"
IntOp $3 $3 & DISABLED
${if} $3 == 1
StrCpy $3 0
${else}
!insertmacro MUI_INSTALLOPTIONS_READ $3 "io_download.ini" "Field 2" "State"
${endif}
; Download
!insertmacro MUI_INSTALLOPTIONS_READ $2 "io_download.ini" "Field 3" "State"
; SelectFolder
!insertmacro MUI_INSTALLOPTIONS_READ $1 "io_download.ini" "Field 4" "State"
; FolderPath
!insertmacro MUI_INSTALLOPTIONS_READ $0 "io_download.ini" "Field 5" "State"
; Return output to user.
; The stack available to the user contains:
; TOP
; Modified FolderPath
; Modified SelectFolder
; Modified Download
; Modified DoNothing
; $0 = FolderPath
; $1 = SelectFolder
; $2 = Download
; $3 = DoNothing
Exch $3
Exch 3
Exch $2
Exch 2
Exch $1
Exch
Exch $0
FunctionEnd
!macroend
!macro LYX_FUNCTION_EnableBrowseControls
!insertmacro LYX_FUNC `EnableBrowseControls`
; After this point:
; $0 = SelectFolder
; $1 = temp
; $2 = temp
; $3 = temp
Push $0
Push $1
Push $2
Push $3
; Populate the registers with the values in the widgets.
; We're interested only in $0 (SelectFolder) here.
${ReadDownloadValues} $1 $2 $0 $3
; Get the dialog HWND, storing it in $1
FindWindow $1 "#32770" "" $HWNDPARENT
; To get the HWND of the controls use:
; GetDlgItem (output var)
; (hwnd of the custom dialog) (1200 + Field number - 1)
; Get the Browse textbox ID
GetDlgItem $2 $1 1204
; Enable it if the SelectFolder ($0) checkbox is selected.
EnableWindow $2 $0
; get Browse button ID
GetDlgItem $2 $1 1205
; Enable it if the Folder checkbox is selected.
EnableWindow $2 $0
; Remove temporaries from stack.
Pop $3
Pop $2
Pop $1
Pop $0
FunctionEnd
!macroend
!macro SearchRegistry_Private ExePath RegistryKey RegistrySubKey RemoveFromPath AddtoPath
${if} ${ExePath} == ""
ReadRegStr ${ExePath} HKLM "${RegistryKey}" "${RegistrySubKey}"
${if} ${ExePath} != ""
${StrRep} "${ExePath}" "${ExePath}" "${RemoveFromPath}" ""
StrCpy ${ExePath} "${ExePath}${AddtoPath}"
${endif}
${endif}
!macroend
!macro LYX_FUNCTION_SearchRegistry
!insertmacro LYX_FUNC `SearchRegistry`
; The stack contains:
; TOP
; ExePath
; RegistryKey
; RegistrySubKey
; RemoveFromPath
; AddtoPath
; After this point:
; $0 = ExePath
; $1 = RegistryKey
; $2 = RegistrySubKey
; $3 = RemoveFromPath
; $4 = AddtoPath
Exch $0
Exch
Exch $1
Exch 2
Exch $2
Exch 3
Exch $3
Exch 4
Exch $4
; Use a macro simply to make life understandable.
!insertmacro SearchRegistry_Private "$0" "$1" "$2" "$3" "$4"
; Return output to user.
Exch $4
Exch 4
Exch $3
Exch 3
Exch $2
Exch 2
Exch $1
Exch
Exch $0
FunctionEnd
!macroend
!macro DownloadEnter_Private ExePath Required DownloadLabel HomeLabel PageHeader PageDescription
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 1" "Text" ""
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 2" "Text" "$(DownloadPageField2)"
Push $0
${if} ${Required} == 1
StrCpy $0 "NOTIFY"
${else}
StrCpy $0 "DISABLED"
${endif}
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 2" "Flags" $0
Pop $0
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 2" "State" "0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 3" "Text" "${DownloadLabel}"
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 4" "Text" "${HomeLabel}"
${if} ${ExePath} == ""
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 3" "State" "1"
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 4" "State" "0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 5" "Flags" PATH_MUST_EXIST|DISABLED
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 5" "State" ""
${else}
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 3" "State" "0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 4" "State" "1"
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 5" "Flags" PATH_MUST_EXIST
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_download.ini" "Field 5" "State" "${ExePath}"
${endif}
ClearErrors
!insertmacro MUI_HEADER_TEXT "${PageHeader}" "${PageDescription}"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "io_download.ini"
!macroend
!macro LYX_FUNCTION_DownloadEnter
!insertmacro LYX_FUNC `DownloadEnter`
; The stack contains:
; TOP
; ExePath
; Required
; DownloadLabel
; HomeLabel
; PageHeader
; PageDescription
; After this point:
; $0 = ExePath
; $1 = Required
; $2 = DownloadLabel
; $3 = HomeLabel
; $4 = PageHeader
; $5 = PageDescription
Exch $0
Exch
Exch $1
Exch 2
Exch $2
Exch 3
Exch $3
Exch 4
Exch $4
Exch 5
Exch $5
; Use a macro simply to make life understandable.
!insertmacro DownloadEnter_Private "$0" "$1" "$2" "$3" "$4" "$5"
; Return output to user.
Exch $5
Exch 5
Exch $4
Exch 4
Exch $3
Exch 3
Exch $2
Exch 2
Exch $1
Exch
Exch $0
FunctionEnd
!macroend
!macro DownloadLeave_Private DoNotRequire Download FolderPath URL EnterFolder ExeName InvalidFolder
!insertmacro MUI_INSTALLOPTIONS_READ $0 "io_download.ini" "Settings" "State"
StrCmp $0 0 go_on ; Next button?
${EnableBrowseControls}
Abort ; Return to the page
go_on:
${ReadDownloadValues} ${DoNotRequire} ${Download} $0 ${FolderPath}
${if} ${DoNotRequire} == 1
;
${elseif} ${Download} == 1
StrCpy ${FolderPath} ""
ExecShell open "${URL}"
${else}
${StrTrim} ${FolderPath} ${FolderPath}
${StrRTrimChar} ${FolderPath} ${FolderPath} '\'
${if} ${FolderPath} == ""
MessageBox MB_OK "${EnterFolder}"
Abort
${endif}
${if} ${FileExists} "${FolderPath}"
${StrRep} ${FolderPath} ${FolderPath} "${ExeName}" ""
${StrRTrimChar} ${FolderPath} ${FolderPath} '\'
${if} ${FileExists} "${FolderPath}\${ExeName}"
${else}
MessageBox MB_OK "${InvalidFolder}"
Abort
${endif}
${else}
MessageBox MB_OK "${InvalidFolder}"
Abort
${endif}
${endif}
!macroend
!macro LYX_FUNCTION_DownloadLeave
!insertmacro LYX_FUNC `DownloadLeave`
; The stack contains:
; TOP
; DoNotRequire
; Download
; FolderPath
; URL
; EnterFolder
; ExeName
; InvalidFolder
; After this point:
; $0 = DoNotRequire
; $1 = Download
; $2 = FolderPath
; $3 = URL
; $4 = EnterFolder
; $5 = ExeName
; $6 = InvalidFolder
Exch $0
Exch
Exch $1
Exch 2
Exch $2
Exch 3
Exch $3
Exch 4
Exch $4
Exch 5
Exch $5
Exch 6
Exch $6
; Use a macro simply to make life understandable.
!insertmacro DownloadLeave_Private "$0" "$1" "$2" "$3" "$4" "$5" "$6"
; Return output to user.
Exch $6
Exch 6
Exch $5
Exch 5
Exch $4
Exch 4
Exch $3
Exch 3
Exch $2
Exch 2
Exch $1
Exch
Exch $0
FunctionEnd
!macroend
!macro LYX_FUNCTION_ReadDownloadValues_Call DoNothing Download SelectFolder FolderPath
Push `${DoNothing}`
Push `${Download}`
Push `${SelectFolder}`
Push `${FolderPath}`
Call ReadDownloadValues
Pop `${FolderPath}`
Pop `${SelectFolder}`
Pop `${Download}`
Pop `${DoNothing}`
!macroend
!macro LYX_FUNCTION_EnableBrowseControls_Call
Call EnableBrowseControls
!macroend
!macro LYX_FUNCTION_SearchRegistry_Call ExePath RegistryKey RegistrySubKey RemoveFromPath AddtoPath
Push `${AddtoPath}`
Push `${RemoveFromPath}`
Push `${RegistrySubKey}`
Push `${RegistryKey}`
Push `${ExePath}`
Call SearchRegistry
; Empty the stack of all the stuff we've just added.
; We're not interested in most of it, so just fill $0 repeatedly.
Pop `${ExePath}`
Pop `$0`
Pop `$0`
Pop `$0`
Pop `$0`
!macroend
!macro LYX_FUNCTION_DownloadEnter_Call ExePath Required DownloadLabel HomeLabel PageHeader PageDescription
Push `${PageDescription}`
Push `${PageHeader}`
Push `${HomeLabel}`
Push `${DownloadLabel}`
Push `${Required}`
Push `${ExePath}`
Call DownloadEnter
; Empty the stack of all the stuff we've just added.
; We're not interested in keeping it, so just fill $0 repeatedly.
Pop `$0`
Pop `$0`
Pop `$0`
Pop `$0`
Pop `$0`
Pop `$0`
!macroend
!macro LYX_FUNCTION_DownloadLeave_Call DoNotRequire Download FolderPath URL EnterFolder ExeName InvalidFolder
Push `${InvalidFolder}`
Push `${ExeName}`
Push `${EnterFolder}`
Push `${URL}`
Push `${FolderPath}`
Push `${Download}`
Push `${DoNotRequire}`
Call DownloadLeave
; Empty the stack of all the stuff we've just added.
Pop `${DoNotRequire}`
Pop `${Download}`
Pop `${FolderPath}`
Pop `$0`
Pop `$0`
Pop `$0`
Pop `$0`
!macroend
!endif ; _DOWNLOAD_NSH_

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -0,0 +1,116 @@
/*
Declarations
*/
!include "settings.user.nsh"
!include "settings.nsh"
;--------------------------------
;Defines based on settings
!ifndef SETUPTYPE_BUNDLE
!define SETUPTYPE_NAME DOWNLOAD
!else
!define SETUPTYPE_NAME INSTALL
!endif
;--------------------------------
;Standard header files
!include "MUI.nsh"
!include "LogicLib.nsh"
!include "StrFunc.nsh"
!include "FileFunc.nsh"
!include "WordFunc.nsh"
!include "Sections.nsh"
!include "WinVer.nsh"
;--------------------------------
;Windows constants
!define SHCNE_ASSOCCHANGED 0x08000000
!define SHCNF_IDLIST 0x0000
;--------------------------------
;Reserve Files
;These files should come first in the compressed data (for faster GUI)
ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
ReserveFile "dialogs\user.ini"
ReserveFile "dialogs\external.ini"
ReserveFile "dialogs\viewer.ini"
ReserveFile "dialogs\langselect.ini"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
ReserveFile "${FILES_DVIPOST_PKG}\dvipost.sty"
;--------------------------------
;Variables
Var AdminOrPowerUser
Var CurrentUserInstall
Var PathLaTeX
Var PathImageMagick
Var PathGhostscript
Var PathViewer
Var SetupLaTeX
Var SetupImageMagick
Var SetupGhostscript
Var SetupViewer
Var SizeLaTeX
Var SizeImageMagick
Var SizeGhostscript
Var SizeViewer
Var LangName
Var LangISOCode
Var AspellHive
;--------------------------------
;Include standard functions
!insertmacro FUNCTION_STRING_StrStr
!insertmacro GetParent
!insertmacro VersionCompare
!insertmacro WordFind2X
;--------------------------------
;Macros
!macro ReDef NAME VALUE
;Redefine a pre-processor definition
!ifdef `${NAME}`
!undef `${NAME}`
!endif
!define `${NAME}` `${VALUE}`
!macroend
!macro CallFunc FUNCTION INPUT VAROUT
;Calls a function that modifies a single value on the stack
Push ${INPUT}
Call ${FUNCTION}
Pop ${VAROUT}
!macroend
;--------------------------------
;LyX installer header files
!include "include\init.nsh"
!include "include\windows.nsh"
!include "include\lang.nsh"
!include "include\gui.nsh"
!include "include\detection.nsh"
!include "include\filelists.nsh"

View File

@ -0,0 +1,314 @@
/*
Detection functions for all components
*/
;--------------------------------
;Macros
!macro SearchMiKTeX25
;Detect location of MiKTeX installation using initexmf
Push $R0
nsExec::ExecToStack "initexmf.exe --report"
Pop $R0 ;Return value
Pop $R0 ;Output
${WordFind2X} $R0 "BinDir: " "$\r" "+1" $PathLaTeX
Pop $R0
!macroend
!macro SearchMiKTeX24 ROOTKEY
ReadRegStr $PathLaTeX ${ROOTKEY} "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "Install Root"
${if} $PathLaTeX != ""
!insertmacro callfunc TrimBackslash $PathLaTeX $PathLaTeX ;Just in case it's installed in a root directory
StrCpy $PathLaTeX "$PathLaTeX\miktex\bin"
${endif}
!macroend
!macro IfKeyExists ROOT MAIN_KEY KEY
Push $R0
Push $R1
!define Index 'Line${__LINE__}'
StrCpy $R1 0
"${Index}-Loop:"
;Check for key
EnumRegKey $R0 ${ROOT} "${MAIN_KEY}" "$R1"
StrCmp $R0 "" "${Index}-False"
IntOp $R1 $R1 + 1
StrCmp $R0 "${KEY}" "${Index}-True" "${Index}-Loop"
"${Index}-True:"
;Found
Push ${TRUE}
Goto "${Index}-End"
"${Index}-False:"
;Not found
Push ${FALSE}
goto "${Index}-End"
"${Index}-End:"
!undef Index
Exch 2
Pop $R0
Pop $R1
!macroend
;--------------------------------
;Functions
Function SearchAll
Call SearchLaTeX
Call SearchGhostscript
Call SearchImageMagick
IfSilent +2
Call SearchViewer
FunctionEnd
Function TrimBackslash
;Trim a trailing backslash of a directory
Exch $R0
Push $R1
StrCpy $R1 $R0 1 -1
${if} $R1 == "\"
StrLen $R1 $R0
IntOp $R1 $R1 - 1
StrCpy $R0 $R0 $R1
${endif}
Pop $R1
Exch $R0
FunctionEnd
Function GetPathPrefix
Push $R0
StrCpy $R0 "$INSTDIR\bin;$INSTDIR\python"
${if} $PathLaTeX != ""
StrCpy $R0 "$R0;$PathLaTeX"
${endif}
${if} $PathGhostscript != ""
StrCpy $R0 "$R0;$PathGhostscript"
${endif}
${if} $PathImageMagick != ""
StrCpy $R0 "$R0;$PathImageMagick"
${endif}
Exch $R0
FunctionEnd
Function SearchViewer
Push $R0
Push $R1
!insertmacro CallFunc DetectViewerByExtension "pdf" $R0
!insertmacro CallFunc DetectViewerByExtension "ps" $R1
StrCpy $PathViewer ""
${if} $R0 != ""
${if} $R1 != ""
StrCpy $PathViewer "associated"
${endif}
${endif}
Pop $R1
Pop $R0
FunctionEnd
Function DetectViewerByExtension
;Input on stack: file extension without dot
Exch $R0
Push $R1
Push $R2
InitPluginsDir
StrCpy $R1 "$PLUGINSDIR\ViewerDetect.$R0"
FileOpen $R2 $R1 w
FileClose $R2
StrCpy $R0 ""
System::Call "shell32::FindExecutableA(t R1, n, t .R0)"
Delete $R1
Pop $R2
Pop $R1
Exch $R0
FunctionEnd
Function SearchLaTeX
;Search where MikTeX is installed
!insertmacro SearchMiKTeX25
${unless} ${FileExists} "$PathLaTeX\${BIN_LATEX}"
!insertmacro SearchMiKTeX24 HKCU
${endif}
${unless} ${FileExists} "$PathLaTeX\${BIN_LATEX}"
!insertmacro SearchMiKTeX24 HKLM
${endif}
${unless} ${FileExists} "$PathLaTeX\${BIN_LATEX}"
StrCpy $PathLatex ""
${endif}
FunctionEnd
Function SearchLaTeXLocalRoot
;Search for the MikTeX local root
;Returns value on stack
Push $R0
;MikTeX 2.5
!insertmacro IfKeyExists HKCU "Software\MiKTeX.org\MiKTeX" "2.5"
Pop $R0
${if} $R0 == ${FALSE}
!insertmacro IfKeyExists HKLM "Software\MiKTeX.org\MiKTeX" "2.5"
Pop $R0
${endif}
${if} $R0 == ${TRUE}
StrCpy $R0 "$APPDATA\MiKTeX\2.5"
${else}
;MiKTeX 2.4
ReadRegStr $R0 HKCU "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "Local Root"
${unless} ${FileExists} $R0
ReadRegStr $R0 HKLM "Software\MiK\MiKTeX\CurrentVersion\MiKTeX" "Local Root"
${endif}
${endif}
Exch $R0
FunctionEnd
Function SearchGhostscript
;Search where Ghostscript is installed
Push $R0 ;Temp
Push $R1 ;Counter
Push $R2 ;Enum return
Push $R3 ;AFPL version
Push $R4 ;GPL version
StrCpy $R3 ""
StrCpy $R4 ""
;Check the latest version of AFPL Ghostscript installed
StrCpy $R1 0
${do}
EnumRegKey $R2 HKLM "Software\AFPL Ghostscript" $R1
${if} $R2 != ""
${VersionCompare} $R2 $R3 $R0
${if} $R0 == "1"
StrCpy $R3 $R2
${endif}
IntOp $R1 $R1 + 1
${endif}
${loopuntil} $R2 == ""
;The same for GPL Ghostscript
StrCpy $R1 0
${do}
EnumRegKey $R2 HKLM "Software\GPL Ghostscript" $R1
${if} $R2 != ""
${VersionCompare} $R2 $R4 $R0
${if} $R0 == "1"
StrCpy $R4 $R2
${endif}
IntOp $R1 $R1 + 1
${endif}
${loopuntil} $R2 == ""
;Take the latest one
${VersionCompare} $R3 $R4 $R0
${if} $R0 == "1"
;AFPL is newer
ReadRegStr $PathGhostscript HKLM "Software\AFPL Ghostscript\$R3" "GS_DLL"
${else}
;GPL is newer or equal
ReadRegStr $PathGhostscript HKLM "Software\GPL Ghostscript\$R4" "GS_DLL"
${endif}
;Trim the DLL filename to get the path
${GetParent} $PathGhostscript $PathGhostscript
${unless} ${FileExists} "$PathGhostscript\${BIN_GHOSTSCRIPT}"
StrCpy $PathGhostscript ""
${endif}
Pop $R4
Pop $R3
Pop $R2
Pop $R1
Pop $R0
FunctionEnd
Function SearchImageMagick
;Search where ImageMagick is installed
ReadRegStr $PathImageMagick HKLM "Software\ImageMagick\Current" "BinPath"
${unless} ${FileExists} "$PathImageMagick\${BIN_IMAGEMAGICK}"
StrCpy $PathImageMagick ""
${endif}
FunctionEnd

View File

@ -0,0 +1,281 @@
/*
Lists of files to include in the installer
*/
!define FILE '${COMMAND} "${DIRECTORY}'
!macro FileListLyXBin COMMAND DIRECTORY
${FILE}tex2lyx.exe"
!macroend
!macro FileListLyXIcons COMMAND DIRECTORY
${FILE}lyx_32x32.ico"
${FILE}lyx_doc_32x32.ico"
!macroend
!macro FileListLyXScriptsCleanDVI COMMAND DIRECTORY
${FILE}clean_dvi.py"
!macroend
!macro FileListQtBin COMMAND DIRECTORY
${FILE}QtCore4.dll"
${FILE}QtGui4.dll"
!macroend
!macro FileListMSVCBin COMMAND DIRECTORY
${FILE}msvcr80.dll"
${FILE}msvcp80.dll"
!macroend
!macro FileListMSVCManifest COMMAND DIRECTORY
${FILE}\Microsoft.VC80.CRT.manifest"
!macroend
!macro FileListDllMSVCBin COMMAND DIRECTORY
${FILE}iconv.dll"
${FILE}intl.dll"
${FILE}aspell.dll"
${FILE}Aiksaurus.dll"
${FILE}zlib1.dll"
!macroend
!macro FileListNetpbmBin COMMAND DIRECTORY
${FILE}libnetpbm10.dll"
${FILE}pnmcrop.exe"
!macroend
!macro FileListDTLBin COMMAND DIRECTORY
${FILE}dt2dv.exe"
${FILE}dv2dt.exe"
!macroend
!macro FileListDvipostBin COMMAND DIRECTORY
${FILE}pplatex.exe"
!macroend
!macro FileListPDFToolsBin COMMAND DIRECTORY
${FILE}pdfopen.exe"
${FILE}pdfclose.exe"
!macroend
!macro FileListPDFViewBin COMMAND DIRECTORY
${FILE}pdfview.exe"
!macroend
!macro FileListFonts COMMAND DIRECTORY
${FILE}cmex10.ttf"
${FILE}cmmi10.ttf"
${FILE}cmr10.ttf"
${FILE}cmsy10.ttf"
${FILE}eufm10.ttf"
${FILE}msam10.ttf"
${FILE}msbm10.ttf"
${FILE}wasy10.ttf"
!macroend
!macro FileListPythonBin COMMAND DIRECTORY
${FILE}python.exe"
!macroend
!macro FileListPythonDll COMMAND DIRECTORY
${FILE}python25.dll"
!macroend
!macro FileListPythonLib COMMAND DIRECTORY
${FILE}UserDict.py"
${FILE}codecs.py"
${FILE}copy_reg.py"
${FILE}fnmatch.py"
${FILE}getopt.py"
${FILE}glob.py"
${FILE}gzip.py"
${FILE}linecache.py"
${FILE}locale.py"
${FILE}ntpath.py"
${FILE}os.py"
${FILE}pipes.py"
${FILE}posixpath.py"
${FILE}random.py"
${FILE}re.py"
${FILE}shutil.py"
${FILE}site.py"
${FILE}sre.py"
${FILE}sre_compile.py"
${FILE}sre_constants.py"
${FILE}sre_parse.py"
${FILE}stat.py"
${FILE}string.py"
${FILE}struct.py"
${FILE}tempfile.py"
${FILE}tempfile.py"
${FILE}types.py"
${FILE}warnings.py"
!macroend
!macro FileListPythonLibEncodings COMMAND DIRECTORY
${FILE}aliases.py"
${FILE}ascii.py"
${FILE}base64_codec.py"
${FILE}big5.py"
${FILE}big5hkscs.py"
${FILE}bz2_codec.py"
${FILE}charmap.py"
${FILE}cp037.py"
${FILE}cp1006.py"
${FILE}cp1026.py"
${FILE}cp1140.py"
${FILE}cp1250.py"
${FILE}cp1251.py"
${FILE}cp1252.py"
${FILE}cp1253.py"
${FILE}cp1254.py"
${FILE}cp1255.py"
${FILE}cp1256.py"
${FILE}cp1257.py"
${FILE}cp1258.py"
${FILE}cp424.py"
${FILE}cp437.py"
${FILE}cp500.py"
${FILE}cp737.py"
${FILE}cp775.py"
${FILE}cp850.py"
${FILE}cp852.py"
${FILE}cp855.py"
${FILE}cp856.py"
${FILE}cp857.py"
${FILE}cp860.py"
${FILE}cp861.py"
${FILE}cp862.py"
${FILE}cp863.py"
${FILE}cp864.py"
${FILE}cp865.py"
${FILE}cp866.py"
${FILE}cp869.py"
${FILE}cp874.py"
${FILE}cp875.py"
${FILE}cp932.py"
${FILE}cp949.py"
${FILE}cp950.py"
${FILE}euc_jisx0213.py"
${FILE}euc_jis_2004.py"
${FILE}euc_jp.py"
${FILE}euc_kr.py"
${FILE}gb18030.py"
${FILE}gb2312.py"
${FILE}gbk.py"
${FILE}hex_codec.py"
${FILE}hp_roman8.py"
${FILE}hz.py"
${FILE}idna.py"
${FILE}iso2022_jp.py"
${FILE}iso2022_jp_1.py"
${FILE}iso2022_jp_2.py"
${FILE}iso2022_jp_2004.py"
${FILE}iso2022_jp_3.py"
${FILE}iso2022_jp_ext.py"
${FILE}iso2022_kr.py"
${FILE}iso8859_1.py"
${FILE}iso8859_10.py"
${FILE}iso8859_11.py"
${FILE}iso8859_13.py"
${FILE}iso8859_14.py"
${FILE}iso8859_15.py"
${FILE}iso8859_16.py"
${FILE}iso8859_2.py"
${FILE}iso8859_3.py"
${FILE}iso8859_4.py"
${FILE}iso8859_5.py"
${FILE}iso8859_6.py"
${FILE}iso8859_7.py"
${FILE}iso8859_8.py"
${FILE}iso8859_9.py"
${FILE}johab.py"
${FILE}koi8_r.py"
${FILE}koi8_u.py"
${FILE}latin_1.py"
${FILE}mac_arabic.py"
${FILE}mac_centeuro.py"
${FILE}mac_croatian.py"
${FILE}mac_cyrillic.py"
${FILE}mac_farsi.py"
${FILE}mac_greek.py"
${FILE}mac_iceland.py"
${FILE}mac_latin2.py"
${FILE}mac_roman.py"
${FILE}mac_romanian.py"
${FILE}mac_turkish.py"
${FILE}mbcs.py"
${FILE}palmos.py"
${FILE}ptcp154.py"
${FILE}punycode.py"
${FILE}quopri_codec.py"
${FILE}raw_unicode_escape.py"
${FILE}rot_13.py"
${FILE}shift_jis.py"
${FILE}shift_jisx0213.py"
${FILE}shift_jis_2004.py"
${FILE}string_escape.py"
${FILE}tis_620.py"
${FILE}undefined.py"
${FILE}unicode_escape.py"
${FILE}unicode_internal.py"
${FILE}utf_16.py"
${FILE}utf_16_be.py"
${FILE}utf_16_le.py"
${FILE}utf_7.py"
${FILE}utf_8.py"
${FILE}utf_8_sig.py"
${FILE}uu_codec.py"
${FILE}zlib_codec.py"
${FILE}__init__.py"
!macroend
!macro FileListAiksaurusData COMMAND DIRECTORY
${FILE}words.dat"
${FILE}meanings.dat"
!macroend
!macro FileListNSISDll COMMAND DIRECTORY
${FILE}nsExec.dll"
${FILE}System.dll"
!macroend

View File

@ -0,0 +1,212 @@
/*
Installer User Interface
*/
;--------------------------------
;General
Name "${APP_NAME} ${APP_VERSION}"
BrandingText " "
;Default installation folder
InstallDir "${SETUP_DEFAULT_DIRECTORY}"
;--------------------------------
;Interface settings
!define MUI_ABORTWARNING
!define MUI_ICON "${SETUP_ICON}"
!define MUI_UNICON "${SETUP_ICON}"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${SETUP_HEADERIMAGE}"
!define MUI_HEADERIMAGE_RIGHT
!define MUI_WELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${SETUP_WIZARDIMAGE}"
!define MUI_CUSTOMFUNCTION_GUIINIT InitInterface
!define MUI_COMPONENTSPAGE_NODESC
;--------------------------------
;Pages
;Installer
!define MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_WELCOMEPAGE_TEXT $(TEXT_WELCOME_${SETUPTYPE_NAME})
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${FILES_LICENSE}"
Page custom PageUser PageUserValidate
Page custom PageReinstall PageReinstallValidate
Page custom PageExternalLaTeX PageExternalLaTeXValidate
Page custom PageExternalImageMagick PageExternalImageMagickValidate
Page custom PageExternalGhostscript PageExternalGhostscriptValidate
Page custom PageViewer PageViewerValidate
Page custom PageLanguage PageLanguageValidate
!define MUI_PAGE_HEADER_TEXT $(TEXT_DICT_TITLE)
!define MUI_PAGE_HEADER_SUBTEXT $(TEXT_DICT_SUBTITLE)
!define MUI_COMPONENTSPAGE_TEXT_TOP $(TEXT_DICT_TOP)
!define MUI_COMPONENTSPAGE_TEXT_COMPLIST $(TEXT_DICT_LIST)
!insertmacro MUI_PAGE_COMPONENTS ;For spell checker dictionaries
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN "$INSTDIR\${APP_RUN}"
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortcut
!define MUI_FINISHPAGE_SHOWREADME_TEXT $(TEXT_FINISH_DESKTOP)
!define MUI_FINISHPAGE_LINK $(TEXT_FINISH_WEBSITE)
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.lyx.org/"
!define MUI_PAGE_CUSTOMFUNCTION_PRE CheckDesktopShortcut
!insertmacro MUI_PAGE_FINISH
;Uninstaller
!define MUI_WELCOMEPAGE_TITLE_3LINES
!define MUI_WELCOMEPAGE_TEXT $(UNTEXT_WELCOME)
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_COMPONENTS
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Installer Languages
!insertmacro IncludeLang "english"
!insertmacro IncludeLang "french"
!insertmacro IncludeLang "german"
!insertmacro IncludeLang "italian"
;--------------------------------
;Version information
VIProductVersion "${APP_VERSION_NUMBER}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APP_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${APP_INFO}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${APP_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${APP_COPYRIGHT}"
;--------------------------------
;Macros
!macro InitDialogExternal COMPONENT CURRENTUSER_POSSIBLE
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 1" "Text" $(TEXT_EXTERNAL_${COMPONENT}_INFO_${SETUPTYPE_NAME})
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 3" "Text" $(TEXT_EXTERNAL_${COMPONENT}_FOLDER)
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 5" "Text" $(TEXT_EXTERNAL_${COMPONENT}_FOLDER_INFO)
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 6" "Text" $(TEXT_EXTERNAL_${COMPONENT}_NONE)
!if ${CURRENTUSER_POSSIBLE} == ${TRUE}
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 2" "Text" "$(TEXT_EXTERNAL_${COMPONENT}_${SETUPTYPE_NAME})"
!else
${if} $AdminOrPowerUser == ${TRUE}
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 2" "Text" "$(TEXT_EXTERNAL_${COMPONENT}_${SETUPTYPE_NAME})"
${else}
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 2" "Text" "$(TEXT_EXTERNAL_${COMPONENT}_${SETUPTYPE_NAME}) $(TEXT_EXTERNAL_NOPRIVILEDGES)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 2" "Flags" "DISABLED"
${endif}
!endif
!macroend
!macro InitDialogExternalDir COMPONENT CURRENTUSER_POSSIBLE
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 4" "State" $Path${COMPONENT}
!if ${CURRENTUSER_POSSIBLE} == ${FALSE}
${if} $AdminOrPowerUser == ${TRUE}
!endif
${if} $Path${COMPONENT} == ""
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 2" "State" "1"
${else}
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 3" "State" "1"
${endif}
!if ${CURRENTUSER_POSSIBLE} == ${FALSE}
${else}
!insertmacro MUI_INSTALLOPTIONS_WRITE "external_${COMPONENT}.ini" "Field 3" "State" "1"
${endif}
!endif
!macroend
!macro InitDialogLang VAR LANGNAME LANGISOCODE LANGID
StrCpy ${VAR} `${VAR}|${LANGNAME}`
!macroend
;--------------------------------
;Functions
Function InitDialogs
Push $R0
;Extract dialogs
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "dialogs\user.ini" "user.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "dialogs\reinstall.ini" "reinstall.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "dialogs\external.ini" "external_latex.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "dialogs\external.ini" "external_imagemagick.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "dialogs\external.ini" "external_ghostscript.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "dialogs\viewer.ini" "viewer.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "dialogs\langselect.ini" "langselect.ini"
;Write texts
!insertmacro MUI_INSTALLOPTIONS_WRITE "user.ini" "Field 1" "Text" $(TEXT_USER_INFO)
!insertmacro MUI_INSTALLOPTIONS_WRITE "user.ini" "Field 2" "Text" $(TEXT_USER_ALL)
!insertmacro MUI_INSTALLOPTIONS_WRITE "user.ini" "Field 3" "Text" $(TEXT_USER_CURRENT)
!insertmacro MUI_INSTALLOPTIONS_WRITE "reinstall.ini" "Field 1" "Text" $(TEXT_REINSTALL_INFO)
!insertmacro MUI_INSTALLOPTIONS_WRITE "reinstall.ini" "Field 2" "Text" $(TEXT_REINSTALL_ENABLE)
!insertmacro InitDialogExternal latex ${TRUE}
!insertmacro InitDialogExternal imagemagick ${FALSE}
!insertmacro InitDialogExternal ghostscript ${FALSE}
!insertmacro MUI_INSTALLOPTIONS_WRITE "viewer.ini" "Field 1" "Text" $(TEXT_VIEWER_INFO_${SETUPTYPE_NAME})
!insertmacro MUI_INSTALLOPTIONS_WRITE "viewer.ini" "Field 2" "Text" $(TEXT_VIEWER_${SETUPTYPE_NAME})
!insertmacro MUI_INSTALLOPTIONS_WRITE "langselect.ini" "Field 1" "Text" $(TEXT_LANGUAGE_INFO)
StrCpy $R0 ""
!insertmacro LanguageList '!insertmacro InitDialogLang $R0'
!insertmacro MUI_INSTALLOPTIONS_WRITE "langselect.ini" "Field 2" "ListItems" $R0
;Set state of user dialog
${if} $CurrentUserInstall == ${TRUE}
!insertmacro MUI_INSTALLOPTIONS_WRITE "user.ini" "Field 2" "State" "0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "user.ini" "Field 3" "State" "1"
${else}
!insertmacro MUI_INSTALLOPTIONS_WRITE "user.ini" "Field 2" "State" "1"
!insertmacro MUI_INSTALLOPTIONS_WRITE "user.ini" "Field 3" "State" "0"
${endif}
Pop $R0
FunctionEnd
Function InitInterface
${if} $AdminOrPowerUser != ${TRUE}
MessageBox MB_OK|MB_ICONEXCLAMATION $(TEXT_NO_PRIVILEDGES)
${endif}
Banner::show /NOUNLOAD "Preparing wizard"
Call InitDialogs
Call InitLanguage
Call InitSizeExternal
Call InitSizeViewer
Banner::destroy
FunctionEnd

View File

@ -0,0 +1,138 @@
/*
Installer and uninstaller initialization
*/
;--------------------------------
;Functions
Function CommandLineParameter
Exch $R0
Push $R1
Push $R2
StrLen $R1 $R0
Push $CMDLINE
Push $R0
Call StrStr
Pop $R2
StrCpy $R2 $R2 $R1
${if} $R2 == $R0
StrCpy $R0 ${TRUE}
${else}
StrCpy $R0 ${FALSE}
${endif}
Push $R2
Push $R1
Exch $R0
FunctionEnd
Function .onInit
${unless} ${silent}
Banner::show /NOUNLOAD "Checking system"
${endif}
;Check all dependencies
Call CheckWindows
Call CheckPrivileges
Call LoadInstaller
Call SearchAll
${unless} ${silent}
Banner::destroy
${endif}
FunctionEnd
Function un.onInit
Call un.CheckPrivileges
Call un.LoadUnInstaller
FunctionEnd
Function LoadInstaller
;Set the correct shell context depending on command line parameter
;and priviledges
Push $R0
Push "/CurrentUser"
Call CommandLineParameter
Pop $CurrentUserInstall
${if} $CurrentUserInstall == ${TRUE}
SetShellVarContext current
${else}
${if} $AdminOrPowerUser == ${TRUE}
SetShellVarContext all
${else}
;Display an error when the /AllUsers command line parameter is used
;by a user without Administrator or Power User priviledges
Push "/AllUsers"
Call CommandLineParameter
Pop $R0
${if} $R0 == ${TRUE}
MessageBox MB_OK|MB_ICONSTOP "You need Administrator or Power User privileges to install ${APP_NAME} for all users."
Quit
${endif}
SetShellVarContext current
${endif}
${endif}
${if} ${silent}
Call InitUser
${endif}
Pop $R0
FunctionEnd
Function un.LoadUnInstaller
;Set the correct shell context depending on whether LyX has been installed
;for the current user or all users
ReadRegStr $R0 HKCU ${APP_REGKEY} ""
${if} $R0 == $INSTDIR
StrCpy $CurrentUserInstall ${TRUE}
${endif}
${if} $CurrentUserInstall == ${TRUE}
SetShellVarContext current
${else}
${if} $AdminOrPowerUser == ${FALSE}
MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} has been installed for all users. Therefore you need Administrator or Power User privileges to uninstall."
Quit
${else}
SetShellVarContext all
${endif}
${endif}
FunctionEnd

View File

@ -0,0 +1,138 @@
/*
Translations for installer and LyX itself
*/
!macro LanguageList COMMAND
;List of supported LyX languages with ISO code and language identifier
;To be used as input for other macros
${COMMAND} "Bokmål" nb_NO 1044
${COMMAND} "Ceština" cs_CZ 1029
${COMMAND} "Dansk" da_DK 1030
${COMMAND} "Deutsch" de_DE 1031
${COMMAND} "English" en_EN 1033
${COMMAND} "Español" es_ES 1034
${COMMAND} "Euskara" eu_EU 1069
${COMMAND} "Français" fr_FR 1036
${COMMAND} "Italiano" it_IT 1057
${COMMAND} "Magyar" hu_HU 1038
${COMMAND} "Nynorsk" nn_NO 2068
${COMMAND} "Polski" pl_PL 1045
${COMMAND} "Russian" ru_RU 1049
${COMMAND} "Slovenský" sk_SK 1060
${COMMAND} "Suomi" fi_FI 1035
${COMMAND} "Türkçe" tr_TR 1055
!macroend
!macro LanguageString name text
!ifndef "${name}"
!define "${name}" "${text}"
!endif
!macroend
!macro LanguageStringAdd lang_name name
;Takes a define and puts that into a language string
LangString "${name}" "${LANG_${lang_name}}" "${${name}}"
!undef "${name}"
!macroend
!macro LanguageStringCreateExternal component
${LanguageStringAdd} TEXT_EXTERNAL_${component}_TITLE
${LanguageStringAdd} TEXT_EXTERNAL_${component}_SUBTITLE
${LanguageStringAdd} TEXT_EXTERNAL_${component}_INFO_${SETUPTYPE_NAME}
${LanguageStringAdd} TEXT_EXTERNAL_${component}_${SETUPTYPE_NAME}
${LanguageStringAdd} TEXT_EXTERNAL_${component}_FOLDER
${LanguageStringAdd} TEXT_EXTERNAL_${component}_FOLDER_INFO
${LanguageStringAdd} TEXT_EXTERNAL_${component}_NONE
${LanguageStringAdd} TEXT_EXTERNAL_${component}_NOTFOUND
!macroend
!macro LanguageStringCreate lang_name
;Creates all language strings
!insertmacro ReDef LanguageStringAdd '!insertmacro LanguageStringAdd "${lang_name}"'
${LanguageStringAdd} TEXT_NO_PRIVILEDGES
${LanguageStringAdd} TEXT_INSTALL_CURRENTUSER
${LanguageStringAdd} TEXT_WELCOME_${SETUPTYPE_NAME}
${LanguageStringAdd} TEXT_USER_TITLE
${LanguageStringAdd} TEXT_USER_SUBTITLE
${LanguageStringAdd} TEXT_USER_INFO
${LanguageStringAdd} TEXT_USER_CURRENT
${LanguageStringAdd} TEXT_USER_ALL
${LanguageStringAdd} TEXT_REINSTALL_TITLE
${LanguageStringAdd} TEXT_REINSTALL_SUBTITLE
${LanguageStringAdd} TEXT_REINSTALL_INFO
${LanguageStringAdd} TEXT_REINSTALL_ENABLE
${LanguageStringAdd} TEXT_EXTERNAL_NOPRIVILEDGES
!insertmacro LanguageStringCreateExternal LaTeX
!insertmacro LanguageStringCreateExternal ImageMagick
!insertmacro LanguageStringCreateExternal Ghostscript
${LanguageStringAdd} TEXT_VIEWER_TITLE
${LanguageStringAdd} TEXT_VIEWER_SUBTITLE
${LanguageStringAdd} TEXT_VIEWER_INFO_${SETUPTYPE_NAME}
${LanguageStringAdd} TEXT_VIEWER_${SETUPTYPE_NAME}
${LanguageStringAdd} TEXT_DICT_TITLE
${LanguageStringAdd} TEXT_DICT_SUBTITLE
${LanguageStringAdd} TEXT_DICT_TOP
${LanguageStringAdd} TEXT_DICT_LIST
${LanguageStringAdd} TEXT_LANGUAGE_TITLE
${LanguageStringAdd} TEXT_LANGUAGE_SUBTITLE
${LanguageStringAdd} TEXT_LANGUAGE_INFO
!ifndef SETUPTYPE_BUNDLE
${LanguageStringAdd} TEXT_DOWNLOAD_FAILED_LATEX
${LanguageStringAdd} TEXT_DOWNLOAD_FAILED_IMAGEMAGICK
${LanguageStringAdd} TEXT_DOWNLOAD_FAILED_GHOSTSCRIPT
${LanguageStringAdd} TEXT_DOWNLOAD_FAILED_VIEWER
!endif
${LanguageStringAdd} TEXT_DOWNLOAD_FAILED_DICT
${LanguageStringAdd} TEXT_NOTINSTALLED_LATEX
${LanguageStringAdd} TEXT_NOTINSTALLED_IMAGEMAGICK
${LanguageStringAdd} TEXT_NOTINSTALLED_GHOSTSCRIPT
${LanguageStringAdd} TEXT_NOTINSTALLED_VIEWER
${LanguageStringAdd} TEXT_NOTINSTALLED_DICT
${LanguageStringAdd} TEXT_FINISH_DESKTOP
${LanguageStringAdd} TEXT_FINISH_WEBSITE
${LanguageStringAdd} UNTEXT_WELCOME
!macroend
!macro IncludeLang langname
!ifndef DICT_NAME
!define DICT_NAME $R1
!endif
;Include both NSIS/LyX language file
!insertmacro MUI_LANGUAGE "${langname}"
!include "lang\${langname}.nsh"
!include "lang\English.nsh" ;Use English for missing strings in translation
!insertmacro LanguageStringCreate "${langname}"
!macroend

View File

@ -0,0 +1,68 @@
/*
Checks for Windows version
*/
;--------------------------------
;Macros
!macro CheckPrivileges
Push $R0
UserInfo::GetAccountType
Pop $R0
${if} $R0 == "Admin"
StrCpy $AdminOrPowerUser ${TRUE}
${elseif} $R0 == "Power"
StrCpy $AdminOrPowerUser ${TRUE}
${else}
StrCpy $AdminOrPowerUser ${FALSE}
${endif}
Pop $R0
!macroend
;--------------------------------
;Functions
Function CheckPrivileges
!insertmacro CheckPrivileges
FunctionEnd
Function un.CheckPrivileges
!insertmacro CheckPrivileges
FunctionEnd
Function CheckWindows
;Check for Windows NT 5.0 or later (2000, XP, 2003 etc.)
${unless} ${IsNT}
${andunless} ${AtLeastWin2000}
MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} only supports Windows 2000, XP, 2003 and later."
${endif}
FunctionEnd
Function UpdatePathEnvironment
Push $R0
Push $R1
;Updates the path environment variable of the instaler process to the latest system value
ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" Path
ReadRegStr $R1 HKCU "Environment" Path
System::Call 'kernel32::SetEnvironmentVariableA(t, t) i("Path", "$R0;$R1").r0'
Pop $R1
Pop $R0
FunctionEnd

View File

@ -1,41 +0,0 @@
[Settings]
NumFields=5
[Field 1]
Type=Label
Left=5
Right=-1
Top=0
Bottom=10
[Field 2]
Type=RadioButton
Left=0
Right=-1
Top=11
Bottom=22
State=0
Flags=NOTIFY
[Field 3]
Type=RadioButton
Left=0
Right=-1
Top=23
Bottom=34
Flags=NOTIFY
[Field 4]
Type=RadioButton
Left=0
Right=-1
Top=35
Bottom=46
Flags=NOTIFY
[Field 5]
Type=DirRequest
Left=5
Right=-1
Top=47
Bottom=58

View File

@ -1,9 +0,0 @@
[Settings]
NumFields=1
[Field 1]
Type=Label
Left=5
Right=-1
Top=0
Bottom=140

View File

@ -1,18 +0,0 @@
[Settings]
NumFields=2
[Field 1]
Type=GroupBox
Left=0
Right=160
Top=0
Bottom=-4
Text=" Available Languages "
[Field 2]
Type=Droplist
ListItems=Dansk|Deutsch|English|Español|Euskara|Français|Italiano|Magyar nyelv|Nederlands|Norsk|Nynorsk|Polski|Româna|Russian|Slovenský|Slovenšcina|Suomi|Türkçe
Left=20
Right=130
Top=15
Bottom=130

View File

@ -1,75 +0,0 @@
; Author: Lilla (lilla@earthlink.net) 2003-06-13
; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll
; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi
; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing).
;
; Usage:
; Call IsUserAdmin
; Pop $R0 ; at this point $R0 is "true" or "false"
;
; Modified May 2005 by Angus Leeming, placing the original function
; body inside a macro and defining functions IsUserAdmin and un.IsUserAdmin
; in terms of this macro.
; Allows the function us.IsUserAdmin to be used inside the installer.
!ifndef _IS_USER_ADMIN_NSH_
!define _IS_USER_ADMIN_NSH_
!macro IsUserAdmin_private
!define skipBackupLbl "skipBackup_${__LINE__}"
Push $R0
Push $R1
Push $R2
ClearErrors
UserInfo::GetName
IfErrors Win9x
Pop $R1
UserInfo::GetAccountType
Pop $R2
StrCmp $R2 "Admin" 0 Continue
; Observation: I get here when running Win98SE. (Lilla)
; The functions UserInfo.dll looks for are there on Win98 too,
; but just don't work. So UserInfo.dll, knowing that admin isn't required
; on Win98, returns admin anyway. (per kichik)
; MessageBox MB_OK 'User "$R1" is in the Administrators group'
StrCpy $R0 "true"
Goto Done
Continue:
; You should still check for an empty string because the functions
; UserInfo.dll looks for may not be present on Windows 95. (per kichik)
StrCmp $R2 "" Win9x
StrCpy $R0 "false"
;MessageBox MB_OK 'User "$R1" is in the "$R2" group'
Goto Done
Win9x:
; comment/message below is by UserInfo.nsi author:
; This one means you don't need to care about admin or
; not admin because Windows 9x doesn't either
;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
StrCpy $R0 "true"
Done:
;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"'
Pop $R2
Pop $R1
Exch $R0
!undef skipBackupLbl
!macroend
Function IsUserAdmin
!insertmacro IsUserAdmin_private
FunctionEnd
Function un.IsUserAdmin
!insertmacro IsUserAdmin_private
FunctionEnd
!endif ; _IS_USER_ADMIN_NSH_

View File

@ -0,0 +1,93 @@
/*
LyX Installer Language File
Language: English
Author: Joost Verburg
*/
!insertmacro LanguageString TEXT_NO_PRIVILEDGES "You do not have Administrator or Power User privileges.$\r$\n$\r$\nAlthough you can install ${APP_NAME} and the typesetting system, the utilities for image conversion and previewing cannot be installed without these priviledges."
!insertmacro LanguageString TEXT_INSTALL_CURRENTUSER "(Installed for Current User)"
!insertmacro LanguageString TEXT_WELCOME_DOWNLOAD "This wizard will guide you through the installation of $(^NameDA), the document processor that encourages an approach to writing based on the structure of your documents, not their appearance.\r\n\r\nThis installer will setup a complete environment to use ${APP_NAME} and can download missing components automatically.\r\n\r\n$(^ClickNext)"
!insertmacro LanguageString TEXT_WELCOME_INSTALL "This wizard will guide you through the installation of $(^NameDA), the document processor that encourages an approach to writing based on the structure of your documents, not their appearance.\r\n\r\nThis installer will setup a complete environment to use ${APP_NAME} and can install missing components automatically.\r\n\r\n$(^ClickNext)"
!insertmacro LanguageString TEXT_USER_TITLE "Choose Users"
!insertmacro LanguageString TEXT_USER_SUBTITLE "Choose for which users you want to install $(^NameDA)."
!insertmacro LanguageString TEXT_USER_INFO "Select whether want to install $(^NameDA) for yourself only or for all users on this sytem. $(^ClickNext)"
!insertmacro LanguageString TEXT_USER_CURRENT "Install just for me"
!insertmacro LanguageString TEXT_USER_ALL "Install for anyone using this computer"
!insertmacro LanguageString TEXT_REINSTALL_TITLE "Reinstall"
!insertmacro LanguageString TEXT_REINSTALL_SUBTITLE "Choose whether you want to reinstall the $(^NameDA) program files."
!insertmacro LanguageString TEXT_REINSTALL_INFO "$(^NameDA) is already installed. This installer will allow you to change the interface language and locations of external applications or download additional dictionaries. If you also want to reinstall the program files, check the box below. $(^ClickNext)"
!insertmacro LanguageString TEXT_REINSTALL_ENABLE "Reinstall $(^NameDA) program files"
!insertmacro LanguageString TEXT_EXTERNAL_NOPRIVILEDGES "(Administrator or Power User privileges required)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_TITLE "LaTeX Typesetting System"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_SUBTITLE "A typesetting system is required to be able to create documents for printing or publishing."
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INFO_DOWNLOAD "Please specify whether you want to download MiKTeX or want to use an existing LaTeX system. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INFO_INSTALL "Please specify whether you want to install MiKTeX or want to use an existing LaTeX system. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_DOWNLOAD "Download MiKTeX"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INSTALL "Install MiKTeX"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_FOLDER "Use an existing LaTeX system in the following folder:"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_FOLDER_INFO "This folder should contain ${BIN_LATEX}."
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_NONE "Install without a LaTeX typesetting system (not recommended)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_NOTFOUND "${BIN_LATEX} does not exist in the folder you specified."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_TITLE "ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_SUBTITLE "ImageMagick is required to support various image formats."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INFO_DOWNLOAD "Please specify whether you want to download ImageMagick or have it already installed. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INFO_INSTALL "Please specify whether you want to install ImageMagick or have it already installed. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_DOWNLOAD "Download ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INSTALL "Install ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_FOLDER "Use an existing ImageMagick installation in the following folder:"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_FOLDER_INFO "This folder should contain ${BIN_IMAGEMAGICK}."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_NONE "Install without ImageMagick (not recommended)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_NOTFOUND "${BIN_IMAGEMAGICK} does not exist in the folder you specified."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_TITLE "Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_SUBTITLE "Ghostscript is required to preview images in PostScript format."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INFO_DOWNLOAD "Please specify whether you want to download Ghostscript or have it already installed. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INFO_INSTALL "Please specify whether you want to install Ghostscript or have it already installed. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_DOWNLOAD "Download Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INSTALL "Install Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_FOLDER "Use an existing Ghostscript installation in the following folder:"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_FOLDER_INFO "This folder should contain ${BIN_GHOSTSCRIPT}."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_NONE "Install without GhostScript (not recommended)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_NOTFOUND "${BIN_GHOSTSCRIPT} does not exist in the folder you specified."
!insertmacro LanguageString TEXT_VIEWER_TITLE "Document Viewer"
!insertmacro LanguageString TEXT_VIEWER_SUBTITLE "A viewer is required to be able to display typeset documents on your screen."
!insertmacro LanguageString TEXT_VIEWER_INFO_DOWNLOAD "There is no viewer installed on your system to preview both PDF and Postscript files, which are common formats for typeset documents. If you check the box below, the PDF/Postscript viewer GSView will be downloaded. $_CLICK"
!insertmacro LanguageString TEXT_VIEWER_INFO_INSTALL "There is no viewer installed on your system to preview both PDF and Postscript files, which are common formats for typeset documents. If you check the box below, the PDF/Postscript viewer GSView will be installed. $_CLICK"
!insertmacro LanguageString TEXT_VIEWER_DOWNLOAD "Download GSView"
!insertmacro LanguageString TEXT_VIEWER_INSTALL "Install GSView"
!insertmacro LanguageString TEXT_DICT_TITLE "Spell Checker Dictionaries"
!insertmacro LanguageString TEXT_DICT_SUBTITLE "Choose the languages you want the spell checker to support."
!insertmacro LanguageString TEXT_DICT_TOP "In order to spell check documents in a certain language, a dictionary with valid words has to be downloaded. Select the dictionaries to download. $_CLICK"
!insertmacro LanguageString TEXT_DICT_LIST "Select dictionaries to download:"
!insertmacro LanguageString TEXT_LANGUAGE_TITLE "Choose Language"
!insertmacro LanguageString TEXT_LANGUAGE_SUBTITLE "Choose the language in which you want to use $(^NameDA)."
!insertmacro LanguageString TEXT_LANGUAGE_INFO "Select the language to use for the ${APP_NAME} interface. $(^ClickNext)"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_LATEX "Downloading MiKTeX failed. Would you like to try again?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_IMAGEMAGICK "Downloading ImageMagick failed. Would you like to try again?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_GHOSTSCRIPT "Downloading Ghostscript failed. Would you like to try again?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_VIEWER "Downloading GSView failed. Would you like to try again?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_DICT "Failed to download the ${DICT_NAME} spell checker dictionary. Would you like to try again?"
!insertmacro LanguageString TEXT_NOTINSTALLED_LATEX "The MiKTeX setup wizard was not completed. Do you want to run MiKTeX setup again?"
!insertmacro LanguageString TEXT_NOTINSTALLED_IMAGEMAGICK "The ImageMagick was not completed. Do you want to run ImageMagick setup again?"
!insertmacro LanguageString TEXT_NOTINSTALLED_GHOSTSCRIPT "The Ghostscript setup wizard was not completed. Do you want to run Ghostscript setup again?"
!insertmacro LanguageString TEXT_NOTINSTALLED_VIEWER "You did not associate GSView with the PDF/Postscript file types. Do you want to run GSView setup again?"
!insertmacro LanguageString TEXT_NOTINSTALLED_DICT "The setup wizard of the ${DICT_NAME} spell checker dictionary was not completed. Do you want to run the setup again?"
!insertmacro LanguageString TEXT_FINISH_DESKTOP "Create desktop shortcut"
!insertmacro LanguageString TEXT_FINISH_WEBSITE "Visit lyx.org for the latest news, support and tips"
!insertmacro LanguageString UNTEXT_WELCOME "This wizard will guide you through the uninstallation of $(^NameDA). Please close $(^NameDA) before you continue.\r\n\r\nNote that this wizard will only uninstall LyX itself. If you want to uninstall other applications you installed for use with LyX, uninstall them using their entry in Add/Remove Programs.\r\n\r\n$_CLICK"

View File

@ -0,0 +1,91 @@
/*
LyX Installer Language File
Language: French
Author: Jean-Pierre Chrétien
*/
!insertmacro LanguageString TEXT_NO_PRIVILEDGES "Vous n'avez pas les privilèges d'administrateur.$\r$\n$\r$\nBien que vous puissiez installer ${APP_NAME} et le système typographique, les utilitaires de conversion de format graphique et de prévisualisation ne peuvent être installés sans ces privilèges."
!insertmacro LanguageString TEXT_WELCOME_DOWNLOAD "Cet assistant va vous guider tout au long de l'installation de $(^NameDA), le constructeur de documents qui encourage une saisie fondée sur la structure du document plutôt que sur son apparence.\r\n\r\nCet assistant d'installation va paramétrer un environnement complet d'utilisation de ${APP_NAME} et peut télécharger automatiquement les composants manquants.\r\n\r\n$(^ClickNext)"
!insertmacro LanguageString TEXT_WELCOME_INSTALL "Cet assistant va vous guider tout au long de l'installation de $(^NameDA), le constructeur de documents qui encourage une saisie fondée sur la structure du document plutôt que sur son apparence.\r\n\r\nCet assistant d'installation va paramétrer un environnement complet d'utilisation de ${APP_NAME} et peut installer automatiquement les composants manquants.\r\n\r\n$(^ClickNext)"
!insertmacro LanguageString TEXT_USER_TITLE "Choix des utilisateurs"
!insertmacro LanguageString TEXT_USER_SUBTITLE "Sélection des utilisateurs désirant utiliser $(^NameDA)."
!insertmacro LanguageString TEXT_USER_INFO "Choix entre installer $(^NameDA) seulement pour vous-même ou bien pour tous les utilisateurs du système. $(^ClickNext)"
!insertmacro LanguageString TEXT_USER_CURRENT "Installer seulement pour moi."
!insertmacro LanguageString TEXT_USER_ALL "Installer pour tous les utilisateurs."
!insertmacro LanguageString TEXT_REINSTALL_TITLE "Réinstallation"
!insertmacro LanguageString TEXT_REINSTALL_SUBTITLE "Réinstallation éventuelle des fichiers programmes de $(^NameDA)."
!insertmacro LanguageString TEXT_REINSTALL_INFO "$(^NameDA) est déjà installé. Cet assistant vous permettra de modifier le langage de l'interface ou l'emplacement des applications externes, ou de télécharger de nouveaux dictionnaires. Si vous souhaitez réinstaller aussi les fichiers programmes, cochez la case ci-dessous. $(^ClickNext)"
!insertmacro LanguageString TEXT_REINSTALL_ENABLE "Réinstaller les fichiers programmes $(^NameDA)"
!insertmacro LanguageString TEXT_EXTERNAL_NOPRIVILEDGES "(Privilèges d'administration requis)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_TITLE "Système typographique LaTeX"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_SUBTITLE "Un système typographique est requis pour pouvoir créer des documents imprimables ou publiables."
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INFO_DOWNLOAD "Merci de préciser si vous désirez télécharger MikTeX ou si vous voulez utiliser une distribution LaTeX existante. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INFO_INSTALL "Merci de préciser si vous désirez installer MikTeX ou si vous voulez utiliser une distribution LaTeX existante. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_DOWNLOAD "Télécharger MikTeX"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INSTALL "Installer MikTeX"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_FOLDER "Utiliser une distribution LaTeX existante dans le répertoire suivant :"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_FOLDER_INFO "Ce répertoire doit contenir ${BIN_LATEX}."
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_NONE "Installer sans distribution LaTeX (non recommandé)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_NOTFOUND "${BIN_LATEX} n'existe pas dans le répertoire spécifié."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_TITLE "ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_SUBTITLE "ImageMagick est requis pour les conversions de formats graphiques variés."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INFO_DOWNLOAD "Merci de préciser si vous désirez télécharger ImageMagick ou si vous en disposez déjà. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INFO_INSTALL "Merci de préciser si vous désirez installer ImageMagick ou si vous en disposez déjà. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_DOWNLOAD "Télécharger ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INSTALL "Installer ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_FOLDER "Utiliser une installation ImageMagick existante dans le répertoire suivant :"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_FOLDER_INFO "Ce répertoire doit contenir ${BIN_IMAGEMAGICK}."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_NONE "Installer sans ImageMagick (non recommandé)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_NOTFOUND "${BIN_IMAGEMAGICK} n'existe pas dans le répertoire spécifié."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_TITLE "Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_SUBTITLE "Ghostscript est requis pour prévisualiser les documents au format PostScript."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INFO_DOWNLOAD "Merci de préciser si vous désirez télécharger Ghostscript ou si vous en disposez déjà. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INFO_INSTALL "Merci de préciser si vous désirez installer Ghostscript ou si vous en disposez déjà. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_DOWNLOAD "Télécharger Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INSTALL "Installer Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_FOLDER "Utiliser une installation Ghostscript existante dans le répertoire suivant :"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_FOLDER_INFO "Ce répertoire doit contenir ${BIN_GHOSTSCRIPT}."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_NONE "Installer sans GhostScript (non recommandé)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_NOTFOUND "${BIN_GHOSTSCRIPT} n'existe pas dans le répertoire spécifié."
!insertmacro LanguageString TEXT_VIEWER_TITLE "Visualisation des documents"
!insertmacro LanguageString TEXT_VIEWER_SUBTITLE "Un afficheur est requis pour présenter les résultats des traitements à l'écran."
!insertmacro LanguageString TEXT_VIEWER_INFO_DOWNLOAD "Il n'y a pas d'afficheur installé sur votre système pour prévisualiser les fichiers PDF et PostScript , formats courants de la version typographique des documents. Si vous cochez la case ci-dessous, l'afficheur PDF/PostScript Gaviez sera téléchargé. $_CLICK"
!insertmacro LanguageString TEXT_VIEWER_INFO_INSTALL "Il n'y a pas d'afficheur installé sur votre système pour prévisualiser les fichiers PDF et PostScript , formats courants de la version typographique des documents. Si vous cochez la case ci-dessous, l'afficheur PDF/PostScript GSView sera installé. $_CLICK"
!insertmacro LanguageString TEXT_VIEWER_DOWNLOAD "Télécharger GSView"
!insertmacro LanguageString TEXT_VIEWER_INSTALL "Installer GSView"
!insertmacro LanguageString TEXT_DICT_TITLE "Dictionnaires orthographiques"
!insertmacro LanguageString TEXT_DICT_SUBTITLE "Sélection des langues pour lesquelles vous désirez un dictionnaire orthographique."
!insertmacro LanguageString TEXT_DICT_TOP "Pour vérifier l'orthographe des documents dans un langage donné, un dictionnaire contenant les mots admis dot être téléchargé. Sélectionner les dictionnaires à télécharger. $_CLICK"
!insertmacro LanguageString TEXT_DICT_LIST "Sélectionner les dictionnaires à télécharger :"
!insertmacro LanguageString TEXT_LANGUAGE_TITLE "Choix de la langue"
!insertmacro LanguageString TEXT_LANGUAGE_SUBTITLE "Choix de la langue de l'interface $(^NameDA)."
!insertmacro LanguageString TEXT_LANGUAGE_INFO "Sélectionner la langue à utiliser dans l'interface ${APP_NAME}. $(^ClickNext)"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_LATEX "Le téléchargement de MikTeX a échoué. Voulez-vous réessayer ?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_IMAGEMAGICK "Le téléchargement de ImageMagick a échoué. Voulez-vous réessayer ?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_GHOSTSCRIPT "Le téléchargement de Ghostscript a échoué. Voulez-vous réessayer ?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_VIEWER "Le téléchargement de GSView a échoué. Voulez-vous réessayer ?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_DICT "Le téléchargement du dictionnaire orthographique ${DICT_NAME} a échoué. Voulez-vous réessayer ?"
!insertmacro LanguageString TEXT_NOTINSTALLED_LATEX "L'installation de MikTeX est restée incomplète. Voulez-vous relancer l'installation de MikTeX ?"
!insertmacro LanguageString TEXT_NOTINSTALLED_IMAGEMAGICK "L'installation de ImageMagick est restée incomplète. Voulez-vous relancer l'installation de ImageMagick ?"
!insertmacro LanguageString TEXT_NOTINSTALLED_GHOSTSCRIPT "L'installation de Ghostscript est restée incomplète. Voulez-vous relancer l'installation de Ghostscript ?"
!insertmacro LanguageString TEXT_NOTINSTALLED_VIEWER "Vous n'avez pas associé GSView aux types de fichier PDF/PostScript. Voulez-vous relancer l'installation de GSView ?"
!insertmacro LanguageString TEXT_NOTINSTALLED_DICT "L'installation du dictionnaire orthographique ${DICT_NAME} est restée incomplète. Voulez-vous relancer l'installation ?"
!insertmacro LanguageString TEXT_FINISH_DESKTOP "Créer un raccourci sur le bureau"
!insertmacro LanguageString TEXT_FINISH_WEBSITE "Consulter les dernières nouvelles, trucs et astuces sur le site lyx.org"
!insertmacro LanguageString UNTEXT_WELCOME "Cet assistant va vous guider tout au long de la désinstallation de $(^NameDA). Merci de quitter $(^NameDA) avant de poursuivre.\r\n\r\nNotez bien que cet assistant ne désinstallera que LyX proprement dit. Si vous désirez désinstaller d'autres applications que vous avez installées pour les besoins de $(^NameDA), effectuez cette désinstallation via la page « Ajout/Suppression de programmes ».\r\n\r\n$_CLICK"

View File

@ -0,0 +1,91 @@
/*
LyX Installer Language File
Language: German
Author: Andreas Deininger
*/
!insertmacro LanguageString TEXT_NO_PRIVILEDGES "Sie gehören weder der Gruppe der Administratoren noch der Gruppe der Hauptbenutzer an.$\r$\n$\r$\nSie können zwar ${APP_NAME} installieren und ebenso auch das Satzprogramm. Die Werkzeuge zur Grafikkonvertierung und für die Vorschau können jedoch ohne diese Rechte nicht installiert werden."
!insertmacro LanguageString TEXT_WELCOME_DOWNLOAD "Dieses Installationsprogramm wird Sie durch die Installation von $(^NameDA) leiten, des Dokumentenverarbeitungsprogramms welches das Verfassen von Texten basierend auf ihrer Struktur unterstützt, nicht das Verfassen von Texten ausgerichtet auf ihr Erscheinungsbild.\r\n\r\nDieses Installationsprogramm wird ein Komplettsystem zur Nutzung von ${APP_NAME} auf Ihrem Rechner erzeugen, dabei können fehlende Komponenten automatisch heruntergeladen werden.\r\n\r\n$(^ClickNext)"
!insertmacro LanguageString TEXT_WELCOME_INSTALL "Dieses Installationsprogramm wird Sie durch die Installation von $(^NameDA) leiten, des Dokumentenverarbeitungsprogramms welches das Verfassen von Texten basierend auf ihrer Struktur unterstützt, nicht das Verfassen von Texten ausgerichtet auf ihr Erscheinungsbild.\r\n\r\nDieses Installationsprogramm wird ein Komplettsystem zur Nutzung von ${APP_NAME} auf Ihrem Rechner erzeugen, dabei können fehlende Komponenten automatisch heruntergeladen werden.\r\n\r\n$(^ClickNext)"
!insertmacro LanguageString TEXT_USER_TITLE "Benutzer auswählen"
!insertmacro LanguageString TEXT_USER_SUBTITLE "Wählen Sie die Benutzer aus, für die Sie $(^NameDA) installieren wollen."
!insertmacro LanguageString TEXT_USER_INFO "Wählen Sie aus, ob Sie $(^NameDA) nur für den eigenen Gebrauch oder für die Nutzung durch alle Benutzer dieses Systems installieren möchten. $(^ClickNext)"
!insertmacro LanguageString TEXT_USER_CURRENT "Installation nur für mich"
!insertmacro LanguageString TEXT_USER_ALL "Installation für alle Benutzer dieses Computers"
!insertmacro LanguageString TEXT_REINSTALL_TITLE "Erneute Installation"
!insertmacro LanguageString TEXT_REINSTALL_SUBTITLE "Wählen Sie aus, ob Sie die $(^NameDA) Programmdateien erneut installieren möchten."
!insertmacro LanguageString TEXT_REINSTALL_INFO "$(^NameDA) ist bereits installiert. Das Installationsprogramm gestattet Ihnen die Spracheinstellungen der Benutzeroberfläche oder den Ort externer Anwendungen abzuändern, ferner können Sie zusätzliche Wörterbücher herunterladen. Falls Sie die Programmdateien erneut installieren möchten, markieren Sie das untenstehende Kästchen. $(^ClickNext)"
!insertmacro LanguageString TEXT_REINSTALL_ENABLE "$(^NameDA) Programmdateien erneut installieren"
!insertmacro LanguageString TEXT_EXTERNAL_NOPRIVILEDGES "(Rechte als Administrator oder Hauptbenutzer erforderlich)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_TITLE "LaTeX Satzsystem"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_SUBTITLE "Es wird ein Satzsystem benötigt, um Dokumente zum Druck oder zur Publikation erzeugen zu können."
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INFO_DOWNLOAD "Bitte geben Sie an, ob sie MiKTeX herunterladen wollen oder ob Sie eine bereits existierendes LaTeX-System nutzen wollen. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INFO_INSTALL "Bitte geben Sie an, ob sie MiKTeX installieren wollen oder ob Sie eine bereits existierendes LaTeX -System nutzen wollen. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_DOWNLOAD "MiKTeX herunterladen"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INSTALL "MiKTeX installieren"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_FOLDER "Ein bereits existierendes LaTeX-System im folgenden Verzeichnis nutzen:"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_FOLDER_INFO "Dieses Verzeichnis sollte ${BIN_LATEX} enthalten."
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_NONE "Installation ohne das LaTeX Satzsystem (nicht empfohlen)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_NOTFOUND "${BIN_LATEX} existiert nicht in dem von Ihnen angegebenen Verzeichnis."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_TITLE "ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_SUBTITLE "ImageMagick wird benötigt, damit verschiedene Bildformate unterstützt werden können."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INFO_DOWNLOAD "Bitte geben Sie an, ob sie ImageMagick herunterladen wollen oder ob Sie es bereits installiert haben. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INFO_INSTALL "Bitte geben Sie an, ob sie ImageMagick installieren wollen oder ob Sie es bereits installiert haben. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_DOWNLOAD "ImageMagick herunterladen"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INSTALL "ImageMagick installieren"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_FOLDER "Eine bereits bestehende ImageMagick-Installation aus dem folgenden Verzeichnis nutzen:"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_FOLDER_INFO "Dieses Verzeichnis sollte ${BIN_IMAGEMAGICK} enthalten."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_NONE "Installation ohne ImageMagick (nicht empfohlen)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_NOTFOUND "${BIN_IMAGEMAGICK} existiert nicht in dem von Ihnen angegebenen Verzeichnis."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_TITLE "Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_SUBTITLE "Ghostscript wird für die Vorschauansicht von Bildern im PostScript-Format benötigt."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INFO_DOWNLOAD "Bitte geben Sie an, ob sie Ghostscript herunterladen wollen oder ob Sie es bereits installiert haben. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INFO_INSTALL "Bitte geben Sie an, ob sie Ghostscript installieren wollen oder ob Sie es bereits installiert haben. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_DOWNLOAD "Ghostscript herunterladen"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INSTALL "Ghostscript installieren"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_FOLDER "Eine bereits bestehende Ghostscript-Installation aus dem folgenden Verzeichnis nutzen:"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_FOLDER_INFO "Dieses Verzeichnis sollte ${BIN_GHOSTSCRIPT} enthalten."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_NONE "Installation ohne Ghostscript (nicht empfohlen)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_NOTFOUND "${BIN_GHOSTSCRIPT} existiert nicht in dem von Ihnen angegebenen Verzeichnis."
!insertmacro LanguageString TEXT_VIEWER_TITLE "Dokumentenbetrachter"
!insertmacro LanguageString TEXT_VIEWER_SUBTITLE "Um von Ihnen verfasste Dokumente auf Ihrem Bildschirm anzuzeigen, wird ein Anzeigeprogramm benötigt."
!insertmacro LanguageString TEXT_VIEWER_INFO_DOWNLOAD "Auf Ihrem System ist kein Anzeigeprogramm für die Vorschauansicht von sowohl PDF- als auch Postscript-Dateien installiert, beides sind gebräuchliche Formate beim Dokumentensatz. Falls Sie das untenstehende Kästchen markieren, wird GSView heruntergeladen, ein Anzeigeprogramm für PDF- und Postscript-Dateien. $_CLICK"
!insertmacro LanguageString TEXT_VIEWER_INFO_INSTALL "Auf Ihrem System ist kein Anzeigeprogramm für die Vorschauansicht von sowohl PDF- als auch Postscript-Dateien installiert, beides sind gebräuchliche Formate beim Dokumentensatz. Falls Sie das untenstehende Kästchen markieren, wird GSView installiert, ein Anzeigeprogramm für PDF- und Postscript-Dateien. $_CLICK"
!insertmacro LanguageString TEXT_VIEWER_DOWNLOAD "GSView herunterladen"
!insertmacro LanguageString TEXT_VIEWER_INSTALL "GSView installieren"
!insertmacro LanguageString TEXT_DICT_TITLE "Wörterbücher zur Rechtschreibprüfung"
!insertmacro LanguageString TEXT_DICT_SUBTITLE "Wählen Sie die Sprachen aus, für die eine Rechtschreibprüfung möglich sein soll."
!insertmacro LanguageString TEXT_DICT_TOP "Um für Dokumente in einer bestimmten Sprache die Rechtschreibprüfung durchführen zu können, muss ein jeweils ein Wörterbuch mit dem nötigen Wortschatz heruntergeladen werden. Wählen Sie die Wörterbucher aus, die Sie herunterladen möchten. $_CLICK"
!insertmacro LanguageString TEXT_DICT_LIST "Wählen Sie die Wörterbucher aus, die Sie herunterladen möchten:"
!insertmacro LanguageString TEXT_LANGUAGE_TITLE "Wählen Sie die Sprache aus"
!insertmacro LanguageString TEXT_LANGUAGE_SUBTITLE "Wählen Sie die Sprache aus, in der Sie $(^NameDA) nutzen wollen."
!insertmacro LanguageString TEXT_LANGUAGE_INFO "Wählen Sie die Sprache aus, die Sie für die ${APP_NAME} Benutzeroberfläche nutzen wollen. $(^ClickNext)"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_LATEX "Das Herunterladen von MiKTeX ist fehlgeschlagen. Möchten Sie es erneut versuchen?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_IMAGEMAGICK "Das Herunterladen von ImageMagick ist fehlgeschlagen. Möchten Sie es erneut versuchen?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_GHOSTSCRIPT "Das Herunterladen von Ghostscript ist fehlgeschlagen. Möchten Sie es erneut versuchen?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_VIEWER "Das Herunterladen von GSView ist fehlgeschlagen. Möchten Sie es erneut versuchen?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_DICT "Das Herunterladen von Wöterbüchern für die ${DICT_NAME} Rechtschreibprüfung ist fehlgeschlagen. Möchten Sie es erneut versuchen?"
!insertmacro LanguageString TEXT_NOTINSTALLED_LATEX "Die Installation von MiKTeX konnte nicht erfolgreich abgeschlossen werden. Möchten Sie MiKTeX erneut installieren?"
!insertmacro LanguageString TEXT_NOTINSTALLED_IMAGEMAGICK "Die Installation von ImageMagick konnte nicht erfolgreich abgeschlossen werden. Möchten Sie ImageMagick erneut installieren?"
!insertmacro LanguageString TEXT_NOTINSTALLED_GHOSTSCRIPT "Die Installation von Ghostscript konnte nicht erfolgreich abgeschlossen werden. Möchten Sie Ghostscript erneut installieren?"
!insertmacro LanguageString TEXT_NOTINSTALLED_VIEWER "GSView ist nicht für die Anzeige von PDF- oder Postscript-Dateien konfiguriert. Möchten Sie GSView erneut installieren?"
!insertmacro LanguageString TEXT_NOTINSTALLED_DICT "Die Installation der Wörterbucher für die ${DICT_NAME} Rechtschreibprüfung konnte nicht erfolgreich abgeschlossen werden. Möchten Sie die Installation erneut versuchen?"
!insertmacro LanguageString TEXT_FINISH_DESKTOP "Ein Symbol auf der Arbeitsoberfläche erzeugen"
!insertmacro LanguageString TEXT_FINISH_WEBSITE "Besuchen Sie lyx.org für aktuelle Neuigkeiten, für Tips und Tricks sowie für sonstige Hinweise"
!insertmacro LanguageString UNTEXT_WELCOME "Dieses Installationsprogramm wird Sie durch die Deinstallation von $(^NameDA) leiten. Bitte schließen Sie $(^NameDA) bevor Sie fortfahren.\r\n\r\nBeachten Sie bitte, dass im folgenden nur LyX selbst deinstalliert wird. Falls Sie andere Anwendungen aus ihrem System entfernen möchten, die zur Nutzung von Lyx installiert wurden, benutzen Sie hierzu bitte den Eintrag Software im Menü Systemsteuerung und wählen Sie dort dann den entsprechenden Eintrag für das Programm aus.\r\n\r\n$_CLICK"

View File

@ -0,0 +1,91 @@
/*
LyX Installer Language File
Language: Italian
Author: Enrico Forestieri
*/
!insertmacro LanguageString TEXT_NO_PRIVILEDGES "Non si hanno privilegi da amministratore o utente avanzato.$\r$\n$\r$\nSebbene sia possibile installare ${APP_NAME} ed il sistema di composizione tipografica, le utilità per la conversione delle immagini e per l'anteprima non possono essere installate senza tali privilegi."
!insertmacro LanguageString TEXT_WELCOME_DOWNLOAD "Verrete guidati nell'installazione di $(^NameDA), il compilatore di documenti che incoraggia un approccio alla scrittura basato sulla struttura dei vostri testi, non sulla loro apparenza.\r\n\r\nQuesto installer preparerà un ambiente completo per usare ${APP_NAME} ed è in grado di scaricare automaticamente dalla rete i componenti mancanti.\r\n\r\n$(^ClickNext)"
!insertmacro LanguageString TEXT_WELCOME_INSTALL "Verrete guidati nell'installazione di $(^NameDA), il compilatore di documenti che incoraggia un approccio alla scrittura basato sulla struttura dei vostri testi, non sulla loro apparenza.\r\n\r\nQuesto installer preparerà un ambiente completo per usare ${APP_NAME} ed è in grado di installare automaticamente i componenti mancanti.\r\n\r\n$(^ClickNext)"
!insertmacro LanguageString TEXT_USER_TITLE "Scelta degli Utenti"
!insertmacro LanguageString TEXT_USER_SUBTITLE "Scegliete per quali utenti volete installare $(^NameDA)."
!insertmacro LanguageString TEXT_USER_INFO "Scegliete se volete installare $(^NameDA) solo per voi o per tutti gli utenti di questo sistema. $(^ClickNext)"
!insertmacro LanguageString TEXT_USER_CURRENT "Installazione personale"
!insertmacro LanguageString TEXT_USER_ALL "Installazione per tutti gli utenti"
!insertmacro LanguageString TEXT_REINSTALL_TITLE "Reinstallazione"
!insertmacro LanguageString TEXT_REINSTALL_SUBTITLE "Scegliete se volete reinstallare i file di $(^NameDA)."
!insertmacro LanguageString TEXT_REINSTALL_INFO "$(^NameDA) è già installato. Questo installer vi consentirà di cambiare la lingua dell'interfaccia, l'ubicazione di applicazioni esterne o di scaricare dalla rete dizionari aggiuntivi. Se volete anche reinstallare i file del programma, selezionate la casella sottostante. $(^ClickNext)"
!insertmacro LanguageString TEXT_REINSTALL_ENABLE "Reinstallazione dei file di $(^NameDA)"
!insertmacro LanguageString TEXT_EXTERNAL_NOPRIVILEDGES "(sono richiesti privilegi da amministratore o utente avanzato)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_TITLE "Sistema di Composizione Tipografica LaTeX"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_SUBTITLE "È necessario il sistema di composizione tipografica LaTeX per potere creare documenti adatti per la stampa o la pubblicazione."
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INFO_DOWNLOAD "Specificate se volete scaricare dalla rete MiKTeX o volete usare un sistema LaTeX preesistente. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INFO_INSTALL "Specificate se volete installare MiKTeX o volete usare un sistema LaTeX preesistente. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_DOWNLOAD "Scarica MiKTeX"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_INSTALL "Installa MiKTeX"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_FOLDER "Usa il sistema LaTeX preesistente nella seguente cartella:"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_FOLDER_INFO "Questa cartella deve contenere ${BIN_LATEX}."
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_NONE "Installa senza un sistema di composizione tipografica LaTeX (sconsigliato)"
!insertmacro LanguageString TEXT_EXTERNAL_LATEX_NOTFOUND "${BIN_LATEX} non è presente nella cartella specificata."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_TITLE "ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_SUBTITLE "ImageMagick è necessario per il supporto di vari formati grafici."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INFO_DOWNLOAD "Specificate se volete scaricare dalla rete ImageMagick o se è già installato. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INFO_INSTALL "Specificate se volete installare ImageMagick o se è già installato. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_DOWNLOAD "Scarica ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_INSTALL "Installa ImageMagick"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_FOLDER "Usa l'installazione di ImageMagick preesistente nella seguente cartella:"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_FOLDER_INFO "Questa cartella deve contenere ${BIN_IMAGEMAGICK}."
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_NONE "Installa senza ImageMagick (sconsigliato)"
!insertmacro LanguageString TEXT_EXTERNAL_IMAGEMAGICK_NOTFOUND "${BIN_IMAGEMAGICK} non è presente nella cartella specificata."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_TITLE "Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_SUBTITLE "Ghostscript è necessario per l'anteprima di immagini in formato PostScript."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INFO_DOWNLOAD "Specificate se volete scaricare dalla rete Ghostscript o se è già installato. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INFO_INSTALL "Specificate se volete installare Ghostscript o se è già installato. $(^ClickNext)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_DOWNLOAD "Scarica Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_INSTALL "Installa Ghostscript"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_FOLDER "Usa l'installazione di Ghostscript preesistente nella seguente cartella:"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_FOLDER_INFO "Questa cartella deve contenere ${BIN_GHOSTSCRIPT}."
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_NONE "Installa senza GhostScript (sconsigliato)"
!insertmacro LanguageString TEXT_EXTERNAL_GHOSTSCRIPT_NOTFOUND "${BIN_GHOSTSCRIPT} non è presente nella cartella specificata."
!insertmacro LanguageString TEXT_VIEWER_TITLE "Visualizzatore di Documenti"
!insertmacro LanguageString TEXT_VIEWER_SUBTITLE "Un visualizzatore è necessario per mostrare sullo schermo i documenti compilati."
!insertmacro LanguageString TEXT_VIEWER_INFO_DOWNLOAD "Non è installato nessun visualizzatore in grado di mostrare file sia PDF che Postscript, ovvero i formati comuni per i documenti compilati. Selezionando la casella sottostante, verrà scaricato dalla rete il visualizzatore PDF/Postscript GSView. $_CLICK"
!insertmacro LanguageString TEXT_VIEWER_INFO_INSTALL "Non è installato nessun visualizzatore in grado di mostrare file sia PDF che Postscript, ovvero i formati comuni per i documenti compilati. Selezionando la casella sottostante, verrà installato il visualizzatore PDF/Postscript GSView. $_CLICK"
!insertmacro LanguageString TEXT_VIEWER_DOWNLOAD "Scarica GSView"
!insertmacro LanguageString TEXT_VIEWER_INSTALL "Installa GSView"
!insertmacro LanguageString TEXT_DICT_TITLE "Dizionari per il Correttore Ortografico"
!insertmacro LanguageString TEXT_DICT_SUBTITLE "Scegliete le lingue che volete usare per il correttore ortografico."
!insertmacro LanguageString TEXT_DICT_TOP "Per verificare l'ortografia dei documenti in una data lingua, è necessario scaricare dalla rete un dizionario di parole valide. Selezionate i dizionari da scaricare. $_CLICK"
!insertmacro LanguageString TEXT_DICT_LIST "Selezionate i dizionari da scaricare:"
!insertmacro LanguageString TEXT_LANGUAGE_TITLE "Scelta della Lingua"
!insertmacro LanguageString TEXT_LANGUAGE_SUBTITLE "Scegliete la lingua nella quale volete usare $(^NameDA)."
!insertmacro LanguageString TEXT_LANGUAGE_INFO "Scegliete la lingua da usare per l'interfaccia di ${APP_NAME}. $(^ClickNext)"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_LATEX "Non sono riuscito a scaricare MiKTeX. Volete provare ancora?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_IMAGEMAGICK "Non sono riuscito a scaricare ImageMagick. Volete provare ancora?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_GHOSTSCRIPT "Non sono riuscito a scaricare Ghostscript. Volete provare ancora?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_VIEWER "Non sono riuscito a scaricare GSView. Volete provare ancora?"
!insertmacro LanguageString TEXT_DOWNLOAD_FAILED_DICT "Non sono riuscito a scaricare il dizionario ortografico ${DICT_NAME}. Volete provare ancora?"
!insertmacro LanguageString TEXT_NOTINSTALLED_LATEX "L'installazione di MiKTeX non è stata completata. Volete rilanciare il programma di installazione di MiKTeX?"
!insertmacro LanguageString TEXT_NOTINSTALLED_IMAGEMAGICK "L'installazione di ImageMagick non è stata completata. Volete rilanciare il programma di installazione di ImageMagick?"
!insertmacro LanguageString TEXT_NOTINSTALLED_GHOSTSCRIPT "L'installazione di Ghostscript non è stata completata. Volete rilanciare il programma di installazione di Ghostscript?"
!insertmacro LanguageString TEXT_NOTINSTALLED_VIEWER "Non avete associato GSView ai file di tipo PDF/Postscript. Volete rilanciare il programma di installazione di GSView?"
!insertmacro LanguageString TEXT_NOTINSTALLED_DICT "L'installazione del dizionario ortografico ${DICT_NAME} non è stata completata. Volete riprovarla?"
!insertmacro LanguageString TEXT_FINISH_DESKTOP "Crea icona sul desktop"
!insertmacro LanguageString TEXT_FINISH_WEBSITE "Visitate lyx.org per ultime novità, aiuto e suggerimenti"
!insertmacro LanguageString UNTEXT_WELCOME "Verrete guidati nella disinstallazione di $(^NameDA). Per favore, chiudete $(^NameDA) prima di continuare.\r\n\r\nNotate che verrà disinstallato solamente LyX. Se volete disinstallare le altre applicazioni installate insieme a LyX, dovrete farlo mediante la voce corrispondente in 'Installazione applicazioni'.\r\n\r\n$_CLICK"

View File

@ -0,0 +1,290 @@
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil\fcharset2 Symbol;}}
{\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\qc\b\f0\fs24 LyX Windows Distribution License Agreement\b0\fs36\par
\pard\fs16\par
\pard\qc This Windows distribution of LyX contains:\par
\pard\par
\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent0{\pntxtb\'B7}}\fi-720\li720 LyX. You can redistribute LyX and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\par
{\pntext\f2\'B7\tab}Components of Python. You can redistribute Python and/or modify it under the terms of the Python Software Foundation License Version 2.\par
{\pntext\f2\'B7\tab}Components of Aspell. You can redistribute Aspell and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.\par
{\pntext\f2\'B7\tab}A modified version of the BaKoMa fonts. You can redistribute the BaKoMa fonts under the terms of the BaKoMa Font License.\par
{\pntext\f2\'B7\tab}The wasy font 'wasy10.ttf' from the latex-xft font bundle: http://packages.qa.debian.org/l/latex-xft-fonts.html. You can redistribute the latex-xft font bundle and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\par
{\pntext\f2\'B7\tab}Components of Netpbm. You can redistribute Netpbm and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\par
{\pntext\f2\'B7\tab}Components of Dvipost. You can redistribute Dvipost and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\par
{\pntext\f2\'B7\tab}Components of Aiksaurus. You can redistribute Aiksaurus and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\par
\pard\par
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\par
\par
\pard\qc\b\fs24 GNU GENERAL PUBLIC LICENSE\b0\fs16\par
Version 2, June 1991\par
\par
Copyright (C) 1989, 1991 Free Software Foundation, Inc.\par
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA\par
Everyone is permitted to copy and distribute verbatim copies\par
of this license document, but changing it is not allowed.\par
\pard\par
\b Preamble\b0\par
\par
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.\par
\par
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.\par
\par
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.\par
\par
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\par
\par
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.\par
\par
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.\par
\par
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.\par
\par
The precise terms and conditions for copying, distribution and modification follow.\par
\page\b GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\b0\par
\par
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".\par
\par
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.\par
\par
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.\par
\par
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.\par
\par
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:\par
\par
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.\par
\par
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.\par
\par
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) \page These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.\par
\par
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.\par
\par
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.\par
\par
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:\par
\par
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,\par
\par
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,\par
\par
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)\par
\par
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.\par
\par
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. \page 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.\par
\par
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.\par
\par
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.\par
\par
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.\par
\par
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.\par
\par
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.\par
\par
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. \page 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.\par
\par
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\par
\par
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.\par
\par
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.\par
\par
\b NO WARRANTY\b0\par
\par
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par
\par
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\par
\par
\b END OF TERMS AND CONDITIONS\par
\b0\par
\pard\qc\b\fs24 GNU LESSER GENERAL PUBLIC LICENSE\b0\fs16\par
Version 2.1, February 1999\par
\par
Copyright (C) 1991, 1999 Free Software Foundation, Inc.\par
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\par
Everyone is permitted to copy and distribute verbatim copies\par
of this license document, but changing it is not allowed.\par
\par
[This is the first released version of the Lesser GPL. It also counts\par
as the successor of the GNU Library Public License, version 2, hence\par
the version number 2.1.]\par
\pard\b Preamble\b0\par
\par
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.\par
\par
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.\par
\par
When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.\par
\par
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.\par
\par
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.\par
\par
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.\par
\par
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.\par
\par
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.\par
\par
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.\par
\par
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.\par
\par
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.\par
\par
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.\par
\par
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.\par
\par
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.\par
\par
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.\par
\par
\b TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\b0\par
\par
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".\par
\par
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.\par
\par
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)\par
\par
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.\par
\par
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.\par
\par
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.\par
\par
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.\par
\par
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:\par
\par
* a) The modified work must itself be a software library.\par
* b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.\par
* c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.\par
* d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.\par
\par
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)\par
\par
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.\par
\par
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.\par
\par
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. \par
\par
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.\par
\par
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.\par
\par
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.\par
\par
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.\par
\par
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.\par
\par
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.\par
\par
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.\par
\par
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.\par
\par
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)\par
\par
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.\par
\par
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.\par
\par
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:\par
\par
* a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)\par
* b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.\par
* c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.\par
* d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.\par
* e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. \par
\par
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.\par
\par
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.\par
\par
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:\par
\par
* a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.\par
* b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. \par
\par
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.\par
\par
9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.\par
\par
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.\par
\par
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.\par
\par
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.\par
\par
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.\par
\par
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.\par
\par
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.\par
\par
13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\par
\par
Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.\par
\par
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.\par
\par
\b NO WARRANTY\b0\par
\par
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par
\par
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\par
\par
\b END OF TERMS AND CONDITIONS\b0\par
\par
\pard\qc\b\fs24 PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2\b0\fs16\par
\pard\par
1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation.\par
\par
2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee.\par
\par
3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python.\par
\par
4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.\par
\par
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.\par
\par
6. This License Agreement will automatically terminate upon a material breach of its terms and conditions.\par
\par
7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party.\par
\par
8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement.\par
\par
\pard\qc\b\fs24 BaKoMa Fonts License\par
\pard\b0\fs16\par
This licence covers two font packs (known as BaKoMa Fonts Colelction, which is available at `CTAN:fonts/cm/ps-type1/bakoma/'):\par
\par
1) BaKoMa-CM (1.1/12-Nov-94)\par
Computer Modern Fonts in PostScript Type 1 and TrueType font formats.\par
\par
2) BaKoMa-AMS (1.2/19-Jan-95)\par
AMS TeX fonts in PostScript Type 1 and TrueType font formats.\par
\par
Copyright (C) 1994, 1995, Basil K. Malyshev. All Rights Reserved.\par
\par
Permission to copy and distribute these fonts for any purpose is hereby granted without fee, provided that the above copyright notice, author statement and this permission notice appear in all copies of these fonts and related documentation.\par
\par
Permission to modify and distribute modified fonts for any purpose is hereby granted without fee, provided that the copyright notice, author statement, this permission notice and location of original fonts (http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma) appear in all copies of modified fonts and related documentation.\par
\par
Permission to use these fonts (embedding into PostScript, PDF, SVG and printing by using any software) is hereby granted without fee. It is not required to provide any notices about using these fonts.\par
\par
Basil K. Malyshev\par
INSTITUTE FOR HIGH ENERGY PHYSICS\par
IHEP, OMVT\par
Moscow Region\par
142281 PROTVINO\par
RUSSIA\par
\par
E-Mail: bakoma@mail.ru or malyshev@mail.ihep.ru\f1\par
}

View File

@ -0,0 +1,40 @@
/*
NSIS Script - LyX 1.4 Installer for Win32
Authors: Joost Verburg, Angus Leeming, Uwe Stöhr
Requires NSIS 2.21 or later
Licence details for all installer scripts can be found
in the file COPYING or at http://www.lyx.org/about/license.php
*/
!include "include\declarations.nsh"
;--------------------------------
;Compile the launcher
!system '"${NSISDIR}\makensis.exe" "${FILES_LAUNCHER}\launcher.nsi"'
;--------------------------------
;Compile Windows PDF view helper
!system '"${NSISDIR}\makensis.exe" "${FILES_PDFVIEW}\pdfview.nsi"'
;--------------------------------
;LyX Installer
OutFile "${SETUP_EXE}"
;--------------------------------
;Components
!include "components\core.nsh"
!include "components\user.nsh"
!include "components\reinstall.nsh"
!include "components\external.nsh"
!include "components\viewer.nsh"
!include "components\dicts.nsh"
!include "components\langselect.nsh"
!include "components\configure.nsh"
!include "components\uninstall.nsh"

View File

@ -1,642 +0,0 @@
// -*- C++ -*-
/*
* \file lyx_configure.C
* This file is part of LyX, the document processor.
* http://www.lyx.org/
* Licence details can be found in the file COPYING or copy at
* http://www.lyx.org/about/license.php
*
* \author Angus Leeming
* Full author contact details are available in file CREDITS or copy at
* http://www.lyx.org/about/credits.php
*
* Define five functions that can be called from the NSIS installer:
*
* set_path_prefix [ configure_file, path_prefix ]
* create_lyx_bat [ bin_dir, lang ]
* create_relyx_bat [ bin_dir, lang ]
* run_configure [ configure_file, path_prefix ]
* set_env [ var_name, var_value ]
*
* The quantities in [ ... ] are the variables that the functions expect
* to find on the stack. They push "-1" onto the stack on failure and "0"
* onto the stack on success.
*
* Compile the code with
*
* g++ -I/c/Program\ Files/NSIS/Contrib -Wall -shared \
* lyx_configure.C -o lyx_configure.dll
*
* Compilation requires the exdll.h header file to be installed (here at
* C:\Program Files\NSIS\Contrib\ExDLL\exdll.h). The file can be obtained
* from http://cvs.sourceforge.net/viewcvs.py/nsis/NSIS/Contrib/ExDLL/
*
* Move the resulting lyx_configure.dll to C:\Program Files\NSIS\Plugins
*/
#include <cstdio>
#include <cstdlib>
#include <exception>
#include <fstream>
#include <iostream>
#include <list>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>
#include <windows.h>
#include "ExDLL/exdll.h"
namespace {
std::string const subst(std::string const & a,
std::string const & oldstr,
std::string const & newstr)
{
std::string lstr = a;
std::string::size_type i = 0;
std::string::size_type const olen = oldstr.length();
while ((i = lstr.find(oldstr, i)) != std::string::npos) {
lstr.replace(i, olen, newstr);
i += newstr.length();
}
return lstr;
}
std::string const basename(std::string const & path)
{
// Windows recognizes both '/' and '\' as directory separators.
std::string::size_type const final_slash = path.find_last_of("/\\");
return (final_slash == std::string::npos) ?
path :
path.substr(final_slash+1);
}
std::string const dirname(std::string const & path)
{
// Windows recognizes both '/' and '\' as directory separators.
std::string::size_type const final_slash = path.find_last_of("/\\");
return (final_slash == std::string::npos) ?
std::string() :
path.substr(0, final_slash);
}
std::string const pop_from_stack()
{
char data[10*MAX_PATH];
return (popstring(data) == 0) ? data : std::string();
}
void push_to_stack(int const data)
{
std::ostringstream os;
os << data;
pushstring(os.str().c_str());
}
std::list<std::string> const tokenize(std::string const & data,
char const separator)
{
std::list<std::string> result;
std::string::size_type index = 0;
while (true) {
std::string::size_type const end = data.find(separator, index);
if (end == std::string::npos) {
std::string::size_type const count =
data.size() - index;
std::string const elem = data.substr(index, count);
if (elem.size() > 0) {
result.push_back(elem);
}
break;
}
std::string::size_type const count = end - index;
std::string const elem = data.substr(index, count);
if (elem.size() > 0) {
result.push_back(elem);
}
index = (end+1 == data.size()) ? std::string::npos : end + 1;
}
return result;
}
void remove_duplicates(std::list<std::string> & data)
{
typedef std::list<std::string>::iterator iterator;
for (iterator it = data.begin(); it != data.end(); ++it) {
iterator next = it;
++next;
if (next == data.end())
break;
iterator end = std::remove(next, data.end(), *it);
data.erase(end, data.end());
}
}
std::string concatenate(std::list<std::string> const & data,
char const separator)
{
typedef std::list<std::string>::const_iterator iterator;
iterator it = data.begin();
iterator const end = data.end();
if (it == end)
return std::string();
std::ostringstream result;
result << *it;
++it;
for (; it != end; ++it) {
result << separator << *it;
}
return result.str();
}
std::string const sanitize_win32_path(std::string const & in)
{
std::string out = subst(in, "/", "\\");
// Replace multiple adjacent directory separators with a single one
typedef std::string::size_type size_type;
size_type offset = 0;
while (offset != std::string::npos) {
size_type const slash = out.find_first_of('\\', offset);
if (slash == std::string::npos)
break;
size_type const slash_end = out.find_first_not_of('\\', slash);
if (slash_end == std::string::npos) {
// Remove all trailing '\' characters
out = out.substr(0, slash);
break;
} else {
size_type const count = slash_end - (slash + 1);
if (count > 0)
out.erase(slash + 1, count);
}
offset = slash + 1;
}
return out;
}
std::string const sanitize_path_envvar(std::string const & in)
{
// A Windows PATH environment variable has elements separated
// by a ';' character.
typedef std::list<std::string> string_list;
string_list envvar = tokenize(in, ';');
// Ensure that each PATH element uses '\' directory separators
// and doesn't end in a '\'.
string_list::iterator const end = envvar.end();
for (string_list::iterator it = envvar.begin(); it != end; ++it) {
std::string const new_path = sanitize_win32_path(*it);
*it = new_path;
}
remove_duplicates(envvar);
return concatenate(envvar, ';');
}
bool replace_path_prefix(std::string & data,
std::string::size_type const prefix_pos,
std::string const & path_prefix)
{
std::string::size_type start_prefix =
data.find_first_of('"', prefix_pos);
if (start_prefix == std::string::npos)
return false;
start_prefix += 1;
std::string::size_type end_line =
data.find_first_of('\n', prefix_pos);
if (end_line == std::string::npos)
return false;
std::string::size_type end_prefix =
data.find_last_of('"', end_line);
if (end_prefix == std::string::npos || end_prefix == start_prefix)
return false;
std::string::size_type const count = end_prefix - start_prefix;
std::string const old_prefix = data.substr(start_prefix, count);
// The configure script needs to see '\\' for each '\' directory
// separator.
std::string const prefix =
subst(sanitize_path_envvar(path_prefix + ';' + old_prefix),
"\\", "\\\\");
data.erase(start_prefix, count);
data.insert(start_prefix, prefix);
return true;
}
bool insert_path_prefix(std::string & data,
std::string::size_type const xfonts_pos,
std::string const & path_prefix)
{
std::string::size_type const xfonts_start =
data.find_last_of('\n', xfonts_pos);
if (xfonts_start == std::string::npos)
return false;
// The configure script needs to see '\\' for each '\' directory
// separator.
std::string const prefix =
subst(sanitize_path_envvar(path_prefix), "\\", "\\\\");
std::ostringstream ss;
ss << data.substr(0, xfonts_start)
<< "\n"
"cat >>$outfile <<EOF\n"
"\n"
"\\\\path_prefix \"" << prefix << "\"\n"
"EOF\n"
<< data.substr(xfonts_start);
data = ss.str();
return true;
}
bool write_bat(std::ostream & os, std::string const & quoted_exe)
{
os << "if \"%~1\" == \"~1\" goto win95\n"
<< quoted_exe << " %*\n"
<< "goto end\n"
<< ":win95\n"
<< quoted_exe << " %1 %2 %3 %4 %5 %6 %7 %8 %9\n"
<< ":end\n";
return os;
}
// A wrapper for GetEnvironmentVariable
bool get_environment_variable(std::string const & var, std::string & val)
{
if (var.empty())
return false;
std::vector<char> cval(MAX_PATH, '\0');
DWORD size = GetEnvironmentVariable(var.c_str(),
&*cval.begin(),
cval.size());
if (size == 0)
// The specified variable was not found.
return false;
if (size > cval.size()) {
// Insufficient size in the buffer to store the var
// so resize to the required size.
cval.resize(size, '\0');
size = GetEnvironmentVariable(var.c_str(),
&*cval.begin(),
cval.size());
if (size == 0 || size > cval.size())
// Give up
return false;
}
val.assign(cval.begin(), cval.begin() + size);
return true;
}
// Inserts code into "configure" to output "path_prefix" to lyxrc.defaults.
// Throws std::runtime_error on failure.
void set_path_prefix(std::string const & configure_file,
std::string const & path_prefix)
{
std::ifstream ifs(configure_file.c_str());
if (!ifs) {
std::ostringstream ss;
ss << "Unable to open " << configure_file << " for reading";
throw std::runtime_error(ss.str());
}
std::istreambuf_iterator<char> const begin_ifs(ifs);
std::istreambuf_iterator<char> const end_ifs;
std::string configure_data(begin_ifs, end_ifs);
ifs.close();
// Does configure already contain a "path_prefix" entry
// or should we insert one?
std::string::size_type const prefix_pos =
configure_data.find("path_prefix");
if (prefix_pos != std::string::npos) {
if (!replace_path_prefix(configure_data, prefix_pos, path_prefix)) {
std::ostringstream ss;
ss << "Unable to replace the existing path_prefix in "
<< configure_file;
throw std::runtime_error(ss.str());
}
} else {
std::string::size_type const xfonts_pos =
configure_data.find("if [ \"x$use_cygwin_path_fix");
if (xfonts_pos == std::string::npos) {
std::ostringstream ss;
ss << "Unable to find a position to insert the "
"path_prefix entry in "
<< configure_file;
throw std::runtime_error(ss.str());
}
if (!insert_path_prefix(configure_data, xfonts_pos, path_prefix)) {
std::ostringstream ss;
ss << "Unable to insert a new path_prefix in "
<< configure_file;
throw std::runtime_error(ss.str());
}
}
std::ofstream ofs(configure_file.c_str());
if (!ofs) {
std::ostringstream ss;
ss << "Unable to open " << configure_file << " for writing";
throw std::runtime_error(ss.str());
}
ofs << configure_data;
if (!ofs) {
std::ostringstream ss;
ss << "Failed to write " << configure_file;
throw std::runtime_error(ss.str());
}
}
// Creates the lyx.bat file in the LyX\bin folder.
// Throws std::runtime_error on failure.
void create_lyx_bat(std::string const & bin_dir, std::string const & lang)
{
std::string const lyx_bat_file = bin_dir + "\\lyx.bat";
std::ofstream ofs(lyx_bat_file.c_str());
if (!ofs) {
std::ostringstream ss;
ss << "Unable to unable to open "
<< lyx_bat_file << " for writing";
throw std::runtime_error(ss.str());
}
ofs << "@echo off\n"
<< "if \"%LANG%\"==\"\" SET LANG=" << lang << "\n";
std::string const lyx_exe_file = bin_dir + "\\lyx.exe";
if (!write_bat(ofs, "start \"LyX\" \"" + lyx_exe_file + "\"")) {
std::ostringstream ss;
ss << "Failed to write to " << lyx_bat_file;
throw std::runtime_error(ss.str());
}
}
// Creates the reLyX.bat file in the LyX\bin folder.
// Throws std::runtime_error on failure.
void create_relyx_bat(std::string const & bin_dir, std::string const & lang)
{
std::string const relyx_bat_file = bin_dir + "\\reLyX.bat";
std::ofstream ofs(relyx_bat_file.c_str());
if (!ofs) {
std::ostringstream ss;
ss << "Unable to unable to open "
<< relyx_bat_file << " for writing";
throw std::runtime_error(ss.str());
}
std::string relyx_file = bin_dir + "\\reLyX";
std::string relyx = "perl.exe \"" + relyx_file + "\"";
if (!write_bat(ofs, "perl.exe \"" + relyx_file + "\"")) {
std::ostringstream ss;
ss << "Failed to write to " << relyx_bat_file;
throw std::runtime_error(ss.str());
}
}
// Runs "sh configure" to generate things like lyxrc.defaults.
// Throws std::runtime_error on failure.
void run_configure(std::string const & abs_configure_file_in,
std::string const & path_prefix)
{
std::string const abs_configure_file =
sanitize_win32_path(abs_configure_file_in);
std::string const configure_dir = dirname(abs_configure_file);
std::string const configure_file = basename(abs_configure_file);
if (configure_file.empty() || configure_dir.empty()) {
std::ostringstream ss;
ss << "Invalid path to configure file: "
<< abs_configure_file;
throw std::runtime_error(ss.str());
}
if (SetCurrentDirectory(configure_dir.c_str()) == 0) {
std::ostringstream ss;
ss << "Unable to cd "<< configure_dir;
throw std::runtime_error(ss.str());
}
std::string path;
if (!get_environment_variable("PATH", path)) {
std::ostringstream ss;
ss << "Unable to grab the PATH environment variable";
throw std::runtime_error(ss.str());
}
path = sanitize_path_envvar(path_prefix + ';' + path);
if (SetEnvironmentVariable("PATH", path.c_str()) == 0) {
std::ostringstream ss;
ss << "Failed to set the PATH environment variable to:\n"
<< path << '\n';
throw std::runtime_error(ss.str());
}
// Even "start /WAIT /B sh.exe configure" returns
// before the script is done, so just invoke "sh" directly.
// Assumes that configure_file does not need quoting.
std::string const command = std::string("sh.exe ") + configure_file;
if (system(command.c_str()) != 0) {
std::ostringstream ss;
ss << "Failed to run: " << command;
throw std::runtime_error(ss.str());
}
}
} // namespace anon
//===========================================//
// //
// Below is the public interface to the .dll //
// //
//===========================================//
BOOL WINAPI DllMain(HANDLE /*hInst*/,
ULONG /*ul_reason_for_call*/,
LPVOID /*lpReserved*/)
{
return TRUE;
}
// Inserts code into "configure" to output "path_prefix" to lyxrc.defaults.
extern "C"
void __declspec(dllexport) set_path_prefix(HWND const /*hwndParent*/,
int const string_size,
char * const variables,
stack_t ** const stacktop)
{
EXDLL_INIT();
std::string const configure_file = pop_from_stack();
std::string const path_prefix = pop_from_stack();
if (configure_file.empty() || path_prefix.empty()) {
push_to_stack(-1);
return;
}
int result = 0;
try {
set_path_prefix(configure_file, path_prefix);
}
catch(std::exception const & ex) {
std::cerr << "ERROR: set_path_prefix:\n\t"
<< ex.what() << '\n';
result = -1;
}
push_to_stack(result);
}
// Creates the lyx.bat file in the LyX\bin folder.
extern "C"
void __declspec(dllexport) create_lyx_bat(HWND const /*hwndParent*/,
int const string_size,
char * const variables,
stack_t ** const stacktop)
{
EXDLL_INIT();
std::string const bin_dir = pop_from_stack();
std::string const lang = pop_from_stack();
if (bin_dir.empty() || lang.empty()) {
push_to_stack(-1);
return;
}
int result = 0;
try {
create_lyx_bat(bin_dir, lang);
}
catch(std::exception const & ex) {
std::cerr << "ERROR: create_lyx_bat:\n\t"
<< ex.what() << '\n';
result = -1;
}
push_to_stack(result);
}
// Creates the reLyX.bat file in the LyX\bin folder.
extern "C"
void __declspec(dllexport) create_relyx_bat(HWND const /*hwndParent*/,
int const string_size,
char * const variables,
stack_t ** const stacktop)
{
EXDLL_INIT();
std::string const bin_dir = pop_from_stack();
std::string const lang = pop_from_stack();
if (bin_dir.empty() || lang.empty()) {
push_to_stack(-1);
return;
}
int result = 0;
try {
create_relyx_bat(bin_dir, lang);
}
catch(std::exception const & ex) {
std::cerr << "ERROR: create_relyx_bat:\n\t"
<< ex.what() << '\n';
result = -1;
}
push_to_stack(result);
}
// Runs "sh configure" to generate things like lyxrc.defaults.
extern "C"
void __declspec(dllexport) run_configure(HWND const /*hwndParent*/,
int const string_size,
char * const variables,
stack_t ** const stacktop)
{
EXDLL_INIT();
std::string const configure_file = pop_from_stack();
std::string const path_prefix = pop_from_stack();
if (configure_file.empty() || path_prefix.empty()) {
push_to_stack(-1);
return;
}
int result = 0;
try {
run_configure(configure_file, path_prefix);
}
catch(std::exception const & ex) {
std::cerr << "ERROR: run_configure:\n\t"
<< ex.what() << '\n';
result = -1;
}
push_to_stack(result);
}
// Set an environment variable.
extern "C"
void __declspec(dllexport) set_env(HWND const /*hwndParent*/,
int const string_size,
char * const variables,
stack_t ** const stacktop)
{
EXDLL_INIT();
std::string const var_name = pop_from_stack();
std::string const var_value = pop_from_stack();
if (var_name.empty() || var_value.empty()) {
push_to_stack(-1);
return;
}
// Function returns a nonzero value on success.
int const result =
SetEnvironmentVariableA(var_name.c_str(), var_value.c_str()) ?
0 : -1;
push_to_stack(result);
}

View File

@ -1,807 +0,0 @@
; Lyx for Windows, NSIS v2 series installer script
; File lyx_installer.nsi
; This file is part of LyX, the document processor.
; http://www.lyx.org/
; Licence details can be found in the file COPYING or copy at
; http://www.lyx.org/about/license.php3
; Author Angus Leeming
; Author Uwe Stöhr
; Full author contact details are available in file CREDITS or copy at
; http://www.lyx.org/about/credits.php
; This script requires NSIS 2.06 and above
; http://nsis.sourceforge.net/
;--------------------------------
; Do a Cyclic Redundancy Check to make sure the installer
; was not corrupted by the download.
CRCCheck force
; Make the installer as small as possible.
SetCompressor /SOLID lzma
;--------------------------------
; You should need to change only these macros...
!define PRODUCT_NAME "LyX"
!define PRODUCT_VERSION "1.4.0"
!define PRODUCT_LICENSE_FILE "..\..\..\..\COPYING"
!define PRODUCT_SOURCEDIR "..\..\..\..\build\installprefix"
!define PRODUCT_EXE "$INSTDIR\bin\lyx.exe"
!define PRODUCT_BAT "$INSTDIR\bin\lyx.bat"
!define PRODUCT_EXT ".lyx"
!define PRODUCT_MIME_TYPE "application/lyx"
!define PRODUCT_UNINSTALL_EXE "$INSTDIR\uninstall.exe"
!define INSTALLER_EXE "lyx_setup_140.exe"
!define INSTALLER_ICON "..\icons\lyx_32x32.ico"
; Replaced by HKLM or HKCU depending on SetShellVarContext.
!define PRODUCT_ROOT_KEY "SHCTX"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\lyx.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
;--------------------------------
; Make some of the information above available to NSIS.
Name "${PRODUCT_NAME}"
OutFile "${INSTALLER_EXE}"
InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
;--------------------------------
!include "MUI.nsh"
!include "LogicLib.nsh"
!include "StrFunc.nsh"
!include "strtrim.nsh"
!include "download.nsh"
!include "lyx_utils.nsh"
; Grabbed from
; http://nsis.sourceforge.net/archive/viewpage.php?pageid=275
!include "is_user_admin.nsh"
; Grabbed from
; http://abiword.pchasm.org/source/cvs/abiword-cvs/abi/src/pkg/win/setup/NSISv2/abi_util_fileassoc.nsh
; Use the Abiword macros to help set up associations with the file extension.
; in the Registry.
!include "abi_util_fileassoc.nsh"
;--------------------------------
; Declare used functions
${StrStrAdv}
${StrLoc}
${StrNSISToIO}
${StrRep}
${StrTok}
${StrTrim}
${StrLTrim}
${StrRTrim}
${StrRTrimChar}
${ReadDownloadValues}
${EnableBrowseControls}
${SearchRegistry}
${DownloadEnter}
${DownloadLeave}
;--------------------------------
; Variables
Var MinSYSPath
Var DownloadMinSYS
Var PythonPath
Var DownloadPython
Var DoNotRequireMiKTeX
Var MiKTeXPath
Var DownloadMiKTeX
Var DoNotRequireGhostscript
Var GhostscriptPath
Var DownloadGhostscript
Var DoNotRequireImageMagick
Var ImageMagickPath
Var DownloadImageMagick
Var PDFViewerPath
Var PSViewerPath
Var PSViewerProg
Var DoNotInstallLyX
Var PathPrefix
Var CreateFileAssociations
Var CreateDesktopIcon
Var StartmenuFolder
Var ProductRootKey
Var LangName
Var LangCode
;--------------------------------
; Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
!define MUI_ABORTWARNING
!define MUI_ICON "${INSTALLER_ICON}"
!define MUI_UNICON "${INSTALLER_ICON}"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
Page custom DownloadMinSYS DownloadMinSYS_LeaveFunction
Page custom DownloadPython DownloadPython_LeaveFunction
Page custom DownloadMiKTeX DownloadMiKTeX_LeaveFunction
Page custom DownloadGhostscript DownloadGhostscript_LeaveFunction
Page custom DownloadImageMagick DownloadImageMagick_LeaveFunction
Page custom SummariseDownloads SummariseDownloads_LeaveFunction
; Show the license.
!insertmacro MUI_PAGE_LICENSE "${PRODUCT_LICENSE_FILE}"
; Specify the installation directory.
!insertmacro MUI_PAGE_DIRECTORY
; Specify LyX's menu language.
Page custom SelectMenuLanguage SelectMenuLanguage_LeaveFunction
; Define which components to install.
!insertmacro MUI_PAGE_COMPONENTS
; Specify where to install program shortcuts.
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!insertmacro MUI_PAGE_STARTMENU ${PRODUCT_NAME} $StartmenuFolder
; Watch the components being installed.
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_TEXT_LARGE
!define MUI_FINISHPAGE_TEXT "$(FinishPageMessage)"
!define MUI_FINISHPAGE_RUN_TEXT "$(FinishPageRun)"
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchProduct"
!insertmacro MUI_PAGE_FINISH
; The uninstaller.
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
; Languages
!insertmacro MUI_LANGUAGE "English" # first language is the default language
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Swedish"
!include "lyx_languages\english.nsh"
!include "lyx_languages\danish.nsh"
!include "lyx_languages\dutch.nsh"
!include "lyx_languages\french.nsh"
!include "lyx_languages\german.nsh"
!include "lyx_languages\italian.nsh"
!include "lyx_languages\polish.nsh"
!include "lyx_languages\spanish.nsh"
!include "lyx_languages\swedish.nsh"
LicenseData "$(LyXLicenseData)"
;--------------------------------
; Reserve Files
; These files should be inserted before other files in the data block
; Keep these lines before any File command
; Only for solid compression (by default, solid compression
; is enabled for BZIP2 and LZMA)
ReserveFile "io_download.ini"
ReserveFile "io_summary.ini"
!insertmacro MUI_RESERVEFILE_LANGDLL
ReserveFile "io_ui_language.ini"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
;--------------------------------
Section "!${PRODUCT_NAME}" SecCore
SectionIn RO
SectionEnd
Section /o "$(SecAllUsersTitle)" SecAllUsers
SetShellVarContext all
StrCpy $ProductRootKey "HKLM"
SectionEnd
Section "$(SecFileAssocTitle)" SecFileAssoc
StrCpy $CreateFileAssociations "true"
SectionEnd
Section "$(SecDesktopTitle)" SecDesktop
StrCpy $CreateDesktopIcon "true"
SectionEnd
; The '-' makes the section invisible.
; Sections are entered in order, so the settings above are all
; available to SecInstallation
Section "-Installation actions" SecInstallation
SetOverwrite on
SetOutPath "$INSTDIR"
File /r "${PRODUCT_SOURCEDIR}\Resources"
File /r "${PRODUCT_SOURCEDIR}\bin"
${if} "$PathPrefix" != ""
lyx_configure::set_path_prefix "$INSTDIR\Resources\configure" "$PathPrefix"
Pop $0
${if} $0 != 0
MessageBox MB_OK "$(ModifyingConfigureFailed)"
${endif}
${endif}
lyx_configure::create_lyx_bat "$INSTDIR\bin" "$LangCode"
Pop $0
${if} $0 != 0
MessageBox MB_OK "$(CreateCmdFilesFailed)"
${endif}
lyx_configure::run_configure "$INSTDIR\Resources\configure" "$PathPrefix"
Pop $0
${if} $0 != 0
MessageBox MB_OK "$(RunConfigureFailed)"
${endif}
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "${PRODUCT_EXE}"
WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "RootKey" "$ProductRootKey"
WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "${PRODUCT_UNINSTALL_EXE}"
WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "${PRODUCT_EXE}"
WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "StartMenu" "$SMPROGRAMS\$StartmenuFolder"
CreateDirectory "$SMPROGRAMS\$StartmenuFolder"
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\${PRODUCT_NAME}.lnk" "${PRODUCT_BAT}" "" "${PRODUCT_EXE}"
CreateShortCut "$SMPROGRAMS\$StartmenuFolder\Uninstall.lnk" "${PRODUCT_UNINSTALL_EXE}"
${if} $CreateDesktopIcon == "true"
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "${PRODUCT_BAT}" "" "${PRODUCT_EXE}"
${endif}
${if} $CreateFileAssociations == "true"
${CreateApplicationAssociation} \
"${PRODUCT_NAME}" \
"${PRODUCT_NAME}" \
"${PRODUCT_NAME} Document" \
"${PRODUCT_EXE},1" \
"${PRODUCT_BAT}"
${CreateFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}" "${PRODUCT_MIME_TYPE}"
${endif}
WriteUninstaller "${PRODUCT_UNINSTALL_EXE}"
SectionEnd
; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "$(SecCoreDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecAllUsers} "$(SecAllUsersDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssoc} "$(SecFileAssocDescription)"
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "$(SecDesktopDescription)"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
!define MUI_LANGDLL_ALWAYSSHOW
; This hook function is called internally by NSIS on installer startup
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "io_download.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "io_summary.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "io_ui_language.ini"
; Default settings
; These can be reset to "all" in section SecAllUsers.
SetShellVarContext current
StrCpy $ProductRootKey "HKCU"
; This can be reset to "true" in section SecDesktop.
StrCpy $CreateDesktopIcon "false"
StrCpy $CreateFileAssociations "false"
; If the user does *not* have administrator privileges,
; then make section SecAllUsers readonly.
Call IsUserAdmin
Pop $0
${if} $0 == "true"
!define ENABLE 0x00000001
SectionGetFlags ${SecAllUsers} $0
IntOp $0 $0 | ${ENABLE}
SectionSetFlags ${SecAllUsers} $0
!undef ENABLE
${else}
!define READ_ONLY 0x00000010
SectionGetFlags ${SecAllUsers} $0
IntOp $0 $0 | ${READ_ONLY}
SectionSetFlags ${SecAllUsers} $0
!undef READ_ONLY
${endif}
Call SearchMinSYS
Call SearchPython
Call SearchMiKTeX
Call SearchGhostscript
Call SearchImageMagick
Call SearchPDFViewer
Call SearchPSViewer
ClearErrors
FunctionEnd
;--------------------------------
Function LaunchProduct
lyx_configure::set_env LANG $LangCode
Exec ${PRODUCT_EXE}
FunctionEnd
;--------------------------------
; Sets the value of the global $MinSYSPath variable.
Function SearchMinSYS
; This function manipulates the registers $0-$3,
; so push their current content onto the stack.
Push $0
Push $1
Push $2
Push $3
; Search the registry for the MinSYS uninstaller.
; If successful, put its location in $2.
StrCpy $3 "Software\Microsoft\Windows\CurrentVersion\Uninstall"
StrCpy $2 ""
StrCpy $0 0
loop:
EnumRegKey $1 HKLM "$3" $0
${if} $1 == ""
Goto done
${endif}
${StrLoc} $2 "$1" "MSYS-1.0" "<"
${if} $2 > 0
StrCpy $2 "$3\$1"
Goto done
${else}
StrCpy $2 ""
${endif}
IntOp $0 $0 + 1
Goto loop
done:
${SearchRegistry} \
$MinSYSPath \
"$2" \
"Inno Setup: App Path" \
"" \
"\bin"
; Return the $0, $1, $2 and $2 registers to their original state
Pop $3
Pop $2
Pop $1
Pop $0
FunctionEnd
Function DownloadMinSYS
StrCpy $DownloadMinSYS "0"
${DownloadEnter} \
$MinSYSPath \
0 \
"$(MinSYSDownloadLabel)" \
"$(MinSYSFolderLabel)" \
"$(MinSYSHeader)" \
"$(MinSYSDescription)"
FunctionEnd
Function DownloadMinSYS_LeaveFunction
; This function manipulates the $0 register
; so push its current content onto the stack.
Push $0
${DownloadLeave} \
$0 \
$DownloadMinSYS \
$MinSYSPath \
"http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=82721&release_id=158803" \
"$(EnterMinSYSFolder)" \
"sh.exe" \
"$(InvalidMinSYSFolder)"
; Return the $0 register to its original state
Pop $0
FunctionEnd
;--------------------------------
; Sets the value of the global $PythonPath variable.
Function SearchPython
${SearchRegistry} \
$PythonPath \
"Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe" \
"" \
"\Python.exe" \
""
FunctionEnd
Function DownloadPython
StrCpy $DownloadPython "0"
${DownloadEnter} \
$PythonPath \
0 \
"$(PythonDownloadLabel)" \
"$(PythonFolderLabel)" \
"$(PythonHeader)" \
"$(PythonDescription)"
FunctionEnd
Function DownloadPython_LeaveFunction
; This function manipulates the $0 register
; so push its current content onto the stack.
Push $0
${DownloadLeave} \
$0 \
$DownloadPython \
$PythonPath \
"http://www.python.org/download/" \
"$(EnterPythonFolder)" \
"Python.exe" \
"$(InvalidPythonFolder)"
; Return the $0 register to its original state
Pop $0
FunctionEnd
;--------------------------------
; Sets the value of the global $MiKTeXPath variable.
Function SearchMiKTeX
${SearchRegistry} \
$MiKTeXPath \
"Software\MiK\MiKTeX\CurrentVersion\MiKTeX" \
"Install Root" \
"" \
"\miktex\bin"
FunctionEnd
Function DownloadMiKTeX
StrCpy $DoNotRequireMiKTeX "1"
StrCpy $DownloadMiKTeX "0"
${DownloadEnter} \
$MiKTeXPath \
1 \
"$(MiKTeXDownloadLabel)" \
"$(MiKTeXFolderLabel)" \
"$(MiKTeXHeader)" \
"$(MiKTeXDescription)"
FunctionEnd
Function DownloadMiKTeX_LeaveFunction
${DownloadLeave} \
$DoNotRequireMiKTeX \
$DownloadMiKTeX \
$MiKTeXPath \
"http://www.miktex.org/setup.html" \
"$(EnterMiKTeXFolder)" \
"latex.exe" \
"$(InvalidMiKTeXFolder)"
FunctionEnd
;--------------------------------
; Sets the value of the global $GhostscriptPath variable.
Function SearchGhostscript
; This function manipulates the $0 and $1 registers,
; so push their current content onto the stack.
Push $0
Push $1
; Find which version of ghostscript, if any, is installed.
; Store this value in $0.
StrCpy $0 ""
EnumRegKey $1 HKLM "Software\AFPL Ghostscript" 0
${if} $1 != ""
StrCpy $0 "Software\AFPL Ghostscript\$1"
${else}
EnumRegKey $1 HKLM "Software\GPL Ghostscript" 0
${if} $1 != ""
StrCpy $0 "Software\GPL Ghostscript\$1"
${endif}
${endif}
${SearchRegistry} \
$GhostscriptPath \
"$0" \
"GS_DLL" \
"\gsdll32.dll" \
""
; Return the $0 and $1 registers to their original states
Pop $1
Pop $0
FunctionEnd
Function DownloadGhostscript
StrCpy $DoNotRequireGhostscript "1"
StrCpy $DownloadGhostscript "0"
; Find which version of ghostscript, if any, is installed.
EnumRegKey $1 HKLM "Software\AFPL Ghostscript" 0
${if} $1 == ""
EnumRegKey $1 HKLM "Software\GPL Ghostscript" 0
StrCpy $2 "True"
${endif}
${if} $1 != ""
${if} $2 == "True"
StrCpy $0 "Software\GPL Ghostscript\$1"
${else}
StrCpy $0 "Software\AFPL Ghostscript\$1"
${endif}
${else}
StrCpy $0 ""
${endif}
${DownloadEnter} \
$GhostscriptPath \
1 \
"$(GhostscriptDownloadLabel)" \
"$(GhostscriptFolderLabel)" \
"$(GhostscriptHeader)" \
"$(GhostscriptDescription)"
FunctionEnd
Function DownloadGhostscript_LeaveFunction
${DownloadLeave} \
$DoNotRequireGhostscript \
$DownloadGhostscript \
$GhostscriptPath \
"http://www.cs.wisc.edu/~ghost/doc/AFPL/index.htm" \
"$(EnterGhostscriptFolder)" \
"gswin32c.exe" \
"$(InvalidGhostscriptFolder)"
FunctionEnd
;--------------------------------
; Sets the value of the global $ImageMagickPath variable.
Function SearchImageMagick
${SearchRegistry} \
$ImageMagickPath \
"Software\ImageMagick\Current" \
"BinPath" \
"" \
""
FunctionEnd
Function DownloadImageMagick
StrCpy $DoNotRequireImageMagick "1"
StrCpy $DownloadImageMagick "0"
${DownloadEnter} \
$ImageMagickPath \
1 \
"$(ImageMagickDownloadLabel)" \
"$(ImageMagickFolderLabel)" \
"$(ImageMagickHeader)" \
"$(ImageMagickDescription)"
FunctionEnd
Function DownloadImageMagick_LeaveFunction
${DownloadLeave} \
$DoNotRequireImageMagick \
$DownloadImageMagick \
$ImageMagickPath \
"http://www.imagemagick.org/script/binary-releases.php" \
"$(EnterImageMagickFolder)" \
"convert.exe" \
"$(InvalidImageMagickFolder)"
FunctionEnd
;--------------------------------
; Sets the value of the global $PDFViewerPath variable.
Function SearchPDFViewer
; test if a pdf-viewer is installed, only test for Acrobat, Adobe Reader (AroRD32), and GSview32
StrCpy $PDFViewerPath ""
ReadRegStr $PDFViewerPath HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\Acrobat.exe" "Path"
${if} $PDFViewerPath == ""
ReadRegStr $PDFViewerPath HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe" "Path"
${endif}
${if} $PDFViewerPath == ""
ReadRegStr $PDFViewerPath HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\gsview32.exe" "Path"
${endif}
StrCpy $0 $PDFViewerPath "" -1 ;remove the "\" at the end
${if} $0 == "\"
StrCpy $PDFViewerPath $PDFViewerPath -1
${endif}
FunctionEnd
;--------------------------------
Function SearchPSViewer
; This function manipulates the $0 register,
; so push its current content onto the stack.
Push $0
; test if a ps-viewer is installed, only check for GSview32
StrCpy $PSViewerPath ""
ReadRegStr $PSViewerPath HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\gsview32.exe" "Path"
; Failed to find anything that way. Try another.
${if} $PSViewerPath == ""
ReadRegStr $PSViewerProg HKCR "psfile\shell\open\command" ""
; Extract the first quoted word.
${StrTok} $0 "$PSViewerProg" '"' '1' '0'
${if} $0 != ""
StrCpy $PSViewerProg $0
${endif}
${StrTrim} $PSViewerProg "$PSViewerProg"
; Split into <path,exe> pair
${StrStrAdv} $PSViewerPath $PSViewerProg "\" "<" "<" "0" "0" "0"
${StrStrAdv} $PSViewerProg $PSViewerProg "\" "<" ">" "0" "0" "0"
${endif}
; Return the $0 register to its original states
Pop $0
FunctionEnd
;--------------------------------
Function SummariseDownloads
StrCpy $PathPrefix ""
${if} $MinSYSPath != ""
StrCpy $PathPrefix "$PathPrefix;$MinSYSPath"
${endif}
${if} $PythonPath != ""
StrCpy $PathPrefix "$PathPrefix;$PythonPath"
${endif}
${if} $MiKTeXPath != ""
StrCpy $PathPrefix "$PathPrefix;$MiKTeXPath"
${endif}
${if} $GhostscriptPath != ""
StrCpy $PathPrefix "$PathPrefix;$GhostscriptPath"
${endif}
${if} $ImageMagickPath != ""
StrCpy $PathPrefix "$PathPrefix;$ImageMagickPath"
${endif}
; Remove the leading ';'
StrCpy $PathPrefix "$PathPrefix" "" 1
IntOp $DoNotInstallLyX $DownloadMinSYS + $DownloadPython
IntOp $DoNotInstallLyX $DoNotInstallLyX + $DownloadMiKTeX
IntOp $DoNotInstallLyX $DoNotInstallLyX + $DownloadGhostscript
IntOp $DoNotInstallLyX $DoNotInstallLyX + $DownloadImageMagick
${if} "$DoNotInstallLyX" == 1
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_summary.ini" "Field 1" "Text" "$(SummaryPleaseInstall)"
${else}
${StrNSISToIO} $0 '$PathPrefix'
${StrRep} $0 "$0" ";" "\r\n"
StrCpy $0 "$(SummaryPathPrefix)\r\n\r\n$0"
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_summary.ini" "Field 1" "Text" "$0"
${endif}
!insertmacro MUI_HEADER_TEXT "$(SummaryTitle)" ""
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "io_summary.ini"
FunctionEnd
Function SummariseDownloads_LeaveFunction
${if} "$DoNotInstallLyX" == 1
Quit
${endif}
FunctionEnd
;--------------------------------
Function SelectMenuLanguage
StrCpy $LangName ""
;tranlate NSIS's language code to the language name; macro from lyx_utils.nsh
!insertmacro TranslateLangCode $LangName $Language
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_ui_language.ini" "Field 1" "State" "$(UILanguageAvailableLanguages)"
!insertmacro MUI_INSTALLOPTIONS_WRITE "io_ui_language.ini" "Field 2" "State" "$LangName"
!insertmacro MUI_HEADER_TEXT "$(UILangageTitle)" "$(UILangageDescription)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "io_ui_language.ini"
FunctionEnd
;--------------------------------
Function SelectMenuLanguage_LeaveFunction
!insertmacro MUI_INSTALLOPTIONS_READ $LangName "io_ui_language.ini" "Field 2" "State"
;Get the language code; macro from lyx_utils.nsh
StrCpy $LangCode ""
!insertmacro GetLangCode $LangCode $LangName
FunctionEnd
;--------------------------------
; The Uninstaller
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
; Ascertain whether the user has sufficient privileges to uninstall.
SetShellVarContext current
ReadRegStr $0 HKCU "${PRODUCT_UNINST_KEY}" "RootKey"
${if} $0 == ""
ReadRegStr $0 HKLM "${PRODUCT_UNINST_KEY}" "RootKey"
${if} $0 == ""
MessageBox MB_OK "$(UnNotInRegistryLabel)"
${endif}
${endif}
${if} $0 == "HKLM"
Call un.IsUserAdmin
Pop $0
${if} $0 == "true"
SetShellVarContext all
${else}
MessageBox MB_OK "$(UnNotAdminLabel)"
Abort
${endif}
${endif}
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UnReallyRemoveLabel)" IDYES +2
Abort
FunctionEnd
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(UnRemoveSuccessLabel)"
FunctionEnd
Section Uninstall
RMDir /r $INSTDIR
ReadRegStr $0 ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "StartMenu"
RMDir /r "$0"
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
DeleteRegKey "HKCU" "${PRODUCT_UNINST_KEY}"
DeleteRegKey ${PRODUCT_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
DeleteRegKey HKCR "Applications\lyx.exe"
DeleteRegKey HKCR "Applications\lyx.bat"
; remove extension .lyx
${RemoveFileAssociation} "${PRODUCT_EXT}" "${PRODUCT_NAME}"
DeleteRegKey HKCR "${PRODUCT_NAME}"
SetAutoClose true
SectionEnd
; eof

View File

@ -1,80 +0,0 @@
!ifndef _LYX_LANGUAGES_DANISH_NSH_
!define _LYX_LANGUAGES_DANISH_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_DANISH}
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Installer til alle brugere?"
LangString SecFileAssocTitle "${LYX_LANG}" "Fil-associationer"
LangString SecDesktopTitle "${LYX_LANG}" "Skrivebordsikon"
LangString SecCoreDescription "${LYX_LANG}" "Filerne til ${PRODUCT_NAME}."
LangString SecAllUsersDescription "${LYX_LANG}" "Installer til alle brugere, eller kun den aktuelle bruger. (kræver administrator-rettigheder.)"
LangString SecFileAssocDescription "${LYX_LANG}" "Opret association mellem LyX og .lyx filer."
LangString SecDesktopDescription "${LYX_LANG}" "Et ${PRODUCT_NAME} ikon på skrivebordet"
LangString ModifyingConfigureFailed "${LYX_LANG}" "Forsøget på at indstille 'path_prefix' i konfigurationen mislykkedes"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Det lykkedes ikke at oprette lyx.cms og reLyx.cmd"
LangString RunConfigureFailed "${LYX_LANG}" "Mislykket forsøg på at afvikle konfigurations-scriptet"
LangString FinishPageMessage "${LYX_LANG}" "Tillykke!! LyX er installeret."
LangString FinishPageRun "${LYX_LANG}" "Start LyX"
LangString DownloadPageField2 "${LYX_LANG}" "&Installer ikke"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS (www.mingw.org/msys.shtml) er et værktøj som ${PRODUCT_NAME} skal buge til at afvikle en række scripts."
LangString EnterMinSYSFolder "${LYX_LANG}" "Angiv stien til den mappe, som indeholder sh.exe"
LangString InvalidMinSYSFolder "${LYX_LANG}" "Kunne ikke finde sh.exe"
LangString MinSYSDownloadLabel "${LYX_LANG}" "&Hent MinSYS"
LangString MinSYSFolderLabel "${LYX_LANG}" "&Mappen som indeholder sh.exe"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "Python er et script-sprog (www.python.org) som skal være installeret. Ellers er der et antal scripts som ${PRODUCT_NAME} ikke kan afvikle."
LangString EnterPythonFolder "${LYX_LANG}" "Angiv stien til den mappe som indeholder Python.exe"
LangString InvalidPythonFolder "${LYX_LANG}" "Kunne ikke finde Python.exe"
LangString PythonDownloadLabel "${LYX_LANG}" "&hent Python"
LangString PythonFolderLabel "${LYX_LANG}" "&Mappen som indeholder Python.exe"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) er en ajourført TeX implementering til Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "Angiv stien til mappen som indeholder latex.exe"
LangString InvalidMiKTeXFolder "${LYX_LANG}" "Kunne ikke finde latex.exe"
LangString MiKTeXDownloadLabel "${LYX_LANG}" "&Hent MiKTeX"
LangString MiKTeXFolderLabel "${LYX_LANG}" "&Mappen som indeholder latex.exe"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "ImageMagick (www.imagemagick.org/script/index.php) bruges til at konvertere grafik-filer til forskellige slutformater."
LangString EnterImageMagickFolder "${LYX_LANG}" "Angiv stien til mappen som indeholder convert.exe"
LangString InvalidImageMagickFolder "${LYX_LANG}" "Kunne ikke finde convert.exe"
LangString ImageMagickDownloadLabel "${LYX_LANG}" "&Hent ImageMagick"
LangString ImageMagickFolderLabel "${LYX_LANG}" "&Mappen som indeholder convert.exe"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (http://www.cs.wisc.edu/~ghost/) bruges til at konvertere billeder til og fra PostScript."
LangString EnterGhostscriptFolder "${LYX_LANG}" "Angiv stien til mappen som indeholder gswin32c.exe"
LangString InvalidGhostscriptFolder "${LYX_LANG}" "Kunne ikke finde gswin32c.exe"
LangString GhostscriptDownloadLabel "${LYX_LANG}" "&Hent Ghostscript"
LangString GhostscriptFolderLabel "${LYX_LANG}" "&Mappen som indeholder gswin32c.exe"
LangString SummaryTitle "${LYX_LANG}" "Software - sammendrag"
LangString SummaryPleaseInstall "${LYX_LANG}" "Installer de filer du har downloaded, og kør så LyX's installationsprogram igen."
LangString SummaryPathPrefix "${LYX_LANG}" "Jeg tilføjer en 'path_prefix' streng til 'lyxrc.defaults' som indeholder:"
LangString UILangageTitle "${LYX_LANG}" "Sprogvalg for LyXs brugergrænseflade"
LangString UILangageDescription "${LYX_LANG}" "Bruges til menuer, beskeder etc."
LangString UILanguageAvailableLanguages "${LYX_LANG}" " Tilgængelige sprog "
LangString UnNotInRegistryLabel "${LYX_LANG}" "Kunne ikke finde $(^Name) i registreringsdatabsen$\r$\nGenvejene på skrivebordet og i Start-menuen bliver ikke fjernet"
LangString UnNotAdminLabel "${LYX_LANG}" "Beklager! Du skal have administrator-rettigheder$\r$\nfor at afinstallere$(^Name)."
LangString UnReallyRemoveLabel "${LYX_LANG}" "Er du sikker på, at du vil slette $(^Name) og alle tilhørende komponenter?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "$(^Name) er blevet fjernet fra din computer."
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_DANISH_NSH_

View File

@ -1,80 +0,0 @@
!ifndef _LYX_LANGUAGES_DUTCH_NSH_
!define _LYX_LANGUAGES_DUTCH_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_DUTCH}
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Installeer voor alle gebruikers?"
LangString SecFileAssocTitle "${LYX_LANG}" "Bestand associaties"
LangString SecDesktopTitle "${LYX_LANG}" "Bureaublad pictogram"
LangString SecCoreDescription "${LYX_LANG}" "De ${PRODUCT_NAME} bestanden."
LangString SecAllUsersDescription "${LYX_LANG}" "Installeer voor alle gebruikers of uitsluitend de huidige gebruiker. (Systeembeheer rechten zijn noodzakelijk)"
LangString SecFileAssocDescription "${LYX_LANG}" "Associeer het LyX programma met de .lyx extensie."
LangString SecDesktopDescription "${LYX_LANG}" "Een ${PRODUCT_NAME} pictogram op het Bureaublad."
LangString ModifyingConfigureFailed "${LYX_LANG}" "'path_prefix' kon niet worden geregistreerd tijdens de configuratie"
LangString CreateCmdFilesFailed "${LYX_LANG}" "lyx.cmd en reLyX.cmd konden niet worden aangemaakt"
LangString RunConfigureFailed "${LYX_LANG}" "Mislukte configuratie poging"
LangString FinishPageMessage "${LYX_LANG}" "LyX is nu geinstalleerd. Sommige gebruikers hebben echter gemeld dat het configuratie script niet is uitgevoerd waardoor LyX afbreekt met de melding dat het bestand textclass.lst ontbreekt. Ga, om dit te herstellen, in de commando prompt naar het LyX/Resources pad en voer het commando 'sh configure' uit."
LangString FinishPageRun "${LYX_LANG}" "Start LyX"
LangString DownloadPageField2 "${LYX_LANG}" "&Niet installeren"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS (een minimale Unix script omgeving, www.mingw.org/msys.shtml) wordt gebruikt door ${PRODUCT_NAME} om een aantal taken uit te voeren."
LangString EnterMinSYSFolder "${LYX_LANG}" "Voer het pad in naar de map met sh.exe"
LangString InvalidMinSYSFolder "${LYX_LANG}" "sh.exe is niet gevonden"
LangString MinSYSDownloadLabel "${LYX_LANG}" "&Haal MinSYS op"
LangString MinSYSFolderLabel "${LYX_LANG}" "&Map met sh.exe"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "Python (een script taal, www.python.org) moet worden geinstalleerd, anders is ${PRODUCT_NAME} niet in staat een aantal taken uit te voeren."
LangString EnterPythonFolder "${LYX_LANG}" "Voer het pad in naar de map met Python.exe"
LangString InvalidPythonFolder "${LYX_LANG}" "Python.exe is niet gevonden"
LangString PythonDownloadLabel "${LYX_LANG}" "&Haal Python op"
LangString PythonFolderLabel "${LYX_LANG}" "&Map met Python.exe"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) is een up-to-date TeX implementatie voor Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "Voer het pad in naar de map met latex.exe"
LangString InvalidMiKTeXFolder "${LYX_LANG}" "latex.exe is niet gevonden"
LangString MiKTeXDownloadLabel "${LYX_LANG}" "&Haal MiKTeX op"
LangString MiKTeXFolderLabel "${LYX_LANG}" "&Map met latex.exe"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "ImageMagick (www.imagemagick.org/script/index.php) kan worden gebruikt om grafische bestanden te converteren (afhankelijk van gewenste output)."
LangString EnterImageMagickFolder "${LYX_LANG}" "Voer het pad in naar de map met convert.exe"
LangString InvalidImageMagickFolder "${LYX_LANG}" "convert.exe is niet gevonden"
LangString ImageMagickDownloadLabel "${LYX_LANG}" "&Haal ImageMagick op"
LangString ImageMagickFolderLabel "${LYX_LANG}" "&Map met convert.exe"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (http://www.cs.wisc.edu/~ghost/) wordt gebruikt om afbeeldingen van/naar PostScript te converteren."
LangString EnterGhostscriptFolder "${LYX_LANG}" "Voer het pad in naar de map met gswin32c.exe"
LangString InvalidGhostscriptFolder "${LYX_LANG}" "gswin32c.exe is niet gevonden"
LangString GhostscriptDownloadLabel "${LYX_LANG}" "&Haal Ghostscript op"
LangString GhostscriptFolderLabel "${LYX_LANG}" "&Map met gswin32c.exe"
LangString SummaryTitle "${LYX_LANG}" "Software samenvatting"
LangString SummaryPleaseInstall "${LYX_LANG}" "Installeer de opgehaalde bestanden en start vervolgens het LyX installatie programma nogmaals om de installatie af te ronden."
LangString SummaryPathPrefix "${LYX_LANG}" "Ik voeg een 'path_prefix' tekst aan 'lyxrc.defaults' toe met:"
LangString UILangageTitle "${LYX_LANG}" "De taal van LyX's interface"
LangString UILangageDescription "${LYX_LANG}" "als gebruikt voor menu's, waarschuwingen, etc."
LangString UILanguageAvailableLanguages "${LYX_LANG}" " beschikbare talen "
LangString UnNotInRegistryLabel "${LYX_LANG}" "$(^Name) is niet gevonden in het Windows register$\r$\nSnelkoppelingen op het Bureaublad en in het Start Menu worden niet verwijderd."
LangString UnNotAdminLabel "${LYX_LANG}" "Sorry! U heeft systeembeheer rechten nodig$\r$\nom $(^Name) te verwijderen."
LangString UnReallyRemoveLabel "${LYX_LANG}" "Weet u zeker dat u $(^Name) en alle componenten volledig wil verwijderen van deze computer?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "$(^Name) was successvol verwijderd van uw computer."
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_DUTCH_NSH_

View File

@ -1,80 +0,0 @@
!ifndef _LYX_LANGUAGES_ENGLISH_NSH_
!define _LYX_LANGUAGES_ENGLISH_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_ENGLISH}
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Install for all users?"
LangString SecFileAssocTitle "${LYX_LANG}" "File associations"
LangString SecDesktopTitle "${LYX_LANG}" "Desktop icon"
LangString SecCoreDescription "${LYX_LANG}" "The ${PRODUCT_NAME} files."
LangString SecAllUsersDescription "${LYX_LANG}" "Install for all users or just the current user. (Requires Administrator privileges.)"
LangString SecFileAssocDescription "${LYX_LANG}" "Create associations between the executable and the .lyx extension."
LangString SecDesktopDescription "${LYX_LANG}" "A ${PRODUCT_NAME} icon on the desktop."
LangString ModifyingConfigureFailed "${LYX_LANG}" "Failed attempting to set 'path_prefix' in the configure script"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Failed attempting to create lyx.cmd and reLyX.cmd"
LangString RunConfigureFailed "${LYX_LANG}" "Failed attempting to execute the configure script"
LangString FinishPageMessage "${LYX_LANG}" "LyX should now be installed. However, some of our users report that the configure script fails to run and, as a result, LyX fails to start, reporting a missing textclass.lst file. To fix, run the command: 'sh configure' from the LyX/Resources directory."
LangString FinishPageRun "${LYX_LANG}" "Launch LyX"
LangString DownloadPageField2 "${LYX_LANG}" "&Do not install"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS is a minimal unix scripting environment (www.mingw.org/msys.shtml) which ${PRODUCT_NAME} needs to run a number of scripts."
LangString EnterMinSYSFolder "${LYX_LANG}" "Please input the path to the folder containing sh.exe"
LangString InvalidMinSYSFolder "${LYX_LANG}" "Unable to find sh.exe"
LangString MinSYSDownloadLabel "${LYX_LANG}" "&Download MinSYS"
LangString MinSYSFolderLabel "${LYX_LANG}" "&Folder containing sh.exe"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "The Python scripting language (www.python.org) must be installed or ${PRODUCT_NAME} will be unable to run a number of scripts."
LangString EnterPythonFolder "${LYX_LANG}" "Please input the path to the folder containing Python.exe"
LangString InvalidPythonFolder "${LYX_LANG}" "Unable to find Python.exe"
LangString PythonDownloadLabel "${LYX_LANG}" "&Download Python"
LangString PythonFolderLabel "${LYX_LANG}" "&Folder containing Python.exe"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) is an up-to-date TeX implementation for Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "Please input the path to the folder containing latex.exe"
LangString InvalidMiKTeXFolder "${LYX_LANG}" "Unable to find latex.exe"
LangString MiKTeXDownloadLabel "${LYX_LANG}" "&Download MiKTeX"
LangString MiKTeXFolderLabel "${LYX_LANG}" "&Folder containing latex.exe"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "The ImageMagick tools (www.imagemagick.org/script/index.php) can be used to convert graphics files to whatever output format is needed."
LangString EnterImageMagickFolder "${LYX_LANG}" "Please input the path to the folder containing convert.exe"
LangString InvalidImageMagickFolder "${LYX_LANG}" "Unable to find convert.exe"
LangString ImageMagickDownloadLabel "${LYX_LANG}" "&Download ImageMagick"
LangString ImageMagickFolderLabel "${LYX_LANG}" "&Folder containing convert.exe"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (www.cs.wisc.edu/~ghost/) is used to convert images to/from PostScript."
LangString EnterGhostscriptFolder "${LYX_LANG}" "Please input the path to the folder containing gswin32c.exe"
LangString InvalidGhostscriptFolder "${LYX_LANG}" "Unable to find gswin32c.exe"
LangString GhostscriptDownloadLabel "${LYX_LANG}" "&Download Ghostscript"
LangString GhostscriptFolderLabel "${LYX_LANG}" "&Folder containing gswin32c.exe"
LangString SummaryTitle "${LYX_LANG}" "Software summary"
LangString SummaryPleaseInstall "${LYX_LANG}" "Please install your downloaded files and then run LyX's installer once again."
LangString SummaryPathPrefix "${LYX_LANG}" "I shall add a 'path_prefix' string to 'lyxrc.defaults' containing:"
LangString UILangageTitle "${LYX_LANG}" "The language of LyX's interface"
LangString UILangageDescription "${LYX_LANG}" "As used for menus, messages, etc."
LangString UILanguageAvailableLanguages "${LYX_LANG}" " Available Languages "
LangString UnNotInRegistryLabel "${LYX_LANG}" "Unable to find $(^Name) in the registry$\r$\nShortcuts on the desktop and in the Start Menu will not be removed."
LangString UnNotAdminLabel "${LYX_LANG}" "Sorry! You must have administrator privileges$\r$\nto uninstall $(^Name)."
LangString UnReallyRemoveLabel "${LYX_LANG}" "Are you sure you want to completely remove $(^Name) and all of its components?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "$(^Name) was successfully removed from your computer."
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_ENGLISH_NSH_

View File

@ -1,81 +0,0 @@
!ifndef _LYX_LANGUAGES_FRENCH_NSH_
!define _LYX_LANGUAGES_FRENCH_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_FRENCH}
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Installer pour tous les utilisateurs ?"
LangString SecFileAssocTitle "${LYX_LANG}" "Associations de fichiers"
LangString SecDesktopTitle "${LYX_LANG}" "Icône du bureau"
LangString SecCoreDescription "${LYX_LANG}" "Les fichiers ${PRODUCT_NAME}"
LangString SecAllUsersDescription "${LYX_LANG}" "Installer pour tous les utilisateurs (nécessite les droits d'administrateur), ou seulement pour l'utilisateur courant ?."
LangString SecFileAssocDescription "${LYX_LANG}" "Crée les associations entre l'exécutable et le suffixe .lyx."
LangString SecDesktopDescription "${LYX_LANG}" "Une icône ${PRODUCT_NAME} sur le bureau."
LangString ModifyingConfigureFailed "${LYX_LANG}" "Échec de l'allocation 'path_prefix' lors de la configuration."
LangString CreateCmdFilesFailed "${LYX_LANG}" "Échec de la création des fichiers lyx.cmd et reLyX.cmd"
LangString RunConfigureFailed "${LYX_LANG}" "Échec de la tentative de configuration initiale de LyX."
LangString FinishPageMessage "${LYX_LANG}" "LyX devrait être installé. Cependant, quelques utilisateurs ont signalé que le script de configuration échouait; en conséquence, LyX refuse de démarrer avec un message indiquant l'absence du fichier textclass.lst. Pour rectifier l'installation, exécuter 'sh configure' depuis le répertoire LyX/Resources."
LangString FinishPageRun "${LYX_LANG}" "Démarrer LyX"
LangString DownloadPageField2 "${LYX_LANG}" "&Ne pas installer"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS est un environnement minimal pour gérer des commandes (www.mingw.org/msys.shtml) dont ${PRODUCT_NAME} a besoin pour ses traitements."
LangString EnterMinSYSFolder "${LYX_LANG}" "Merci de saisir le chemin conduisant au répertoire où se trouve sh.exe"
LangString InvalidMinSYSFolder "${LYX_LANG}" "sh.exe introuvable"
LangString MinSYSDownloadLabel "${LYX_LANG}" "&Télécharger MinSYS"
LangString MinSYSFolderLabel "${LYX_LANG}" "&Répertoire contenant sh.exe"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "Le langage de commandes Python (www.python.org) doit être installé ou ${PRODUCT_NAME} ne pourra pas exécuter un certain nombre de commandes."
LangString EnterPythonFolder "${LYX_LANG}" "Merci de saisir le chemin conduisant au répertoire où se trouve Python.exe"
LangString InvalidPythonFolder "${LYX_LANG}" "Python.exe introuvable"
LangString PythonDownloadLabel "${LYX_LANG}" "&Télécharger Python"
LangString PythonFolderLabel "${LYX_LANG}" "&Répertoire contenant Python.exe"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) est une distribution moderne de TeX pour Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "Merci de saisir le chemin conduisant au répertoire où se trouve latex.exe"
LangString InvalidMiKTeXFolder "${LYX_LANG}" "latex.exe introuvable"
LangString MiKTeXDownloadLabel "${LYX_LANG}" "&Télécharger MiKTeX"
LangString MiKTeXFolderLabel "${LYX_LANG}" "&Répertoire contenant latex.exe"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "Les outils graphiques de ImageMagick (www.imagemagick.org/script/index.php) peuvent être utilisés pour convertir les fichiers graphiques dans n'importe quel format nécessaire."
LangString EnterImageMagickFolder "${LYX_LANG}" "Merci de saisir le chemin conduisant au répertoire où se trouve convert.exe"
LangString InvalidImageMagickFolder "${LYX_LANG}" "convert.exe introuvable"
LangString ImageMagickDownloadLabel "${LYX_LANG}" "&Télécharger ImageMagick"
LangString ImageMagickFolderLabel "${LYX_LANG}" "&Répertoire contenant convert.exe"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (http://www.cs.wisc.edu/~ghost/) est utilisé pour convertir les graphiques depuis/vers PostScript."
LangString EnterGhostscriptFolder "${LYX_LANG}" "Merci de saisir le chemin conduisant au répertoire où se trouve gswin32c.exe"
LangString InvalidGhostscriptFolder "${LYX_LANG}" "gswin32c.exe introuvable"
LangString GhostscriptDownloadLabel "${LYX_LANG}" "&Télécharger Ghostscript"
LangString GhostscriptFolderLabel "${LYX_LANG}" "&Répertoire contenant gswin32c.exe"
LangString SummaryTitle "${LYX_LANG}" "Résumé d'installation"
LangString SummaryPleaseInstall "${LYX_LANG}" "Merci d'installer les fichiers téléchargés, puis d'exécuter de nouveau l'installation de LyX."
LangString SummaryPathPrefix "${LYX_LANG}" "Durant l'installation, une chaîne de caractères 'path_prefix' sera ajoutée à 'lyxrc.defaults', elle contiendra :"
LangString UILangageTitle "${LYX_LANG}" "Le langage de l'interface de LyX"
LangString UILangageDescription "${LYX_LANG}" "Tel qu'il est utilisé pour les menus, messages, etc."
LangString UILanguageAvailableLanguages "${LYX_LANG}" " Langages disponibles"
LangString UnNotInRegistryLabel "${LYX_LANG}" "$(^Name) introuvable dans le base des registres. $\r$\nLes raccourcis sur le bureau et dans le menu de démarrage ne seront pas supprimés."
LangString UnNotAdminLabel "${LYX_LANG}" "Désolé ! Vous devez avoir les droits d'administration$\r$\npour installer$(^Name)."
LangString UnReallyRemoveLabel "${LYX_LANG}" "Êtes vous sûr(e) de vouloir supprimer complètement $(^Name) et tous ses composants ?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "$(^Name) supprimé de votre ordinateur avec succès."
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_FRENCH_NSH_

View File

@ -1,80 +0,0 @@
!ifndef _LYX_LANGUAGES_GERMAN_NSH_
!define _LYX_LANGUAGES_GERMAN_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_GERMAN}
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Für alle Nutzer installieren?"
LangString SecFileAssocTitle "${LYX_LANG}" "Dateizuordnungen"
LangString SecDesktopTitle "${LYX_LANG}" "Desktopsymbol"
LangString SecCoreDescription "${LYX_LANG}" "Das Programm ${PRODUCT_NAME}."
LangString SecAllUsersDescription "${LYX_LANG}" "Für alle Nutzer oder nur für den aktuellen Nutzer installieren. (Dazu werden Administratorrechte benötigt.)"
LangString SecFileAssocDescription "${LYX_LANG}" "Vernüpfung zwischen ${PRODUCT_NAME} und der .lyx Dateiendung."
LangString SecDesktopDescription "${LYX_LANG}" "Verknüpfung zu ${PRODUCT_NAME} auf dem Desktop."
LangString ModifyingConfigureFailed "${LYX_LANG}" "Der 'path_prefix' (Liste mit Programmpfaden) konnte nicht im Konfigurationsskript gesetzt werden."
LangString CreateCmdFilesFailed "${LYX_LANG}" "Konnte die Dateien lyx.cmd und reLyX.cmd nicht erstellen."
LangString RunConfigureFailed "${LYX_LANG}" "Konnte das Konfigurationsskript nicht ausführen."
LangString FinishPageMessage "${LYX_LANG}" "LyX sollte nun installiert sein. Jedoch haben einige Nutzer berichtet, dass das Konfigurationsskript nicht ausgeführt werden konnte und LyX daher nicht startet. Die Fehlermeldung lautet in diesem Fall $\'reporting a missing textclass.lst file$\'. Um den Fehler zu beheben, führen Sie bitte den Befehl $\'sh configure$\' aus Windows Kommandozeile aus, wenn Sie sich im Verzeichnis $\'<LyX>\Resources\lyx$\' befinden."
LangString FinishPageRun "${LYX_LANG}" "LyX starten"
LangString DownloadPageField2 "${LYX_LANG}" "&Nicht installieren"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS ist eine Unix-Umgebung für Skripte (www.mingw.org/msys.shtml) die von ${PRODUCT_NAME} für das Ausführen verschiedener Skripte benötigt wird."
LangString EnterMinSYSFolder "${LYX_LANG}" "Geben sie den Pfad zur Datei sh.exe an."
LangString InvalidMinSYSFolder "${LYX_LANG}" "Kann die Datei sh.exe nicht finden."
LangString MinSYSDownloadLabel "${LYX_LANG}" "&MinSYS herunterladen"
LangString MinSYSFolderLabel "${LYX_LANG}" "&Ordner der die Datei sh.exe enthält"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "Ein Interpreter der Skriptsprache Python (www.python.org) ist notwendig damit ${PRODUCT_NAME} Skripte ausführen kann."
LangString EnterPythonFolder "${LYX_LANG}" "Geben sie den Pfad zur Datei python.exe an."
LangString InvalidPythonFolder "${LYX_LANG}" "Kann die Datei python.exe nicht finden."
LangString PythonDownloadLabel "${LYX_LANG}" "&Python herunterladen"
LangString PythonFolderLabel "${LYX_LANG}" "&Ordner der die Datei python.exe enthält"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) ist eine LaTeX-Distribution für Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "Geben sie den Pfad zur Datei latex.exe an."
LangString InvalidMiKTeXFolder "${LYX_LANG}" "Kann die Datei latex.exe nicht finden."
LangString MiKTeXDownloadLabel "${LYX_LANG}" "&MiKTeX herunterladen"
LangString MiKTeXFolderLabel "${LYX_LANG}" "&Ordner der die Datei latex.exe enthält"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "ImageMagick (www.imagemagick.org/script/index.php) wird benötigt, um Grafikdateien in verschiedene Dateiformate umzuwandeln."
LangString EnterImageMagickFolder "${LYX_LANG}" "Geben sie den Pfad zur Datei convert.exe an."
LangString InvalidImageMagickFolder "${LYX_LANG}" "Kann die Datei convert.exe nicht finden."
LangString ImageMagickDownloadLabel "${LYX_LANG}" "&ImageMagic herunterladen"
LangString ImageMagickFolderLabel "${LYX_LANG}" "&Ordner der die Datei convert.exe enthält"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (http://www.cs.wisc.edu/~ghost/) wird für PDF- und PostScript-Grafikdateien benötigt."
LangString EnterGhostscriptFolder "${LYX_LANG}" "Geben sie den Pfad zur Datei gswin32c.exe an."
LangString InvalidGhostscriptFolder "${LYX_LANG}" "Kann die Datei gswin32c.exe nicht finden."
LangString GhostscriptDownloadLabel "${LYX_LANG}" "&Ghostscript herunterladen"
LangString GhostscriptFolderLabel "${LYX_LANG}" "&Ordner der die Datei gswin32c.exe enthält"
LangString SummaryTitle "${LYX_LANG}" "Software Zusammenfassung"
LangString SummaryPleaseInstall "${LYX_LANG}" "Bitte installieren sie die heruntergeladenen Programme und starten dann ${PRODUCT_NAME}'s Installer nochmal."
LangString SummaryPathPrefix "${LYX_LANG}" "Die Liste mit den Programmpfaden, der so genannte 'path_prefix' wird zur Datei 'lyxrc.defaults' hinzugefügt:"
LangString UILangageTitle "${LYX_LANG}" "Die Sprache von LyXs Benutzeroberfläche"
LangString UILangageDescription "${LYX_LANG}" "Wird für die Menüs, Mitteilungen, usw. verwendet"
LangString UILanguageAvailableLanguages "${LYX_LANG}" " Verfügbare Sprachen "
LangString UnNotInRegistryLabel "${LYX_LANG}" "Kann $(^Name) nicht in der Registry finden. $\r$\n Desktopsymbole und Einträge im Startmenü können nicht entfernt werden."
LangString UnNotAdminLabel "${LYX_LANG}" "Sie benötigen Administratorrechte $\r$\n um $(^Name) zu deinstallieren."
LangString UnReallyRemoveLabel "${LYX_LANG}" "Sind Sie sicher, dass sie $(^Name) und all seine Komponenten deinstalliern möchten?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "$(^Name) wurde erfolgreich von ihrem Computer entfernt."
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_GERMAN_NSH_

View File

@ -1,81 +0,0 @@
!ifndef _LYX_LANGUAGES_ITALIAN_NSH_
!define _LYX_LANGUAGES_ITALIAN_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_ITALIAN}
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Installazione per tutti gli utenti?"
LangString SecFileAssocTitle "${LYX_LANG}" "Associazioni dei file"
LangString SecDesktopTitle "${LYX_LANG}" "Icona sul Desktop"
LangString SecCoreDescription "${LYX_LANG}" "I file di ${PRODUCT_NAME}."
LangString SecAllUsersDescription "${LYX_LANG}" "Installazione per tutti gli utenti o solo per l'utente attuale. (Sono richiesti privilegi da amministratore.)"
LangString SecFileAssocDescription "${LYX_LANG}" "Crea le associazioni tra il programma e le estensioni .lyx."
LangString SecDesktopDescription "${LYX_LANG}" "Icona ${PRODUCT_NAME} sul desktop."
LangString ModifyingConfigureFailed "${LYX_LANG}" "Fallito tentativo di aggiornare 'path_prefix' nello script di configurazione"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Fallito tentativo di creare lyx.cmd e reLyX.cmd"
LangString RunConfigureFailed "${LYX_LANG}" "Fallito tentativo di eseguire lo script di configurazione"
LangString FinishPageMessage "${LYX_LANG}" "LyX è stato installato. Però, se l$\'installer non è riuscito a lanciare lo script di configurazione, non sarete in grado di usare LyX a causa della mancata generazione del file textclass.lst. In tal caso, il rimedio consiste nell'eseguire il comando 'sh configure' nella directory $\'<LyX>/Resources$\'."
LangString FinishPageRun "${LYX_LANG}" "Lancia LyX"
LangString DownloadPageField2 "${LYX_LANG}" "&Non installare"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS fornisce un ambiente unix minimale (www.mingw.org/msys.shtml) richiesto da ${PRODUCT_NAME} per far girare un certo numero di file script."
LangString EnterMinSYSFolder "${LYX_LANG}" "Inserite il percorso alla cartella contenente sh.exe"
LangString InvalidMinSYSFolder "${LYX_LANG}" "Non riesco a trovare sh.exe"
LangString MinSYSDownloadLabel "${LYX_LANG}" "&Scarica MinSYS"
LangString MinSYSFolderLabel "${LYX_LANG}" "&Cartella contenente sh.exe"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "L'interprete Python (www.python.org) deve essere installato, altrimenti ${PRODUCT_NAME} non sarà in grado di far girare un certo numero di file script."
LangString EnterPythonFolder "${LYX_LANG}" "Inserite il percorso alla cartella contenente Python.exe"
LangString InvalidPythonFolder "${LYX_LANG}" "Non riesco a trovare Python.exe"
LangString PythonDownloadLabel "${LYX_LANG}" "&carica Python"
LangString PythonFolderLabel "${LYX_LANG}" "&Cartella contenente Python.exe"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) è un'aggiornata implementazione di TeX per Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "Inserite il percorso alla cartella contenente latex.exe"
LangString InvalidMiKTeXFolder "${LYX_LANG}" "Non riesco a trovare latex.exe"
LangString MiKTeXDownloadLabel "${LYX_LANG}" "&Scarica MiKTeX"
LangString MiKTeXFolderLabel "${LYX_LANG}" "&Cartella contenente latex.exe"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "I programmi forniti da ImageMagick (www.imagemagick.org/script/index.php) vengono usati per convertire file grafici da un certo formato ad un qualsiasi altro formato."
LangString EnterImageMagickFolder "${LYX_LANG}" "Inserite il percorso alla cartella contenente convert.exe"
LangString InvalidImageMagickFolder "${LYX_LANG}" "Non riesco a trovare convert.exe"
LangString ImageMagickDownloadLabel "${LYX_LANG}" "&Scarica ImageMagick"
LangString ImageMagickFolderLabel "${LYX_LANG}" "&Cartella contenente convert.exe"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (http://www.cs.wisc.edu/~ghost/) viene usato per convertire immagini in/da PostScript."
LangString EnterGhostscriptFolder "${LYX_LANG}" "Inserite il percorso alla cartella contenente gswin32c.exe"
LangString InvalidGhostscriptFolder "${LYX_LANG}" "Non riesco a trovare gswin32c.exe"
LangString GhostscriptDownloadLabel "${LYX_LANG}" "&Scarica Ghostscript"
LangString GhostscriptFolderLabel "${LYX_LANG}" "&Cartella contenente gswin32c.exe"
LangString SummaryTitle "${LYX_LANG}" "Sommario del software"
LangString SummaryPleaseInstall "${LYX_LANG}" "Siete pregati di installare i pacchetti scaricati e quindi lanciare nuovamente l'installazione di LyX."
LangString SummaryPathPrefix "${LYX_LANG}" "Verrà aggiunta una stringa 'path_prefix' al file 'lyxrc.defaults' contenente:"
LangString UILangageTitle "${LYX_LANG}" "La lingua dell'interfaccia di LyX"
LangString UILangageDescription "${LYX_LANG}" "Usata per menu, messaggi, ecc."
LangString UILanguageAvailableLanguages "${LYX_LANG}" " Lingue Disponibili "
LangString UnNotInRegistryLabel "${LYX_LANG}" "Non riesco a trovare $(^Name) nel registro$\r$\nI collegamenti sul desktop e nel menu Start non saranno rimossi."
LangString UnNotAdminLabel "${LYX_LANG}" "Spiacente! Occorrono privilegi da amministratore$\r$\nper disinstallare $(^Name)."
LangString UnReallyRemoveLabel "${LYX_LANG}" "Siete sicuri di voler rimuovere completamente $(^Name) e tutti i suoi componenti?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "$(^Name) è stato rimosso con successo dal computer."
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_ITALIAN_NSH_

View File

@ -1,81 +0,0 @@
!ifndef _LYX_LANGUAGES_POLISH_NSH_
!define _LYX_LANGUAGES_POLISH_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_POLISH}
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Instalacja dla wszystkich użytkowników?"
LangString SecFileAssocTitle "${LYX_LANG}" "Skojarzenie plików .lyx"
LangString SecDesktopTitle "${LYX_LANG}" "Ikona na pulpicie"
LangString SecCoreDescription "${LYX_LANG}" "Pliki ${PRODUCT_NAME}-a."
LangString SecAllUsersDescription "${LYX_LANG}" "Instalacja dla wszystkich użytkowników lub tylko dla bieżącego użytkownika. Instalacja dla wszystkich wymaga praw administratora."
LangString SecFileAssocDescription "${LYX_LANG}" "Skojarzenie LyX-a z plikami o rozszerzeniu .lyx."
LangString SecDesktopDescription "${LYX_LANG}" "Ikona ${PRODUCT_NAME}-a na pulpicie."
LangString ModifyingConfigureFailed "${LYX_LANG}" "Nieudana próba ustawienia zmiennej 'path_prefix' w pliku skryptu konfigracyjnego"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Niedana próba utworzenia plików lyx.cmd i reLyX.cmd"
LangString RunConfigureFailed "${LYX_LANG}" "Niedana próba wykonania skryptu konfiguracyjnego"
LangString FinishPageMessage "${LYX_LANG}" "LyX powinien być już teraz zainstalowany. Jednak niektórzy użytkownicy raportują, że skrypt konfiguracyjny nie wykonuje się. W efekcie LyX nie uruchamia się zgłaszając brak pliku textclass.lst. Dla naprawy instalacji LyX-a uruchom polecenie 'sh configure' w katalogu $\'<LyX>/Resources/lyx$\'."
LangString FinishPageRun "${LYX_LANG}" "Uruchom LyX"
LangString DownloadPageField2 "${LYX_LANG}" "&Nie instaluj"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS jest minimalnym środowiskiem uniksowym (www.mingw.org/msys.shtml), którego wymaga ${PRODUCT_NAME} do uruchomienia niektórych skryptów."
LangString EnterMinSYSFolder "${LYX_LANG}" "Proszę podać ścieżkę do folderu zawierającego sh.exe"
LangString InvalidMinSYSFolder "${LYX_LANG}" "Nie można znaleźć sh.exe"
LangString MinSYSDownloadLabel "${LYX_LANG}" "&Pobierz MinSYS"
LangString MinSYSFolderLabel "${LYX_LANG}" "&Folder zawierający sh.exe"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "Język skryptowy Python (www.python.org) musi być zainstalowany, inaczej ${PRODUCT_NAME} nie będzie mógł uruchomić niektórych skryptów."
LangString EnterPythonFolder "${LYX_LANG}" "Proszę podać ścieżkę do folderu zawierającego Python.exe"
LangString InvalidPythonFolder "${LYX_LANG}" "Nie można znaleźć Python.exe"
LangString PythonDownloadLabel "${LYX_LANG}" "&Pobierz Python"
LangString PythonFolderLabel "${LYX_LANG}" "&Folder zawierający Python.exe"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) jest implementacją TeX-a dla Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "Proszę podać ścieżkę do folderu zawierającego latex.exe"
LangString InvalidMiKTeXFolder "${LYX_LANG}" "Nie można znaleźć latex.exe"
LangString MiKTeXDownloadLabel "${LYX_LANG}" "&Pobierz MiKTeX"
LangString MiKTeXFolderLabel "${LYX_LANG}" "&Folder zawierający latex.exe"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "Narzędzia pakietu ImageMagick (www.imagemagick.org/script/index.php) są używane do konwersji plików graficznych do wymaganych formatów."
LangString EnterImageMagickFolder "${LYX_LANG}" "Proszę podać ścieżkę do folderu zawierającego convert.exe"
LangString InvalidImageMagickFolder "${LYX_LANG}" "Nie można znaleźć convert.exe"
LangString ImageMagickDownloadLabel "${LYX_LANG}" "&Pobierz ImageMagick"
LangString ImageMagickFolderLabel "${LYX_LANG}" "&Folder zawierający convert.exe"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (www.cs.wisc.edu/~ghost/) jest używany do konwersji z i do formatu PostScript."
LangString EnterGhostscriptFolder "${LYX_LANG}" "Proszę podać ścieżkę do folderu zawierającego gswin32c.exe"
LangString InvalidGhostscriptFolder "${LYX_LANG}" "Nie można znaleźć gswin32c.exe"
LangString GhostscriptDownloadLabel "${LYX_LANG}" "&Pobierz Ghostscript"
LangString GhostscriptFolderLabel "${LYX_LANG}" "&Folder zawierający gswin32c.exe"
LangString SummaryTitle "${LYX_LANG}" "Podsumowanie oprogramowania"
LangString SummaryPleaseInstall "${LYX_LANG}" "Proszę zainstalować pobrane pliki i uruchomić instalator LyX-a ponownie."
LangString SummaryPathPrefix "${LYX_LANG}" "Do zmiennej 'path_prefix' w pliku 'lyxrc.defaults' zostaną dodane następujące ścieżki:"
LangString UILangageTitle "${LYX_LANG}" "Język interfejsu LyX-a"
LangString UILangageDescription "${LYX_LANG}" "Który będzie użyty w menu, komunikatach itp."
LangString UILanguageAvailableLanguages "${LYX_LANG}" " Dostępne języki "
LangString UnNotInRegistryLabel "${LYX_LANG}" "Nie można znaleźć $(^Name) w rejestrze$\r$\nSkróty na pulpicie i w menu Start nie zostaną usunięte."
LangString UnNotAdminLabel "${LYX_LANG}" "Musisz posiadać prawa administratora$\r$\ndo deinstalacji programu $(^Name)."
LangString UnReallyRemoveLabel "${LYX_LANG}" "Czy na pewno chcesz usunąć $(^Name) i wszystkie jego komponenty?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "$(^Name) został pomyślnie usunięty z Twojego komputera."
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_POLISH_NSH_

View File

@ -1,80 +0,0 @@
!ifndef _LYX_LANGUAGES_SPANISH_NSH_
!define _LYX_LANGUAGES_SPANISH_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_SPANISH}
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Instalar para todos los usuarios"
LangString SecFileAssocTitle "${LYX_LANG}" "Asociar ficheros"
LangString SecDesktopTitle "${LYX_LANG}" "Icono de escritorio"
LangString SecCoreDescription "${LYX_LANG}" "Los ficheros de ${PRODUCT_NAME}."
LangString SecAllUsersDescription "${LYX_LANG}" "Instalar para todos los usuarios o sólo para el usuario actual. (Requiere privilegios de Administrador.)"
LangString SecFileAssocDescription "${LYX_LANG}" "Asociar la extesión .lyx con ${PRODUCT_NAME}."
LangString SecDesktopDescription "${LYX_LANG}" "Crear un icono de ${PRODUCT_NAME} en el escritorio."
LangString ModifyingConfigureFailed "${LYX_LANG}" "Error al intentar añadir la entrada 'path_prefix' a la rutina de configuración"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Error al intentar crear lyx.cmd y reLyX.cmd"
LangString RunConfigureFailed "${LYX_LANG}" "Error al intentar ejecutar la rutina de configuración"
LangString FinishPageMessage "${LYX_LANG}" "Si todo fue bien, LyX debería haber sido instalado correctamente. Sin embargo, algunos de nuestros usuarios han informado de que la rutina de configuración falla al ejecutarse y, como resultado, LyX también falla al ejecutarse (puesto que no encuentra el fichero textclass.lst). Para solucionar este problema abra una ventana de MS-DOS y ejecute el comando 'sh configure' desde el directorio LyX/Resources."
LangString FinishPageRun "${LYX_LANG}" "Ejecutar LyX ahora"
LangString DownloadPageField2 "${LYX_LANG}" "&No instalar"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS (www.mingw.org/msys.shtml) es un pequeño entorno Unix que ${PRODUCT_NAME} necesita para ejecutar algunos ficheros de comandos."
LangString EnterMinSYSFolder "${LYX_LANG}" "Por favor, introduzca la ruta completa del directorio que contiene sh.exe"
LangString InvalidMinSYSFolder "${LYX_LANG}" "Imposible encontrar sh.exe"
LangString MinSYSDownloadLabel "${LYX_LANG}" "&Descargar MinSYS"
LangString MinSYSFolderLabel "${LYX_LANG}" "&Directorio que contiene sh.exe"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "El lenguaje de programación Python (www.python.org) debe estar instalado o de lo contrario ${PRODUCT_NAME} no será capaz de ejecutar ciertos ficheros de comandos."
LangString EnterPythonFolder "${LYX_LANG}" "Por favor, introduzca la ruta completa del directorio que contiene Python.exe"
LangString InvalidPythonFolder "${LYX_LANG}" "Imposible encontrar Python.exe"
LangString PythonDownloadLabel "${LYX_LANG}" "&Descargar Python"
LangString PythonFolderLabel "${LYX_LANG}" "&Directorio que contiene Python.exe"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) es una implementación del sistema TeX para Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "Por favor, introduzca la ruta completa del directorio que contiene latex.exe"
LangString InvalidMiKTeXFolder "${LYX_LANG}" "Imposible encontrar latex.exe"
LangString MiKTeXDownloadLabel "${LYX_LANG}" "&Descargar MiKTeX"
LangString MiKTeXFolderLabel "${LYX_LANG}" "&Directorio que contiene latex.exe"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "ImageMagick (www.imagemagick.org/script/index.php) permite convertir ficheros gráficos a cualquier formato que se necesite."
LangString EnterImageMagickFolder "${LYX_LANG}" "Por favor, introduzca la ruta completa del directorio que contiene convert.exe"
LangString InvalidImageMagickFolder "${LYX_LANG}" "Imposible encontrar convert.exe"
LangString ImageMagickDownloadLabel "${LYX_LANG}" "&Descargar ImageMagick"
LangString ImageMagickFolderLabel "${LYX_LANG}" "&Directorio que contiene convert.exe"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (http://www.cs.wisc.edu/~ghost/) es usado para convertir imágenes a/en formato PostScript."
LangString EnterGhostscriptFolder "${LYX_LANG}" "Por favor, introduzca la ruta completa del directorio que contiene gswin32c.exe"
LangString InvalidGhostscriptFolder "${LYX_LANG}" "Imposible encontrar gswin32c.exe"
LangString GhostscriptDownloadLabel "${LYX_LANG}" "&Descargar Ghostscript"
LangString GhostscriptFolderLabel "${LYX_LANG}" "&Directorio que contiene gswin32c.exe"
LangString SummaryTitle "${LYX_LANG}" "Resumen de la instalación"
LangString SummaryPleaseInstall "${LYX_LANG}" "Por favor, instale los programas descargados y vuelva a ejecutar el insralador de LyX una vez más."
LangString SummaryPathPrefix "${LYX_LANG}" "Durante la instalación la variable 'path_prefix' se añadirá a 'lyxrc.defaults' con el siguiente contenido:"
LangString UILangageTitle "${LYX_LANG}" "Seleccione el idioma que desea para la interfaz de LyX"
LangString UILangageDescription "${LYX_LANG}" "Será usado en los menús, mensajes, etc."
LangString UILanguageAvailableLanguages "${LYX_LANG}" " Idiomas disponibles "
LangString UnNotInRegistryLabel "${LYX_LANG}" "Imposible encontrar $(^Name) en el registro$\r$\nLos accesos rápidos del escritorio y del Menú de Inicio no serán eliminados."
LangString UnNotAdminLabel "${LYX_LANG}" "Lo siento! Necesita privilegios de administrador$\r$\npara desinstalar $(^Name)."
LangString UnReallyRemoveLabel "${LYX_LANG}" "¿Está seguro de que desea eliminar completamente $(^Name) y todos sus componentes?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "$(^Name) fue eliminado satisfactoriamente de su ordenador."
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_SPANISH_NSH_

View File

@ -1,90 +0,0 @@
!ifndef _LYX_LANGUAGES_SWEDISH_NSH_
!define _LYX_LANGUAGES_SWEDISH_NSH_
!ifdef LYX_LANG
!undef LYX_LANG
!endif
!define LYX_LANG ${LANG_SWEDISH}
!define SwedishInputFolderPath "Var god ange sökväg till katalogen som innehåller"
!define SwedishUnableToFind "Kan inte hitta"
!define SwedishDownload "&Ladda ner"
!define SwedishFolderContaining "&Katalog innehållande"
LicenseLangString LyXLicenseData ${LYX_LANG} "${PRODUCT_LICENSE_FILE}"
LangString SecAllUsersTitle "${LYX_LANG}" "Installera för alla användare?"
LangString SecFileAssocTitle "${LYX_LANG}" "Program associerade till olika filtyper"
LangString SecDesktopTitle "${LYX_LANG}" "Skrivbordsikon"
LangString SecCoreDescription "${LYX_LANG}" "${PRODUCT_NAME}-filer."
LangString SecAllUsersDescription "${LYX_LANG}" "Installera för alla användare, eller enbart för den aktuella användare. (Kräver administratörsrättigheter.)"
LangString SecFileAssocDescription "${LYX_LANG}" "Skapa en association mellan programmet och filtilläget .lyx."
LangString SecDesktopDescription "${LYX_LANG}" "Skapa en ${PRODUCT_NAME}-ikon på skrivbordet."
LangString ModifyingConfigureFailed "${LYX_LANG}" "Misslyckades med att sätta sökvägsprefixet i konfigurationsprogrammet"
LangString CreateCmdFilesFailed "${LYX_LANG}" "Misslyckades med att skapa filerna lyx.cmd och reLyX.cmd"
LangString RunConfigureFailed "${LYX_LANG}" "Misslyckades med att köra konfigurationsprogrammet"
LangString FinishPageMessage "${LYX_LANG}" "LyX borde nu ha installerats. Dessvärre har en del användare rapporterat att konfigurationsskriptet ibland misslyckats. Om detta händer är inte LyX ordentligt konfigurerat och vägrar starta med ett felmeddelande om att filen 'textclass.lst' saknas. För att åtgärda detta problem, öppna ett kommandofönster (kör programmet 'cmd'), och gå till katalogen 'LyX/Resources directory'. I den katalogen kör du sedan kommandot 'sh configure' vilket kommer att konfigurar LyX."
LangString FinishPageRun "${LYX_LANG}" "Starta LyX"
LangString DownloadPageField2 "${LYX_LANG}" "Installera &ej"
LangString MinSYSHeader "${LYX_LANG}" "MinSYS"
LangString MinSYSDescription "${LYX_LANG}" "MinSYS är en minimal, UNIX-liknande skriptmiljö (www.mingw.org/msys.shtml) vilken ${PRODUCT_NAME} använder för ett flertal funktioner."
LangString EnterMinSYSFolder "${LYX_LANG}" "${SwedishInputFolderPath} sh.exe"
LangString InvalidMinSYSFolder "${LYX_LANG}" "${SwedishUnableToFind} sh.exe"
LangString MinSYSDownloadLabel "${LYX_LANG}" "${SwedishDownload} MinSYS"
LangString MinSYSFolderLabel "${LYX_LANG}" "${SwedishFolderContaining} sh.exe"
LangString PythonHeader "${LYX_LANG}" "Python"
LangString PythonDescription "${LYX_LANG}" "Skriptspråket Python (www.python.org) bör installeras, annars kan ett flertal skript inte användas av ${PRODUCT_NAME}."
LangString EnterPythonFolder "${LYX_LANG}" "${SwedishInputFolderPath} Python.exe"
LangString InvalidPythonFolder "${LYX_LANG}" "${SwedishUnableToFind} Python.exe"
LangString PythonDownloadLabel "${LYX_LANG}" "${SwedishDownload} Python"
LangString PythonFolderLabel "${LYX_LANG}" "${SwedishFolderContaining} Python.exe"
LangString MiKTeXHeader "${LYX_LANG}" "MiKTeX"
LangString MiKTeXDescription "${LYX_LANG}" "MiKTeX (www.miktex.org) är en modern implementering av TeX för Windows."
LangString EnterMiKTeXFolder "${LYX_LANG}" "${SwedishInputFolderPath} latex.exe"
LangString InvalidMiKTeXFolder "${LYX_LANG}" "${SwedishUnableToFind} latex.exe"
LangString MiKTeXDownloadLabel "${LYX_LANG}" "${SwedishDownload} MiKTeX"
LangString MiKTeXFolderLabel "${LYX_LANG}" "${SwedishFolderContaining} latex.exe"
LangString ImageMagickHeader "${LYX_LANG}" "ImageMagick"
LangString ImageMagickDescription "${LYX_LANG}" "Verktygen i paketet ImageMagick (www.imagemagick.org/script/index.php) används av LyX för att konvertera bilder till rätt filformat."
LangString EnterImageMagickFolder "${LYX_LANG}" "${SwedishInputFolderPath} convert.exe"
LangString InvalidImageMagickFolder "${LYX_LANG}" "${SwedishUnableToFind} convert.exe"
LangString ImageMagickDownloadLabel "${LYX_LANG}" "${SwedishDownload} ImageMagick"
LangString ImageMagickFolderLabel "${LYX_LANG}" "${SwedishFolderContaining} convert.exe"
LangString GhostscriptHeader "${LYX_LANG}" "Ghostscript"
LangString GhostscriptDescription "${LYX_LANG}" "Ghostscript (www.cs.wisc.edu/~ghost/) används för att konvertera bilder till/från PostScript."
LangString EnterGhostscriptFolder "${LYX_LANG}" "${SwedishInputFolderPath} gswin32c.exe"
LangString InvalidGhostscriptFolder "${LYX_LANG}" "${SwedishUnableToFind} gswin32c.exe"
LangString GhostscriptDownloadLabel "${LYX_LANG}" "${SwedishDownload} Ghostscript"
LangString GhostscriptFolderLabel "${LYX_LANG}" "${SwedishFolderContaining} gswin32c.exe"
LangString SummaryTitle "${LYX_LANG}" "Sammanfattning av programvara"
LangString SummaryPleaseInstall "${LYX_LANG}" "Var god installera först den kompletterande programvara du laddat ner. Kör sedan LyX installationsprogram igen."
LangString SummaryPathPrefix "${LYX_LANG}" "Ett sökvägsprefix kommer att läggas till i filen 'lyxrc.defaults'. Denna innehåller följande:"
LangString UILangageTitle "${LYX_LANG}" "Språk i LyX användargränsnitt"
LangString UILangageDescription "${LYX_LANG}" "Detta språk används i menyer, meddelanden, m.m."
LangString UILanguageAvailableLanguages "${LYX_LANG}" " Tillgängliga språk "
LangString UnNotInRegistryLabel "${LYX_LANG}" "${SwedishUnableToFind} $(^Name) i registret\r$\nGenvägar på skrivbordet och i startmenyn kommer inte att tas bort."
LangString UnNotAdminLabel "${LYX_LANG}" "Tyvärr! Du måste ha administratörsrättigheter för\r$\natt avinstallera $(^Name)."
LangString UnReallyRemoveLabel "${LYX_LANG}" "Är du säker på att du verkligen vill avinstallera $(^Name) och alla dess komponenter fullständigt?"
LangString UnRemoveSuccessLabel "${LYX_LANG}" "Avinstallationen av $(^Name) från din dator var framgångsrik."
!undef SwedishInputFolderPath
!undef SwedishUnableToFind
!undef SwedishDownload
!undef SwedishFolderContaining
!undef LYX_LANG
!endif ; _LYX_LANGUAGES_SWEDISH_NSH_

View File

@ -1,160 +0,0 @@
;--------------------------------
!macro GetFileExtProg ProgPath AppExe Extension Subentry
ReadRegStr ${AppExe} HKCU \
"Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\${Extension}\OpenWithList" \
"${Subentry}"
${if} ${AppExe} != ""
ReadRegStr ${ProgPath} HKLM \
"Software\Microsoft\Windows\CurrentVersion\App Paths\${AppExe}" "Path"
;remove the "\" at the end
StrCpy $0 ${ProgPath} "" -1
${if} $0 == "\"
StrCpy ${ProgPath} ${ProgPath} -1
${endif}
${endif}
!macroend
;--------------------------------
!macro FileCheck Result FileName FilePath
Push $0
Push $1
StrCpy $0 ""
StrCpy $1 ""
FileOpen $0 "${Filepath}\${FileName}" r
${if} $0 = ""
StrCpy $1 "False"
${Else}
StrCpy $1 "True"
${endif}
FileClose $0
StrCpy ${Result} $1
Pop $1
Pop $0
!macroend
!macro TranslateLangCode LangNme LangISOCode
${if} ${LangISOCode} = 1030
StrCpy ${LangNme} "Dansk"
${endif}
${if} ${LangISOCode} = 1031
StrCpy ${LangNme} "Deutsch"
${endif}
${if} ${LangISOCode} = 1033
StrCpy ${LangNme} "English"
${endif}
${if} ${LangISOCode} = 1034
StrCpy ${LangNme} "Español"
${endif}
${if} ${LangISOCode} = 1036
StrCpy ${LangNme} "Français"
${endif}
${if} ${LangISOCode} = 1040
StrCpy ${LangNme} "Italiano"
${endif}
${if} ${LangISOCode} = 1043
StrCpy ${LangNme} "Nederlands"
${endif}
${if} ${LangISOCode} = 1045
StrCpy ${LangNme} "Polski"
${endif}
${if} ${LangISOCode} = 1053
StrCpy ${LangNme} "Svenska"
${endif}
!macroend
!macro GetLangCode LangCde Name
${if} ${Name} == "Dansk"
StrCpy ${LangCde} "da_DK"
${endif}
${if} ${Name} == "Deutsch"
StrCpy ${LangCde} "de_DE"
${endif}
${if} ${Name} == "English"
StrCpy ${LangCde} "en_EN"
${endif}
${if} ${Name} == "Español"
StrCpy ${LangCde} "es_ES"
${endif}
${if} ${Name} == "Euskara"
StrCpy ${LangCde} "eu_EU"
${endif}
${if} ${Name} == "Français"
StrCpy ${LangCde} "fr_FR"
${endif}
${if} ${Name} == "Italiano"
StrCpy ${LangCde} "it_IT"
${endif}
${if} ${Name} == "Magyar nyelv"
StrCpy ${LangCde} "hu_HU"
${endif}
${if} ${Name} == "Nederlands"
StrCpy ${LangCde} "nl_NL"
${endif}
${if} ${Name} == "Norsk"
StrCpy ${LangCde} "no_NO"
${endif}
${if} ${Name} == "Nynorsk"
StrCpy ${LangCde} "no_NY"
${endif}
${if} ${Name} == "Polski"
StrCpy ${LangCde} "pl_PL"
${endif}
${if} ${Name} == "Româna"
StrCpy ${LangCde} "ro_RO"
${endif}
${if} ${Name} == "Russian"
StrCpy ${LangCde} "ru_RU"
${endif}
${if} ${Name} == "Slovenský"
StrCpy ${LangCde} "sk_SK"
${endif}
${if} ${Name} == "Slovenšcina"
StrCpy ${LangCde} "sl_SI"
${endif}
${if} ${Name} == "Suomi"
StrCpy ${LangCde} "fi_FI"
${endif}
${if} ${Name} == "Türkçe"
StrCpy ${LangCde} "tr_TR"
${endif}
!macroend

View File

@ -1,14 +0,0 @@
!ifndef _LYX_FUNC_NSH_
!define _LYX_FUNC_NSH_
!macro LYX_DEFFUNC Name
!define `${Name}` `!insertmacro LYX_FUNCTION_${Name}`
!macroend
!macro LYX_FUNC ShortName
!undef `${ShortName}`
!define `${ShortName}` `!insertmacro LYX_FUNCTION_${ShortName}_Call`
Function `${ShortName}`
!macroend
!endif ; _LYX_FUNC_NSH_

View File

@ -0,0 +1,112 @@
/*
Settings for LyX installer
*/
;--------------------------------
;File locations
!define FILES_LICENSE "license.rtf"
!define FILES_ICONS "..\icons"
!define FILES_FONTS "..\bakoma"
!define FILES_LAUNCHER "..\..\launcher"
!define FILES_PDFVIEW "..\..\pdfview"
!define FILES_MSVC "${FILES_WINDOWS}\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_0de06acd"
!define FILES_NETPBM "${FILES_DEPS}\netpbm"
!define FILES_DTL "${FILES_DEPS}\dtl"
!define FILES_AIKSAURUS "${FILES_DEPS}\aiksaurus\"
!define FILES_DVIPOST "${FILES_DEPS}\dvipost"
!define FILES_DVIPOST_PKG "${FILES_DVIPOST}"
!define FILES_PDFTOOLS "${FILES_DEPS}\pdftools"
!define FILES_QT "${FILES_DEPS}\qt-4"
!define FILES_DVIPOSTDATA "${FILES_DEPS}\dvipost"
!define FILES_ASPELLDATA "${FILES_DEPS}\aspell"
;--------------------------------
;Locations of components to download
!define DOWNLOAD_LATEX "http://superb-west.dl.sourceforge.net/sourceforge/miktex/basic-miktex-2.5.2471.exe"
!define DOWNLOAD_IMAGEMAGICK "http://superb-west.dl.sourceforge.net/sourceforge/imagemagick/ImageMagick-6.3.0-1-Q16-windows-dll.exe"
!define DOWNLOAD_GHOSTSCRIPT "http://superb-west.dl.sourceforge.net/sourceforge/ghostscript/gs854w32.exe"
!define DOWNLOAD_VIEWER "http://tug.ctan.org/tex-archive/nonfree/support/ghostscript/ghostgum/gsv48w32.exe"
!define DOWNLOAD_ASPELLDICTS "ftp://ftp.lyx.org/pub/lyx/contrib/aspell6-windows"
;--------------------------------
;Download size (in KB)
!define SIZE_DOWNLOAD_LATEX 43127
!define SIZE_DOWNLOAD_IMAGEMAGICK 6830
!define SIZE_DOWNLOAD_GHOSTSCRIPT 12669
!define SIZE_DOWNLOAD_VIEWER 1459
;--------------------------------
;Approximations of space required for components (in KB)
!define SIZE_LATEX 120000
!define SIZE_IMAGEMAGICK 17000
!define SIZE_GHOSTSCRIPT 26000
!define SIZE_VIEWER 4000
;--------------------------------
;Locations of setup files for components (for bundled setup)
!define INSTALL_LATEX "basic-miktex-2.5.2471.exe"
!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.0-0-Q16-windows-dll.exe"
!define INSTALL_GHOSTSCRIPT "gs854w32.exe"
!define INSTALL_VIEWER "gsv48w32.exe"
;--------------------------------
;Names and version
!define APP_NAME "LyX"
!define /date APP_VERSION "1.5svn %Y%m%d"
!define APP_VERSION_NUMBER "1.5.0.0"
!define APP_SERIES_NAME "1.5"
!define APP_SERIES_KEY "15"
!define APP_DIR_USERDATA "LyX1.5.x"
!define APP_INFO "${APP_NAME} - The Document Processor"
!define APP_COPYRIGHT "LyX is Copyright © 1995 by Matthias Ettrich, 1995-2006 LyX Team"
!define APP_RUN "bin\lyx.exe"
!define APP_REGKEY "Software\${APP_NAME}${APP_SERIES_KEY}"
!define APP_REGKEY_SETUP "Software\${APP_NAME}${APP_SERIES_KEY}\Setup"
!define APP_REGKEY_SETTINGS "Software\${APP_NAME}${APP_SERIES_KEY}\Settings"
!define APP_REGNAME_DOC "LyX.Document"
!define APP_EXT ".lyx"
!define APP_MIME_TYPE "application/lyx"
;--------------------------------
;Setup settings
!ifndef SETUPTYPE_BUNDLE
!define /date SETUP_EXE "lyx-15svn-%Y%m%d.exe"
!else
!define /date SETUP_EXE "lyx-15svn-%Y%m%d-bundle.exe"
!endif
!define SETUP_DEFAULT_DIRECTORY "$PROGRAMFILES\${APP_NAME}${APP_SERIES_KEY}"
!define SETUP_ICON "${FILES_ICONS}\lyx_32x32.ico"
!define SETUP_HEADERIMAGE "graphics\header.bmp"
!define SETUP_WIZARDIMAGE "graphics\wizard.bmp"
!define SETUP_UNINSTALLER "Uninstall-${APP_NAME}.exe"
!define SETUP_UNINSTALLER_KEY "${APP_NAME}"
;--------------------------------
;Names of binaries to identify compontents
!define BIN_LATEX "tex.exe"
!define BIN_IMAGEMAGICK "convert.exe"
!define BIN_GHOSTSCRIPT "gswin32c.exe"
;--------------------------------
;Compession
SetCompressor /SOLID lzma

View File

@ -0,0 +1,15 @@
;LyX Windows Installer
;User Settings
;Location of LyX files and dependencies
!define FILES_LYX "..\..\..\..\build-msvc"
!define FILES_DEPS "..\..\..\..\lyx-windows-deps-msvc-qt4"
;Location of Windows installation
!define FILES_WINDOWS "C:\WINDOWS"
;Location of Python 2.5
!define FILES_PYTHON "C:\Python25"

View File

@ -1,127 +0,0 @@
!ifndef _STRTRIM_NSH_
!define _STRTRIM_NSH_
!include "lyxfunc.nsh"
!insertmacro LYX_DEFFUNC `StrLTrim`
!insertmacro LYX_DEFFUNC `StrRTrim`
!insertmacro LYX_DEFFUNC `StrTrim`
!insertmacro LYX_DEFFUNC `StrRTrimChar`
!macro LYX_FUNCTION_StrLTrim
!insertmacro LYX_FUNC `StrLTrim`
; After this point:
; $0 = String (input)
; $1 = Temp (temp)
; Get input from user
Exch $0
Push $1
Loop:
StrCpy $1 "$0" 1
StrCmp "$1" " " TrimLeft
StrCmp "$1" "$\r" TrimLeft
StrCmp "$1" "$\n" TrimLeft
StrCmp "$1" " " TrimLeft ; this is a tab.
GoTo Done
TrimLeft:
StrCpy $0 "$0" "" 1
Goto Loop
Done:
Pop $1
Exch $0
FunctionEnd
!macroend
!macro LYX_FUNCTION_StrLTrim_Call Output Input
Push `${Input}`
Call StrLTrim
Pop `${Output}`
!macroend
!macro LYX_FUNCTION_StrRTrim
!insertmacro LYX_FUNC `StrRTrim`
; After this point:
; $0 = String (input)
; $1 = Temp (temp)
; Get input from user
Exch $0
Push $1
Loop:
StrCpy $1 "$0" 1 -1
StrCmp "$1" " " TrimRight
StrCmp "$1" "$\r" TrimRight
StrCmp "$1" "$\n" TrimRight
StrCmp "$1" " " TrimRight ; this is a tab
GoTo Done
TrimRight:
StrCpy $0 "$0" -1
Goto Loop
Done:
Pop $1
Exch $0
FunctionEnd
!macroend
!macro LYX_FUNCTION_StrRTrim_Call Output Input
Push `${Input}`
Call StrRTrim
Pop `${Output}`
!macroend
!macro LYX_FUNCTION_StrTrim
!insertmacro LYX_FUNC `StrTrim`
Call StrLTrim
Call StrRTrim
FunctionEnd
!macroend
!macro LYX_FUNCTION_StrTrim_Call Output Input
Push `${Input}`
Call StrTrim
Pop `${Output}`
!macroend
!macro LYX_FUNCTION_StrRTrimChar
!insertmacro LYX_FUNC `StrRTrimChar`
; After this point:
; $0 = Input
; $1 = Char
; $2 = Temp
; Get input from user
Exch $0
Exch
Exch $1
Push $2
StrCpy $2 "$0" 1 -1
StrCmp "$2" "$1" TrimRight
GoTo Done
TrimRight:
StrCpy $0 "$0" -1
Done:
Pop $2
Pop $1
Exch $0
FunctionEnd
!macroend
!macro LYX_FUNCTION_StrRTrimChar_Call Output Input Char
Push `${Char}`
Push `${Input}`
Call StrRTrimChar
Pop `${Output}`
!macroend
!endif ; _STRTRIM_NSH_

View File

@ -1,74 +0,0 @@
#! /bin/sh
# This script aims to do averything necessary to automate the packaging
# of LyX/Win ready for an Windows Installer to be built.
# It copies these files into the appropriate places in the LyX tree.
# qt-mt3.dll
# iconv.dll
# mingw10.dll
# dv2dt.exe
# dt2dv.exe
# It strips the executables.
# It adds formats and converters to the Resources/configure script to
# ensure that the generated .dvi file is usable.
# It removes all stuff generated by running configure:
# xfonts/
# doc/LaTeXConfig.lyx
# lyxrc.defaults
# packages.lst
# textclass.lst
# The installee should regenerate them by running configure on his machine.
QT_DLL="$HOME/Qt/3x-msys/bin/qt-mt3.dll"
ICONV_DLL="/j/MinGW/bin/iconv.dll"
MINGW_DLL="/j/MinGW/bin/mingwm10.dll"
DTL_DIR=dtl
DT2DV="$DTL_DIR/dt2dv.exe"
DV2DT="$DTL_DIR/dv2dt.exe"
LYX_INSTALL_DIR="../../../build/installprefix"
# Change this to 'mv -f' when you are confident that
# the various sed scripts are working correctly.
MV='mv -f'
windows_packaging()
{
# Install the necessary .dlls.
for file in "${QT_DLL}" "${ICONV_DLL}" "${MINGW_DLL}" "${DT2DV}" "${DV2DT}"
do
cp "${file}" "$LYX_INSTALL_DIR"/bin/. || {
echo "Failed to copy ${file} to the LyX package" >&2
exit 1
}
done
# Strip the executables
(
cd "${LYX_INSTALL_DIR}/bin"
for file in *.exe
do
strip $file
done
)
# Strip the executables
(
cd "${LYX_INSTALL_DIR}/Resources"
rm -rf xfonts
for file in doc/LaTeXConfig.lyx lyxrc.defaults packages.lst textclass.lst
do
rm -f $file
done
)
}
windows_packaging || exit 1
# The end

View File

@ -0,0 +1,131 @@
Index: base/Aiksaurus.cpp
===================================================================
RCS file: /cvsroot/aiksaurus/base/Aiksaurus.cpp,v
retrieving revision 1.5
diff -u -r1.5 Aiksaurus.cpp
--- base/Aiksaurus.cpp 3 Apr 2005 19:10:55 -0000 1.5
+++ base/Aiksaurus.cpp 12 Jul 2006 21:00:20 -0000
@@ -36,36 +36,69 @@
using namespace std;
#if defined WIN32
+
#ifdef AIK_DATA_DIR
#undef AIK_DATA_DIR
#endif
- #include <windows.h>
- #define WIN32_LEAN_AND_MEAN
- // Default aik_data_dir is local directory
- std::string AIK_DATA_DIR(".\\");
- // Regestry Reading for AIK_DATA_DIR
- void ReadRegistry()
- {
- HKEY hKey;
- unsigned long lType;
- DWORD dwSize;
- unsigned char* szValue = NULL;
- if( ::RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Aiksaurus", 0, KEY_READ, &hKey) == ERROR_SUCCESS )
- {
- // Determine size of string
- if( ::RegQueryValueEx( hKey, "Data_Dir", NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS )
- {
- szValue = new unsigned char[dwSize + 1];
- ::RegQueryValueEx( hKey, "Data_Dir", NULL, &lType, szValue, &dwSize);
- AIK_DATA_DIR = (char*) szValue;
- delete[] szValue;
- }
- }
- }
+
+#ifndef HAVE_GETENV
+#define HAVE_GETENV
+#endif
+
+#include <windows.h>
+#define WIN32_LEAN_AND_MEAN
+
+// Default aik_data_dir is local directory
+std::string AIK_DATA_DIR(".\\");
+
+ std::string ReadRegString(HKEY hive, std::string key, std::string name)
+ {
+
+ // Reads a string from the Windows registry (used to get paths)
+
+ HKEY hKey;
+ unsigned long lType;
+ DWORD dwSize;
+ unsigned char* szValue = NULL;
+
+ if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
+ {
+ szValue = new unsigned char[dwSize + 1];
+ ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
+ std::string RegistryReturn((char*)szValue);
+ delete[] szValue;
+ return RegistryReturn;
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+ }
+
+ HKEY GetRegHive()
+ {
+
+ // Check whether Aiksaurus is installed for the current user or for all users
+
+ std::string value;
+
+ if (ReadRegString(HKEY_LOCAL_MACHINE, "Software\\Aiksaurus", "Data Path") == "")
+ {
+ return HKEY_CURRENT_USER;
+ } else {
+ return HKEY_LOCAL_MACHINE;
+ }
+
+ }
+
#if defined _DLL_BUILD
//Add a DllMain Entry point
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { return TRUE; }
#endif
+
#endif
namespace AiksaurusImpl
@@ -256,14 +289,25 @@
try
{
#if defined WIN32
- ReadRegistry();
+ std::string base(AIK_DATA_DIR);
+ std::string value;
+ HKEY hive;
+
+ hive = GetRegHive();
+ value = (hive, "Software\\Aiksaurus", "Data Path");
+ if (value != "") base == value;
#endif
- std::string base(AIK_DATA_DIR);
+
#ifdef HAVE_GETENV
- char * aikdatadir_envvar = getenv ("AIK_DATA_DIR");
- if (aikdatadir_envvar) base = std::string(aikdatadir_envvar);
+ char * aikdatadir_envvar = getenv ("AIK_DATA_DIR");
+ if (aikdatadir_envvar) base = std::string(aikdatadir_envvar);
+#endif
+
+#if defined WIN32
+ if (base.substr(base.length() - 1, 1) != "\\") base.append("\\");
#endif
- std::string mfile(base + "meanings.dat");
+
+ std::string mfile(base + "meanings.dat");
std::string wfile(base + "words.dat");
d_impl_ptr = new ThesaurusImpl(mfile.c_str(), wfile.c_str());
}

View File

@ -0,0 +1,220 @@
diff -riwBu -Xex dtl\dt2dv.c dtl-modified\dt2dv.c
--- dtl\dt2dv.c Wed Mar 08 01:00:00 1995
+++ dtl-modified\dt2dv.c Mon Oct 02 13:28:35 2006
@@ -1,9 +1,11 @@
/* dt2dv - convert human-readable "DTL" file to DVI format
- this is intended to invert dv2dt version 0.6.0
- - version 0.6.1 - 14:38 GMT +11 Thu 9 March 1995
+ - version 0.6.2 - 27 July 2005
- Geoffrey Tobin G.Tobin@ee.latrobe.edu.au
- fixes: Michal Tomczak-Jaegermann ntomczak@vm.ucs.ualberta.ca
Nelson H. F. Beebe beebe@math.utah.edu
+ Angus Leeming leeming@lyx.org: Enable dt2dv to handle
+ .dvi files containing strings longer than 1024 chars.
- Reference: "The DVI Driver Standard, Level 0",
by The TUG DVI Driver Standards Committee.
Appendix A, "Device-Independent File Format".
@@ -34,7 +36,7 @@
size_t max; /* capacity of buf */
S4 wrote; /* number of characters written into buf */
size_t read; /* position in buf of next character to read from buf */
- char * buf; /* line buffer */
+ unsigned char * buf; /* line buffer */
} Line;
char linebuf[MAXLINE+1];
@@ -1089,7 +1091,7 @@
dinfo();
status = 0;
}
- else if ( ! isprint (c) && ! isspace (c))
+ else if ( ! isprint (c & 0x7f) && ! isspace (c))
{
PRINT_PROGNAME;
fprintf (stderr,
@@ -2223,7 +2225,7 @@
/* transfer (length and) quoted string from dtl to dvi file, */
/* return number of bytes written to dvi file. */
{
- U4 k, k2;
+ U4 k, k2, lstr_maxsize;
Lstring lstr;
if (debug)
@@ -2232,12 +2234,13 @@
fprintf (stderr, "(xfer_len_string) : entering xfer_len_string.\n");
}
- init_Lstring (&lstr, LSIZE);
-
/* k[n] : length of special string */
k = get_unsigned (dtl);
+ lstr_maxsize = (k > LSIZE) ? k : LSIZE;
+ init_Lstring (&lstr, lstr_maxsize);
+
if (debug)
{
PRINT_PROGNAME;
@@ -2567,7 +2570,7 @@
#ifdef HEX_CHECKSUM
/* c[4] : (hexadecimal) checksum : I (gt) would prefer this */
xfer_hex (4, dtl, dvi);
-#else /NOT HEX_CHECKSUM */
+#else /*NOT HEX_CHECKSUM */
/* c[4] : checksum (octal, for comparison with tftopl's .pl file) */
xfer_oct (4, dtl, dvi);
#endif
diff -riwBu -Xex dtl\Makefile dtl-modified\Makefile
--- dtl\Makefile Tue Sep 19 23:59:17 2006
+++ dtl-modified\Makefile Wed Jul 05 17:54:20 2006
@@ -3,6 +3,14 @@
# Thu 9 March 1995
# Geoffrey Tobin
# Nelson H. F. Beebe
+#
+# Changes 27 July 2005 by Angus Leeming to enable the Makefile to
+# work out of the box on both *nix and Windows machines under
+# the MinSYS environment.
+#
+# The Makefile can also be used unaltered to build a Windows executable
+# from a Linux box if make is invoked as:
+# $ make EXEEXT='.exe' CC='i386-mingw32-gcc'
#=======================================================================
BINDIR = /usr/local/bin
@@ -16,10 +24,22 @@
CP = /bin/cp
DITROFF = ditroff
DITROFF = groff
-EXES = dt2dv dv2dt
+
+# This is a GNU make extension.
+# If you're flavour of make refuses to accept it,
+# then simply hardcode EXEEXT.
+ifeq ($(WINDIR),)
+ EXEEXT =
+else
+ EXEEXT = .exe
+endif
+
+DT2DV = dt2dv$(EXEEXT)
+DV2DT = dv2dt$(EXEEXT)
+EXES = $(DT2DV) $(DV2DT)
LDFLAGS = -s
LDFLAGS =
-MAN2PS = ./man2ps
+MAN2PS = sh ./man2ps
MANDIR = /usr/local/man/man$(MANEXT)
MANEXT = 1
OBJS = dt2dv.o dv2dt.o
@@ -44,23 +64,24 @@
#=======================================================================
-all: dtl check doc
+#all: dtl check doc
+all: dtl check
doc: dt2dv.hlp dv2dt.hlp dt2dv.ps dv2dt.ps
-dtl: $(EXES)
+dtl: dv2dt dt2dv
check tests: hello example tripvdu edited
dv2dt: dv2dt.o dtl.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(DV2DT) dv2dt.o
dt2dv: dt2dv.o dtl.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(DT2DV) dt2dv.o
-hello: hello.dtl $(EXES)
- dt2dv hello.dtl hello2.dvi
- dv2dt hello2.dvi hello2.dtl
+hello: hello.dtl dv2dt dt2dv
+ ./$(DT2DV) hello.dtl hello2.dvi
+ ./$(DV2DT) hello2.dvi hello2.dtl
-@diff hello.dtl hello2.dtl > hello.dif
@if [ -s hello.dif ] ; \
then echo ERROR: differences in hello.dif ; \
@@ -69,11 +90,11 @@
hello.dtl: hello.tex
tex hello
- dv2dt hello.dvi hello.dtl
+ ./$(DV2DT) hello.dvi hello.dtl
-example: example.dtl $(EXES)
- dt2dv example.dtl example2.dvi
- dv2dt example2.dvi example2.dtl
+example: example.dtl dv2dt dt2dv
+ ./$(DT2DV) example.dtl example2.dvi
+ ./$(DV2DT) example2.dvi example2.dtl
-@diff example.dtl example2.dtl > example.dif
@if [ -s example.dif ] ; \
then echo ERROR: differences in example.dif ; \
@@ -82,11 +103,11 @@
example.dtl: example.tex
tex example
- dv2dt example.dvi example.dtl
+ ./$(DV2DT) example.dvi example.dtl
-tripvdu: tripvdu.dtl $(EXES)
- dt2dv tripvdu.dtl tripvdu2.dvi
- dv2dt tripvdu2.dvi tripvdu2.dtl
+tripvdu: tripvdu.dtl dv2dt dt2dv
+ ./$(DT2DV) tripvdu.dtl tripvdu2.dvi
+ ./$(DV2DT) tripvdu2.dvi tripvdu2.dtl
-@diff tripvdu.dtl tripvdu2.dtl > tripvdu.dif
@if [ -s tripvdu.dif ] ; \
then echo ERROR: differences in tripvdu.dif ; \
@@ -95,15 +116,15 @@
tripvdu.dtl: tripvdu.tex
tex tripvdu
- dv2dt tripvdu.dvi tripvdu.dtl
+ ./$(DV2DT) tripvdu.dvi tripvdu.dtl
# edited.txt is already a dtl file.
-edited: edited.txt $(EXES)
- dt2dv edited.txt edited.dvi
- dv2dt edited.dvi edited2.dtl
- dt2dv edited2.dtl edited2.dvi
- dv2dt edited2.dvi edited3.dtl
+edited: edited.txt dv2dt dt2dv
+ ./$(DT2DV) edited.txt edited.dvi
+ ./$(DV2DT) edited.dvi edited2.dtl
+ ./$(DT2DV) edited2.dtl edited2.dvi
+ ./$(DV2DT) edited2.dvi edited3.dtl
@if [ -s edited.dif ] ; \
then echo ERROR : differences in edited.dif ; \
else $(RM) edited.dif ; \
diff -riwBu -Xex dtl\man2ps dtl-modified\man2ps
--- dtl\man2ps Tue Sep 19 23:59:22 2006
+++ dtl-modified\man2ps Wed Sep 20 00:03:05 2006
@@ -20,16 +20,16 @@
esac
# We can use either GNU groff or Sun Solaris troff + dpost
-if [ -x /usr/local/bin/groff ]
+if [ which groff > /dev/null ]
then # GNU groff
TROFF="groff $FORMAT"
TROFF2PS="cat"
-elif [ -x /usr/lib/lp/postscript/dpost ]
++elif [ which dpost > /dev/null ]
then # Solaris 2.1
TROFF="troff $FORMAT"
TROFF2PS="/usr/lib/lp/postscript/dpost"
else
- echo "Cannot find troff-to-PostScript filter"
++ echo "Cannot find troff-to-PostScript filter" >&2
exit 1
fi

View File

@ -0,0 +1,360 @@
diff -riwbBu -Xex dvipost-1.1/dvi.c dvipost-1.1-modified/dvi.c
--- dvipost-1.1/dvi.c Wed Mar 22 14:59:58 2006
+++ dvipost-1.1-modified/dvi.c Wed May 31 11:27:44 2006
@@ -502,8 +502,12 @@
for (i = 0; i < pos_changed.dim; i++)
{
POS *p = pos_changed.tab + i;
+ if (!p->type)
+ dout_special(out, osstart);
cmd_goto(out, p->end, cbcol);
dout_putrule(out, p->end - p->beg, cbrule);
+ if (!p->type)
+ dout_special(out, osend);
}
dout_special(out, cbend);
@@ -625,10 +629,9 @@
mv_right(w);
text_cnt++;
- if (!cbmode[page_stat]) return;
-
+ if (!cbmode[page_stat] && !osmode[page_stat]) return;
pos_add(&pos_changed, dvi_stat.v - text_height - cbexp,
- dvi_stat.v + text_depth + cbexp);
+ dvi_stat.v + text_depth + cbexp, cbmode[page_stat]);
if (cbframe)
{
diff -riwbBu -Xex dvipost-1.1/dvipost.c dvipost-1.1-modified/dvipost.c
--- dvipost-1.1/dvipost.c Mon Nov 4 08:44:46 2002
+++ dvipost-1.1-modified/dvipost.c Mon Sep 18 13:11:58 2006
@@ -1,6 +1,7 @@
/* dvi file post processing
$Copyright (C) 2002 Erich Fruehstueck
+Modified version by LyX Team
Dvipost is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -18,13 +19,20 @@
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
-
#include "dvipost.h"
#include "dvi.h"
+#if !defined(_MSC_VER)
#include <unistd.h>
#include <dirent.h>
+#else
+#include "dirent.h"
+#endif
#include <sys/stat.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
int dvipost (const char *iname, const char *oname)
{
FILE *input, *tmp, *output;
@@ -33,7 +41,19 @@
/* open temporary file
*/
+#ifndef _WIN32
tmp = tmpfile();
+#else
+ /* create temporary file in Windows temp directory */
+
+ char tmppath[MAX_PATH-14];
+ char tmpname[MAX_PATH];
+
+ GetTempPath(MAX_PATH-14, tmppath);
+ GetTempFileName(tmppath, "dvp", 0, tmpname);
+
+ tmp = fopen(tmpname, "r+b");
+#endif
if (!tmp)
{
@@ -57,8 +77,10 @@
}
else
{
+#ifndef _WIN32
iname = "<stdin>";
input = stdin;
+#endif
}
/* check magic and process input
@@ -94,6 +116,8 @@
/* copy file to output
*/
+
+#ifndef _WIN32
rewind(tmp);
if (oname && strcmp(oname, "-") != 0)
@@ -113,23 +137,20 @@
oname = "<stdout>";
output = stdout;
}
+#endif
message(NOTE, "$!: Copy data to %s\n", oname);
- while ((c = getc(tmp)) != EOF)
- putc(c, output);
-
+#ifndef _WIN32
+ while ((c = getc(tmp)) != EOF) putc(c, output);
fclose(tmp);
+#else
+ /* Copy file directly */
+ fclose(tmp);
+ CopyFile(tmpname, oname, FALSE);
+ DeleteFile(tmpname);
+#endif
- if (ferror(output))
- {
- fprintf(stderr, "%s: ", pname);
- perror(oname);
- stat = EXIT_FAILURE;
- }
- else stat = EXIT_SUCCESS;
-
- fclose(output);
return stat;
}
diff -riwbBu -Xex dvipost-1.1/dvipost.h dvipost-1.1-modified/dvipost.h
--- dvipost-1.1/dvipost.h Mon Nov 4 08:44:46 2002
+++ dvipost-1.1-modified/dvipost.h Sun Sep 17 22:03:51 2006
@@ -1,6 +1,7 @@
/* postfilter
$Copyright (C) 2002 Erich Fruehstueck
+Modified version by LyX Team
Dvipost is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -44,6 +45,7 @@
typedef struct {
int beg;
int end;
+ int type;
} POS;
typedef struct {
@@ -53,7 +55,7 @@
} PosTab;
void pos_init (PosTab *pos);
-void pos_add (PosTab *pos, int beg, int end);
+void pos_add (PosTab *pos, int beg, int end, int type);
extern int process_dvi (const char *id, FILE *in, FILE *out);
extern int dvipost (const char *iname, const char *oname);
diff -riwbBu -Xex dvipost-1.1/main.c dvipost-1.1-modified/main.c
--- dvipost-1.1/main.c Wed Nov 27 15:19:14 2002
+++ dvipost-1.1-modified/main.c Sun Sep 17 21:56:42 2006
@@ -24,15 +24,19 @@
#define TEX_ACCEPT_OPTIONS 1
#endif
-static char *version = "dvipost version 1.0\n\
+static char *version = "dvipost version 1.1 with modifications by LyX Team (sep 2006)\n\
Dvipost is copyright (C) 2002 Erich Fruehstueck.\n";
#include "dvipost.h"
#include "dvi.h"
+#if !defined(_MSC_VER)
#include <unistd.h>
+#endif
#include <string.h>
#include <sys/types.h>
+#ifndef _WIN32
#include <sys/wait.h>
+#endif
char **tex_argv = NULL;
int tex_argc = 0;
@@ -233,17 +237,26 @@
return stat;
}
-static char *get_dvi_name (const char *arg)
+static char *get_dvi_name (char *arg)
{
char *p, *dvi;
+#ifdef _WIN32
+ int i;
+
+ for (i=0; i < strlen(arg); ++i) {
+ if (arg[i] == '\\')
+ arg[i] = '/';
+ }
+#endif
+
p = strrchr(arg, '/');
if (p && p[1])
arg = p + 1;
- dvi = strcpy(xalloc(strlen(arg) + 4), arg);
- p = strchr(dvi, '.');
+ dvi = strcpy(xalloc(strlen(arg) + 5), arg);
+ p = strrchr(dvi, '.');
if (p && strcmp(p, ".tex") == 0)
*p = 0;
@@ -267,14 +280,32 @@
char *dviname;
int flag;
int i, n;
+#ifdef _WIN32
+ char *cmd;
+ char *qch;
+ char *p;
+#else
int status;
pid_t pid;
+#endif
time_t stamp;
tex_argv = xalloc((1 + argc) * sizeof(char*));
tex_argv[0] = argv[0];
tex_argc = 1;
+#ifdef _WIN32
+ for (i=0; i < strlen(argv[0]); ++i) {
+ if (argv[0][i] == '\\')
+ argv[0][i] = '/';
+ }
+
+ p = strrchr(argv[0], '.');
+
+ if (p && strcmp(p, ".exe") == 0)
+ *p = 0;
+#endif
+
pname = strrchr(argv[0], '/');
if (pname == NULL) pname = argv[0];
@@ -356,6 +387,34 @@
fflush(stdout);
time(&stamp);
+#ifdef _WIN32
+ for (i=0, n=0; i < tex_argc; ++i) {
+ n += strlen(tex_argv[i]);
+ qch = tex_argv[i];
+ while ((qch = strchr(qch, '"'))) {
+ ++qch;
+ ++n;
+ }
+ }
+
+ cmd = xalloc(1 + n + 3*(tex_argc-1));
+ strcpy(cmd, tex_argv[0]);
+
+ for (i=1, n=strlen(cmd); i < tex_argc; ++i)
+ {
+ cmd[n++] = ' ';
+ cmd[n++] = '"';
+ for (qch=tex_argv[i]; *qch; ++qch) {
+ if (*qch == '"')
+ cmd[n++] = '\\';
+ cmd[n++] = *qch;
+ }
+ cmd[n++] = '"';
+ }
+ cmd[n] = '\0';
+ system(cmd);
+ xfree(cmd);
+#else
pid = fork();
if (pid == -1)
@@ -368,6 +427,7 @@
execvp(tex_argv[0], tex_argv);
waitpid(pid, &status, 0);
+#endif
if (dviname)
return dvipost(dviname, dviname);
diff -riwbBu -Xex dvipost-1.1/pos.c dvipost-1.1-modified/pos.c
--- dvipost-1.1/pos.c Tue Oct 29 12:54:02 2002
+++ dvipost-1.1-modified/pos.c Sun Sep 17 22:03:41 2006
@@ -1,6 +1,7 @@
/* position table
$Copyright (C) 2002 Erich Fruehstueck
+Modified version by LyX Team
Dvipost is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -39,7 +40,7 @@
pos->dim = 0;
}
-void pos_add (PosTab *pos, int beg, int end)
+void pos_add (PosTab *pos, int beg, int end, int type)
{
if (beg > end)
{
@@ -56,7 +57,7 @@
{
if (last->end < end) last->end = end;
if (last->beg > beg) last->beg = beg;
-
+ if (last->type < type) last->type = type;
return;
}
}
@@ -64,5 +65,6 @@
pos_expand(pos);
pos->tab[pos->dim].beg = beg;
pos->tab[pos->dim].end = end;
+ pos->tab[pos->dim].type = type;
pos->dim++;
}
diff -riwbBu -Xex dvipost-1.1/tfm.c dvipost-1.1-modified/tfm.c
--- dvipost-1.1/tfm.c Sun Nov 3 09:52:04 2002
+++ dvipost-1.1-modified/tfm.c Sun Sep 17 22:03:44 2006
@@ -1,6 +1,7 @@
/* tfm data
$Copyright (C) 2002 Erich Fruehstueck
+Modified version by LyX Team
Dvipost is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
@@ -22,6 +23,11 @@
#include "dvi.h"
#include <ctype.h>
+#if defined(_MSC_VER)
+#define popen _popen
+#define pclose _pclose
+#endif
+
static char tfm_buf[1024];
static int tfm_err = 0;
static int tfm_pos = 0;
@@ -112,6 +118,8 @@
{
if (tfm_buf[n] == '\n')
{
+ if (n && tfm_buf[n-1] == '\r')
+ n--;
tfm_buf[n] = 0;
break;
}

View File

@ -0,0 +1,253 @@
diff -riwbBuN -Xex aspell-0.60.4/Makefile.am aspell-0.60.4-modified/Makefile.am
--- aspell-0.60.4/Makefile.am Wed Oct 19 11:12:02 2005
+++ aspell-0.60.4-modified/Makefile.am Thu Jun 15 14:45:47 2006
@@ -32,6 +32,7 @@
endif
libaspell_la_SOURCES =\
+ common/aspell_win.cpp\
common/cache.cpp\
common/string.cpp\
common/getdata.cpp\
diff -riwbBuN -Xex aspell-0.60.4/common/aspell_win.cpp aspell-0.60.4-modified/common/aspell_win.cpp
--- aspell-0.60.4/common/aspell_win.cpp Thu Jan 1 01:00:00 1970
+++ aspell-0.60.4-modified/common/aspell_win.cpp Fri Jun 16 01:19:04 2006
@@ -0,0 +1,54 @@
+#ifdef _WIN32
+
+#include <windows.h>
+#include "string.hpp"
+
+namespace acommon {
+
+ String ReadRegString(HKEY hive, String key, String name)
+ {
+
+ // Reads a string from the Windows registry (used to get paths)
+
+ HKEY hKey;
+ unsigned long lType;
+ DWORD dwSize;
+ unsigned char* szValue = NULL;
+
+ if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
+ {
+ szValue = new unsigned char[dwSize + 1];
+ ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
+ String RegistryReturn((char*)szValue);
+ delete[] szValue;
+ return RegistryReturn;
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+
+ }
+
+ HKEY GetRegHive()
+ {
+
+ // Check whether Aspell is installed for the current user or for all users
+
+ String value;
+
+ if (ReadRegString(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Dictionary Path") == "")
+ {
+ return HKEY_CURRENT_USER;
+ } else {
+ return HKEY_LOCAL_MACHINE;
+ }
+
+ }
+
+}
+
+#endif
diff -riwbBuN -Xex aspell-0.60.4/common/aspell_win.hpp aspell-0.60.4-modified/common/aspell_win.hpp
--- aspell-0.60.4/common/aspell_win.hpp Thu Jan 1 01:00:00 1970
+++ aspell-0.60.4-modified/common/aspell_win.hpp Thu Jun 15 15:33:58 2006
@@ -0,0 +1,18 @@
+#ifdef _WIN32
+
+#ifndef ASPELL_WIN__HPP
+#define ASPELL_WIN__HPP
+
+#include "string.hpp"
+#include <windows.h>
+
+namespace acommon {
+
+ extern HKEY GetRegHive();
+ extern String ReadRegString(HKEY type, String key, String name);
+
+}
+
+#endif
+
+#endif
diff -riwbBuN -Xex aspell-0.60.4/common/config.cpp aspell-0.60.4-modified/common/config.cpp
--- aspell-0.60.4/common/config.cpp Wed Jun 22 07:32:30 2005
+++ aspell-0.60.4-modified/common/config.cpp Wed Jun 14 20:44:29 2006
@@ -39,6 +39,7 @@
#include "string_list.hpp"
#include "gettext.h"
+#undef printf
#include "iostream.hpp"
diff -riwbBuN -Xex aspell-0.60.4/common/convert.cpp aspell-0.60.4-modified/common/convert.cpp
--- aspell-0.60.4/common/convert.cpp Thu Sep 29 05:20:04 2005
+++ aspell-0.60.4-modified/common/convert.cpp Sat May 27 12:08:02 2006
@@ -23,6 +23,7 @@
#include "iostream.hpp"
#include "gettext.h"
+#undef printf
namespace acommon {
diff -riwbBuN -Xex aspell-0.60.4/common/file_util.cpp aspell-0.60.4-modified/common/file_util.cpp
--- aspell-0.60.4/common/file_util.cpp Mon Nov 15 13:29:54 2004
+++ aspell-0.60.4-modified/common/file_util.cpp Sat May 27 12:08:02 2006
@@ -26,6 +26,7 @@
#ifdef WIN32
+# include "asc_ctype.hpp"
# include <io.h>
# define ACCESS _access
# include <windows.h>
diff -riwbBuN -Xex aspell-0.60.4/common/gettext_init.cpp aspell-0.60.4-modified/common/gettext_init.cpp
--- aspell-0.60.4/common/gettext_init.cpp Tue Nov 9 09:20:24 2004
+++ aspell-0.60.4-modified/common/gettext_init.cpp Thu Jun 15 15:31:02 2006
@@ -1,5 +1,13 @@
+#include "settings.h"
+#include "string.hpp"
+
+#ifdef _WIN32
+ #include <windows.h>
+ #include "aspell_win.hpp"
+#endif
#include "gettext.h"
+#undef printf
#if ENABLE_NLS
@@ -11,12 +19,24 @@
extern "C" void aspell_gettext_init()
{
- {
acommon::Lock l(&lock);
if (did_init) return;
did_init = true;
- }
+
+#ifdef _WIN32
+ // Registry key for Locale Path
+
+ acommon::String value;
+ HKEY hive;
+
+ hive = acommon::GetRegHive();
+ value = acommon::ReadRegString(hive, "Software\\Aspell", "Locale Path");
+ if (value == "") value = LOCALEDIR;
+
+ bindtextdomain("aspell", value.c_str());
+#else
bindtextdomain("aspell", LOCALEDIR);
+#endif
}
#else
diff -riwbBuN -Xex aspell-0.60.4/common/info.cpp aspell-0.60.4-modified/common/info.cpp
--- aspell-0.60.4/common/info.cpp Wed Nov 10 07:18:46 2004
+++ aspell-0.60.4-modified/common/info.cpp Fri Jun 16 01:20:52 2006
@@ -15,9 +15,11 @@
/* BSDi defines u_intXX_t types in machine/types.h */
#include <machine/types.h>
#endif
+
#ifdef WIN32
# include <windows.h>
# include <winbase.h>
+#include "aspell_win.hpp"
#endif
#include "iostream.hpp"
@@ -38,6 +40,7 @@
#include "string_map.hpp"
#include "gettext.h"
+#undef printf
namespace acommon {
@@ -492,8 +495,22 @@
void get_data_dirs (Config * config,
StringList & lst)
{
+ String dictpath;
+ HKEY hive;
+
lst.clear();
- lst.add(config->retrieve("data-dir"));
+
+ hive = GetRegHive();
+
+#ifdef _WIN32
+ // Registry key for dictionary path
+ dictpath = ReadRegString(hive, "Software\\Aspell", "Dictionary Path");;
+ if (dictpath == "") dictpath = config->retrieve("data-dir");
+#else
+ dictpath = config->retrieve("data-dir");
+#endif
+
+ lst.add(dictpath);
lst.add(config->retrieve("dict-dir"));
}
diff -riwbBuN -Xex aspell-0.60.4/common/posib_err.cpp aspell-0.60.4-modified/common/posib_err.cpp
--- aspell-0.60.4/common/posib_err.cpp Sun Nov 21 03:52:22 2004
+++ aspell-0.60.4-modified/common/posib_err.cpp Sat May 27 12:08:02 2006
@@ -13,6 +13,7 @@
#include "posib_err.hpp"
#include "gettext.h"
+#undef printf
namespace acommon {
diff -riwbBuN -Xex aspell-0.60.4/modules/speller/default/language.cpp aspell-0.60.4-modified/modules/speller/default/language.cpp
--- aspell-0.60.4/modules/speller/default/language.cpp Sun Feb 20 22:47:08 2005
+++ aspell-0.60.4-modified/modules/speller/default/language.cpp Wed Jun 14 19:55:47 2006
@@ -21,10 +21,11 @@
#include "file_util.hpp"
#ifdef ENABLE_NLS
-# include <langinfo.h>
+//#include <langinfo.h>
#endif
#include "gettext.h"
+#undef printf
namespace aspeller {
diff -riwbBuN -Xex aspell-0.60.4/prog/aspell.cpp aspell-0.60.4-modified/prog/aspell.cpp
--- aspell-0.60.4/prog/aspell.cpp Sun Jun 19 14:00:46 2005
+++ aspell-0.60.4-modified/prog/aspell.cpp Wed Jun 14 20:46:09 2006
@@ -60,6 +60,7 @@
#include "hash_fun.hpp"
#include "gettext.h"
+#undef printf
using namespace acommon;

View File

@ -0,0 +1,329 @@
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/hostname.c gettext-tools/src/hostname.c
--- gettext-tools/src/hostname.c 2005-05-20 16:40:02.000000000 -0400
+++ gettext-tools/src/hostname.c 2005-11-11 11:02:07.203125000 -0500
@@ -99,7 +99,7 @@
static enum { default_format, short_format, long_format, ip_format } format;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "fqdn", no_argument, NULL, 'f' },
{ "help", no_argument, NULL, 'h' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgattrib.c gettext-tools/src/msgattrib.c
--- gettext-tools/src/msgattrib.c 2005-05-20 16:40:15.000000000 -0400
+++ gettext-tools/src/msgattrib.c 2005-11-11 11:01:39.484375000 -0500
@@ -69,7 +69,7 @@
static int to_change;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "clear-fuzzy", no_argument, NULL, CHAR_MAX + 8 },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgcat.c gettext-tools/src/msgcat.c
--- gettext-tools/src/msgcat.c 2005-05-20 16:40:19.000000000 -0400
+++ gettext-tools/src/msgcat.c 2005-11-11 11:02:33.109375000 -0500
@@ -53,7 +53,7 @@
static const char *to_code;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgcmp.c gettext-tools/src/msgcmp.c
--- gettext-tools/src/msgcmp.c 2005-05-20 16:40:23.000000000 -0400
+++ gettext-tools/src/msgcmp.c 2005-11-11 11:02:51.906250000 -0500
@@ -49,7 +49,7 @@
static bool multi_domain_mode = false;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "directory", required_argument, NULL, 'D' },
{ "help", no_argument, NULL, 'h' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgcomm.c gettext-tools/src/msgcomm.c
--- gettext-tools/src/msgcomm.c 2005-05-20 16:40:27.000000000 -0400
+++ gettext-tools/src/msgcomm.c 2005-11-11 11:03:09.406250000 -0500
@@ -55,7 +55,7 @@
static const char *to_code;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgconv.c gettext-tools/src/msgconv.c
--- gettext-tools/src/msgconv.c 2005-05-20 16:40:31.000000000 -0400
+++ gettext-tools/src/msgconv.c 2005-11-11 11:03:21.671875000 -0500
@@ -52,7 +52,7 @@
static const char *to_code;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgen.c gettext-tools/src/msgen.c
--- gettext-tools/src/msgen.c 2005-05-20 16:40:35.000000000 -0400
+++ gettext-tools/src/msgen.c 2005-11-11 11:03:54.531250000 -0500
@@ -48,7 +48,7 @@
static int force_po;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgexec.c gettext-tools/src/msgexec.c
--- gettext-tools/src/msgexec.c 2005-05-20 16:40:40.000000000 -0400
+++ gettext-tools/src/msgexec.c 2005-11-11 11:04:07.546875000 -0500
@@ -74,7 +74,7 @@
static int exitcode;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "directory", required_argument, NULL, 'D' },
{ "help", no_argument, NULL, 'h' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgfilter.c gettext-tools/src/msgfilter.c
--- gettext-tools/src/msgfilter.c 2005-05-20 16:40:44.000000000 -0400
+++ gettext-tools/src/msgfilter.c 2005-11-11 11:04:19.062500000 -0500
@@ -97,7 +97,7 @@
static int sub_argc;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgfmt.c gettext-tools/src/msgfmt.c
--- gettext-tools/src/msgfmt.c 2005-11-11 00:58:30.000000000 -0500
+++ gettext-tools/src/msgfmt.c 2005-11-11 11:04:30.546875000 -0500
@@ -163,7 +163,7 @@
static int do_statistics;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "alignment", required_argument, NULL, 'a' },
{ "check", no_argument, NULL, 'c' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msggrep.c gettext-tools/src/msggrep.c
--- gettext-tools/src/msggrep.c 2005-05-20 16:41:05.000000000 -0400
+++ gettext-tools/src/msggrep.c 2005-11-11 11:03:39.796875000 -0500
@@ -81,7 +81,7 @@
static struct grep_task grep_task[3];
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "comment", no_argument, NULL, 'C' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msginit.c gettext-tools/src/msginit.c
--- gettext-tools/src/msginit.c 2005-11-11 00:59:01.000000000 -0500
+++ gettext-tools/src/msginit.c 2005-11-11 11:04:42.078125000 -0500
@@ -125,7 +125,7 @@
static bool no_translator;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "input", required_argument, NULL, 'i' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgmerge.c gettext-tools/src/msgmerge.c
--- gettext-tools/src/msgmerge.c 2005-05-20 16:42:09.000000000 -0400
+++ gettext-tools/src/msgmerge.c 2005-11-11 11:04:51.328125000 -0500
@@ -84,7 +84,7 @@
static const char *backup_suffix_string;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "backup", required_argument, NULL, CHAR_MAX + 1 },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msgunfmt.c gettext-tools/src/msgunfmt.c
--- gettext-tools/src/msgunfmt.c 2005-05-20 16:42:11.000000000 -0400
+++ gettext-tools/src/msgunfmt.c 2005-11-11 11:05:45.718750000 -0500
@@ -73,7 +73,7 @@
static int force_po;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "csharp", no_argument, NULL, CHAR_MAX + 4 },
{ "csharp-resources", no_argument, NULL, CHAR_MAX + 5 },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/msguniq.c gettext-tools/src/msguniq.c
--- gettext-tools/src/msguniq.c 2005-05-20 16:42:23.000000000 -0400
+++ gettext-tools/src/msguniq.c 2005-11-11 11:05:57.968750000 -0500
@@ -52,7 +52,7 @@
static const char *to_code;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-location", no_argument, &line_comment, 1 },
{ "directory", required_argument, NULL, 'D' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/urlget.c gettext-tools/src/urlget.c
--- gettext-tools/src/urlget.c 2005-05-20 16:44:41.000000000 -0400
+++ gettext-tools/src/urlget.c 2005-11-11 11:06:10.968750000 -0500
@@ -65,7 +65,7 @@
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, 'V' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/src/xgettext.c gettext-tools/src/xgettext.c
--- gettext-tools/src/xgettext.c 2005-05-20 16:47:42.000000000 -0400
+++ gettext-tools/src/xgettext.c 2005-11-11 11:06:25.406250000 -0500
@@ -176,7 +176,7 @@
#endif
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "add-comments", optional_argument, NULL, 'c' },
{ "add-location", no_argument, &line_comment, 1 },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/tests/tstgettext.c gettext-tools/tests/tstgettext.c
--- gettext-tools/tests/tstgettext.c 2005-05-20 16:48:17.000000000 -0400
+++ gettext-tools/tests/tstgettext.c 2005-11-11 11:10:29.046875000 -0500
@@ -52,7 +52,7 @@
static bool do_expand;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "domain", required_argument, NULL, 'd' },
{ "env", required_argument, NULL, '=' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/tests/tstngettext.c gettext-tools/tests/tstngettext.c
--- gettext-tools/tests/tstngettext.c 2005-05-20 16:48:20.000000000 -0400
+++ gettext-tools/tests/tstngettext.c 2005-11-11 11:10:39.875000000 -0500
@@ -42,7 +42,7 @@
#define _(str) gettext (str)
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "domain", required_argument, NULL, 'd' },
{ "env", required_argument, NULL, '=' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-runtime/configure.ac gettext-runtime/configure.ac
--- gettext-runtime/configure.ac 2005-11-11 00:04:26.000000000 -0500
+++ gettext-runtime/configure.ac 2005-11-11 11:34:46.687500000 -0500
@@ -111,6 +111,28 @@
#endif
])
+dnl Since gcc-3.3.3, const variables are placed in .rdata section
+dnl On windows (cygwin, mingw) this is a problem if the variable
+dnl is a composite containing references to other variables, because
+dnl the runtime relocation machinery can't fixup the address. Thus
+dnl these composite vars must NOT be declared const. This typically
+dnl occurs in long_options structs, containing references to variables
+dnl that are the targets of an option flag.
+case "$host_os" in
+ *cygwin* | *mingw* )
+ AC_DEFINE([CONST_IS_PROBLEMATIC_WIN32], 1,
+ [Define to 1 if structs-containing-references must not be declared const])
+ ;;
+esac
+AH_VERBATIM([DEF_CONST_PROBLEMATIC_WIN32],
+[/* On some platforms, structs-containing-references must not be declared const */
+#if defined CONST_IS_PROBLEMATIC_WIN32
+# define CONST_PROBLEMATIC_WIN32
+#else
+# define CONST_PROBLEMATIC_WIN32 const
+#endif
+])
+
AH_VERBATIM([DEF_OS2],
[/* Extra OS/2 (emx+gcc) defines. */
#ifdef __EMX__
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-tools/configure.ac gettext-tools/configure.ac
--- gettext-tools/configure.ac 2005-11-11 00:26:09.000000000 -0500
+++ gettext-tools/configure.ac 2005-11-11 11:34:03.140625000 -0500
@@ -214,6 +214,28 @@
#endif
])
+dnl Since gcc-3.3.3, const variables are placed in .rdata section
+dnl On windows (cygwin, mingw) this is a problem if the variable
+dnl is a composite containing references to other variables, because
+dnl the runtime relocation machinery can't fixup the address. Thus
+dnl these composite vars must NOT be declared const. This typically
+dnl occurs in long_options structs, containing references to variables
+dnl that are the targets of an option flag.
+case "$host_os" in
+ *cygwin* | *mingw* )
+ AC_DEFINE([CONST_IS_PROBLEMATIC_WIN32], 1,
+ [Define to 1 if structs-containing-references must not be declared const])
+ ;;
+esac
+AH_VERBATIM([DEF_CONST_PROBLEMATIC_WIN32],
+[/* On some platforms, structs-containing-references must not be declared const */
+#if defined CONST_IS_PROBLEMATIC_WIN32
+# define CONST_PROBLEMATIC_WIN32
+#else
+# define CONST_PROBLEMATIC_WIN32 const
+#endif
+])
+
dnl Check for the expat XML parser.
dnl On operating systems where binary distribution vendors are likely to
dnl ship both gettext and expat, we use dynamic loading to avoid a hard
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-runtime/src/envsubst.c gettext-runtime/src/envsubst.c
--- gettext-runtime/src/envsubst.c 2005-05-20 16:14:16.000000000 -0400
+++ gettext-runtime/src/envsubst.c 2005-11-11 11:07:50.796875000 -0500
@@ -43,7 +43,7 @@
static bool all_variables;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "variables", no_argument, NULL, 'v' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-runtime/src/gettext.c gettext-runtime/src/gettext.c
--- gettext-runtime/src/gettext.c 2005-05-20 16:14:21.000000000 -0400
+++ gettext-runtime/src/gettext.c 2005-11-11 11:08:03.859375000 -0500
@@ -48,7 +48,7 @@
static bool do_expand;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "domain", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' },
diff -urN -x .build -x .inst -x .sinst -x '*~' gettext-runtime/src/ngettext.c gettext-runtime/src/ngettext.c
--- gettext-runtime/src/ngettext.c 2005-05-20 16:14:39.000000000 -0400
+++ gettext-runtime/src/ngettext.c 2005-11-11 11:08:16.062500000 -0500
@@ -44,7 +44,7 @@
static int do_expand;
/* Long options. */
-static const struct option long_options[] =
+static CONST_PROBLEMATIC_WIN32 struct option long_options[] =
{
{ "domain", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' },

View File

@ -0,0 +1,248 @@
diff -riwBu -Xex aspell-setter-sep06\common\config.cpp aspell-setter-sep06-modified\common\config.cpp
--- aspell-setter-sep06\common\config.cpp Mon Dec 12 17:41:06 2005
+++ aspell-setter-sep06-modified\common\config.cpp Sun Oct 22 13:03:46 2006
@@ -78,6 +78,10 @@
namespace aspell {
+#ifdef WIN32PORT
+ String GetWindowsDir(String registry_name, String default_directory);
+#endif
+
const char * const keyinfo_type_name[4] = {
N_("string"), N_("integer"), N_("boolean"), N_("list")
};
@@ -642,20 +646,19 @@
} else if (strcmp(i, "home-dir") == 0) {
- //get the personal folder (e.g. "c:\My Documents")
- char * dir = new char[MAX_PATH];
- LPITEMIDLIST items = 0;
- HRESULT hand = SHGetSpecialFolderLocation(0, CSIDL_PERSONAL, &items);
- if ((NOERROR == hand) && items) {
- if (SHGetPathFromIDList(items, dir)) {
- for (char *ptr = dir; *ptr; ++ptr)
- if ('\\' == *ptr)
- *ptr = '/';
- final_str = dir;
- }
- CoTaskMemFree(items);
- }
- delete [] dir;
+ final_str = GetWindowsDir("Base Path", "");
+
+ } else if (strcmp(i, "dict-dir") == 0) {
+
+ final_str = GetWindowsDir("Dictionary Path", "Dictionaries");
+
+ } else if (strcmp(i, "data-dir") == 0) {
+
+ final_str = GetWindowsDir("Data Path", "Data");
+
+ } else if (strcmp(i, "personal-dir") == 0) {
+
+ final_str = GetWindowsDir("Personal Path", "Personal");
}
#endif
@@ -1394,20 +1397,6 @@
return no_err;
}
-#if defined(WIN32_USE_PERSONAL_DIR)
-# define HOME_DIR "!home-dir"
-# define PERSONAL "<lang>.pws"
-# define REPL "<lang>.prepl"
-#elif defined(ENABLE_WIN32_RELOCATABLE)
-# define HOME_DIR "<prefix>"
-# define PERSONAL "<lang>.pws"
-# define REPL "<lang>.prepl"
-#else
-# define HOME_DIR "<$HOME|./>"
-# define PERSONAL ".aspell.<lang>.pws"
-# define REPL ".aspell.<lang>.prepl"
-#endif
-
static const KeyInfo config_keys[] = {
// the description should be under 50 chars
{"actual-dict-dir", KeyInfoString, "<dict-dir^master>", 0}
@@ -1484,7 +1473,7 @@
, {"per-conf-path", KeyInfoString, "<home-dir/per-conf>", 0}
, {"personal", KeyInfoString, PERSONAL,
N_("personal dictionary file name")}
- , {"personal-path", KeyInfoString, "<home-dir/personal>", 0}
+ , {"personal-path", KeyInfoString, PERSONAL_DIR, 0}
, {"prefix", KeyInfoString, PREFIX,
N_("prefix directory")}
, {"repl", KeyInfoString, REPL,
@@ -1525,10 +1514,8 @@
, {"warn", KeyInfoBool, "true",
N_("enable warnings")}
#ifdef WIN32PORT
- , {"dict-subdir", KeyInfoString, "dicts",
- N_("sub directory for dictionaries")}
- , {"data-subdir", KeyInfoString, "data",
- N_("sub directory for other data")}
+ , {"personal-dir", KeyInfoString, PERSONAL_DIR,
+ N_("directory for personal dictionaries")}
#endif
//
@@ -1587,5 +1574,88 @@
config_impl_keys_begin,
config_impl_keys_end);
}
+
+#ifdef WIN32PORT
+
+ String ReadRegString(HKEY hive, String key, String name)
+ {
+
+ // Reads a string from the Windows registry (used to get paths)
+
+ HKEY hKey;
+ unsigned long lType;
+ DWORD dwSize;
+ unsigned char* szValue = NULL;
+
+ if (::RegOpenKeyEx(hive, key.c_str(), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
+ {
+ if(::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, NULL, &dwSize) == ERROR_SUCCESS)
+ {
+ szValue = new unsigned char[dwSize + 1];
+ ::RegQueryValueEx(hKey, name.c_str(), NULL, &lType, szValue, &dwSize);
+ String RegistryReturn((char*)szValue);
+ delete[] szValue;
+ return RegistryReturn;
+ } else {
+ return "";
+ }
+ } else {
+ return "";
+ }
+
+ }
+
+ HKEY GetRegHive()
+ {
+
+ // Check whether Aspell is installed for the current user or for all users
+
+ String value;
+
+ if (ReadRegString(HKEY_CURRENT_USER, "Software\\Aspell", "Base Path").empty())
+ {
+ return HKEY_LOCAL_MACHINE;
+ } else {
+ return HKEY_CURRENT_USER;
+ }
+
+ }
+
+ String GetWindowsDir(String registry_name, String default_dir)
+ {
+
+ String final_dir;
+
+ // Get directory from registry
+ HKEY hive;
+ hive = GetRegHive();
+ final_dir = ReadRegString(hive, "Software\\Aspell", registry_name);
+
+ // Default location in "Documents and Settings"
+ if (final_dir.empty()) {
+
+ char * dir = new char[MAX_PATH];
+ LPITEMIDLIST items = 0;
+ HRESULT hand = SHGetSpecialFolderLocation(0, CSIDL_APPDATA, &items);
+
+ if ((NOERROR == hand) && items) {
+ if (SHGetPathFromIDList(items, dir)) {
+ for (char *ptr = dir; *ptr; ++ptr)
+ if ('\\' == *ptr)
+ *ptr = '/';
+ final_dir = dir;
+ final_dir.append("/Aspell/");
+ final_dir.append(default_dir.c_str());
+ }
+ CoTaskMemFree(items);
+ }
+
+ }
+
+ return final_dir;
+
+ }
+
+#endif
}
diff -riwBu -Xex aspell-setter-sep06\common\vector.hpp aspell-setter-sep06-modified\common\vector.hpp
--- aspell-setter-sep06\common\vector.hpp Thu Oct 13 08:42:54 2005
+++ aspell-setter-sep06-modified\common\vector.hpp Sun Sep 17 18:50:45 2006
@@ -50,10 +50,10 @@
T * data_end() {return &*this->end();}
T * pbegin() {return &*this->begin();}
- T * pend() {return &*this->end();}
+ T * pend() {return &this->back()+1;}
const T * pbegin() const {return &*this->begin();}
- const T * pend() const {return &*this->end();}
+ const T * pend() const {return &this->back()+1;}
template <typename U>
U * datap() {
diff -riwBu -Xex aspell-setter-sep06\win32\dirs.h aspell-setter-sep06-modified\win32\dirs.h
--- aspell-setter-sep06\win32\dirs.h Thu Oct 13 12:29:34 2005
+++ aspell-setter-sep06-modified\win32\dirs.h Sun Oct 22 12:55:10 2006
@@ -1,16 +1,27 @@
#ifndef dirs_h
#define dirs_h
-#ifdef WIN32_USE_EXECUTABLE_DIR
-# define DATA_DIR "<prefix/data-subdir>"
-# define CONF_DIR "<prefix>"
-# define DICT_DIR "<prefix/dict-subdir>"
+# define DATA_DIR "!data-dir"
+# define DICT_DIR "!dict-dir"
+# define PERSONAL_DIR "!personal-dir"
+
+#if defined(WIN32_USE_EXECUTABLE_DIR)
+# define HOME_DIR "<prefix>"
+# define PERSONAL "<personal-dir>/<lang>.pws"
+# define REPL "<personal-dir>/<lang>.prepl"
# define PREFIX "!prefix"
+#elif defined(WIN32_USE_PERSONAL_DIR)
+# define HOME_DIR "!home-dir"
+# define PERSONAL "<personal-dir>/<lang>.pws"
+# define REPL "<personal-dir>/<lang>.prepl"
+# define PREFIX "<home-dir>"
#else
-# define DATA_DIR "aspell-win32/data"
-# define CONF_DIR "aspell-win32"
-# define DICT_DIR "dicts"
-# define PREFIX "aspell-win32"
+# define HOME_DIR "<$HOME|./>"
+# define PERSONAL "<personal-dir>/.aspell.<lang>.pws"
+# define REPL "<personal-dir>/.aspell.<lang>.prepl"
+# define PREFIX "<home-dir>"
#endif
+
+#define CONF_DIR HOME_DIR
#endif
diff -riwBu -Xex aspell-setter-sep06\win32\settings.h aspell-setter-sep06-modified\win32\settings.h
--- aspell-setter-sep06\win32\settings.h Wed Sep 06 09:51:16 2006
+++ aspell-setter-sep06-modified\win32\settings.h Sun Sep 17 17:55:23 2006
@@ -9,9 +9,6 @@
/* Defined if curses like POSIX Functions should be used */
#undef CURSES_ONLY
-/* Defined if win32 relocation should be used */
-#define ENABLE_WIN32_RELOCATABLE 1
-
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

View File

@ -0,0 +1,600 @@
/*
* dirent.h - operating system independent dirent implementation
*
* Copyright (C) 1998-2002 Toni Ronkko
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* ``Software''), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
*
* Aug 20, 2006, Toni Ronkko
* Removed all remarks about MSVC 1.0, which is antiqued now. Simplified
* comments by removing SGML tags.
*
* May 14 2002, Toni Ronkko
* Embedded the function definitions directly to the header so that no source
* modules must be included in the MS Visual C project for using the
* interface. Removed all the dependencies to other projects so
* that this very header can be used independently.
*
* May 28 1998, Toni Ronkko
* First version.
*/
#ifndef DIRENT_H
#define DIRENT_H
#define DIRENT_H_INCLUDED
/* find out platform */
#if defined(MSDOS) /* MS-DOS */
#elif defined(__MSDOS__) /* Turbo C/Borland */
# define MSDOS
#elif defined(__DOS__) /* Watcom */
# define MSDOS
#endif
#if defined(WIN32) /* MS-Windows */
#elif defined(__NT__) /* Watcom */
# define WIN32
#elif defined(_WIN32) /* Microsoft */
# define WIN32
#elif defined(__WIN32__) /* Borland */
# define WIN32
#endif
/*
* See what kind of dirent interface we have unless autoconf has already
* determinated that.
*/
#if !defined(HAVE_DIRENT_H) && !defined(HAVE_DIRECT_H) && !defined(HAVE_SYS_DIR_H) && !defined(HAVE_NDIR_H) && !defined(HAVE_SYS_NDIR_H) && !defined(HAVE_DIR_H)
# if defined(_MSC_VER) /* Microsoft C/C++ */
/* no dirent.h */
# elif defined(__BORLANDC__) /* Borland C/C++ */
# define HAVE_DIRENT_H
# define VOID_CLOSEDIR
# elif defined(__TURBOC__) /* Borland Turbo C */
/* no dirent.h */
# elif defined(__WATCOMC__) /* Watcom C/C++ */
# define HAVE_DIRECT_H
# elif defined(__apollo) /* Apollo */
# define HAVE_SYS_DIR_H
# elif defined(__hpux) /* HP-UX */
# define HAVE_DIRENT_H
# elif defined(__alpha) || defined(__alpha__) /* Alpha OSF1 */
# error "not implemented"
# elif defined(__sgi) /* Silicon Graphics */
# define HAVE_DIRENT_H
# elif defined(sun) || defined(_sun) /* Sun Solaris */
# define HAVE_DIRENT_H
# elif defined(__FreeBSD__) /* FreeBSD */
# define HAVE_DIRENT_H
# elif defined(__linux__) /* Linux */
# define HAVE_DIRENT_H
# elif defined(__GNUC__) /* GNU C/C++ */
# define HAVE_DIRENT_H
# else
# error "not implemented"
# endif
#endif
/* include proper interface headers */
#if defined(HAVE_DIRENT_H)
# include <dirent.h>
# ifdef FREEBSD
# define NAMLEN(dp) ((int)((dp)->d_namlen))
# else
# define NAMLEN(dp) ((int)(strlen((dp)->d_name)))
# endif
#elif defined(HAVE_NDIR_H)
# include <ndir.h>
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(HAVE_SYS_NDIR_H)
# include <sys/ndir.h>
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(HAVE_DIRECT_H)
# include <direct.h>
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(HAVE_DIR_H)
# include <dir.h>
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(HAVE_SYS_DIR_H)
# include <sys/types.h>
# include <sys/dir.h>
# ifndef dirent
# define dirent direct
# endif
# define NAMLEN(dp) ((int)((dp)->d_namlen))
#elif defined(MSDOS) || defined(WIN32)
/* figure out type of underlaying directory interface to be used */
# if defined(WIN32)
# define DIRENT_WIN32_INTERFACE
# elif defined(MSDOS)
# define DIRENT_MSDOS_INTERFACE
# else
# error "missing native dirent interface"
# endif
/*** WIN32 specifics ***/
# if defined(DIRENT_WIN32_INTERFACE)
# include <windows.h>
# if !defined(DIRENT_MAXNAMLEN)
# define DIRENT_MAXNAMLEN (MAX_PATH)
# endif
/*** MS-DOS specifics ***/
# elif defined(DIRENT_MSDOS_INTERFACE)
# include <dos.h>
/* Borland defines file length macros in dir.h */
# if defined(__BORLANDC__)
# include <dir.h>
# if !defined(DIRENT_MAXNAMLEN)
# define DIRENT_MAXNAMLEN ((MAXFILE)+(MAXEXT))
# endif
# if !defined(_find_t)
# define _find_t find_t
# endif
/* Turbo C defines ffblk structure in dir.h */
# elif defined(__TURBOC__)
# include <dir.h>
# if !defined(DIRENT_MAXNAMLEN)
# define DIRENT_MAXNAMLEN ((MAXFILE)+(MAXEXT))
# endif
# define DIRENT_USE_FFBLK
/* MSVC */
# elif defined(_MSC_VER)
# if !defined(DIRENT_MAXNAMLEN)
# define DIRENT_MAXNAMLEN (12)
# endif
/* Watcom */
# elif defined(__WATCOMC__)
# if !defined(DIRENT_MAXNAMLEN)
# if defined(__OS2__) || defined(__NT__)
# define DIRENT_MAXNAMLEN (255)
# else
# define DIRENT_MAXNAMLEN (12)
# endif
# endif
# endif
# endif
/*** generic MS-DOS and MS-Windows stuff ***/
# if !defined(NAME_MAX) && defined(DIRENT_MAXNAMLEN)
# define NAME_MAX DIRENT_MAXNAMLEN
# endif
# if NAME_MAX < DIRENT_MAXNAMLEN
# error "assertion failed: NAME_MAX >= DIRENT_MAXNAMLEN"
# endif
/*
* Substitute for real dirent structure. Note that d_name field is a
* true character array although we have it copied in the implementation
* dependent data. We could save some memory if we had declared d_name
* as a pointer refering the name within implementation dependent data.
* We have not done that since some code may rely on sizeof(d_name) to be
* something other than four. Besides, directory entries are typically so
* small that it takes virtually no time to copy them from place to place.
*/
typedef struct dirent {
char d_name[NAME_MAX + 1];
/*** Operating system specific part ***/
# if defined(DIRENT_WIN32_INTERFACE) /*WIN32*/
WIN32_FIND_DATA data;
# elif defined(DIRENT_MSDOS_INTERFACE) /*MSDOS*/
# if defined(DIRENT_USE_FFBLK)
struct ffblk data;
# else
struct _find_t data;
# endif
# endif
} dirent;
/*
* DIR substitute structure containing directory name. The name is
* essential for the operation of rewinndir() function.
*/
typedef struct DIR {
char *dirname; /* directory being scanned */
dirent current; /* current entry */
int dirent_filled; /* is current un-processed? */
/*** Operating system specific part ***/
# if defined(DIRENT_WIN32_INTERFACE)
HANDLE search_handle;
# elif defined(DIRENT_MSDOS_INTERFACE)
# endif
} DIR;
# ifdef __cplusplus
extern "C" {
# endif
/* prototypes of public dirent functions */
static DIR *opendir (const char *dirname);
static struct dirent *readdir (DIR *dirp);
static int closedir (DIR *dirp);
static void rewinddir (DIR *dirp);
/*
* Implement dirent interface as static functions so that the user does not
* need to change his project in any way to use dirent function. With this
* it is sufficient to include this very header from source modules using
* dirent functions and the functions will be pulled in automatically.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
/* use ffblk instead of _find_t if requested */
#if defined(DIRENT_USE_FFBLK)
# define _A_ARCH (FA_ARCH)
# define _A_HIDDEN (FA_HIDDEN)
# define _A_NORMAL (0)
# define _A_RDONLY (FA_RDONLY)
# define _A_SUBDIR (FA_DIREC)
# define _A_SYSTEM (FA_SYSTEM)
# define _A_VOLID (FA_LABEL)
# define _dos_findnext(dest) findnext(dest)
# define _dos_findfirst(name,flags,dest) findfirst(name,dest,flags)
#endif
/* internal prototypes */
static int _initdir (DIR *p);
static const char *_getdirname (const struct dirent *dp);
static void _setdirname (struct DIR *dirp);
/*
* Open directory stream DIRNAME for read and return pointer to the
* internal working area that is used for retrieving individual directory
* entries. The internal working area has no fields of your interest.
*/
static DIR *
opendir(
const char *dirname)
{
DIR *dirp;
assert (dirname != NULL);
dirp = (DIR*)malloc (sizeof (struct DIR));
if (dirp != NULL) {
char *p;
/* allocate room for directory name */
dirp->dirname = (char*) malloc (strlen (dirname) + 1 + strlen ("\\*.*"));
if (dirp->dirname == NULL) {
/* failed to duplicate directory name. errno set by malloc() */
free (dirp);
return NULL;
}
/*
* Copy directory name while appending directory separator and "*.*".
* Directory separator is not appended if the name already ends with
* drive or directory separator. Directory separator is assumed to be
* '/' or '\' and drive separator is assumed to be ':'.
*/
strcpy (dirp->dirname, dirname);
p = strchr (dirp->dirname, '\0');
if (dirp->dirname < p &&
*(p - 1) != '\\' && *(p - 1) != '/' && *(p - 1) != ':')
{
strcpy (p++, "\\");
}
# ifdef DIRENT_WIN32_INTERFACE
strcpy (p, "*"); /*scan files with and without extension in win32*/
# else
strcpy (p, "*.*"); /*scan files with and without extension in DOS*/
# endif
/* open stream */
if (_initdir (dirp) == 0) {
/* initialization failed */
free (dirp->dirname);
free (dirp);
return NULL;
}
}
return dirp;
}
/*
* Read a directory entry and return pointer to a structure containing the
* name of the entry. Individual directory entries returned by this very
* function include normal files, sub-directories, pseudo-directories "."
* and ".." and also volume labels, hidden files and system files in MS-DOS
* and MS-Windows. You might want to use stat(2) function to determinate
* which one you are dealing with.
*
* The dirent structure contains several system dependent fields that
* generally have no interest to you. The only interesting one is char
* d_name[] that is also portable across different systems. The d_name
* field contains the name of the directory entry without leading path.
* While d_name is portable across different systems, the actual storage
* capacity of d_name varies from system to system and there is no portable
* way to find out it at compile time. Different systems define the
* capacity of d_name with different macros and some systems do not define
* capacity at all (besides actual declaration of the field). If you really
* need to find out storage capacity of d_name then you might want to try
* NAME_MAX macro. The NAME_MAX is defined in POSIX standard althought
* there are many MS-DOS and MS-Windows implementations those do not define
* it. There are also systems that declare d_name as "char d_name[1]" and
* then allocate suitable amount of memory at run-time. Thanks to Alain
* Decamps (Alain dot Decamps atsign advalvas dot be) for pointing it out to
* me.
*
* This all leads to the fact that it is difficult to allocate space
* for the directory names when the very same program is being compiled on
* number of operating systems. Therefore I suggest that you always
* allocate space for directory names dynamically.
*/
static struct dirent *
readdir (DIR *dirp)
{
assert (dirp != NULL);
if (dirp == NULL) {
errno = EBADF;
return NULL;
}
#if defined(DIRENT_WIN32_INTERFACE)
if (dirp->search_handle == INVALID_HANDLE_VALUE) {
/* directory stream was opened/rewound incorrectly or it ended normally */
errno = EBADF;
return NULL;
}
#endif
if (dirp->dirent_filled != 0) {
/*
* Directory entry has already been retrieved and there is no need to
* retrieve a new one. Directory entry will be retrieved in advance
* when the user calls readdir function for the first time. This is so
* because real dirent has separate functions for opening and reading
* the stream whereas Win32 and DOS dirents open the stream
* automatically when we retrieve the first file. Therefore, we have to
* save the first file when opening the stream and later we have to
* return the saved entry when the user tries to read the first entry.
*/
dirp->dirent_filled = 0;
} else {
/* fill in entry and return that */
#if defined(DIRENT_WIN32_INTERFACE)
if (FindNextFile (dirp->search_handle, &dirp->current.data) == FALSE) {
/* Last file has been processed or an error occured */
FindClose (dirp->search_handle);
dirp->search_handle = INVALID_HANDLE_VALUE;
errno = ENOENT;
return NULL;
}
# elif defined(DIRENT_MSDOS_INTERFACE)
if (_dos_findnext (&dirp->current.data) != 0) {
/* _dos_findnext and findnext will set errno to ENOENT when no
* more entries could be retrieved. */
return NULL;
}
# endif
_setdirname (dirp);
assert (dirp->dirent_filled == 0);
}
return &dirp->current;
}
/*
* Close directory stream opened by opendir() function. Close of the
* directory stream invalidates the DIR structure as well as any previously
* read directory entry.
*
* Usually, the function returns 0 on success and -1 on failure. However,
* on some systems, the function has been declared to return void. If you
* want to keep your code portable, it may be better to ignore the return
* value altogether.
*/
static int
closedir (DIR *dirp)
{
int retcode = 0;
/* make sure that dirp points to legal structure */
assert (dirp != NULL);
if (dirp == NULL) {
errno = EBADF;
return -1;
}
/* free directory name */
if (dirp->dirname != NULL) {
free (dirp->dirname);
}
/* release search handle */
#if defined(DIRENT_WIN32_INTERFACE)
if (dirp->search_handle != INVALID_HANDLE_VALUE) {
if (FindClose (dirp->search_handle) == FALSE) {
/* Unknown error */
retcode = -1;
errno = EBADF;
}
}
#endif
/* clear dirp structure to make sure that it cannot be used anymore*/
memset (dirp, 0, sizeof (*dirp));
# if defined(DIRENT_WIN32_INTERFACE)
dirp->search_handle = INVALID_HANDLE_VALUE;
# endif
free (dirp);
return retcode;
}
/*
* Rewind the directory stream to re-read the directory entries. If new
* files or directories have been created since opendir(), then also these
* new files will be available with readdir().
*
* Almost every dirent implementation ensures that rewinddir() updates its
* internal caches to reflect the current directory structure on disk.
* However, if you really depend on this feature, it may be better to close
* and re-open the directory stream. I recall one particual dirent
* interface, where rewinddir() did not update its internal cache.
*
* BUGS: If the current working directory is changed between opendir() and
* rewinddir(), then the rewound directory stream may refer a non-existent
* directory, or at worst case, to another directory.
*/
static void
rewinddir (DIR *dirp)
{
/* make sure that dirp is legal */
assert (dirp != NULL);
if (dirp == NULL) {
errno = EBADF;
return;
}
assert (dirp->dirname != NULL);
/* close previous stream */
#if defined(DIRENT_WIN32_INTERFACE)
if (dirp->search_handle != INVALID_HANDLE_VALUE) {
if (FindClose (dirp->search_handle) == FALSE) {
/* Unknown error */
errno = EBADF;
}
}
#endif
/* re-open previous stream */
if (_initdir (dirp) == 0) {
/* initialization failed but we cannot deal with error. User will notice
* error later when she tries to retrieve first directory enty. */
/*EMPTY*/;
}
}
/*
* Open native directory stream object and retrieve first file.
* Be sure to close previous stream before opening new one.
*/
static int
_initdir (DIR *dirp)
{
assert (dirp != NULL);
assert (dirp->dirname != NULL);
dirp->dirent_filled = 0;
# if defined(DIRENT_WIN32_INTERFACE)
/* Open stream and retrieve first file */
dirp->search_handle = FindFirstFile (dirp->dirname, &dirp->current.data);
if (dirp->search_handle == INVALID_HANDLE_VALUE) {
/* something went wrong but we don't know what. GetLastError() could
* give us more information about the error, but then we should map
* the error code into errno. */
errno = ENOENT;
return 0;
}
# elif defined(DIRENT_MSDOS_INTERFACE)
if (_dos_findfirst (dirp->dirname,
_A_SUBDIR | _A_RDONLY | _A_ARCH | _A_SYSTEM | _A_HIDDEN,
&dirp->current.data) != 0)
{
/* _dos_findfirst and findfirst will set errno to ENOENT when no
* more entries could be retrieved. */
return 0;
}
# endif
/* initialize DIR and it's first entry */
_setdirname (dirp);
dirp->dirent_filled = 1;
return 1;
}
/*
* Return implementation dependent name of the current directory entry.
*/
static const char *
_getdirname (const struct dirent *dp)
{
#if defined(DIRENT_WIN32_INTERFACE)
return dp->data.cFileName;
#elif defined(DIRENT_USE_FFBLK)
return dp->data.ff_name;
#else
return dp->data.name;
#endif
}
/*
* Copy name of implementation dependent directory entry to the d_name field.
*/
static void
_setdirname (struct DIR *dirp) {
/* make sure that d_name is long enough */
assert (strlen (_getdirname (&dirp->current)) <= NAME_MAX);
strncpy (dirp->current.d_name,
_getdirname (&dirp->current),
NAME_MAX);
dirp->current.d_name[NAME_MAX] = '\0'; /*char d_name[NAME_MAX+1]*/
}
# ifdef __cplusplus
}
# endif
# define NAMLEN(dp) ((int)(strlen((dp)->d_name)))
#else
# error "missing dirent interface"
#endif
#endif /*DIRENT_H*/

Some files were not shown because too many files have changed in this diff Show More