summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/Jamfile120
-rw-r--r--apps/unix/x11pdf.c4
-rw-r--r--apps/windows/winmain.c24
-rw-r--r--apps/windows/winres.rc4
4 files changed, 38 insertions, 114 deletions
diff --git a/apps/Jamfile b/apps/Jamfile
index b3fffb3a..9c9af761 100644
--- a/apps/Jamfile
+++ b/apps/Jamfile
@@ -1,113 +1,37 @@
-# --------------------------------------------------------------------------
#
-# Build simple portable apps
-#
-
-SubDir TOP apps ;
-
-APPLIST =
- pdftool
- ;
-for APP in $(APPLIST)
-{
- Main $(APP) : $(APP).c ;
- LinkLibraries $(APP) : $(FITZLIBS) ;
- InstallBin $(BINDIR) : $(APP)$(SUFEXE) ;
-}
+FITZLIBS = libmupdf libbase libstream libworld libraster libfonts ;
-# --------------------------------------------------------------------------
-#
-# Build non-portable GUI frontend apps
-#
+SubDir TOP apps ;
+Main pdftool : pdftool.c ;
+LinkLibraries pdftool : $(FITZLIBS) ;
SubDir TOP apps common ;
+Library libpdfapp : pdfapp.c ;
-Library libpdfapp :
- pdfapp.c
- ;
-
-if $(OS) = MINGW
+if $(BUILD_WINAPP) = yes
{
- SubDir TOP apps windows ;
-
- Main apparition :
- winmain.c
- winres.rc
- ;
-
- WINLIBS = -lgdi32 -lcomdlg32 ;
- if $(BUILD) = release { WINLIBS += -mwindows ; }
-
- LinkLibraries apparition : libpdfapp $(FITZLIBS) ;
-
- LINKLIBS on apparition$(SUFEXE) = $(LINKLIBS) $(WINLIBS) ;
-
- InstallBin $(BINDIR) : apparition$(SUFEXE) ;
+ SubDir TOP apps windows ;
+ Main pdfview : winmain.c winres.rc ;
+ LinkLibraries pdfview : libpdfapp $(FITZLIBS) ;
+ LINKLIBS on pdfview$(SUFEXE) = $(LINKLIBS) $(WINLIBS) ;
}
-if $(HAVE_X11) = yes
+if $(BUILD_X11APP) = yes
{
- SubDir TOP apps unix ;
- Main apparition : x11pdf.c ximage.c ;
- LinkLibraries apparition : libpdfapp $(FITZLIBS) ;
- LINKLIBS on apparition$(SUFEXE) = $(LINKLIBS) -lX11 -lXext ;
+ SubDir TOP apps unix ;
+ Main pdfview : x11pdf.c ximage.c ;
+ LinkLibraries pdfview : libpdfapp $(FITZLIBS) ;
+ LINKLIBS on pdfview$(SUFEXE) = $(LINKLIBS) $(X11LIBS) ;
}
-if $(HAVE_GLX) = yes
+if $(BUILD_PLUGIN) = yes
{
- SubDir TOP apps unix ;
- Main glxview : glxpdf.c ;
- LinkLibraries glxview : libpdfapp $(FITZLIBS) ;
- LINKLIBS on glxview$(SUFEXE) = $(LINKLIBS) -lX11 -lGL ;
-}
-
-if $(OS) = noMACOSX
-{
- SubDir TOP apps macosx ;
-
- MACBUNDLE = FzView.app ;
-
- XCopy
- $(MACBUNDLE)/Contents/Info.plist
- $(MACBUNDLE)/Contents/PkgInfo
- ;
- XCopy
- $(MACBUNDLE)/Contents/Resources/English.lproj/InfoPlist.strings
- $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/classes.nib
- $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/info.nib
- $(MACBUNDLE)/Contents/Resources/English.lproj/main.nib/objects.xib
- $(MACBUNDLE)/Contents/Resources/macpdf.icns
- ;
-
- MACPDF = $(MACBUNDLE)/Contents/MacOS/fzview ;
- MkDir $(ALL_LOCATE_TARGET)/$(MACPDF:D) ;
- Depends $(MACPDF) : $(ALL_LOCATE_TARGET)/$(MACPDF:D) ;
- Main $(MACPDF) : macpdf.c ;
- LinkLibraries $(MACPDF) : libpdfapp $(FITZLIBS) ;
- LINKLIBS on $(MACPDF) = $(LINKLIBS) -framework Carbon ;
-}
-
-# --------------------------------------------------------------------------
-#
-# Mozilla plugins
-#
-
-SubDir TOP apps mozilla ;
-
-if $(OS) = MINGW
-{
- SUFEXE on npmupdf.dll = ;
- LINKFLAGS on npmupdf.dll = -shared -Wl,--kill-at ;
- LINKLIBS on npmupdf.dll = $(LINKLIBS) -lgdi32 ;
-
- Main npmupdf.dll :
- npwin.c
- moz_winres.rc
- moz_main.c
- ;
-
- LinkLibraries npmupdf.dll : $(FITZLIBS) ;
- InstallBin $(BINDIR) : npmupdf.dll ;
+ SubDir TOP apps mozilla ;
+ SUFEXE on npmupdf.dll = ;
+ LINKFLAGS on npmupdf.dll = $(LINKFLAGS) -shared -Wl,--kill-at ;
+ LINKLIBS on npmupdf.dll = $(LINKLIBS) -lgdi32 ;
+ Main npmupdf.dll : npwin.c moz_winres.rc moz_main.c ;
+ LinkLibraries npmupdf.dll : $(FITZLIBS) ;
}
diff --git a/apps/unix/x11pdf.c b/apps/unix/x11pdf.c
index d9f0d036..c7f2e31b 100644
--- a/apps/unix/x11pdf.c
+++ b/apps/unix/x11pdf.c
@@ -54,7 +54,7 @@ static pdfapp_t gapp;
void winwarn(pdfapp_t *app, char *msg)
{
- fprintf(stderr, "apparition: %s\n", msg);
+ fprintf(stderr, "pdfview: %s\n", msg);
}
void winerror(pdfapp_t *app, fz_error *error)
@@ -432,7 +432,7 @@ void onmouse(int x, int y, int btn, int modifiers, int state)
void usage(void)
{
- fprintf(stderr, "usage: apparition [-d password] [-z zoom] [-p pagenumber] file.pdf\n");
+ fprintf(stderr, "usage: pdfview [-d password] [-z zoom] [-p pagenumber] file.pdf\n");
exit(1);
}
diff --git a/apps/windows/winmain.c b/apps/windows/winmain.c
index 5307ed3b..b5fd2a67 100644
--- a/apps/windows/winmain.c
+++ b/apps/windows/winmain.c
@@ -27,7 +27,7 @@ static int justcopied = 0;
static pdfapp_t gapp;
/*
- * Associate Apparition with PDF files.
+ * Associate PDFView with PDF files.
*/
void associate(char *argv0)
@@ -44,22 +44,22 @@ void associate(char *argv0)
KEY_WRITE, NULL, &key, &disp))
return;
- if (RegSetValueEx(key, "", 0, REG_SZ, "Apparition", strlen("Apparition")+1))
+ if (RegSetValueEx(key, "", 0, REG_SZ, "MuPDF", strlen("MuPDF")+1))
return;
RegCloseKey(key);
- /* HKEY_CLASSES_ROOT\Apparition */
+ /* HKEY_CLASSES_ROOT\MuPDF */
if (RegCreateKeyEx(HKEY_CLASSES_ROOT,
- "Apparition", 0, NULL, REG_OPTION_NON_VOLATILE,
+ "MuPDF", 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_WRITE, NULL, &key, &disp))
return;
if (RegSetValueEx(key, "", 0, REG_SZ, name, strlen(name)+1))
return;
- /* HKEY_CLASSES_ROOT\Apparition\DefaultIcon */
+ /* HKEY_CLASSES_ROOT\MuPDF\DefaultIcon */
if (RegCreateKeyEx(key,
"DefaultIcon", 0, NULL, REG_OPTION_NON_VOLATILE,
@@ -72,7 +72,7 @@ void associate(char *argv0)
RegCloseKey(kicon);
- /* HKEY_CLASSES_ROOT\Apparition\Shell\Open\Command */
+ /* HKEY_CLASSES_ROOT\MuPDF\Shell\Open\Command */
if (RegCreateKeyEx(key,
"shell", 0, NULL, REG_OPTION_NON_VOLATILE,
@@ -104,12 +104,12 @@ void associate(char *argv0)
void winwarn(pdfapp_t *app, char *msg)
{
- MessageBoxA(hwndframe, msg, "Apparition: Warning", MB_ICONWARNING);
+ MessageBoxA(hwndframe, msg, "MuPDF: Warning", MB_ICONWARNING);
}
void winerror(pdfapp_t *app, fz_error *error)
{
- MessageBoxA(hwndframe, error->msg, "Apparition: Error", MB_ICONERROR);
+ MessageBoxA(hwndframe, error->msg, "MuPDF: Error", MB_ICONERROR);
exit(1);
}
@@ -123,7 +123,7 @@ int winfilename(char *buf, int len)
ofn.lpstrFile = buf;
ofn.nMaxFile = len;
ofn.lpstrInitialDir = NULL;
- ofn.lpstrTitle = "Apparition: Open PDF file";
+ ofn.lpstrTitle = "MuPDF: Open PDF file";
ofn.lpstrFilter = "PDF Files (*.pdf)\0*.pdf\0All Files\0*\0\0";
ofn.Flags = OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
return GetOpenFileName(&ofn);
@@ -261,7 +261,7 @@ dlogaboutproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
case WM_INITDIALOG:
SetDlgItemTextA(hwnd, 0x10, gapp.filename);
- SetDlgItemTextA(hwnd, 2, "Apparition is Copyright (C) 2006 artofcode, LLC");
+ SetDlgItemTextA(hwnd, 2, "MuPDF is Copyright (C) 2006-2008 artofcode, LLC");
SetDlgItemTextA(hwnd, 3, pdfapp_usage(&gapp));
return TRUE;
case WM_COMMAND:
@@ -360,11 +360,11 @@ void winopen()
hdc = NULL;
- SetWindowTextA(hwndframe, "Apparition");
+ SetWindowTextA(hwndframe, "MuPDF");
menu = GetSystemMenu(hwndframe, 0);
AppendMenu(menu, MF_SEPARATOR, 0, NULL);
- AppendMenu(menu, MF_STRING, ID_ABOUT, "About Apparition...");
+ AppendMenu(menu, MF_STRING, ID_ABOUT, "About MuPDF...");
AppendMenu(menu, MF_STRING, ID_DOCINFO, "Document Properties...");
SetCursor(arrowcurs);
diff --git a/apps/windows/winres.rc b/apps/windows/winres.rc
index af941f03..3a5ae390 100644
--- a/apps/windows/winres.rc
+++ b/apps/windows/winres.rc
@@ -4,7 +4,7 @@ IDI_ICONDOC ICON "gsdoc.ico"
IDD_DLOGPASS DIALOG 50, 50, 204, 60
//STYLE DS_MODALFRAME | WS_POPUP
STYLE 128 | 0x80000000
-CAPTION " Apparition: Password "
+CAPTION " MuPDF: Password "
FONT 8, "MS Shell Dlg"
BEGIN
EDITTEXT 3, 57,20,140,12, 32
@@ -52,7 +52,7 @@ END
IDD_DLOGABOUT DIALOG 50, 50, 200, 210
STYLE 128 | 0x80000000
-CAPTION " About Apparition "
+CAPTION " About MuPDF "
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "Okay", 1, 200-10-50,210-7-14,50,14, 0x50010001