Ticket #15138: 20130417_for_samples_except.patch

File 20130417_for_samples_except.patch, 41.8 KB (added by suzumizaki, 7 years ago)

New patch for test stack tracing (activated only with Visual C++)

  • samples/except/except.bkl

     
    66    <include file="../../build/bakefiles/common_samples.bkl"/>
    77
    88    <exe id="except" template="wx_sample" template_append="wx_append">
    9         <sources>except.cpp</sources>
     9        <sources>except.cpp except_utf8.cpp</sources>
     10        <headers>except_utf8.h</headers>
    1011        <wx-lib>core</wx-lib>
    1112        <wx-lib>base</wx-lib>
    1213    </exe>
  • samples/except/except.cpp

     
    22// Name:        samples/except/except.cpp
    33// Purpose:     shows how C++ exceptions can be used in wxWidgets
    44// Author:      Vadim Zeitlin
    5 // Modified by:
     5// Modified by: Suzumizaki-kimitaka 2013-04-08
    66// Created:     2003-09-17
    77// RCS-ID:      $Id$
    88// Copyright:   (c) 2003-2005 Vadim Zeitlin
     
    4848    #include "wx/thread.h"
    4949#endif
    5050
     51#include "except_utf8.h"
     52
    5153// ----------------------------------------------------------------------------
    5254// resources
    5355// ----------------------------------------------------------------------------
     
    113115    void OnQuit(wxCommandEvent& event);
    114116    void OnAbout(wxCommandEvent& event);
    115117    void OnDialog(wxCommandEvent& event);
     118    void OnDialogUnicode(wxCommandEvent& event);
    116119
    117120    void OnThrowInt(wxCommandEvent& event);
    118121    void OnThrowString(wxCommandEvent& event);
     
    198201    Except_ShowAssertInThread,
    199202#endif // wxUSE_THREADS
    200203    Except_Dialog,
     204    Except_Dialog_Unicode,
    201205
    202206    Except_Quit = wxID_EXIT,
    203207    Except_About = wxID_ABOUT
     
    215219    EVT_MENU(Except_About, MyFrame::OnAbout)
    216220    EVT_MENU(Except_Dialog, MyFrame::OnDialog)
    217221    EVT_MENU(Except_ThrowInt, MyFrame::OnThrowInt)
     222    EVT_MENU(Except_Dialog_Unicode, MyFrame::OnDialogUnicode)
    218223    EVT_MENU(Except_ThrowString, MyFrame::OnThrowString)
    219224    EVT_MENU(Except_ThrowObject, MyFrame::OnThrowObject)
    220225    EVT_MENU(Except_ThrowUnhandled, MyFrame::OnThrowUnhandled)
     
    349354    // create a menu bar
    350355    wxMenu *menuFile = new wxMenu;
    351356    menuFile->Append(Except_Dialog, wxT("Show &dialog\tCtrl-D"));
     357    menuFile->Append(Except_Dialog_Unicode,
     358                     wxT("Show dialog using &Unicode named class\tCtrl-U"));
    352359    menuFile->AppendSeparator();
    353360    menuFile->Append(Except_ThrowInt, wxT("Throw an &int\tCtrl-I"));
    354361    menuFile->Append(Except_ThrowString, wxT("Throw a &string\tCtrl-S"));
     
    427434    }
    428435}
    429436
     437void MyFrame::OnDialogUnicode(wxCommandEvent& WXUNUSED(event))
     438{
     439#if STACKTRACE_CAN_INCLUDE_UNICODE
     440    try
     441    {
     442        wxDialog* dlg = GenerateDialogUnicode(this);
     443
     444        dlg->ShowModal();
     445    }
     446    catch ( ... )
     447    {
     448        wxLogWarning(wxT("An exception in Unicode Version Dialog"));
     449
     450        Destroy();
     451        throw;
     452    }
     453#else
     454    wxMessageBox(
     455       wxT("Please make sure your compiler supports Unicode identifiers, ")
     456       wxT("after that define STACKTRACE_CAN_INCLUDE_UNICODE as 1 and rebuild."));
     457#endif
     458}
     459
     460
    430461void MyFrame::OnThrowInt(wxCommandEvent& WXUNUSED(event))
    431462{
    432463    throw -17;
     
    546577{
    547578    DoCrash();
    548579}
    549 
  • samples/except/except.dsp

     
    3131MTL=midl.exe
    3232RSC=rc.exe
    3333
    34 !IF  "$(CFG)" == "except - Win32 DLL Release"
     34!IF  "$(CFG)" == "except - Win32 DLL Release"
    3535
    3636# PROP BASE Use_MFC 0
    3737# PROP BASE Use_Debug_Libraries 1
     
    148148# End Source File
    149149# Begin Source File
    150150
     151SOURCE=.\except_utf8.cpp
     152# End Source File
     153# Begin Source File
     154
    151155SOURCE=.\..\..\samples\sample.rc
    152156# End Source File
    153157# End Group
     158# Begin Group "Header Files"
     159
     160# PROP Default_Filter ""
     161# Begin Source File
     162
     163SOURCE=.\except_utf8.h
     164# End Source File
     165# End Group
    154166# End Target
    155167# End Project
    156168
  • samples/except/except_utf8.cpp

     
     1/////////////////////////////////////////////////////////////////////////////
     2// Name:        samples/except/except_utf8.cpp
     3// Purpose:     
     4// Author:      Suzumizaki-kimitaka
     5// Modified by:
     6// Created:     2013-04-11
     7// RCS-ID:     
     8// Copyright:   (C) Suzumizaki-kimitaka
     9// Licence:     wxWindows licence
     10/////////////////////////////////////////////////////////////////////////////
     11
     12/*
     13
     14C++ specification allows non-ASCII named classes, variables, functions, etc.
     15and this file includes Unicode characters for own purpose.
     16
     17Currently this file is saved as UTF-8 with Byte Order Mark.
     18If the BOM doesn't exist, Visual C++ may treat source texts as local not UTF.
     19
     20Old versions of wxMSW can't treat non-ASCII named identifiers inside stack
     21tracing. Because ill versions call wxString::FromAscii with such identifiers
     22and assertion-stop raised by FromAscii throws away the information we really
     23need. Additionally to say, Ill versions used only MBCS functions implemented
     24in dbghelp.dll
     25
     26Try assertion stop and check the dialog shows correctly the names of classes
     27and functions in Unicode.
     28
     29When you uses outdated dbghelp.dll, or MBCS build that not support the class
     30name 'àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€', you can only check avoiding multi assertion stops.
     31
     32*/
     33
     34// ============================================================================
     35// declarations
     36// ============================================================================
     37
     38// ----------------------------------------------------------------------------
     39// headers
     40// ----------------------------------------------------------------------------
     41
     42// For compilers that support precompilation, includes "wx/wx.h".
     43#include "wx/wxprec.h"
     44
     45#ifdef __BORLANDC__
     46    #pragma hdrstop
     47#endif
     48
     49#include "except_utf8.h"
     50#if STACKTRACE_CAN_INCLUDE_UNICODE
     51
     52#ifndef WX_PRECOMP
     53    #include "wx/button.h"
     54    #include "wx/sizer.h"
     55    #include "wx/stattext.h"
     56    #include "wx/dynlib.h"
     57    #include "wx/msgdlg.h"
     58#endif
     59
     60// ----------------------------------------------------------------------------
     61// private classes
     62// ----------------------------------------------------------------------------
     63
     64// named 'Thai language, Japanese, Hindi' only for test purpose
     65class àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€ : public wxDialog
     66{
     67public:
     68    àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€(wxFrame *parent);
     69
     70    // event handlers
     71    void OnShowAssert(wxCommandEvent& event);
     72    void OnThrowObject(wxCommandEvent& event);
     73    void OnInvalidStringFormat(wxCommandEvent& event);
     74    void OnListLoadedModules(wxCommandEvent& event);
     75   
     76    // 'format string includes error'
     77    wxString 曞匏字列の誀り();
     78
     79private:
     80    DECLARE_EVENT_TABLE()
     81};
     82
     83// A trivial exception class
     84class MyException
     85{
     86public:
     87    MyException(const wxString& msg) : m_msg(msg) { }
     88
     89    const wxChar *what() const { return m_msg.c_str(); }
     90
     91private:
     92    wxString m_msg;
     93};
     94
     95// ----------------------------------------------------------------------------
     96// constants
     97// ----------------------------------------------------------------------------
     98
     99// IDs for the controls and the menu commands
     100enum
     101{
     102    // control ids and menu items
     103    Except_utf8_ShowAssert = wxID_HIGHEST,
     104    Except_utf8_ListLoadedModules,
     105    Except_utf8_ThrowObject,
     106    Except_utf8_InvalidStringFormat,
     107};
     108
     109// ----------------------------------------------------------------------------
     110// event tables and other macros for wxWidgets
     111// ----------------------------------------------------------------------------
     112
     113BEGIN_EVENT_TABLE(àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€, wxDialog)
     114    EVT_BUTTON(Except_utf8_ShowAssert, àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::OnShowAssert)
     115    EVT_BUTTON(Except_utf8_ListLoadedModules, àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::OnListLoadedModules)
     116    EVT_BUTTON(Except_utf8_ThrowObject, àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::OnThrowObject)
     117    EVT_BUTTON(Except_utf8_InvalidStringFormat,
     118               àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::OnInvalidStringFormat)
     119END_EVENT_TABLE()
     120
     121// ============================================================================
     122// àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€ implementation
     123// ============================================================================
     124
     125àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€(wxFrame *parent)
     126        : wxDialog(parent, wxID_ANY, wxString(wxT("Throw exception dialog")))
     127{
     128    wxSizer *sizerTop = new wxBoxSizer(wxVERTICAL);
     129   
     130    sizerTop->Add(new wxStaticText(this, wxNewId(),
     131        wxT("Welcome. Now you can check whether your stack trace\ncorrectly ")
     132        wxT("shows non-ASCII identifier used as class name.\n\n")
     133        wxT("The name of this dialog class is 'àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€'. ")),
     134                  0, wxCENTRE | wxALL, 5);
     135
     136    sizerTop->Add(new wxButton(this, Except_utf8_ThrowObject, wxT("Throw &object")),
     137                  0, wxCENTRE | wxALL, 5);
     138    sizerTop->Add(new wxButton(this, Except_utf8_ShowAssert,
     139                               wxT("Show &Assert invoked from wxArrayString")),
     140                  0, wxCENTRE | wxALL, 5);
     141    sizerTop->Add(new wxButton(this, Except_utf8_InvalidStringFormat,
     142                               wxT("Call wxString::&Format with bad parameter")),
     143                  0, wxCENTRE | wxALL, 5);
     144    sizerTop->Add(new wxButton(this, Except_utf8_ListLoadedModules,
     145                               wxT("List loaded modules")),
     146                  0, wxCENTRE | wxALL, 5);
     147    sizerTop->Add(new wxButton(this, wxID_CANCEL, wxT("&Cancel")),
     148                  0, wxCENTRE | wxALL, 5);
     149
     150    SetSizerAndFit(sizerTop);
     151}
     152
     153void àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::OnThrowObject(wxCommandEvent& WXUNUSED(event))
     154{
     155    throw MyException(wxT("Exception thrown from àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€"));
     156}
     157
     158void àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::OnShowAssert(wxCommandEvent& WXUNUSED(event))
     159{
     160    // provoke an assert from wxArrayString.
     161    // to test stack trace can include non-ASCII named class.
     162    wxArrayString arr;
     163    arr[0];
     164}
     165
     166void àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::OnListLoadedModules(wxCommandEvent& WXUNUSED(event))
     167{
     168    wxDynamicLibraryDetailsArray list = wxDynamicLibrary::ListLoaded();
     169    wxString s;
     170    for (size_t i=0; i<list.Count(); ++i)
     171    {
     172        s << list[i].GetName() << wxT(" ");
     173        if (list[i].GetVersion().Trim().Trim(false).size())
     174        {
     175            s << list[i].GetVersion() << wxT("\n");
     176        }
     177        else
     178        {
     179            s << wxT("(not versioned)\n");
     180        }
     181    }
     182    wxMessageBox(s, wxT("The modules currently loaded are:"));
     183}
     184
     185
     186wxString àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::曞匏字列の誀り()
     187{
     188    // provoke an assert from wxString::Format.
     189    // currently, assertion faied in wxArgNormalizer<int>::wxArgNormalizer<int>.
     190    return wxString::Format("%s", 1717);
     191}
     192
     193void àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€::OnInvalidStringFormat(wxCommandEvent& WXUNUSED(event))
     194{
     195    // to test stack trace can include non-ASCII named function.
     196    曞匏字列の誀り();
     197}
     198
     199// ============================================================================
     200// global functions implementation
     201// ============================================================================
     202
     203wxDialog* GenerateDialogUnicode(wxFrame* parent)
     204{
     205    return new àž àž²àž©àž²à¹„àž—àž¢æ—¥æœ¬èªžà€¹à€¿à€šà¥à€Šà¥€(parent);
     206}
     207
     208#endif // STACKTRACE_CAN_INCLUDE_UNICODE
     209
  • samples/except/except_utf8.h

     
     1/////////////////////////////////////////////////////////////////////////////
     2// Name:        samples/except/except_utf8.h
     3// Purpose:     check stacktrace works correctly with non-ASCII identifiers
     4// Author:      Suzumizaki-kimitaka
     5// Modified by:
     6// Created:     2013-04-08
     7// RCS-ID:     
     8// Copyright:   (C) Suzumizaki-kimitaka
     9// Licence:     wxWindows licence
     10/////////////////////////////////////////////////////////////////////////////
     11
     12#ifndef STACKTRACE_CAN_INCLUDE_UNICODE
     13#ifdef _MSC_VER
     14#define STACKTRACE_CAN_INCLUDE_UNICODE 1
     15#else
     16#define STACKTRACE_CAN_INCLUDE_UNICODE 0
     17#endif
     18#endif
     19
     20#if STACKTRACE_CAN_INCLUDE_UNICODE
     21
     22#include "wx/dialog.h"
     23#include "wx/frame.h"
     24wxDialog* GenerateDialogUnicode(wxFrame* parent);
     25
     26#endif
     27
  • samples/except/except_vc7.vcproj

     
    286286                        <File
    287287                                RelativePath=".\except.cpp">
    288288                        </File>
     289                        <File
     290                                RelativePath=".\except_utf8.cpp">
     291                        </File>
    289292                </Filter>
    290293                <Filter
     294                        Name="Header Files"
     295                        Filter="h;hpp;hxx;hm;inl;inc;xsd"
     296                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
     297                        <File
     298                                RelativePath=".\except_utf8.h">
     299                        </File>
     300                </Filter>
     301                <Filter
    291302                        Name="Resource Files"
    292303                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
    293304                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
  • samples/except/except_vc8.vcproj

     
    421421                                RelativePath=".\except.cpp"
    422422                                >
    423423                        </File>
     424                        <File
     425                                RelativePath=".\except_utf8.cpp"
     426                                >
     427                        </File>
    424428                </Filter>
    425429                <Filter
     430                        Name="Header Files"
     431                        Filter="h;hpp;hxx;hm;inl;inc;xsd"
     432                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
     433                        >
     434                        <File
     435                                RelativePath=".\except_utf8.h"
     436                                >
     437                        </File>
     438                </Filter>
     439                <Filter
    426440                        Name="Resource Files"
    427441                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
    428442                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
  • samples/except/except_vc9.vcproj

     
    407407                                RelativePath=".\except.cpp"
    408408                                >
    409409                        </File>
     410                        <File
     411                                RelativePath=".\except_utf8.cpp"
     412                                >
     413                        </File>
    410414                </Filter>
    411415                <Filter
     416                        Name="Header Files"
     417                        Filter="h;hpp;hxx;hm;inl;inc;xsd"
     418                        UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
     419                        >
     420                        <File
     421                                RelativePath=".\except_utf8.h"
     422                                >
     423                        </File>
     424                </Filter>
     425                <Filter
    412426                        Name="Resource Files"
    413427                        Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
    414428                        UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
  • samples/except/makefile.bcc

     
    2424WX_RELEASE_NODOT = 29
    2525COMPILER_PREFIX = bcc
    2626OBJS = \
    27         $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
    28 LIBDIRNAME = \
    29         .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
     27        $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
     28LIBDIRNAME = \
     29        .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
    3030SETUPHDIR = \
    3131        $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
    3232EXCEPT_CXXFLAGS = $(__RUNTIME_LIBS_7) -I$(BCCDIR)\include $(__DEBUGINFO) \
    33         $(__OPTIMIZEFLAG_2) $(__THREADSFLAG_6) -D__WX$(TOOLKIT)__ \
    34         $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
    35         $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
    36         $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include \
     33        $(__OPTIMIZEFLAG_2) $(__THREADSFLAG_6) -D__WX$(TOOLKIT)__ \
     34        $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) \
     35        $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
     36        $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include \
    3737        $(____CAIRO_INCLUDEDIR_FILENAMES_p) -I. $(__DLLFLAG_p) -I.\..\..\samples \
    3838        -DNOPCH $(CPPFLAGS) $(CXXFLAGS)
    3939EXCEPT_OBJECTS =  \
    40         $(OBJS)\except_except.obj
     40        $(OBJS)\except_except.obj \
     41        $(OBJS)\except_except_utf8.obj
    4142
    4243### Conditionally set variables: ###
    4344
    44 !if "$(TOOLKIT)" == "GTK"
    45 WIN32_TOOLKIT_LOWERCASE = gtk
    46 !endif
    47 !if "$(TOOLKIT)" == "MSW"
    48 WIN32_TOOLKIT_LOWERCASE = msw
    49 !endif
     45!if "$(TOOLKIT)" == "GTK"
     46WIN32_TOOLKIT_LOWERCASE = gtk
     47!endif
     48!if "$(TOOLKIT)" == "MSW"
     49WIN32_TOOLKIT_LOWERCASE = msw
     50!endif
    5051!if "$(USE_GUI)" == "0"
    5152PORTNAME = base
    5253!endif
    5354!if "$(USE_GUI)" == "1"
    54 PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
    55 !endif
    56 !if "$(TOOLKIT)" == "MAC"
    57 WXBASEPORT = _carbon
    58 !endif
    59 !if "$(OFFICIAL_BUILD)" == "1"
    60 COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
     55PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
    6156!endif
     57!if "$(TOOLKIT)" == "MAC"
     58WXBASEPORT = _carbon
     59!endif
     60!if "$(OFFICIAL_BUILD)" == "1"
     61COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
     62!endif
    6263!if "$(BUILD)" == "debug"
    6364WXDEBUGFLAG = d
    6465!endif
     
    8384!if "$(MONOLITHIC)" == "1"
    8485EXTRALIBS_FOR_BASE =   
    8586!endif
    86 !if "$(TOOLKIT)" == "GTK" && "$(TOOLKIT_VERSION)" == "2"
    87 LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \
    88         gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \
    89         glib-2.0.lib
    90 !endif
     87!if "$(TOOLKIT)" == "GTK" && "$(TOOLKIT_VERSION)" == "2"
     88LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \
     89        gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \
     90        glib-2.0.lib
     91!endif
    9192!if "$(BUILD)" == "debug"
    9293__OPTIMIZEFLAG_2 = -Od
    9394!endif
     
    190191!endif
    191192!if "$(MONOLITHIC)" == "0"
    192193__WXLIB_BASE_p = \
    193         wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
     194        wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
    194195!endif
    195196!if "$(MONOLITHIC)" == "1"
    196197__WXLIB_MONO_p = \
     
    249250
    250251$(OBJS)\except.exe: $(EXCEPT_OBJECTS)  $(OBJS)\except_sample.res
    251252        ilink32 -Tpe -q  -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) -aa $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @&&|
    252         c0w32.obj $(EXCEPT_OBJECTS),$@,, $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\except_sample.res
     253        c0w32.obj $(EXCEPT_OBJECTS),$@,, $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\except_sample.res
    253254|
    254255
    255256$(OBJS)\except_sample.res: .\..\..\samples\sample.rc
    256         brcc32 -32 -r -fo$@ -i$(BCCDIR)\include    -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) -i$(SETUPHDIR) -i.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) -i. $(__DLLFLAG_p_1) -i.\..\..\samples -dNOPCH .\..\..\samples\sample.rc
     257        brcc32 -32 -r -fo$@ -i$(BCCDIR)\include    -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) -i$(SETUPHDIR) -i.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) -i. $(__DLLFLAG_p_1) -i.\..\..\samples -dNOPCH .\..\..\samples\sample.rc
    257258
    258259$(OBJS)\except_except.obj: .\except.cpp
    259260        $(CXX) -q -c -P -o$@ $(EXCEPT_CXXFLAGS) .\except.cpp
    260261
     262$(OBJS)\except_except_utf8.obj: .\except_utf8.cpp
     263        $(CXX) -q -c -P -o$@ $(EXCEPT_CXXFLAGS) .\except_utf8.cpp
     264
  • samples/except/makefile.gcc

     
    1616WX_RELEASE_NODOT = 29
    1717COMPILER_PREFIX = gcc
    1818OBJS = \
    19         $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
    20 LIBDIRNAME = \
    21         .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
     19        $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
     20LIBDIRNAME = \
     21        .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
    2222SETUPHDIR = \
    2323        $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
    2424EXCEPT_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
    25         $(GCCFLAGS) -DHAVE_W32API_H -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
     25        $(GCCFLAGS) -DHAVE_W32API_H -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
    2626        $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
    2727        $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \
    2828        $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include \
    2929        $(____CAIRO_INCLUDEDIR_FILENAMES_p) -W -Wall -I. $(__DLLFLAG_p) \
    3030        -I.\..\..\samples -DNOPCH $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) \
    31         -Wno-ctor-dtor-privacy $(CXXFLAGS_GTK_WINDOWS_GCC) $(CPPFLAGS) $(CXXFLAGS)
     31        -Wno-ctor-dtor-privacy $(CXXFLAGS_GTK_WINDOWS_GCC) $(CPPFLAGS) $(CXXFLAGS)
    3232EXCEPT_OBJECTS =  \
    3333        $(OBJS)\except_sample_rc.o \
    34         $(OBJS)\except_except.o
     34        $(OBJS)\except_except.o \
     35        $(OBJS)\except_except_utf8.o
    3536
    3637### Conditionally set variables: ###
    3738
    38 ifeq ($(TOOLKIT),GTK)
    39 WIN32_TOOLKIT_LOWERCASE = gtk
    40 endif
    41 ifeq ($(TOOLKIT),MSW)
    42 WIN32_TOOLKIT_LOWERCASE = msw
    43 endif
     39ifeq ($(TOOLKIT),GTK)
     40WIN32_TOOLKIT_LOWERCASE = gtk
     41endif
     42ifeq ($(TOOLKIT),MSW)
     43WIN32_TOOLKIT_LOWERCASE = msw
     44endif
    4445ifeq ($(GCC_VERSION),2.95)
    4546GCCFLAGS = -fvtable-thunks
    4647endif
     
    4849PORTNAME = base
    4950endif
    5051ifeq ($(USE_GUI),1)
    51 PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
    52 endif
    53 ifeq ($(TOOLKIT),MAC)
    54 WXBASEPORT = _carbon
    55 endif
    56 ifeq ($(OFFICIAL_BUILD),1)
    57 COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
     52PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
    5853endif
     54ifeq ($(TOOLKIT),MAC)
     55WXBASEPORT = _carbon
     56endif
     57ifeq ($(OFFICIAL_BUILD),1)
     58COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
     59endif
    5960ifeq ($(BUILD),debug)
    6061WXDEBUGFLAG = d
    6162endif
     
    8081ifeq ($(MONOLITHIC),1)
    8182EXTRALIBS_FOR_BASE =   
    8283endif
    83 ifeq ($(TOOLKIT),GTK)
    84 CXXFLAGS_GTK_WINDOWS_GCC = -mms-bitfields
    85 endif
    86 ifeq ($(TOOLKIT),GTK)
    87 ifeq ($(TOOLKIT_VERSION),2)
    88 LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \
    89         gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \
    90         glib-2.0.lib
    91 endif
    92 endif
     84ifeq ($(TOOLKIT),GTK)
     85CXXFLAGS_GTK_WINDOWS_GCC = -mms-bitfields
     86endif
     87ifeq ($(TOOLKIT),GTK)
     88ifeq ($(TOOLKIT_VERSION),2)
     89LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \
     90        gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \
     91        glib-2.0.lib
     92endif
     93endif
    9394ifeq ($(BUILD),debug)
    9495__OPTIMIZEFLAG_2 = -O0
    9596endif
     
    180181endif
    181182ifeq ($(MONOLITHIC),0)
    182183__WXLIB_BASE_p = \
    183         -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
     184        -lwxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
    184185endif
    185186ifeq ($(MONOLITHIC),1)
    186187__WXLIB_MONO_p = \
     
    242243        -if exist $(OBJS)\except.exe del $(OBJS)\except.exe
    243244
    244245$(OBJS)\except.exe: $(EXCEPT_OBJECTS) $(OBJS)\except_sample_rc.o
    245         $(CXX) -o $@ $(EXCEPT_OBJECTS)  $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK)  -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet
     246        $(CXX) -o $@ $(EXCEPT_OBJECTS)  $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK)  -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet
    246247
    247248$(OBJS)\except_sample_rc.o: ./../../samples/sample.rc
    248         windres --use-temp-file -i$< -o$@    --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../include $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../samples --define NOPCH
     249        windres --use-temp-file -i$< -o$@    --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../include $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../samples --define NOPCH
    249250
    250251$(OBJS)\except_except.o: ./except.cpp
    251252        $(CXX) -c -o $@ $(EXCEPT_CXXFLAGS) $(CPPDEPS) $<
    252253
     254$(OBJS)\except_except_utf8.o: ./except_utf8.cpp
     255        $(CXX) -c -o $@ $(EXCEPT_CXXFLAGS) $(CPPDEPS) $<
     256
    253257.PHONY: all clean
    254258
    255259
  • samples/except/Makefile.in

     
    5050EXCEPT_OBJECTS =  \
    5151        $(__except___win32rc) \
    5252        $(__except_os2_lib_res) \
    53         except_except.o
     53        except_except.o \
     54        except_except_utf8.o
    5455
    5556### Conditionally set variables: ###
    5657
     
    182183except_except.o: $(srcdir)/except.cpp
    183184        $(CXXC) -c -o $@ $(EXCEPT_CXXFLAGS) $(srcdir)/except.cpp
    184185
     186except_except_utf8.o: $(srcdir)/except_utf8.cpp
     187        $(CXXC) -c -o $@ $(EXCEPT_CXXFLAGS) $(srcdir)/except_utf8.cpp
    185188
     189
    186190# Include dependency info, if present:
    187191@IF_GNU_MAKE@-include ./.deps/*.d
    188192
  • samples/except/makefile.unx

     
    5353EXCEPT_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) \
    5454        $(CXXFLAGS)
    5555EXCEPT_OBJECTS =  \
    56         except_except.o
     56        except_except.o \
     57        except_except_utf8.o
    5758
    5859### Conditionally set variables: ###
    5960
     
    9394except_except.o: ./except.cpp
    9495        $(CXX) -c -o $@ $(EXCEPT_CXXFLAGS) $(CPPDEPS) $<
    9596
     97except_except_utf8.o: ./except_utf8.cpp
     98        $(CXX) -c -o $@ $(EXCEPT_CXXFLAGS) $(CPPDEPS) $<
     99
    96100.PHONY: all install uninstall clean
    97101
    98102
  • samples/except/makefile.vc

     
    1515WX_RELEASE_NODOT = 29
    1616COMPILER_PREFIX = vc
    1717OBJS = \
    18         $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)$(ARCH_SUFFIX)
     18        $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)$(ARCH_SUFFIX)
    1919LIBDIRNAME = \
    20         .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG)
     20        .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG)
    2121SETUPHDIR = \
    2222        $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
    2323EXCEPT_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME_4) /DWIN32 \
    2424        $(__DEBUGINFO_0) /Fd$(OBJS)\except.pdb $(____DEBUGRUNTIME_3_p) \
    2525        $(__OPTIMIZEFLAG_6) /D_CRT_SECURE_NO_DEPRECATE=1 \
    2626        /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \
    27         $(__NO_VC_CRTDBG_p) /D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
    28         $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
    29         $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \
    30         $(__MSLU_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\include \
    31         $(____CAIRO_INCLUDEDIR_FILENAMES_p) /W4 /I. $(__DLLFLAG_p) /D_WINDOWS \
    32         /I.\..\..\samples /DNOPCH $(__RTTIFLAG_11) $(__EXCEPTIONSFLAG_12) \
    33         $(CPPFLAGS) $(CXXFLAGS)
     27        $(__NO_VC_CRTDBG_p) /D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
     28        $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
     29        $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \
     30        $(__MSLU_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\include \
     31        $(____CAIRO_INCLUDEDIR_FILENAMES_p) /W4 /I. $(__DLLFLAG_p) /D_WINDOWS \
     32        /I.\..\..\samples /DNOPCH $(__RTTIFLAG_11) $(__EXCEPTIONSFLAG_12) \
     33        $(CPPFLAGS) $(CXXFLAGS)
    3434EXCEPT_OBJECTS =  \
    35         $(OBJS)\except_except.obj
     35        $(OBJS)\except_except.obj \
     36        $(OBJS)\except_except_utf8.obj
    3637EXCEPT_RESOURCES =  \
    3738        $(OBJS)\except_sample.res
    3839
    3940### Conditionally set variables: ###
    4041
    41 !if "$(TOOLKIT)" == "GTK"
    42 WIN32_TOOLKIT_LOWERCASE = gtk
    43 !endif
    44 !if "$(TOOLKIT)" == "MSW"
    45 WIN32_TOOLKIT_LOWERCASE = msw
    46 !endif
    47 !if "$(TARGET_CPU)" == "AMD64"
    48 ARCH_SUFFIX = _x64
    49 !endif
    50 !if "$(TARGET_CPU)" == "IA64"
    51 ARCH_SUFFIX = _ia64
    52 !endif
    53 !if "$(TARGET_CPU)" == "X64"
    54 ARCH_SUFFIX = _x64
    55 !endif
    56 !if "$(TARGET_CPU)" == "amd64"
    57 ARCH_SUFFIX = _x64
    58 !endif
    59 !if "$(TARGET_CPU)" == "ia64"
    60 ARCH_SUFFIX = _ia64
    61 !endif
    62 !if "$(TARGET_CPU)" == "x64"
    63 ARCH_SUFFIX = _x64
    64 !endif
     42!if "$(TOOLKIT)" == "GTK"
     43WIN32_TOOLKIT_LOWERCASE = gtk
     44!endif
     45!if "$(TOOLKIT)" == "MSW"
     46WIN32_TOOLKIT_LOWERCASE = msw
     47!endif
     48!if "$(TARGET_CPU)" == "AMD64"
     49ARCH_SUFFIX = _x64
     50!endif
     51!if "$(TARGET_CPU)" == "IA64"
     52ARCH_SUFFIX = _ia64
     53!endif
     54!if "$(TARGET_CPU)" == "X64"
     55ARCH_SUFFIX = _x64
     56!endif
     57!if "$(TARGET_CPU)" == "amd64"
     58ARCH_SUFFIX = _x64
     59!endif
     60!if "$(TARGET_CPU)" == "ia64"
     61ARCH_SUFFIX = _ia64
     62!endif
     63!if "$(TARGET_CPU)" == "x64"
     64ARCH_SUFFIX = _x64
     65!endif
    6566!if "$(USE_GUI)" == "0"
    6667PORTNAME = base
    6768!endif
    6869!if "$(USE_GUI)" == "1"
    69 PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
    70 !endif
    71 !if "$(TOOLKIT)" == "MAC"
    72 WXBASEPORT = _carbon
    73 !endif
    74 !if "$(OFFICIAL_BUILD)" == "1"
    75 COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
     70PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
    7671!endif
     72!if "$(TOOLKIT)" == "MAC"
     73WXBASEPORT = _carbon
     74!endif
     75!if "$(OFFICIAL_BUILD)" == "1"
     76COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
     77!endif
    7778!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
    7879WXDEBUGFLAG = d
    7980!endif
     
    101102!if "$(TARGET_CPU)" == "IA64"
    102103LINK_TARGET_CPU = /MACHINE:IA64
    103104!endif
    104 !if "$(TARGET_CPU)" == "X64"
    105 LINK_TARGET_CPU = /MACHINE:X64
    106 !endif
     105!if "$(TARGET_CPU)" == "X64"
     106LINK_TARGET_CPU = /MACHINE:X64
     107!endif
    107108!if "$(TARGET_CPU)" == "amd64"
    108109LINK_TARGET_CPU = /MACHINE:X64
    109110!endif
    110111!if "$(TARGET_CPU)" == "ia64"
    111112LINK_TARGET_CPU = /MACHINE:IA64
    112113!endif
    113 !if "$(TARGET_CPU)" == "x64"
    114 LINK_TARGET_CPU = /MACHINE:X64
    115 !endif
     114!if "$(TARGET_CPU)" == "x64"
     115LINK_TARGET_CPU = /MACHINE:X64
     116!endif
    116117!if "$(MONOLITHIC)" == "0"
    117118EXTRALIBS_FOR_BASE =
    118119!endif
    119120!if "$(MONOLITHIC)" == "1"
    120121EXTRALIBS_FOR_BASE =   
    121122!endif
    122 !if "$(TOOLKIT)" == "GTK" && "$(TOOLKIT_VERSION)" == "2"
    123 LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \
    124         gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \
    125         glib-2.0.lib
    126 !endif
     123!if "$(TOOLKIT)" == "GTK" && "$(TOOLKIT_VERSION)" == "2"
     124LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib \
     125        gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib \
     126        glib-2.0.lib
     127!endif
    127128!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
    128129__DEBUGINFO_0 = /Zi
    129130!endif
     
    328329!endif
    329330!if "$(MONOLITHIC)" == "0"
    330331__WXLIB_BASE_p = \
    331         wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
     332        wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
    332333!endif
    333334!if "$(MONOLITHIC)" == "1"
    334335__WXLIB_MONO_p = \
     
    372373
    373374$(OBJS)\except.exe: $(EXCEPT_OBJECTS) $(OBJS)\except_sample.res
    374375        link /NOLOGO /OUT:$@  $(__DEBUGINFO_1) /pdb:"$(OBJS)\except.pdb" $(__DEBUGINFO_2)  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
    375         $(EXCEPT_OBJECTS) $(EXCEPT_RESOURCES)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib
     376        $(EXCEPT_OBJECTS) $(EXCEPT_RESOURCES)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib
    376377<<
    377378
    378379$(OBJS)\except_sample.res: .\..\..\samples\sample.rc
    379         rc /fo$@  /d WIN32 $(____DEBUGRUNTIME_3_p_1) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_1)  /d __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) /i $(SETUPHDIR) /i .\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\samples /d NOPCH .\..\..\samples\sample.rc
     380        rc /fo$@  /d WIN32 $(____DEBUGRUNTIME_3_p_1) /d _CRT_SECURE_NO_DEPRECATE=1 /d _CRT_NON_CONFORMING_SWPRINTFS=1 /d _SCL_SECURE_NO_WARNINGS=1 $(__NO_VC_CRTDBG_p_1)  /d __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) /i $(SETUPHDIR) /i .\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\samples /d NOPCH .\..\..\samples\sample.rc
    380381
    381382$(OBJS)\except_except.obj: .\except.cpp
    382383        $(CXX) /c /nologo /TP /Fo$@ $(EXCEPT_CXXFLAGS) .\except.cpp
    383384
     385$(OBJS)\except_except_utf8.obj: .\except_utf8.cpp
     386        $(CXX) /c /nologo /TP /Fo$@ $(EXCEPT_CXXFLAGS) .\except_utf8.cpp
     387
  • samples/except/makefile.wat

     
    3131
    3232### Conditionally set variables: ###
    3333
    34 WIN32_TOOLKIT_LOWERCASE =
    35 !ifeq TOOLKIT GTK
    36 WIN32_TOOLKIT_LOWERCASE = gtk
    37 !endif
    38 !ifeq TOOLKIT MSW
    39 WIN32_TOOLKIT_LOWERCASE = msw
    40 !endif
     34WIN32_TOOLKIT_LOWERCASE =
     35!ifeq TOOLKIT GTK
     36WIN32_TOOLKIT_LOWERCASE = gtk
     37!endif
     38!ifeq TOOLKIT MSW
     39WIN32_TOOLKIT_LOWERCASE = msw
     40!endif
    4141PORTNAME =
    4242!ifeq USE_GUI 0
    4343PORTNAME = base
    4444!endif
    4545!ifeq USE_GUI 1
    46 PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
    47 !endif
    48 WXBASEPORT =
    49 !ifeq TOOLKIT MAC
    50 WXBASEPORT = _carbon
    51 !endif
    52 COMPILER_VERSION =
    53 !ifeq OFFICIAL_BUILD 1
    54 COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
     46PORTNAME = $(WIN32_TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
    5547!endif
     48WXBASEPORT =
     49!ifeq TOOLKIT MAC
     50WXBASEPORT = _carbon
     51!endif
     52COMPILER_VERSION =
     53!ifeq OFFICIAL_BUILD 1
     54COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD
     55!endif
    5656WXDEBUGFLAG =
    5757!ifeq BUILD debug
    5858WXDEBUGFLAG = d
     
    8383!ifeq MONOLITHIC 1
    8484EXTRALIBS_FOR_BASE =   
    8585!endif
    86 LIB_GTK =
    87 !ifeq TOOLKIT GTK
    88 !ifeq TOOLKIT_VERSION 2
    89 LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib &
    90         gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib &
    91         glib-2.0.lib
    92 !endif
    93 !endif
     86LIB_GTK =
     87!ifeq TOOLKIT GTK
     88!ifeq TOOLKIT_VERSION 2
     89LIB_GTK = gtk-win32-2.0.lib gdk-win32-2.0.lib pangocairo-1.0.lib &
     90        gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib &
     91        glib-2.0.lib
     92!endif
     93!endif
    9494__DEBUGINFO_0 =
    9595!ifeq BUILD debug
    9696!ifeq DEBUG_INFO default
     
    168168__WXLIB_BASE_p =
    169169!ifeq MONOLITHIC 0
    170170__WXLIB_BASE_p = &
    171         wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
     171        wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
    172172!endif
    173173__WXLIB_MONO_p =
    174174!ifeq MONOLITHIC 1
     
    240240WX_RELEASE_NODOT = 29
    241241COMPILER_PREFIX = wat
    242242OBJS = &
    243         $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
    244 LIBDIRNAME = &
    245         .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
     243        $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
     244LIBDIRNAME = &
     245        .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)_$(LIBTYPE_SUFFIX)$(CFG)
    246246SETUPHDIR = &
    247247        $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
    248248EXCEPT_CXXFLAGS = $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG_5) &
    249         $(__RUNTIME_LIBS_6) -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) &
    250         $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) &
    251         $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) &
    252         -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx &
    253         -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -i=.\..\..\samples &
    254         -dNOPCH $(__RTTIFLAG_7) $(__EXCEPTIONSFLAG_8) $(CPPFLAGS) $(CXXFLAGS)
     249        $(__RUNTIME_LIBS_6) -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) &
     250        $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) &
     251        $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) &
     252        -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx &
     253        -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -i=.\..\..\samples &
     254        -dNOPCH $(__RTTIFLAG_7) $(__EXCEPTIONSFLAG_8) $(CPPFLAGS) $(CXXFLAGS)
    255255EXCEPT_OBJECTS =  &
    256         $(OBJS)\except_except.obj
     256        $(OBJS)\except_except.obj &
     257        $(OBJS)\except_except_utf8.obj
    257258
    258259
    259260all : $(OBJS)
     
    279280        @%append $(OBJS)\except.lbc option caseexact
    280281        @%append $(OBJS)\except.lbc  $(__DEBUGINFO_1)  libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS)
    281282        @for %i in ($(EXCEPT_OBJECTS)) do @%append $(OBJS)\except.lbc file %i
    282         @for %i in ( $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib) do @%append $(OBJS)\except.lbc library %i
     283        @for %i in ( $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(LIB_GTK)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib) do @%append $(OBJS)\except.lbc library %i
    283284        @%append $(OBJS)\except.lbc option resource=$(OBJS)\except_sample.res
    284285        @for %i in () do @%append $(OBJS)\except.lbc option stack=%i
    285286        wlink @$(OBJS)\except.lbc
    286287
    287288$(OBJS)\except_sample.res :  .AUTODEPEND .\..\..\samples\sample.rc
    288         wrc -q -ad -bt=nt -r -fo=$^@    -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p)  -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $<
     289        wrc -q -ad -bt=nt -r -fo=$^@    -d__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p)  -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $<
    289290
    290291$(OBJS)\except_except.obj :  .AUTODEPEND .\except.cpp
    291292        $(CXX) -bt=nt -zq -fo=$^@ $(EXCEPT_CXXFLAGS) $<
    292293
     294$(OBJS)\except_except_utf8.obj :  .AUTODEPEND .\except_utf8.cpp
     295        $(CXX) -bt=nt -zq -fo=$^@ $(EXCEPT_CXXFLAGS) $<
     296