Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 145868 Details for
Bug 213074
app-crypt/truecrypt-5.1 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
nogui patch
truecrypt-5.1-nogui.patch (text/plain), 11.07 KB, created by
Tomáš Chvátal (RETIRED)
on 2008-03-11 21:17:04 UTC
(
hide
)
Description:
nogui patch
Filename:
MIME Type:
Creator:
Tomáš Chvátal (RETIRED)
Created:
2008-03-11 21:17:04 UTC
Size:
11.07 KB
patch
obsolete
>diff -urN -urNp truecrypt-5.1-source.orig/Main/Application.cpp truecrypt-5.1-source/Main/Application.cpp >--- truecrypt-5.1-source.orig/Main/Application.cpp 2008-03-02 12:03:30.000000000 +0100 >+++ truecrypt-5.1-source/Main/Application.cpp 2008-03-11 21:16:18.000000000 +0100 >@@ -22,14 +22,14 @@ namespace TrueCrypt > mUserInterfaceType = UserInterfaceType::Text; > return mUserInterface; > } >- >+#ifdef ENABLE_wxGUI > wxApp* Application::CreateGuiApp () > { > mUserInterface = new GraphicUserInterface; > mUserInterfaceType = UserInterfaceType::Graphic; > return mUserInterface; > } >- >+#endif > FilePath Application::GetConfigFilePath (const wxString &configFileName, bool createConfigDir) > { > wxStandardPaths stdPaths; >@@ -74,12 +74,13 @@ namespace TrueCrypt > wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) CreateConsoleApp); > break; > } >+#ifdef ENABLE_wxGUI > case UserInterfaceType::Graphic: > { > wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) CreateGuiApp); > break; > } >- >+#endif > default: > throw ParameterIncorrect (SRC_POS); > } >diff -urN -urNp truecrypt-5.1-source.orig/Main/FatalErrorHandler.cpp truecrypt-5.1-source/Main/FatalErrorHandler.cpp >--- truecrypt-5.1-source.orig/Main/FatalErrorHandler.cpp 2008-03-09 20:18:58.000000000 +0100 >+++ truecrypt-5.1-source/Main/FatalErrorHandler.cpp 2008-03-11 21:20:27.000000000 +0100 >@@ -92,6 +92,7 @@ namespace TrueCrypt > > #endif // wxUSE_STACKWALKER > >+#ifdef ENABLE_wxGUI > wxString url = Gui->GetHomepageLinkURL (L"err-report", vars.str()); > url.Replace (L"0x", L""); > >@@ -111,7 +112,7 @@ namespace TrueCrypt > > if (Gui->AskYesNo (msg, true)) > wxLaunchDefaultBrowser (url, wxBROWSER_NEW_WINDOW); >- >+#endif > _exit (1); > } > #endif // TC_UNIX >@@ -156,7 +157,7 @@ namespace TrueCrypt > vars << L"&exlocation=" << exPos; > vars.Replace (L"::", L"."); > vars.Replace (L":", L"."); >- >+#ifdef ENABLE_wxGUI > wxString url = Gui->GetHomepageLinkURL (L"err-report", vars); > > wxString msg = L"An unhandled exception has occured and TrueCrypt must be terminated. If this is caused by a bug in TrueCrypt, we would like to fix it. To help us, you can send us an automatically generated error report containing the following items:\n\n- Program version\n- Operating system version\n- Hardware architecture\n- Error description\n- Error location\n"; >@@ -166,15 +167,19 @@ namespace TrueCrypt > > if (Gui->AskYesNo (msg, true)) > wxLaunchDefaultBrowser (url, wxBROWSER_NEW_WINDOW); >- >+#endif > } > catch (exception &e) > { >+#ifdef ENABLE_wxGUI > Gui->ShowError (e); >+#endif > } > catch (...) > { >+#ifdef ENABLE_wxGUI > Gui->ShowError (_("Unknown exception occurred.")); >+#endif > } > > _exit (1); >diff -urN -urNp truecrypt-5.1-source.orig/Main/GraphicUserInterface.cpp truecrypt-5.1-source/Main/GraphicUserInterface.cpp >--- truecrypt-5.1-source.orig/Main/GraphicUserInterface.cpp 2008-03-09 08:41:24.000000000 +0100 >+++ truecrypt-5.1-source/Main/GraphicUserInterface.cpp 2008-03-11 21:21:35.000000000 +0100 >@@ -16,6 +16,8 @@ > #include "Platform/Unix/Process.h" > #endif > >+#ifdef ENABLE_wxGUI >+ > #include "Application.h" > #include "GraphicUserInterface.h" > #include "FatalErrorHandler.h" >@@ -1055,3 +1057,4 @@ namespace TrueCrypt > > GraphicUserInterface *Gui = nullptr; > } >+#endif >diff -urN -urNp truecrypt-5.1-source.orig/Main/GraphicUserInterface.h truecrypt-5.1-source/Main/GraphicUserInterface.h >--- truecrypt-5.1-source.orig/Main/GraphicUserInterface.h 2008-03-09 08:40:00.000000000 +0100 >+++ truecrypt-5.1-source/Main/GraphicUserInterface.h 2008-03-11 21:22:24.000000000 +0100 >@@ -14,6 +14,7 @@ > #include "Main.h" > #include "UserInterface.h" > >+#ifdef ENABLE_wxGUI > namespace TrueCrypt > { > class GraphicUserInterface : public UserInterface >@@ -129,5 +130,5 @@ namespace TrueCrypt > > extern GraphicUserInterface *Gui; > } >- >+#endif > #endif // TC_HEADER_Main_GraphicUserInterface >diff -urN -urNp truecrypt-5.1-source.orig/Main/Main.make truecrypt-5.1-source/Main/Main.make >--- truecrypt-5.1-source.orig/Main/Main.make 2008-03-02 18:12:16.000000000 +0100 >+++ truecrypt-5.1-source/Main/Main.make 2008-03-11 21:24:42.000000000 +0100 >@@ -21,6 +21,7 @@ OBJS += UserPreferences.o > OBJS += VolumeHistory.o > OBJS += Xml.o > OBJS += Unix/Main.o >+ifeq "$(TC_BUILD_GUI)" "True" > OBJS += Forms/AboutDialog.o > OBJS += Forms/ChangePasswordDialog.o > OBJS += Forms/DeviceSelectionDialog.o >@@ -47,6 +48,7 @@ OBJS += Forms/VolumeLocationWizardPage.o > OBJS += Forms/VolumePasswordWizardPage.o > OBJS += Forms/VolumeSizeWizardPage.o > OBJS += Forms/WizardFrame.o >+endif > OBJS += Resources.o > > ifndef DISABLE_PRECOMPILED_HEADERS >@@ -70,12 +72,12 @@ CXXFLAGS += -I$(BASE_DIR)/Main > ifeq "$(TC_BUILD_CONFIG)" "Release" > > CXXFLAGS += $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --cxxflags) >-WX_LIBS = $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --libs adv,core,base) >+WX_LIBS = $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --libs) > > else > > CXXFLAGS += $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --debug --cxxflags) >-WX_LIBS = $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --debug --libs adv,core,base) >+WX_LIBS = $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --debug --libs) > > endif > >diff -urN -urNp truecrypt-5.1-source.orig/Main/Resources.cpp truecrypt-5.1-source/Main/Resources.cpp >--- truecrypt-5.1-source.orig/Main/Resources.cpp 2008-02-04 12:14:16.000000000 +0100 >+++ truecrypt-5.1-source/Main/Resources.cpp 2008-03-11 21:27:59.000000000 +0100 >@@ -35,6 +35,7 @@ namespace TrueCrypt > } > #endif // TC_WINDOWS > >+#ifdef ENABLE_wxGUI > wxBitmap Resources::GetDriveIconBitmap () > { > #ifdef TC_WINDOWS >@@ -72,6 +73,7 @@ namespace TrueCrypt > # endif > #endif > } >+#endif > > string Resources::GetLanguageXml () > { >@@ -110,7 +112,7 @@ namespace TrueCrypt > return string (License); > #endif > } >- >+#ifdef ENABLE_wxGUI > wxBitmap Resources::GetLogoBitmap () > { > #ifdef TC_WINDOWS >@@ -173,4 +175,5 @@ namespace TrueCrypt > return wxBitmap (image); > #endif > } >+#endif > } >diff -urN -urNp truecrypt-5.1-source.orig/Main/Resources.h truecrypt-5.1-source/Main/Resources.h >--- truecrypt-5.1-source.orig/Main/Resources.h 2008-02-04 12:14:14.000000000 +0100 >+++ truecrypt-5.1-source/Main/Resources.h 2008-03-11 21:29:08.000000000 +0100 >@@ -17,15 +17,18 @@ namespace TrueCrypt > class Resources > { > public: >+#ifdef ENABLE_wxGUI > static wxBitmap GetDriveIconBitmap (); > static wxBitmap GetDriveIconMaskBitmap (); >+#endif > static string GetLanguageXml (); > static string GetLegalNotices (); >+#ifdef ENABLE_wxGUI > static wxBitmap GetLogoBitmap (); > static wxBitmap GetTextualLogoBitmap (); > static wxIcon GetTrueCryptIcon (); > static wxBitmap GetVolumeCreationWizardBitmap (int height = -1); >- >+#endif > protected: > }; > } >diff -urN -urNp truecrypt-5.1-source.orig/Main/SystemPrecompiled.h truecrypt-5.1-source/Main/SystemPrecompiled.h >--- truecrypt-5.1-source.orig/Main/SystemPrecompiled.h 2008-02-04 12:22:08.000000000 +0100 >+++ truecrypt-5.1-source/Main/SystemPrecompiled.h 2008-03-11 21:30:46.000000000 +0100 >@@ -7,16 +7,24 @@ > */ > > #include <wx/wx.h> >+#ifdef ENABLE_wxGUI > #include <wx/dnd.h> >+#endif > #include <wx/filename.h> >+#ifdef ENABLE_wxGUI > #include <wx/imaglist.h> > #include <wx/listctrl.h> >+#endif > #include <wx/mstream.h> > #include <wx/power.h> > #include <wx/snglinst.h> >+#ifdef ENABLE_wxGUI > #include <wx/taskbar.h> >+#endif > #include <wx/txtstrm.h> >+#ifdef ENABLE_wxGUI > #include <wx/valgen.h> >+#endif > #include <wx/wfstream.h> > > #include <iostream> >diff -urN -urNp truecrypt-5.1-source.orig/Main/TextUserInterface.cpp truecrypt-5.1-source/Main/TextUserInterface.cpp >--- truecrypt-5.1-source.orig/Main/TextUserInterface.cpp 2008-03-10 14:05:40.000000000 +0100 >+++ truecrypt-5.1-source/Main/TextUserInterface.cpp 2008-03-11 21:32:12.000000000 +0100 >@@ -712,8 +712,9 @@ namespace TrueCrypt > > InterfaceType = UserInterfaceType::Text; > Init(); >- >+#ifdef ENABLE_wxGUI > SetExitOnFrameDelete (false); >+#endif > } > catch (exception &e) > { >diff -urN -urNp truecrypt-5.1-source.orig/Main/Unix/Main.cpp truecrypt-5.1-source/Main/Unix/Main.cpp >--- truecrypt-5.1-source.orig/Main/Unix/Main.cpp 2008-03-09 21:13:10.000000000 +0100 >+++ truecrypt-5.1-source/Main/Unix/Main.cpp 2008-03-11 21:32:59.000000000 +0100 >@@ -61,7 +61,9 @@ int main (int argc, char **argv) > if (!getenv ("DISPLAY")) > forceTextUI = true; > #endif >- >+#ifndef ENABLE_wxGUI >+ forceTextUI = true; >+#endif > // Set user interface type > if (forceTextUI || (argc > 1 && (strcmp (argv[1], "-t") == 0 || strcmp (argv[1], "--text") == 0))) > Application::Initialize (UserInterfaceType::Text); >diff -urN -urNp truecrypt-5.1-source.orig/Main/UserInterface.cpp truecrypt-5.1-source/Main/UserInterface.cpp >--- truecrypt-5.1-source.orig/Main/UserInterface.cpp 2008-03-09 18:02:54.000000000 +0100 >+++ truecrypt-5.1-source/Main/UserInterface.cpp 2008-03-11 21:34:02.000000000 +0100 >@@ -359,9 +359,10 @@ namespace TrueCrypt > #ifdef __WXGTK__ > if (Application::GetUserInterfaceType() != UserInterfaceType::Text) > #endif >+#ifdef ENABLE_wxGUI > if (wxGetKeyState (WXK_CAPITAL)) > message += wxString (L"\n\n") + LangString["CAPSLOCK_ON"]; >- >+#endif > return message; > } > >diff -urN -urNp truecrypt-5.1-source.orig/Main/VolumeHistory.cpp truecrypt-5.1-source/Main/VolumeHistory.cpp >--- truecrypt-5.1-source.orig/Main/VolumeHistory.cpp 2008-02-04 12:14:16.000000000 +0100 >+++ truecrypt-5.1-source/Main/VolumeHistory.cpp 2008-03-11 21:34:43.000000000 +0100 >@@ -10,6 +10,9 @@ > #include "Application.h" > #include "GraphicUserInterface.h" > #include "Xml.h" >+ >+#ifdef ENABLE_wxGUI >+ > #include "VolumeHistory.h" > > namespace TrueCrypt >@@ -150,3 +153,5 @@ namespace TrueCrypt > Mutex VolumeHistory::AccessMutex; > > } >+ >+#endif >diff -urN -urNp truecrypt-5.1-source.orig/Makefile truecrypt-5.1-source/Makefile >--- truecrypt-5.1-source.orig/Makefile 2008-03-09 20:27:30.000000000 +0100 >+++ truecrypt-5.1-source/Makefile 2008-03-11 21:37:50.000000000 +0100 >@@ -12,6 +12,7 @@ > # NOSTRIP: Do not strip release binary > # NOTEST: Do not test release binary > # VERBOSE: Enable verbose messages >+# NOGUI: Do not build GUI truecrypt > > #------ Targets ------ > # all >@@ -31,6 +32,17 @@ TC_BUILD_CONFIG := Debug > endif > endif > >+export TC_BUILD_GUI := True >+ >+ifeq "$(origin NOGUI)" "command line" >+TC_BUILD_GUI := False >+endif >+ >+export TC_BUILD_GUI := True >+ >+ifeq "$(origin NOGUI)" "command line" >+TC_BUILD_GUI := False >+endif > > #------ Build configuration ------ > >@@ -155,6 +167,10 @@ endif > > #------ Common configuration ------ > >+ifeq "$(TC_BUILD_GUI)" "True" >+C_CXX_FLAGS += -DENABLE_wxGUI >+endif >+ > CFLAGS := $(C_CXX_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS) > CXXFLAGS := $(C_CXX_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS) > LFLAGS := $(LFLAGS) $(EXTRA_LFLAGS) >@@ -198,6 +214,12 @@ CXXFLAGS := > LFLAGS := > endif > >+ifeq "$(TC_BUILD_GUI)" "True" >+WX_NO_GUI:= >+else >+WX_NO_GUI:=--disable-gui >+endif >+ > wxbuild: > > ifneq "$(shell test -f $(WX_ROOT)/configure || test -f $(WX_BUILD_DIR)/../configure && echo 1)" "1" >@@ -207,7 +229,7 @@ endif > > mkdir -p $(WX_BUILD_DIR) > @echo Configuring wxWidgets library... >- cd $(WX_BUILD_DIR) && $(WX_ROOT)/configure $(WX_CONFIGURE_FLAGS) >/dev/null >+ cd $(WX_BUILD_DIR) && $(WX_ROOT)/configure $(WX_NO_GUI) $(WX_CONFIGURE_FLAGS) >/dev/null > > @echo Building wxWidgets library... > cd $(WX_BUILD_DIR) && make
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 213074
:
145865
|
145866
|
145867
| 145868