cp -r ../Documents/MolbyDoc $(DESTPREFIX)/$(PRODUCT_DIR)
mkdir -p $(DESTPREFIX)/$(PRODUCT_DIR)/Scripts/lib
for i in $(RUBY_EXTLIB); do cp $(RUBY_DIR)/lib/$$i $(DESTPREFIX)/$(PRODUCT_DIR)/Scripts/lib; done
-ifneq ($(DEBUG),1)
- for i in $(DESTPREFIX)/$(PRODUCT_DIR)/*.exe $(DESTPREFIX)/$(PRODUCT_DIR)/amber11/bin/*.exe $(DESTPREFIX)/$(PRODUCT_DIR)/ortep3/*.exe; do $(TOOL_PREFIX)strip "$$i"; done
-endif
endif
ifeq ($(TARGET_PLATFORM),MSW)
install: setup
setup: $(DESTPREFIX) $(DESTPREFIX)/$(PRODUCT_DIR)/$(FINAL_EXECUTABLE)
+ifneq ($(DEBUG),1)
+ for i in $(DESTPREFIX)/$(PRODUCT_DIR)/*.exe $(DESTPREFIX)/$(PRODUCT_DIR)/amber11/bin/*.exe $(DESTPREFIX)/$(PRODUCT_DIR)/ortep3/*.exe; do $(TOOL_PREFIX)strip "$$i"; done
+endif
mkdir -p ../latest_binaries
ifneq ($(WINE_PATH),)
($(WINE_PATH)/wine ../../Inno\ Setup\ 5/ISCC.exe molby$(PRODUCT_SUFFIX).iss || exit 1)
wxLaunchDefaultBrowser(wxT("file:///") + url);
}
+int
+MyApp::FilterEvent(wxEvent &event)
+{
+#if 0
+ static FILE *fp_eventlog = NULL;
+ if (fp_eventlog == NULL) {
+ char buf[32];
+ int i = 0;
+ while (1) {
+ snprintf(buf, sizeof buf, "Molby_eventlog_%d.log", i);
+ fp_eventlog = fopen(buf, "r");
+ if (fp_eventlog == NULL) {
+ fp_eventlog = fopen(buf, "wt");
+ break;
+ } else {
+ fclose(fp_eventlog);
+ i++;
+ }
+ }
+ }
+ if (fp_eventlog != NULL) {
+ fprintf(fp_eventlog, "%d %d\n", event.GetEventType(), event.GetId());
+ }
+ fflush(fp_eventlog);
+ }
+#endif
+ return -1;
+}
#pragma mark ====== AboutBox ======
void OnHelp(wxCommandEvent& event);
+ int FilterEvent(wxEvent &event);
+
protected:
MyDocManager* m_docManager;
wxProgressDialog *m_progressDialog;
bool
MyClientConnection::OnDisconnect()
{
- wxGetApp().m_client->Disconnect();
+ return wxGetApp().m_client->Disconnect();
}
MyClient::MyClient()
Disconnect();
}
-void
+bool
MyClient::Disconnect()
{
if (m_clientConnection != NULL) {
- m_clientConnection->Disconnect();
- m_clientConnection = NULL;
- }
+ if (m_clientConnection->Disconnect()) {
+ m_clientConnection = NULL;
+ return true;
+ } else return false;
+ } else return true;
}
wxConnectionBase *
bool
MyServerConnection::OnDisconnect()
{
- wxGetApp().m_server->Disconnect();
+ return wxGetApp().m_server->Disconnect();
}
bool
Disconnect();
}
-void
+bool
MyServer::Disconnect()
{
if (m_serverConnection != NULL) {
- m_serverConnection->Disconnect();
- m_serverConnection = NULL;
- }
+ if (m_serverConnection->Disconnect()) {
+ m_serverConnection = NULL;
+ return true;
+ } else return false;
+ } else return true;
}
wxConnectionBase *
public:
MyClient();
~MyClient();
- void Disconnect();
+ bool Disconnect();
wxConnectionBase *OnMakeConnection();
MyClientConnection *m_clientConnection;
};
public:
MyServer();
~MyServer();
- void Disconnect();
+ bool Disconnect();
wxConnectionBase *OnAcceptConnection(const wxString& topic);
MyServerConnection *m_serverConnection;
};