Not logged in. Log in with Twitter

Sumatra PDF Reader forum

Small, fast, free PDF, EPUB, MOBI, CHM, DJVU, CBR, CBZ reader for Windows

help using define in the project files

I use to do a custom build using the /D switch unfortunately the makefile has been abandoned and I can't seam to build sumatra to my taste
for example in the SumatraPDF-no-MUPDF project
Configuration Properties -> C/C++ -> Command Line I added
/D DISABLE_DOCUMENT_RESTRICTIONS
but the build exe ignores the switch
I don't want to touch the cpp/hpp files anybody has an idea?
I also used thethese are the switches I passed to nmake
/D DISABLE_EBOOK_UI /D ABOUT_USE_LESS_COLORS /D ENABLE_EXTENDED_PROPERTIES /D DISABLE_DOCUMENT_RESTRICTIONS /D ENABLE_SAVE_SHORTCUT /D SVN_PRE_RELEASE_VER=10570" "BUILD_EPUB_PREVIEW = 1" "BUILD_CBZ_PREVIEW=1" "BUILD_CBR_PREVIEW=1"
ia on December 9, 2016
I also tried with
/D DISABLE_DOCUMENT_RESTRICTIONS=1
still no go
ia on December 9, 2016
maybe I'm adding this define in the wrong project file shuld I add it to the libmupdf project?
there are way too many projects in the solution

ps
what in the configuration manager what is ReleasePrefast ?
what's the difference between ReleasePrefast and Release?
ia on December 9, 2016
New build system is described in https://github.com/sumatrapdfreader/sumatrapdf/wiki/Premake5-build-system

Prefast configuration is for enabling code analysis https://msdn.microsoft.com/en-us/library/d3bbz7tz.aspx
Krzysztof Kowalczyk on December 9, 2016
Instead we have src\utils\BuildConfig.h file. It's empty by default but you can changed it to add your #define customizations.

that line was all I needed
I'll test and report :)
ia on December 10, 2016
I guess some of the defines wore removed as I got an error
Error C2665 'str::Find': none of the 2 overloads could convert all the argument types sumatra C:\Users\ilija\Desktop\sumatrapdf-master\src\AppPrefs.cpp 75
the error is related to ebook ui

#ifdef DISABLE_EBOOK_UI
if (!prefsData || !str::Find(prefsData, "UseFixedPageUI ="))
gGlobalPrefs->ebookUI.useFixedPageUI = gGlobalPrefs->chmUI.useFixedPageUI = true;
#endif

ah well it can be changed with the preference file

I don't want to overload this thread with useless info but somebody trying to compile this might find it useful
ia on December 10, 2016
I got most of the defines working unfortunately all of the extra preview handlers return a LNK2001 error
can somebody (Krzysztof as zeniko is gone) confirm that the epub/mobi/cbr handlers ie
#define BUILD_EPUB_PREVIEW
are working in the current sourcess
they did compile and work in rev 10417 from
https://github.com/sumatrapdfreader/sumatrapdf/tree/rel3.1working

I do know they're disabled until sumatra gets new icons but when you have a good fast preview handler you do not need an icon you have the document front page :)

tanks
ia on December 10, 2016

Powered by fofou, created by Krzysztof Kowalczyk