[gs-cvs] rev 8877 - trunk/gs/src
ghostgum at ghostscript.com
ghostgum at ghostscript.com
Fri Jul 25 15:51:15 PDT 2008
Author: ghostgum
Date: 2008-07-25 15:51:14 -0700 (Fri, 25 Jul 2008)
New Revision: 8877
Modified:
trunk/gs/src/dwsetup.cpp
trunk/gs/src/dwsetup.h
trunk/gs/src/dwsetup.rc
trunk/gs/src/winint.mak
Log:
Change Windows installer to remove "GPL Ghostscript Fonts" target.
Ghostscript now includes fonts in the Resource directory,
and no longer needs the fonts previously installed in
"C:\Program Files\gs\fonts".
Modified: trunk/gs/src/dwsetup.cpp
===================================================================
--- trunk/gs/src/dwsetup.cpp 2008-07-25 01:27:27 UTC (rev 8876)
+++ trunk/gs/src/dwsetup.cpp 2008-07-25 22:51:14 UTC (rev 8877)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2006 Artifex Software, Inc.
+/* Copyright (C) 2001-2008 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -21,14 +21,11 @@
// setupgs.exe
// uninstgs.exe
// filelist.txt (contains list of program files)
-// fontlist.txt (contains list of font files)
// gs#.##\* (files listed in filelist.txt)
-// fonts\* (fonts listed in fontlist.txt)
// This is the same as the zip file created by Aladdin Enterprises,
-// with the addition of setupgs.exe, uninstgs.exe, filelist.txt and
-// fontlist.txt.
+// with the addition of setupgs.exe, uninstgs.exe, and filelist.txt
//
-// The first line of the files filelist.txt and fontlist.txt
+// The first line of the file filelist.txt
// contains the uninstall name to be used.
// The second line contains name of the main directory where
// uninstall log files are to be placed.
@@ -38,18 +35,12 @@
// gs8.55
// gs8.55\bin\gsdll32.dll
// gs8.55\lib\gs_init.ps
-// The file fontlist.txt might contain:
-// GPL Ghostscript Fonts
-// fonts
-// fonts\n019003l.pfb
-// fonts\n019023l.pfb
//
// The default install directory is c:\gs.
// The default Start Menu Folder is Ghostscript.
// These are set in the resources.
// The setup program will create the following uninstall log files
// c:\gs\gs#.##\uninstal.txt
-// c:\gs\fonts\uninstal.txt
// The uninstall program (accessed through control panel) will not
// remove directories nor will it remove itself.
//
@@ -57,7 +48,7 @@
// location, no files will be copied, but the existence of each file
// will be checked. This allows the archive to be unzipped, then
// configured in its current location. Running the uninstall will not
-// remove uninstgs.exe, setupgs.exe, filelist.txt or fontlist.txt.
+// remove uninstgs.exe, setupgs.exe, or filelist.txt.
#define STRICT
@@ -113,7 +104,7 @@
// unzip self extractor.
CHAR g_szSourceDir[MAXSTR];
-// Target directory for program and fonts.
+// Target directory for program.
// Default loaded from resources
CHAR g_szTargetDir[MAXSTR];
@@ -124,7 +115,6 @@
// Setup application name, loaded from resources
CHAR g_szAppName[MAXSTR];
-BOOL g_bInstallFonts = TRUE;
BOOL g_bCJKFonts = FALSE;
BOOL g_bAllUsers = FALSE;
@@ -155,7 +145,6 @@
BOOL init();
BOOL install_all();
BOOL install_prog();
-BOOL install_fonts();
BOOL make_filelist(int argc, char *argv[]);
int get_font_path(char *path, unsigned int pathlen);
BOOL write_cidfmap(const char *gspath, const char *cidpath);
@@ -534,7 +523,6 @@
SetDlgItemText(g_hMain, IDC_TARGET_DIR, g_szTargetDir);
SetDlgItemText(g_hMain, IDC_TARGET_GROUP, g_szTargetGroup);
SetDlgItemText(g_hMain, IDC_PRODUCT_NAME, cinst.GetUninstallName());
- SendDlgItemMessage(g_hMain, IDC_INSTALL_FONTS, BM_SETCHECK, BST_CHECKED, 0);
ShowWindow(g_hMain, SW_SHOWNORMAL);
return (g_hMain != (HWND)NULL); /* success */
@@ -623,9 +611,6 @@
g_szTargetDir, sizeof(g_szTargetDir));
GetDlgItemText(hwnd, IDC_TARGET_GROUP,
g_szTargetGroup, sizeof(g_szTargetGroup));
- g_bInstallFonts = (SendDlgItemMessage(g_hMain,
- IDC_INSTALL_FONTS, BM_GETCHECK, 0, 0)
- == BST_CHECKED);
g_bCJKFonts = (SendDlgItemMessage(g_hMain,
IDC_CJK_FONTS, BM_GETCHECK, 0, 0)
== BST_CHECKED);
@@ -685,11 +670,6 @@
g_bError = TRUE;
return FALSE;
}
- if (g_bInstallFonts && !install_fonts()) {
- cinst.CleanUp();
- g_bError = TRUE;
- return FALSE;
- }
gs_addmess("Install successful\n");
@@ -909,54 +889,6 @@
}
-BOOL
-install_fonts()
-{
- cinst.SetMessageFunction(gs_addmess);
- cinst.SetTargetDir(g_szTargetDir);
- cinst.SetTargetGroup(g_szTargetGroup);
- cinst.SetAllUsers(g_bAllUsers);
- if (!cinst.Init(g_szSourceDir, "fontlist.txt"))
- return FALSE;
-
- // copy files
- if (!cinst.InstallFiles(g_bNoCopy, &g_bQuit)) {
- gs_addmess("Font install failed\n");
- return FALSE;
- }
-
- if (g_bQuit)
- return FALSE;
-
- if (g_bNoCopy) {
- // Don't write uninstall log or entry
- // since we didn't copy any files.
- cinst.CleanUp();
- }
- else {
- // consolidate logs into one uninstall file
- if (cinst.MakeLog()) {
- // add uninstall entry for "Add/Remove Programs"
- gs_addmess("Adding uninstall program\n");
- if (!cinst.WriteUninstall(UNINSTALLPROG, g_bNoCopy)) {
- gs_addmess("Failed to write uninstall entry\n");
- return FALSE;
- }
- }
- else {
- gs_addmess("Failed to write uninstall log\n");
- // If batch install, files might be on a server
- // in a write protected directory.
- // Don't return an error for batch install.
- if (g_bBatch)
- return TRUE;
- return FALSE;
- }
- }
-
- gs_addmess("Font install successful\n");
- return TRUE;
-}
//////////////////////////////////////////////////////////////////////
// Create lib/cidfmap based on installed fonts
@@ -1303,3 +1235,4 @@
//////////////////////////////////////////////////////////////////////
+
Modified: trunk/gs/src/dwsetup.h
===================================================================
--- trunk/gs/src/dwsetup.h 2008-07-25 01:27:27 UTC (rev 8876)
+++ trunk/gs/src/dwsetup.h 2008-07-25 22:51:14 UTC (rev 8877)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2006 Artifex Software, Inc.
+/* Copyright (C) 2001-2008 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -36,7 +36,6 @@
#define IDS_TARGET_DIR 502
#define IDS_TARGET_GROUP 503
#define IDC_PRODUCT_NAME 1000
-#define IDC_INSTALL_FONTS 1001
#define IDC_TEXTWIN_MLE 1002
#define IDC_TEXTWIN_COPY 1003
#define IDC_INSTALL 1004
@@ -49,3 +48,4 @@
#endif /* dwsetup_INCLUDED */
+
Modified: trunk/gs/src/dwsetup.rc
===================================================================
--- trunk/gs/src/dwsetup.rc 2008-07-25 01:27:27 UTC (rev 8876)
+++ trunk/gs/src/dwsetup.rc 2008-07-25 22:51:14 UTC (rev 8877)
@@ -48,8 +48,6 @@
EDITTEXT IDC_TARGET_GROUP,8,124,220,12,ES_AUTOHSCROLL
PUSHBUTTON "Browse...",IDC_BROWSE_GROUP,240,123,50,14
- CONTROL "Install Ghostscript Fonts",IDC_INSTALL_FONTS,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,8,142,220,12
CONTROL "Use Windows TrueType fonts for Chinese, Japanese and Korean",IDC_CJK_FONTS,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,8,156,220,12
@@ -145,3 +143,4 @@
+
Modified: trunk/gs/src/winint.mak
===================================================================
--- trunk/gs/src/winint.mak 2008-07-25 01:27:27 UTC (rev 8876)
+++ trunk/gs/src/winint.mak 2008-07-25 22:51:14 UTC (rev 8877)
@@ -216,7 +216,7 @@
# Create a self-extracting archive with setup program.
# This assumes that the current directory is named gs#.## relative to its
# parent, where #.## is the Ghostscript version, and that the files and
-# directories listed in ZIPTEMPFILE and ZIPFONTFILES are the complete list
+# directories listed in ZIPTEMPFILE are the complete list
# of needed files and directories relative to the current directory's parent.
ZIPTEMPFILE=gs$(GS_DOT_VERSION)\obj\dwfiles.rsp
@@ -228,12 +228,9 @@
ZIPPROGFILE6=gs$(GS_DOT_VERSION)\examples
ZIPPROGFILE7=gs$(GS_DOT_VERSION)\lib
ZIPPROGFILE8=gs$(GS_DOT_VERSION)\Resource
-ZIPFONTDIR=fonts
-ZIPFONTFILES=$(ZIPFONTDIR)\*.*
# Make the zip archive.
FILELIST_TXT=filelist.txt
-FONTLIST_TXT=fontlist.txt
!ifdef WIN64
ZIPTARGET=gs$(GS_VERSION)w64
!else
@@ -253,10 +250,8 @@
echo $(ZIPPROGFILE7) >> $(ZIPTEMPFILE)
echo $(ZIPPROGFILE8) >> $(ZIPTEMPFILE)
make_filelist.exe -title "GPL Ghostscript $(GS_DOT_VERSION)" -dir "gs$(GS_DOT_VERSION)" -list "$(FILELIST_TXT)" @$(ZIPTEMPFILE)
- make_filelist -title "GPL Ghostscript Fonts" -dir "fonts" -list "$(FONTLIST_TXT)" $(ZIPFONTFILES)
-del $(ZIPTARGET).zip
- $(ZIP_XE) -9 $(ZIPTARGET).zip $(SETUP_XE_NAME) $(UNINSTALL_XE_NAME) $(FILELIST_TXT) $(FONTLIST_TXT)
- $(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPFONTDIR)
+ $(ZIP_XE) -9 $(ZIPTARGET).zip $(SETUP_XE_NAME) $(UNINSTALL_XE_NAME) $(FILELIST_TXT)
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE1)
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE2)
$(ZIP_XE) -9 -r $(ZIPTARGET).zip $(ZIPPROGFILE3)
@@ -270,7 +265,6 @@
-del $(SETUP_XE_NAME)
-del $(UNINSTALL_XE_NAME)
-del $(FILELIST_TXT)
- -del $(FONTLIST_TXT)
cd gs$(GS_DOT_VERSION)
# Now convert to a self extracting archive.
@@ -301,3 +295,4 @@
# end of winint.mak
+
More information about the gs-cvs
mailing list