diff --git a/build/bakefiles/Bakefiles.bkgen b/build/bakefiles/Bakefiles.bkgen index e715f0b1ee..151b2ce588 100644 --- a/build/bakefiles/Bakefiles.bkgen +++ b/build/bakefiles/Bakefiles.bkgen @@ -52,7 +52,7 @@ - + autoconf,borland,dmars_smake,dmars,mingw,watcom @@ -234,7 +234,7 @@ gnu - + gnu - - - - - - flash.cpp - core - base - wx06 - - diff --git a/samples/flash/flash.cpp b/samples/flash/flash.cpp deleted file mode 100644 index bb96f45710..0000000000 --- a/samples/flash/flash.cpp +++ /dev/null @@ -1,596 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Name: flash.cpp -// Purpose: Sample showing integration of Flash ActiveX control -// Author: Vadim Zeitlin -// Created: 2009-01-13 -// Copyright: (c) 2009 Vadim Zeitlin -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -/* - Documentation for embedding Flash into anything other than a web browser is - not easy to find, here is the tech note which provided most of the - information used here: http://www.adobe.com/go/tn_12059 - */ - -// ============================================================================ -// declarations -// ============================================================================ - -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- - -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#ifndef __WXMSW__ - #error "ActiveX controls are MSW-only" -#endif - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - -#include "wx/cmdline.h" -#include "wx/filename.h" - -#ifndef wxHAS_IMAGES_IN_RESOURCES - #include "../sample.xpm" -#endif - -#include "wx/msw/ole/activex.h" - -// we currently use VC-specific extensions in this sample, it could be -// rewritten to avoid them if there is real interest in doing it but compiler -// COM support in MSVC makes the code much simpler to understand -#ifndef __VISUALC__ - #error "This sample requires Microsoft Visual C++ compiler COM extensions" -#endif - -// import Flash ActiveX control by using its (standard) type library UUID -// -// no_auto_exclude is needed to import IServiceProvider interface defined in -// this type library even though its name conflicts with a standard Windows -// interface with the same name -#import "libid:D27CDB6B-AE6D-11CF-96B8-444553540000" no_auto_exclude - -using namespace ShockwaveFlashObjects; - -const CLSID CLSID_ShockwaveFlash = __uuidof(ShockwaveFlash); -const IID IID_IShockwaveFlash = __uuidof(IShockwaveFlash); - -inline wxString bstr2wx(const _bstr_t& bstr) -{ - return wxString(static_cast(bstr)); -} - -inline _bstr_t wx2bstr(const wxString& str) -{ - return _bstr_t(str.wc_str()); -} - -// ---------------------------------------------------------------------------- -// constants -// ---------------------------------------------------------------------------- - -// taken from type library -namespace -{ - -const int FLASH_DISPID_ONREADYSTATECHANGE = -609; // DISPID_ONREADYSTATECHANGE -const int FLASH_DISPID_ONPROGRESS = 0x7a6; -const int FLASH_DISPID_FSCOMMAND = 0x96; -const int FLASH_DISPID_FLASHCALL = 0xc5; - -enum FlashState -{ - FlashState_Unknown = -1, - FlashState_Loading, - FlashState_Uninitialized, - FlashState_Loaded, - FlashState_Interactive, - FlashState_Complete, - FlashState_Max -}; - -} // anonymous namespace - -// ---------------------------------------------------------------------------- -// private classes -// ---------------------------------------------------------------------------- - -// Define a new application type, each program should derive a class from wxApp -class FlashApp : public wxApp -{ -public: - FlashApp() { } - - virtual bool OnInit(); - - virtual void OnInitCmdLine(wxCmdLineParser& parser); - virtual bool OnCmdLineParsed(wxCmdLineParser& parser); - - virtual bool OnExceptionInMainLoop(); - -private: - wxString m_swf; - - wxDECLARE_NO_COPY_CLASS(FlashApp); -}; - -// Define a new frame type: this is going to be our main frame -class FlashFrame : public wxFrame -{ -public: - // ctor takes ownership of the pointer which must be non-NULL and opens the - // given SWF file if it's non-empty - FlashFrame(IShockwaveFlash *flash, const wxString& swf); - virtual ~FlashFrame(); - - void SetMovie(const wxString& movie); - - void Play(); - void Stop(); - -private: - enum - { - Flash_Play = 100, - Flash_Get, - Flash_Set, - Flash_Call, - Flash_CallWithArg - }; - - void OnOpen(wxCommandEvent& event); - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); - - void OnPlay(wxCommandEvent&) { Play(); } - void OnStop(wxCommandEvent&) { Stop(); } - void OnBack(wxCommandEvent& event); - void OnForward(wxCommandEvent& event); - void OnInfo(wxCommandEvent& event); - void OnVarGet(wxCommandEvent& event); - void OnVarSet(wxCommandEvent& event); - void OnCall(wxCommandEvent& event); - void OnCallWithArg(wxCommandEvent& event); - - void OnActiveXEvent(wxActiveXEvent& event); - - // give an error message if hr is not S_OK - void CheckFlashCall(HRESULT hr, const char *func); - - // return the name of the Flash control state - wxString GetFlashStateString(int state); - - // call CallFunction() with a single argument of the type specified by - // argtype or without any arguments if it is empty - void CallFlashFunc(const wxString& argtype, - const wxString& func, - const wxString& arg = wxString()); - - - const IShockwaveFlashPtr m_flash; - wxLog *m_oldLog; - wxString m_swf; - FlashState m_state; - - wxTextCtrl *m_varname, - *m_varvalue, - *m_funcname, - *m_funcarg; - - wxDECLARE_EVENT_TABLE(); - wxDECLARE_NO_COPY_CLASS(FlashFrame); -}; - -// ---------------------------------------------------------------------------- -// event tables and other macros for wxWidgets -// ---------------------------------------------------------------------------- - -wxBEGIN_EVENT_TABLE(FlashFrame, wxFrame) - EVT_MENU(wxID_OPEN, FlashFrame::OnOpen) - EVT_MENU(wxID_EXIT, FlashFrame::OnQuit) - EVT_MENU(wxID_ABOUT, FlashFrame::OnAbout) - - EVT_BUTTON(Flash_Play, FlashFrame::OnPlay) - EVT_BUTTON(wxID_STOP, FlashFrame::OnStop) - EVT_BUTTON(wxID_BACKWARD, FlashFrame::OnBack) - EVT_BUTTON(wxID_FORWARD, FlashFrame::OnForward) - - EVT_BUTTON(wxID_INFO, FlashFrame::OnInfo) - EVT_BUTTON(Flash_Get, FlashFrame::OnVarGet) - EVT_BUTTON(Flash_Set, FlashFrame::OnVarSet) - EVT_BUTTON(Flash_Call, FlashFrame::OnCall) - EVT_BUTTON(Flash_CallWithArg, FlashFrame::OnCallWithArg) - - EVT_ACTIVEX(wxID_ANY, FlashFrame::OnActiveXEvent) -wxEND_EVENT_TABLE() - -wxIMPLEMENT_APP(FlashApp); - -// ============================================================================ -// implementation -// ============================================================================ - -// ---------------------------------------------------------------------------- -// the application class -// ---------------------------------------------------------------------------- - -void FlashApp::OnInitCmdLine(wxCmdLineParser& parser) -{ - wxApp::OnInitCmdLine(parser); - - parser.AddParam("SWF file to play", - wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL); -} - -bool FlashApp::OnCmdLineParsed(wxCmdLineParser& parser) -{ - if ( parser.GetParamCount() ) - m_swf = parser.GetParam(0); - - return wxApp::OnCmdLineParsed(parser); -} - -bool FlashApp::OnInit() -{ - if ( !wxApp::OnInit() ) - return false; - - IShockwaveFlash *flash = NULL; - HRESULT hr = ::CoCreateInstance - ( - CLSID_ShockwaveFlash, - NULL, - CLSCTX_INPROC_SERVER, - IID_IShockwaveFlash, - (void **)&flash - ); - if ( FAILED(hr) ) - { - wxLogSysError(hr, "Failed to create Flash ActiveX control"); - return false; - } - - new FlashFrame(flash, m_swf); - - return true; -} - -bool FlashApp::OnExceptionInMainLoop() -{ - try - { - throw; - } - catch ( _com_error& ce ) - { - wxLogMessage("COM exception: %s", ce.ErrorMessage()); - - return true; - } - catch ( ... ) - { - throw; - } -} - -// ---------------------------------------------------------------------------- -// main frame creation -// ---------------------------------------------------------------------------- - -// frame constructor -FlashFrame::FlashFrame(IShockwaveFlash *flash, const wxString& swf) - : wxFrame(NULL, wxID_ANY, "wxWidgets Flash sample"), - m_flash(flash, false /* take ownership */), - m_swf(swf), - m_state(FlashState_Unknown) -{ - // set the frame icon - SetIcon(wxICON(sample)); - - // create the new log target before doing anything with the Flash that - // could result in log messages - wxTextCtrl * const log = new wxTextCtrl(this, wxID_ANY, "", - wxDefaultPosition, wxSize(-1, 100), - wxTE_MULTILINE); - m_oldLog = wxLog::SetActiveTarget(new wxLogTextCtrl(log)); - -#if wxUSE_MENUS - // create a menu bar - wxMenu *fileMenu = new wxMenu; - fileMenu->Append(wxID_OPEN); - fileMenu->AppendSeparator(); - fileMenu->Append(wxID_EXIT); - - wxMenu *helpMenu = new wxMenu; - helpMenu->Append(wxID_ABOUT); - - wxMenuBar *menuBar = new wxMenuBar(); - menuBar->Append(fileMenu, "&File"); - menuBar->Append(helpMenu, "&Help"); - SetMenuBar(menuBar); -#endif // wxUSE_MENUS - -#if wxUSE_STATUSBAR - CreateStatusBar(2); - SetStatusText("Welcome to wxWidgets Flash embedding sample"); - SetStatusText("No loaded file", 1); -#endif // wxUSE_STATUSBAR - - wxPanel * const panel = new wxPanel(this); - wxSizer * const sizerPanel = new wxBoxSizer(wxVERTICAL); - wxWindow * const activeXParent = new wxWindow(panel, wxID_ANY, - wxDefaultPosition, - wxSize(300, 200)); - new wxActiveXContainer(activeXParent, IID_IShockwaveFlash, flash); - if ( !swf.empty() ) - SetMovie(swf); - - sizerPanel->Add(activeXParent, - wxSizerFlags(1).Expand().Border()); - - const wxSizerFlags flagsHorz(wxSizerFlags().Centre().HorzBorder()); - - wxSizer * const sizerBtns = new wxBoxSizer(wxHORIZONTAL); - sizerBtns->Add(new wxButton(panel, wxID_BACKWARD), flagsHorz); - sizerBtns->Add(new wxButton(panel, Flash_Play, "&Play"), flagsHorz); - sizerBtns->Add(new wxButton(panel, wxID_STOP), flagsHorz); - sizerBtns->Add(new wxButton(panel, wxID_FORWARD), flagsHorz); - sizerBtns->AddSpacer(20); - sizerBtns->Add(new wxButton(panel, wxID_INFO), flagsHorz); - sizerPanel->Add(sizerBtns, wxSizerFlags().Center().Border()); - - wxSizer * const sizerVar = new wxBoxSizer(wxHORIZONTAL); - sizerVar->Add(new wxStaticText(panel, wxID_ANY, "Variable &name:"), - flagsHorz); - m_varname = new wxTextCtrl(panel, wxID_ANY); - sizerVar->Add(m_varname, flagsHorz); - sizerVar->Add(new wxStaticText(panel, wxID_ANY, "&value:"), - flagsHorz); - m_varvalue = new wxTextCtrl(panel, wxID_ANY); - sizerVar->Add(m_varvalue, flagsHorz); - sizerVar->AddSpacer(10); - sizerVar->Add(new wxButton(panel, Flash_Get, "&Get"), flagsHorz); - sizerVar->Add(new wxButton(panel, Flash_Set, "&Set"), flagsHorz); - sizerPanel->Add(sizerVar, wxSizerFlags().Center().Border()); - - wxSizer * const sizerCall = new wxBoxSizer(wxHORIZONTAL); - sizerCall->Add(new wxStaticText(panel, wxID_ANY, "&Function name:"), - flagsHorz); - m_funcname = new wxTextCtrl(panel, wxID_ANY); - sizerCall->Add(m_funcname, flagsHorz); - sizerCall->Add(new wxButton(panel, Flash_Call, "&Call"), flagsHorz); - sizerCall->Add(new wxStaticText(panel, wxID_ANY, "&argument:"), - flagsHorz); - m_funcarg = new wxTextCtrl(panel, wxID_ANY); - sizerCall->Add(m_funcarg, flagsHorz); - sizerCall->Add(new wxButton(panel, Flash_CallWithArg, "Call &with arg"), - flagsHorz); - sizerPanel->Add(sizerCall, wxSizerFlags().Center().Border()); - - panel->SetSizer(sizerPanel); - - wxSizer * const sizerFrame = new wxBoxSizer(wxVERTICAL); - sizerFrame->Add(panel, wxSizerFlags(2).Expand()); - sizerFrame->Add(log, wxSizerFlags(1).Expand()); - SetSizerAndFit(sizerFrame); - - Show(); - - m_flash->PutAllowScriptAccess(L"always"); - wxLogMessage("Script access changed to \"%s\"", - bstr2wx(m_flash->GetAllowScriptAccess())); -} - -FlashFrame::~FlashFrame() -{ - delete wxLog::SetActiveTarget(m_oldLog); -} - -// ---------------------------------------------------------------------------- -// Flash API wrappers -// ---------------------------------------------------------------------------- - -void FlashFrame::CheckFlashCall(HRESULT hr, const char *func) -{ - if ( FAILED(hr) ) - { - wxLogSysError(hr, "Call to IShockwaveFlash::%s() failed", func); - } -} - -void FlashFrame::CallFlashFunc(const wxString& argtype, - const wxString& func, - const wxString& arg) -{ - wxString args; - if ( !argtype.empty() ) - { - args = wxString::Format("<%s>%s", argtype, arg, argtype); - } - - // take care with XML formatting: there should be no spaces in it or the - // call would fail! - wxString request = wxString::Format - ( - "" - "" - "%s" - "" - "", - func, - args - ); - - wxLogMessage("%s(%s) returned \"%s\"", - func, args, - bstr2wx(m_flash->CallFunction(wx2bstr(request)))); -} - -wxString FlashFrame::GetFlashStateString(int state) -{ - static const char *knownStates[] = - { - "Loading", "Uninitialized", "Loaded", "Interactive", "Complete", - }; - - if ( state >= 0 && state < WXSIZEOF(knownStates) ) - return knownStates[state]; - - return wxString::Format("unknown state (%d)", state); -} - -void FlashFrame::SetMovie(const wxString& movie) -{ - // Flash doesn't like relative file names - wxFileName fn(movie); - fn.MakeAbsolute(); - const wxString swf = fn.GetFullPath(); - if ( swf == m_swf ) - m_flash->PutMovie(L""); - else - m_swf = swf; - - m_flash->PutMovie(m_swf.wc_str()); - - SetStatusText("Loaded \"" + m_swf + '"', 1); -} - -void FlashFrame::Play() -{ - CheckFlashCall(m_flash->Play(), "Play"); -} - -void FlashFrame::Stop() -{ - CheckFlashCall(m_flash->Stop(), "Stop"); -} - -// ---------------------------------------------------------------------------- -// event handlers -// ---------------------------------------------------------------------------- - -void FlashFrame::OnOpen(wxCommandEvent& WXUNUSED(event)) -{ - wxString swf = wxLoadFileSelector("Flash movie", ".swf", m_swf, this); - if ( swf.empty() ) - return; - - SetMovie(swf); -} - -void FlashFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) -{ - // true is to force the frame to close - Close(true); -} - -void FlashFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) -{ - wxMessageBox("Flash ActiveX control embedding sample\n" - "\n" - "(c) 2009 Vadim Zeitlin", - "About " + GetTitle(), - wxOK | wxICON_INFORMATION, - this); -} - -void FlashFrame::OnActiveXEvent(wxActiveXEvent& event) -{ - switch ( event.GetDispatchId() ) - { - case FLASH_DISPID_ONREADYSTATECHANGE: - { - const int state = event[0].GetInteger(); - if ( state != m_state ) - { - wxLogMessage("State changed to %s", - GetFlashStateString(state)); - - if ( state >= 0 && state < FlashState_Max ) - m_state = static_cast(state); - else - m_state = FlashState_Unknown; - } - } - break; - - case FLASH_DISPID_ONPROGRESS: - wxLogMessage("Progress: %d%%", event[0].GetInteger()); - break; - - case FLASH_DISPID_FSCOMMAND: - wxLogMessage("Flash command %s(%s)", - event[0].GetString(), event[1].GetString()); - break; - - case FLASH_DISPID_FLASHCALL: - wxLogMessage("Flash request \"%s\"", event[0].GetString()); - break; - - default: - wxLogMessage("Unknown event %ld", event.GetDispatchId()); - } - - event.Skip(); -} - -void FlashFrame::OnBack(wxCommandEvent& WXUNUSED(event)) -{ - CheckFlashCall(m_flash->Back(), "Back"); -} - -void FlashFrame::OnForward(wxCommandEvent& WXUNUSED(event)) -{ - CheckFlashCall(m_flash->Forward(), "Forward"); -} - -void FlashFrame::OnInfo(wxCommandEvent& WXUNUSED(event)) -{ - const int state = m_flash->GetReadyState(); - wxString msg = "State: " + GetFlashStateString(state); - - if ( state == FlashState_Complete ) - { - msg += wxString::Format(", frame: %ld/%ld", - m_flash->GetFrameNum() + 1, - m_flash->GetTotalFrames()); - } - - if ( m_flash->IsPlaying() ) - msg += ", playing"; - - wxLogMessage("%s", msg); -} - -void FlashFrame::OnVarGet(wxCommandEvent& WXUNUSED(event)) -{ - m_varvalue->SetValue(bstr2wx( - m_flash->GetVariable(wx2bstr(m_varname->GetValue())))); -} - -void FlashFrame::OnVarSet(wxCommandEvent& WXUNUSED(event)) -{ - m_flash->SetVariable(wx2bstr(m_varname->GetValue()), - wx2bstr(m_varvalue->GetValue())); -} - -void FlashFrame::OnCall(wxCommandEvent& WXUNUSED(event)) -{ - CallFlashFunc("", m_funcname->GetValue()); -} - -void FlashFrame::OnCallWithArg(wxCommandEvent& WXUNUSED(event)) -{ - CallFlashFunc("string", m_funcname->GetValue(), m_funcarg->GetValue()); -} - - - diff --git a/samples/flash/flash_vc7.vcproj b/samples/flash/flash_vc7.vcproj deleted file mode 100644 index 26c5f3bbbd..0000000000 --- a/samples/flash/flash_vc7.vcproj +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/flash/flash_vc8.vcproj b/samples/flash/flash_vc8.vcproj deleted file mode 100644 index 8087af76c1..0000000000 --- a/samples/flash/flash_vc8.vcproj +++ /dev/null @@ -1,829 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/flash/flash_vc9.vcproj b/samples/flash/flash_vc9.vcproj deleted file mode 100644 index d9914aa86a..0000000000 --- a/samples/flash/flash_vc9.vcproj +++ /dev/null @@ -1,801 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/flash/form.mxml b/samples/flash/form.mxml deleted file mode 100644 index 2a983fa25c..0000000000 --- a/samples/flash/form.mxml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/samples/flash/form.swf b/samples/flash/form.swf deleted file mode 100644 index 7bd9d7ab2d..0000000000 Binary files a/samples/flash/form.swf and /dev/null differ diff --git a/samples/flash/makefile.vc b/samples/flash/makefile.vc deleted file mode 100644 index 8efc1a5c14..0000000000 --- a/samples/flash/makefile.vc +++ /dev/null @@ -1,374 +0,0 @@ -# ========================================================================= -# This makefile was generated by -# Bakefile 0.2.11 (http://www.bakefile.org) -# Do not modify, all changes will be overwritten! -# ========================================================================= - -!include <../../build/msw/config.vc> - -# ------------------------------------------------------------------------- -# Do not modify the rest of this file! -# ------------------------------------------------------------------------- - -### Variables: ### - -WX_RELEASE_NODOT = 31 -COMPILER_PREFIX = vc -OBJS = \ - $(COMPILER_PREFIX)$(COMPILER_VERSION)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)$(ARCH_SUFFIX) -LIBDIRNAME = \ - .\..\..\lib\$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG) -SETUPHDIR = \ - $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) -FLASH_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME_4) /DWIN32 \ - $(__DEBUGINFO_0) /Fd$(OBJS)\flash.pdb $(____DEBUGRUNTIME_3_p) \ - $(__OPTIMIZEFLAG_6) /D_CRT_SECURE_NO_DEPRECATE=1 \ - /D_CRT_NON_CONFORMING_SWPRINTFS=1 /D_SCL_SECURE_NO_WARNINGS=1 \ - $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__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_p) /W4 /I. $(__DLLFLAG_p) /D_WINDOWS \ - /I.\..\..\samples /DNOPCH $(__RTTIFLAG_11) $(__EXCEPTIONSFLAG_12) \ - $(CPPFLAGS) $(CXXFLAGS) -FLASH_OBJECTS = \ - $(OBJS)\flash_flash.obj -FLASH_RESOURCES = \ - $(OBJS)\flash_sample.res - -### Conditionally set variables: ### - -!if "$(TARGET_CPU)" == "AMD64" -ARCH_SUFFIX = _x64 -!endif -!if "$(TARGET_CPU)" == "ARM64" -ARCH_SUFFIX = _arm64 -!endif -!if "$(TARGET_CPU)" == "IA64" -ARCH_SUFFIX = _ia64 -!endif -!if "$(TARGET_CPU)" == "X64" -ARCH_SUFFIX = _x64 -!endif -!if "$(TARGET_CPU)" == "amd64" -ARCH_SUFFIX = _x64 -!endif -!if "$(TARGET_CPU)" == "arm64" -ARCH_SUFFIX = _arm64 -!endif -!if "$(TARGET_CPU)" == "ia64" -ARCH_SUFFIX = _ia64 -!endif -!if "$(TARGET_CPU)" == "x64" -ARCH_SUFFIX = _x64 -!endif -!if "$(USE_GUI)" == "0" -PORTNAME = base -!endif -!if "$(USE_GUI)" == "1" -PORTNAME = msw$(TOOLKIT_VERSION) -!endif -!if "$(OFFICIAL_BUILD)" == "1" -COMPILER_VERSION = ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" -WXDEBUGFLAG = d -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "1" -WXDEBUGFLAG = d -!endif -!if "$(UNICODE)" == "1" -WXUNICODEFLAG = u -!endif -!if "$(WXUNIV)" == "1" -WXUNIVNAME = univ -!endif -!if "$(SHARED)" == "1" -WXDLLFLAG = dll -!endif -!if "$(SHARED)" == "0" -LIBTYPE_SUFFIX = lib -!endif -!if "$(SHARED)" == "1" -LIBTYPE_SUFFIX = dll -!endif -!if "$(TARGET_CPU)" == "AMD64" -LINK_TARGET_CPU = /MACHINE:X64 -!endif -!if "$(TARGET_CPU)" == "ARM64" -LINK_TARGET_CPU = /MACHINE:ARM64 -!endif -!if "$(TARGET_CPU)" == "IA64" -LINK_TARGET_CPU = /MACHINE:IA64 -!endif -!if "$(TARGET_CPU)" == "X64" -LINK_TARGET_CPU = /MACHINE:X64 -!endif -!if "$(TARGET_CPU)" == "amd64" -LINK_TARGET_CPU = /MACHINE:X64 -!endif -!if "$(TARGET_CPU)" == "arm64" -LINK_TARGET_CPU = /MACHINE:ARM64 -!endif -!if "$(TARGET_CPU)" == "ia64" -LINK_TARGET_CPU = /MACHINE:IA64 -!endif -!if "$(TARGET_CPU)" == "x64" -LINK_TARGET_CPU = /MACHINE:X64 -!endif -!if "$(MONOLITHIC)" == "0" -EXTRALIBS_FOR_BASE = -!endif -!if "$(MONOLITHIC)" == "1" -EXTRALIBS_FOR_BASE = -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_0 = /Zi -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_0 = -!endif -!if "$(DEBUG_INFO)" == "0" -__DEBUGINFO_0 = -!endif -!if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_0 = /Zi -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_1 = /DEBUG -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_1 = -!endif -!if "$(DEBUG_INFO)" == "0" -__DEBUGINFO_1 = -!endif -!if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_1 = /DEBUG -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_2 = $(__DEBUGRUNTIME_5) -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_2 = -!endif -!if "$(DEBUG_INFO)" == "0" -__DEBUGINFO_2 = -!endif -!if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_2 = $(__DEBUGRUNTIME_5) -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" -____DEBUGRUNTIME_3_p = /D_DEBUG -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -____DEBUGRUNTIME_3_p = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -____DEBUGRUNTIME_3_p = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "1" -____DEBUGRUNTIME_3_p = /D_DEBUG -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" -____DEBUGRUNTIME_3_p_1 = /d _DEBUG -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -____DEBUGRUNTIME_3_p_1 = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -____DEBUGRUNTIME_3_p_1 = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "1" -____DEBUGRUNTIME_3_p_1 = /d _DEBUG -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__DEBUGRUNTIME_4 = d -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__DEBUGRUNTIME_4 = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -__DEBUGRUNTIME_4 = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "1" -__DEBUGRUNTIME_4 = d -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__DEBUGRUNTIME_5 = -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__DEBUGRUNTIME_5 = /opt:ref /opt:icf -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -__DEBUGRUNTIME_5 = /opt:ref /opt:icf -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "1" -__DEBUGRUNTIME_5 = -!endif -!if "$(BUILD)" == "debug" -__OPTIMIZEFLAG_6 = /Od -!endif -!if "$(BUILD)" == "release" -__OPTIMIZEFLAG_6 = /O2 -!endif -!if "$(USE_THREADS)" == "0" -__THREADSFLAG_9 = L -!endif -!if "$(USE_THREADS)" == "1" -__THREADSFLAG_9 = T -!endif -!if "$(RUNTIME_LIBS)" == "dynamic" -__RUNTIME_LIBS_10 = D -!endif -!if "$(RUNTIME_LIBS)" == "static" -__RUNTIME_LIBS_10 = $(__THREADSFLAG_9) -!endif -!if "$(USE_RTTI)" == "0" -__RTTIFLAG_11 = /GR- -!endif -!if "$(USE_RTTI)" == "1" -__RTTIFLAG_11 = /GR -!endif -!if "$(USE_EXCEPTIONS)" == "0" -__EXCEPTIONSFLAG_12 = -!endif -!if "$(USE_EXCEPTIONS)" == "1" -__EXCEPTIONSFLAG_12 = /EHsc -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" -__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" -__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" -__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__ -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" -__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__ -!endif -!if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ -!endif -!if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__ -!endif -!if "$(DEBUG_FLAG)" == "0" -__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0 -!endif -!if "$(DEBUG_FLAG)" == "0" -__DEBUG_DEFINE_p_1 = /d wxDEBUG_LEVEL=0 -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__NDEBUG_DEFINE_p = /DNDEBUG -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -__NDEBUG_DEFINE_p = /DNDEBUG -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -__NDEBUG_DEFINE_p_1 = /d NDEBUG -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -__NDEBUG_DEFINE_p_1 = /d NDEBUG -!endif -!if "$(USE_EXCEPTIONS)" == "0" -__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS -!endif -!if "$(USE_EXCEPTIONS)" == "0" -__EXCEPTIONS_DEFINE_p_1 = /d wxNO_EXCEPTIONS -!endif -!if "$(USE_RTTI)" == "0" -__RTTI_DEFINE_p = /DwxNO_RTTI -!endif -!if "$(USE_RTTI)" == "0" -__RTTI_DEFINE_p_1 = /d wxNO_RTTI -!endif -!if "$(USE_THREADS)" == "0" -__THREAD_DEFINE_p = /DwxNO_THREADS -!endif -!if "$(USE_THREADS)" == "0" -__THREAD_DEFINE_p_1 = /d wxNO_THREADS -!endif -!if "$(UNICODE)" == "0" -__UNICODE_DEFINE_p = /DwxUSE_UNICODE=0 -!endif -!if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p = /D_UNICODE -!endif -!if "$(UNICODE)" == "0" -__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=0 -!endif -!if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_1 = /d _UNICODE -!endif -!if "$(USE_CAIRO)" == "1" -____CAIRO_INCLUDEDIR_FILENAMES_p = /I$(CAIRO_ROOT)\include\cairo -!endif -!if "$(USE_CAIRO)" == "1" -____CAIRO_INCLUDEDIR_FILENAMES_1_p = /i $(CAIRO_ROOT)\include\cairo -!endif -!if "$(SHARED)" == "1" -__DLLFLAG_p = /DWXUSINGDLL -!endif -!if "$(SHARED)" == "1" -__DLLFLAG_p_1 = /d WXUSINGDLL -!endif -!if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = \ - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib -!endif -!if "$(MONOLITHIC)" == "0" -__WXLIB_BASE_p = \ - wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib -!endif -!if "$(MONOLITHIC)" == "1" -__WXLIB_MONO_p = \ - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib -!endif -!if "$(MONOLITHIC)" == "1" && "$(USE_STC)" == "1" -__LIB_SCINTILLA_IF_MONO_p = wxscintilla$(WXDEBUGFLAG).lib -!endif -!if "$(USE_GUI)" == "1" -__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib -!endif -!if "$(USE_GUI)" == "1" -__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib -!endif -!if "$(USE_GUI)" == "1" -__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib -!endif -!if "$(USE_CAIRO)" == "1" -__CAIRO_LIB_p = cairo.lib -!endif -!if "$(USE_CAIRO)" == "1" -____CAIRO_LIBDIR_FILENAMES_p = /LIBPATH:$(CAIRO_ROOT)\lib -!endif - - -all: $(OBJS) -$(OBJS): - -if not exist $(OBJS) mkdir $(OBJS) - -### Targets: ### - -all: $(OBJS)\flash.exe - -clean: - -if exist $(OBJS)\*.obj del $(OBJS)\*.obj - -if exist $(OBJS)\*.res del $(OBJS)\*.res - -if exist $(OBJS)\*.pch del $(OBJS)\*.pch - -if exist $(OBJS)\flash.exe del $(OBJS)\flash.exe - -if exist $(OBJS)\flash.ilk del $(OBJS)\flash.ilk - -if exist $(OBJS)\flash.pdb del $(OBJS)\flash.pdb - -$(OBJS)\flash.exe: $(FLASH_OBJECTS) $(OBJS)\flash_sample.res - link /NOLOGO /OUT:$@ $(__DEBUGINFO_1) /pdb:"$(OBJS)\flash.pdb" $(__DEBUGINFO_2) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<< - $(FLASH_OBJECTS) $(FLASH_RESOURCES) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_SCINTILLA_IF_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) 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 shlwapi.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib version.lib wsock32.lib wininet.lib -<< - -$(OBJS)\flash_sample.res: .\..\..\samples\sample.rc - 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 __WXMSW__ $(__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) /i $(SETUPHDIR) /i .\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\samples /d NOPCH .\..\..\samples\sample.rc - -$(OBJS)\flash_flash.obj: .\flash.cpp - $(CXX) /c /nologo /TP /Fo$@ $(FLASH_CXXFLAGS) .\flash.cpp - diff --git a/samples/makefile.vc b/samples/makefile.vc index b0dc178ce9..3256231daa 100644 --- a/samples/makefile.vc +++ b/samples/makefile.vc @@ -323,9 +323,6 @@ clean: cd xrc $(MAKE) -f makefile.vc $(MAKEARGS) clean cd "$(MAKEDIR)" - cd flash - $(MAKE) -f makefile.vc $(MAKEARGS) clean - cd "$(MAKEDIR)" cd mfc $(MAKE) -f makefile.vc $(MAKEARGS) clean cd "$(MAKEDIR)" @@ -764,11 +761,6 @@ sub_xrc: cd "$(MAKEDIR)" !endif -sub_flash: - cd flash - $(MAKE) -f makefile.vc $(MAKEARGS) all - cd "$(MAKEDIR)" - sub_mfc: cd mfc $(MAKE) -f makefile.vc $(MAKEARGS) all diff --git a/samples/samples.bkl b/samples/samples.bkl index 3d415c22c1..bdcd170772 100644 --- a/samples/samples.bkl +++ b/samples/samples.bkl @@ -102,7 +102,6 @@ other ones. --> -