First version
This commit is contained in:
commit
d0eaab4e1a
3
Samples/tcptest/resource.rc
Normal file
3
Samples/tcptest/resource.rc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
aaaa ICON "wx/msw/std.ico"
|
||||||
|
|
||||||
|
#include "wx/msw/wx.rc"
|
271
Samples/tcptest/tcpclient.cpp
Normal file
271
Samples/tcptest/tcpclient.cpp
Normal file
|
@ -0,0 +1,271 @@
|
||||||
|
#include "tcpclient.h"
|
||||||
|
|
||||||
|
#define BUF_SIZE 1024
|
||||||
|
|
||||||
|
const long SimpleTCPClient::SOCKET_ID = wxNewId();
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(SimpleTCPClient, wxEvtHandler)
|
||||||
|
EVT_SOCKET(SOCKET_ID, SimpleTCPClient::OnSocketEvent)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_EVENT_TYPE(EV_CONNECTED);
|
||||||
|
DEFINE_EVENT_TYPE(EV_CLIENTONDATA);
|
||||||
|
|
||||||
|
SimpleTCPClient::SimpleTCPClient(wxEvtHandler* parent, wxWindowID id)
|
||||||
|
{
|
||||||
|
|
||||||
|
m_id = id;
|
||||||
|
m_parent = parent;
|
||||||
|
logBox = NULL;
|
||||||
|
Client = NULL;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleTCPClient::~SimpleTCPClient()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read specified number of bytes to specified buffer from socket and return actual number of read bytes
|
||||||
|
int SimpleTCPClient::Read( void *buffer, unsigned int nbytes )
|
||||||
|
{
|
||||||
|
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
// Read data
|
||||||
|
if (Client != NULL)
|
||||||
|
{
|
||||||
|
if ( Client->IsConnected() && !disconnected)
|
||||||
|
{
|
||||||
|
Client->Read(buffer, nbytes);
|
||||||
|
result = Client->LastCount(); // Set number of actually read bytes as result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Peek specified number of bytes to specified buffer from socket and return actual number of peeked bytes
|
||||||
|
// This doesn't remove the data from socket and it can be read afterwards
|
||||||
|
int SimpleTCPClient::Peek( void *buffer, unsigned int nbytes )
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
// Peek data
|
||||||
|
if (Client != NULL && !disconnected)
|
||||||
|
{
|
||||||
|
if ( Client->IsConnected() )
|
||||||
|
{
|
||||||
|
Client->Peek(buffer, nbytes);
|
||||||
|
result = Client->LastCount(); // Set number of actually peeked bytes as result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Read from socket and return a string (this should be mostly used for "human-readable" data)
|
||||||
|
wxString SimpleTCPClient::ReadStr()
|
||||||
|
{
|
||||||
|
wxString readString = "";
|
||||||
|
|
||||||
|
char buff[BUF_SIZE + 1]; // Buffer with byte for zero termination (end of string)
|
||||||
|
memset(buff, 0, sizeof(buff));
|
||||||
|
|
||||||
|
// Read data
|
||||||
|
if (Client != NULL) Client->Read(&buff, BUF_SIZE);
|
||||||
|
|
||||||
|
readString = buff;
|
||||||
|
|
||||||
|
return readString;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Peek data in socket without clearing the data and return a string (this should be mostly used for "human-readable" data)
|
||||||
|
wxString SimpleTCPClient::PeekStr()
|
||||||
|
{
|
||||||
|
wxString readString = "";
|
||||||
|
|
||||||
|
char buff[BUF_SIZE + 1]; // Buffer with byte for zero termination (end of string)
|
||||||
|
memset(buff, 0, sizeof(buff));
|
||||||
|
|
||||||
|
// Read data
|
||||||
|
if (Client != NULL) Client->Peek(&buff, BUF_SIZE);
|
||||||
|
|
||||||
|
readString = buff;
|
||||||
|
|
||||||
|
return readString;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPClient::LogClient( wxString logText )
|
||||||
|
{
|
||||||
|
// Append text to provided wxTextCtrl (if exists)
|
||||||
|
// "(internal)" is added just to make it easier to understand how the application works
|
||||||
|
// It will show which messages came from the "inside" of tcpclient.cpp file
|
||||||
|
if (logBox != NULL) logBox->WriteText("(internal) " + logText + "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPClient::Connect(wxString hostname, unsigned int port)
|
||||||
|
{
|
||||||
|
if (Client == NULL)
|
||||||
|
{
|
||||||
|
wxIPV4address ipaddr;
|
||||||
|
ipaddr.Hostname(hostname);
|
||||||
|
ipaddr.Service(port);
|
||||||
|
|
||||||
|
LogClient("Opening client");
|
||||||
|
Client = new wxSocketClient();
|
||||||
|
Client->SetFlags(wxSOCKET_NOWAIT); // wxSOCKET_NONE is default but produced some segfaults on retry
|
||||||
|
|
||||||
|
Client->SetEventHandler(*this, SOCKET_ID);
|
||||||
|
Client->SetNotify(wxSOCKET_CONNECTION_FLAG | wxSOCKET_INPUT_FLAG | wxSOCKET_LOST_FLAG);
|
||||||
|
Client->Notify(true);
|
||||||
|
|
||||||
|
Client->Connect(ipaddr, false);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if ( Client->IsConnected() )
|
||||||
|
{
|
||||||
|
LogClient( "Already connected" );
|
||||||
|
}
|
||||||
|
else if ( !Client->IsConnected() )
|
||||||
|
{
|
||||||
|
LogClient( "Connection in progress" );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SimpleTCPClient::WriteStr( wxString str_in )
|
||||||
|
{
|
||||||
|
if (Client != NULL) // No point in trying if client is not active
|
||||||
|
{
|
||||||
|
// Send string to server
|
||||||
|
if ( Client->IsConnected() )
|
||||||
|
{
|
||||||
|
Client->Write(str_in.c_str(), str_in.Length());
|
||||||
|
LogClient("Sent \"" + str_in + "\"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPClient::Write( const void *data, unsigned int dataBytes )
|
||||||
|
{
|
||||||
|
if (Client != NULL) // No point in trying if client is not active
|
||||||
|
{
|
||||||
|
// Write data
|
||||||
|
if ( Client->IsConnected() )
|
||||||
|
{
|
||||||
|
Client->Write(data, dataBytes);
|
||||||
|
LogClient("Sent binary data");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPClient::WriteWait( const void *data, unsigned int dataBytes )
|
||||||
|
{
|
||||||
|
if (Client != NULL) // No point in trying if client is not active
|
||||||
|
{
|
||||||
|
// Write data
|
||||||
|
if ( Client->IsConnected() )
|
||||||
|
{
|
||||||
|
//wxSocketFlags tempFlags = Client->GetFlags();
|
||||||
|
|
||||||
|
//Client->SetFlags(wxSOCKET_BLOCK);
|
||||||
|
|
||||||
|
Client->Write(data, dataBytes);
|
||||||
|
Client->WaitForWrite(0,10);
|
||||||
|
|
||||||
|
//Client->SetFlags(tempFlags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SimpleTCPClient::OnRecv(wxSocketBase *sock)
|
||||||
|
{
|
||||||
|
|
||||||
|
LogClient("Incoming data");
|
||||||
|
|
||||||
|
// Put current socket in event data, so main application will be able to read it
|
||||||
|
wxCommandEvent myevent(EV_CLIENTONDATA, m_id);
|
||||||
|
myevent.SetClientData( sock );
|
||||||
|
wxPostEvent(m_parent, myevent);
|
||||||
|
|
||||||
|
|
||||||
|
//**** Data must be handled in main application.
|
||||||
|
//**** If main application will only read partial data,
|
||||||
|
//**** next events will be fired until all data is read.
|
||||||
|
//**** But if application does not read any data,
|
||||||
|
//**** data receive event will get stuck until it is manually read
|
||||||
|
|
||||||
|
//if ( sock->IsData() ) OnRecv( sock ); // Keep receiving if more data is available (this is default behavior anyway)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPClient::Disconnect()
|
||||||
|
{
|
||||||
|
if (Client != NULL)
|
||||||
|
{
|
||||||
|
Client->Destroy();
|
||||||
|
Client->WaitForLost(0,50);
|
||||||
|
Client = NULL;
|
||||||
|
LogClient("Disconnecting from server");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPClient::OnSocketEvent(wxSocketEvent &event)
|
||||||
|
{
|
||||||
|
|
||||||
|
LogClient("Socket event");
|
||||||
|
|
||||||
|
wxSocketBase *sock = event.GetSocket();
|
||||||
|
|
||||||
|
switch(event.GetSocketEvent())
|
||||||
|
{
|
||||||
|
case wxSOCKET_CONNECTION:
|
||||||
|
{
|
||||||
|
LogClient("Successfully connected");
|
||||||
|
|
||||||
|
|
||||||
|
wxCommandEvent myevent(EV_CONNECTED, m_id);
|
||||||
|
myevent.SetClientData( sock );
|
||||||
|
wxPostEvent(m_parent, myevent);
|
||||||
|
disconnected = false;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case wxSOCKET_INPUT:
|
||||||
|
{
|
||||||
|
// Redirect to OnRecv function
|
||||||
|
OnRecv(event.GetSocket());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case wxSOCKET_LOST:
|
||||||
|
{
|
||||||
|
LogClient("Disconnected");
|
||||||
|
sock->Close();
|
||||||
|
sock->Discard();
|
||||||
|
sock->Destroy();
|
||||||
|
Client->Close();
|
||||||
|
Client->Discard();
|
||||||
|
Client->Destroy();
|
||||||
|
Client = NULL;
|
||||||
|
disconnected = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
LogClient("Unknown event");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
80
Samples/tcptest/tcpclient.h
Normal file
80
Samples/tcptest/tcpclient.h
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
#ifndef TCPCLIENT_H
|
||||||
|
#define TCPCLIENT_H
|
||||||
|
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#include "wx/socket.h"
|
||||||
|
#include "wx/event.h"
|
||||||
|
#include <list>
|
||||||
|
|
||||||
|
DECLARE_EVENT_TYPE(EV_CONNECTED, wxCommandEvent);
|
||||||
|
DECLARE_EVENT_TYPE(EV_CLIENTONDATA, wxCommandEvent);
|
||||||
|
|
||||||
|
class SimpleTCPClient : public wxEvtHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
int maxClients;
|
||||||
|
|
||||||
|
SimpleTCPClient(wxEvtHandler* parent, wxWindowID id); // Constructor
|
||||||
|
virtual ~SimpleTCPClient(); // Destructor
|
||||||
|
|
||||||
|
void Connect( wxString hostname, unsigned int port ); // This will start listening (address is optional, port can be also set with different function)
|
||||||
|
|
||||||
|
void Disconnect();
|
||||||
|
|
||||||
|
unsigned int Port( unsigned int port = 0 ); // Return current port number (if no arguments) or set new port number (if specified)
|
||||||
|
|
||||||
|
wxTextCtrl *logBox; // Text control to be used as log output (optional)
|
||||||
|
|
||||||
|
|
||||||
|
void OnSocketEvent(wxSocketEvent &event);
|
||||||
|
|
||||||
|
void OnRecv(wxSocketBase *sock);
|
||||||
|
|
||||||
|
wxString ReadStr();
|
||||||
|
|
||||||
|
int Read( void *buffer, unsigned int nbytes );
|
||||||
|
|
||||||
|
wxString PeekStr();
|
||||||
|
|
||||||
|
int Peek( void *buffer, unsigned int nbytes );
|
||||||
|
|
||||||
|
void WriteStr( wxString str_in );
|
||||||
|
|
||||||
|
// Write data (for example char array) to socket
|
||||||
|
void Write( const void *data, unsigned int dataBytes );
|
||||||
|
|
||||||
|
// Write data (for example char array) to socket
|
||||||
|
void WriteWait( const void *data, unsigned int dataBytes );
|
||||||
|
|
||||||
|
bool isDisconnected()
|
||||||
|
{
|
||||||
|
if (Client)
|
||||||
|
{
|
||||||
|
if (Client->IsDisconnected()) return true;
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
|
else return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
bool disconnected;
|
||||||
|
wxEvtHandler * m_parent; // Parent form
|
||||||
|
wxWindowID m_id; // ID assigned to current instance of server
|
||||||
|
|
||||||
|
wxSocketClient *Client; // Client things will happen here
|
||||||
|
|
||||||
|
void LogClient( wxString logText ); // Log will be printed with this function if required
|
||||||
|
|
||||||
|
|
||||||
|
static const long SOCKET_ID; // For event handling
|
||||||
|
DECLARE_EVENT_TABLE() // For event handling
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TCPCLIENT_H
|
492
Samples/tcptest/tcpserver.cpp
Normal file
492
Samples/tcptest/tcpserver.cpp
Normal file
|
@ -0,0 +1,492 @@
|
||||||
|
#include "tcpserver.h"
|
||||||
|
|
||||||
|
#define BUF_SIZE 1024
|
||||||
|
|
||||||
|
const long SimpleTCPServer::SERVER_ID = wxNewId();
|
||||||
|
const long SimpleTCPServer::CLIENT_ID = wxNewId();
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(SimpleTCPServer, wxEvtHandler)
|
||||||
|
EVT_SOCKET(SERVER_ID, SimpleTCPServer::OnServerEvent)
|
||||||
|
EVT_SOCKET(CLIENT_ID, SimpleTCPServer::OnClientEvent)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_EVENT_TYPE(EV_CLIENTCONNECTED);
|
||||||
|
DEFINE_EVENT_TYPE(EV_CLIENTDISCONNECTED);
|
||||||
|
DEFINE_EVENT_TYPE(EV_ONDATA);
|
||||||
|
DEFINE_EVENT_TYPE(EV_ONERROR);
|
||||||
|
DEFINE_EVENT_TYPE(EV_ONCLOSE);
|
||||||
|
|
||||||
|
|
||||||
|
SimpleTCPServer::SimpleTCPServer(wxEvtHandler* parent, wxWindowID id)
|
||||||
|
{
|
||||||
|
maxClients = 10; // Clients beyond that will be rejected by server (more than 1 is not handled well right now)
|
||||||
|
m_id = id;
|
||||||
|
m_parent = parent;
|
||||||
|
logBox = NULL;
|
||||||
|
logLevel = 0;
|
||||||
|
Listener = NULL;
|
||||||
|
currentClient = new wxSocketBase(); // Socket of current/most recent client will be stored here
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleTCPServer::~SimpleTCPServer()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SimpleTCPServer::LogServer( wxString logText )
|
||||||
|
{
|
||||||
|
// Append text to provided wxTextCtrl (if exists)
|
||||||
|
// "(internal)" is added just to make it easier to understand how the application works
|
||||||
|
// It will show which messages came from the "inside" of tcpserver.cpp file
|
||||||
|
if (logBox != NULL) logBox->WriteText("(internal) " + logText + "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::Open(unsigned int port)
|
||||||
|
{
|
||||||
|
if (Listener == NULL)
|
||||||
|
{
|
||||||
|
wxIPV4address ipaddr;
|
||||||
|
ipaddr.AnyAddress();
|
||||||
|
if (port == NULL)
|
||||||
|
{
|
||||||
|
ipaddr.Service( srvPort );
|
||||||
|
}
|
||||||
|
else ipaddr.Service( port );
|
||||||
|
|
||||||
|
|
||||||
|
LogServer("Opening server");
|
||||||
|
Listener = new wxSocketServer(ipaddr);
|
||||||
|
connectedClients = 0;
|
||||||
|
currentClient = NULL;
|
||||||
|
|
||||||
|
if(Listener->Ok())
|
||||||
|
LogServer("Started listening");
|
||||||
|
else
|
||||||
|
LogServer("Could not start listening");
|
||||||
|
|
||||||
|
Listener->SetEventHandler(*this, SERVER_ID);
|
||||||
|
Listener->SetNotify(wxSOCKET_CONNECTION_FLAG);
|
||||||
|
Listener->Notify(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogServer("Server already opened");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::Close()
|
||||||
|
{
|
||||||
|
if (Listener)
|
||||||
|
{
|
||||||
|
/** Removed in favor of map of clients
|
||||||
|
// Iterate over list of connected clients to disconnect them all
|
||||||
|
std::list<wxSocketBase*>::iterator it;
|
||||||
|
for (it = clients.begin(); it != clients.end(); ++it)
|
||||||
|
{
|
||||||
|
(*it)->Destroy(); // Disconnect client
|
||||||
|
}
|
||||||
|
clients.clear(); // Clear the list after everyone is disconnected
|
||||||
|
**/
|
||||||
|
|
||||||
|
if (connectedClients >0)
|
||||||
|
{
|
||||||
|
// Iterate over map of connected clients
|
||||||
|
for( std::map<wxSocketBase*, wxString>::const_iterator it = clientMap.begin();
|
||||||
|
it != clientMap.end(); ++it)
|
||||||
|
{
|
||||||
|
it->first->Destroy(); // Disconnect client ( ->first means first element of map, that is wxSocketBase )
|
||||||
|
}
|
||||||
|
clientMap.clear(); // Clear the map of clients
|
||||||
|
|
||||||
|
connectedClients = 0; // Clear number of clients
|
||||||
|
}
|
||||||
|
currentClient = NULL; // Clear current client
|
||||||
|
|
||||||
|
Listener->Destroy(); // Remove the server
|
||||||
|
Listener = NULL;
|
||||||
|
|
||||||
|
LogServer("Closing server");
|
||||||
|
|
||||||
|
// Post event about server closing
|
||||||
|
//wxCommandEvent myevent(EV_ONCLOSE, m_id);
|
||||||
|
//wxPostEvent(m_parent, myevent);
|
||||||
|
|
||||||
|
}
|
||||||
|
else LogServer("Server already closed");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Peek buffer, provide socket to read or use default one
|
||||||
|
int SimpleTCPServer::Peek( void *buffer, unsigned int nbytes, wxSocketBase* sock )
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
// Read from specified socket or default socket if not specified
|
||||||
|
if (sock != NULL)
|
||||||
|
{
|
||||||
|
sock->Peek(buffer, nbytes);
|
||||||
|
result = sock->LastCount();
|
||||||
|
}
|
||||||
|
else if (currentClient != NULL)
|
||||||
|
{
|
||||||
|
currentClient->Peek(buffer, nbytes);
|
||||||
|
result = currentClient->LastCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Peek buffer as string, provide socket to read or use default one
|
||||||
|
wxString SimpleTCPServer::PeekStr(wxSocketBase* sock)
|
||||||
|
{
|
||||||
|
wxString readString = "";
|
||||||
|
|
||||||
|
char buff[BUF_SIZE + 1]; // Buffer with byte for zero termination (end of string)
|
||||||
|
memset(buff, 0, sizeof(buff));
|
||||||
|
|
||||||
|
|
||||||
|
if (sock != NULL)
|
||||||
|
{
|
||||||
|
sock->Peek(&buff, BUF_SIZE);
|
||||||
|
}
|
||||||
|
else if (currentClient != NULL)
|
||||||
|
{
|
||||||
|
currentClient->Peek(&buff, BUF_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
readString = buff;
|
||||||
|
|
||||||
|
return readString;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Peek buffer, provide socket to read or use default one
|
||||||
|
int SimpleTCPServer::Read( void *buffer, unsigned int nbytes, wxSocketBase* sock )
|
||||||
|
{
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
// Read from specified socket or default socket if not specified
|
||||||
|
if (sock != NULL)
|
||||||
|
{
|
||||||
|
sock->Read(buffer, nbytes);
|
||||||
|
result = sock->LastCount();
|
||||||
|
}
|
||||||
|
else if (currentClient != NULL)
|
||||||
|
{
|
||||||
|
currentClient->Read(buffer, nbytes);
|
||||||
|
result = currentClient->LastCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Read from socket and return a string (this should be mostly used for "human-readable" data)
|
||||||
|
wxString SimpleTCPServer::ReadStr( wxSocketBase* sock )
|
||||||
|
{
|
||||||
|
wxString readString = "";
|
||||||
|
|
||||||
|
char buff[BUF_SIZE + 1]; // Buffer with byte for zero termination (end of string)
|
||||||
|
memset(buff, 0, sizeof(buff));
|
||||||
|
|
||||||
|
// Read from specified socket or default socket if not specified
|
||||||
|
if (sock != NULL) sock->Read(&buff, BUF_SIZE);
|
||||||
|
else if (currentClient != NULL) currentClient->Read(&buff, BUF_SIZE);
|
||||||
|
|
||||||
|
readString = buff;
|
||||||
|
|
||||||
|
return readString;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::WriteStr( wxString str_in, wxSocketBase* sock )
|
||||||
|
{
|
||||||
|
if (Listener != NULL) // No point in trying if server doesn't exist
|
||||||
|
{
|
||||||
|
// Write string to specified socket
|
||||||
|
if (sock != NULL)
|
||||||
|
{
|
||||||
|
sock->Write(str_in.c_str(), str_in.Length());
|
||||||
|
}
|
||||||
|
else // Send to everyone
|
||||||
|
{
|
||||||
|
// Iterate over map of connected clients
|
||||||
|
for( std::map<wxSocketBase*, wxString>::const_iterator it = clientMap.begin();
|
||||||
|
it != clientMap.end(); ++it)
|
||||||
|
{
|
||||||
|
WriteStr(str_in, it->first);
|
||||||
|
}
|
||||||
|
LogServer("Sent \"" + str_in + "\"");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
//else if (currentClient != NULL) currentClient->Write(str_in.c_str(), str_in.Length());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::WriteStr( wxString str_in, wxString ip_port )
|
||||||
|
{
|
||||||
|
|
||||||
|
bool success = false;
|
||||||
|
|
||||||
|
// Iterate over map of connected clients
|
||||||
|
for( std::map<wxSocketBase*, wxString>::const_iterator it = clientMap.begin();
|
||||||
|
it != clientMap.end(); ++it)
|
||||||
|
{
|
||||||
|
if (it->second == ip_port) // If provided address matches one of connected sockets
|
||||||
|
{
|
||||||
|
WriteStr(str_in, it->first);
|
||||||
|
success = true;
|
||||||
|
LogServer("Sent \"" + str_in + "\"");
|
||||||
|
|
||||||
|
}
|
||||||
|
if (success) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SimpleTCPServer::Write( const void *data, unsigned int dataBytes, wxSocketBase* sock )
|
||||||
|
{
|
||||||
|
if (Listener != NULL) // No point in trying if server doesn't exist
|
||||||
|
{
|
||||||
|
// Write data to specified socket or default socket
|
||||||
|
if (sock != NULL) sock->Write(data, dataBytes);
|
||||||
|
else if (currentClient != NULL) currentClient->Write(data, dataBytes);
|
||||||
|
LogServer("Sent binary data");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::Write( const void *data, unsigned int dataBytes, wxString ip_port )
|
||||||
|
{
|
||||||
|
|
||||||
|
bool success = false;
|
||||||
|
|
||||||
|
// Iterate over map of connected clients
|
||||||
|
for( std::map<wxSocketBase*, wxString>::const_iterator it = clientMap.begin();
|
||||||
|
it != clientMap.end(); ++it)
|
||||||
|
{
|
||||||
|
if (it->second == ip_port) // If provided address matches one of connected sockets
|
||||||
|
{
|
||||||
|
Write(data, dataBytes, it->first);
|
||||||
|
success = true;
|
||||||
|
}
|
||||||
|
if (success) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void SimpleTCPServer::OnServerEvent(wxSocketEvent &event)
|
||||||
|
{
|
||||||
|
if(event.GetSocketEvent() == wxSOCKET_CONNECTION)
|
||||||
|
{
|
||||||
|
wxSocketBase *clientSock = Listener->Accept(false);
|
||||||
|
|
||||||
|
// Drop client if exceeded maximum count of clients
|
||||||
|
if (connectedClients >= maxClients)
|
||||||
|
{
|
||||||
|
clientSock->Destroy();
|
||||||
|
LogServer("Client rejected (limit exceeded)");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Proceed normally if limit not exceeded
|
||||||
|
|
||||||
|
clientSock->SetEventHandler(*this, CLIENT_ID);
|
||||||
|
clientSock->SetNotify(wxSOCKET_INPUT_FLAG | wxSOCKET_LOST_FLAG);
|
||||||
|
clientSock->Notify(true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Get IP address and port of connected client
|
||||||
|
wxIPV4address clientAddr;
|
||||||
|
clientSock->GetPeer(clientAddr);
|
||||||
|
// Prepare a string with address:port
|
||||||
|
wxString clientAddStr = clientAddr.IPAddress() + ":" + wxString::Format(wxT("%i"),clientAddr.Service());
|
||||||
|
|
||||||
|
// Store client data in map with pair of socket and string with address:port
|
||||||
|
clientMap.insert( std::pair<wxSocketBase*, wxString>(clientSock, clientAddStr) );
|
||||||
|
|
||||||
|
currentClient = clientSock; // Set this client as current client
|
||||||
|
|
||||||
|
connectedClients++;
|
||||||
|
LogServer("Client connected (" + clientAddStr + ")"); // Print log with address of client
|
||||||
|
|
||||||
|
wxCommandEvent myevent(EV_CLIENTCONNECTED, m_id);
|
||||||
|
wxPostEvent(m_parent, myevent);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::OnClientEvent(wxSocketEvent &event)
|
||||||
|
{
|
||||||
|
switch(event.GetSocketEvent())
|
||||||
|
{
|
||||||
|
case wxSOCKET_INPUT: OnRecv(event.GetSocket()); break;
|
||||||
|
case wxSOCKET_LOST: OnConnLost(event.GetSocket()); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int SimpleTCPServer::Port(unsigned int port)
|
||||||
|
{
|
||||||
|
// Return current port number if no arguments or invalid value specified
|
||||||
|
if ( (port < 1) || (port > 65535) || port == NULL )
|
||||||
|
{
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
else // Set new port number and reopen the server if needed
|
||||||
|
{
|
||||||
|
// Proceed only if port is different
|
||||||
|
if (port != srvPort)
|
||||||
|
{
|
||||||
|
srvPort = port;
|
||||||
|
LogServer("New port: " + wxString::Format(wxT("%i"),port) );
|
||||||
|
|
||||||
|
// Restart server with new port (only if it was running before)
|
||||||
|
if (Listener != NULL)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
Open();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return port;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::OnRecv(wxSocketBase *sock)
|
||||||
|
{
|
||||||
|
|
||||||
|
LogServer("Incoming data");
|
||||||
|
|
||||||
|
currentClient = sock; // Set data sender as current client (so it will be easy to respond to it later)
|
||||||
|
|
||||||
|
// Put current socket in event data, so main application will be able to read it
|
||||||
|
wxCommandEvent myevent(EV_ONDATA, m_id);
|
||||||
|
myevent.SetClientData( sock );
|
||||||
|
wxPostEvent(m_parent, myevent);
|
||||||
|
|
||||||
|
|
||||||
|
//**** Data must be handled in main application.
|
||||||
|
//**** If main application will only read partial data,
|
||||||
|
//**** next events will be fired until all data is read.
|
||||||
|
//**** But if application does not read any data,
|
||||||
|
//**** data receive event will get stuck until it is manually read
|
||||||
|
|
||||||
|
//if ( sock->IsData() ) OnRecv( sock ); // Keep receiving if more data is available (this is default behavior anyway)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::OnConnLost(wxSocketBase *sock)
|
||||||
|
{
|
||||||
|
LogServer("Client disconnected");
|
||||||
|
|
||||||
|
wxCommandEvent myevent(EV_CLIENTDISCONNECTED, m_id);
|
||||||
|
myevent.SetClientData( sock );
|
||||||
|
wxPostEvent(m_parent, myevent);
|
||||||
|
|
||||||
|
connectedClients--;
|
||||||
|
|
||||||
|
clientMap.erase( sock ); // Remove client from map of connected clients
|
||||||
|
|
||||||
|
// Removed in favor of map
|
||||||
|
// clients.remove(sock); // Remove client from list of clients
|
||||||
|
|
||||||
|
if (currentClient == sock)
|
||||||
|
{
|
||||||
|
currentClient = NULL; // Clear current client if this is the one disconnecting
|
||||||
|
LogServer("Clearing current client");
|
||||||
|
}
|
||||||
|
|
||||||
|
sock->Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SimpleTCPServer::DropClient(wxSocketBase *sock)
|
||||||
|
{
|
||||||
|
//LogServer("Dropping client");
|
||||||
|
|
||||||
|
connectedClients--;
|
||||||
|
|
||||||
|
wxCommandEvent myevent(EV_CLIENTDISCONNECTED, m_id);
|
||||||
|
myevent.SetClientData( sock );
|
||||||
|
wxPostEvent(m_parent, myevent);
|
||||||
|
|
||||||
|
clientMap.erase( sock ); // Remove client from map of connected clients
|
||||||
|
|
||||||
|
// Get IP address and port of connected client
|
||||||
|
wxIPV4address clientAddr;
|
||||||
|
sock->GetPeer(clientAddr);
|
||||||
|
// Prepare a string with address:port
|
||||||
|
wxString clientAddStr = clientAddr.IPAddress() + ":" + wxString::Format(wxT("%i"),clientAddr.Service());
|
||||||
|
LogServer("Dropping client " + clientAddStr);
|
||||||
|
|
||||||
|
if (currentClient == sock)
|
||||||
|
{
|
||||||
|
currentClient = NULL; // Clear current client if this is the one disconnecting
|
||||||
|
}
|
||||||
|
|
||||||
|
sock->Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void SimpleTCPServer::DropClient(wxString ip_port)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
bool success = false;
|
||||||
|
|
||||||
|
// Iterate over map of connected clients
|
||||||
|
for( std::map<wxSocketBase*, wxString>::const_iterator it = clientMap.begin();
|
||||||
|
it != clientMap.end(); ++it)
|
||||||
|
{
|
||||||
|
if (it->second == ip_port) // If provided address matches one of connected sockets
|
||||||
|
{
|
||||||
|
//LogServer("Dropping client");
|
||||||
|
|
||||||
|
connectedClients--;
|
||||||
|
|
||||||
|
wxCommandEvent myevent(EV_CLIENTDISCONNECTED, m_id);
|
||||||
|
myevent.SetClientData( it->first );
|
||||||
|
wxPostEvent(m_parent, myevent);
|
||||||
|
|
||||||
|
// Get IP address and port of connected client
|
||||||
|
wxIPV4address clientAddr;
|
||||||
|
it->first->GetPeer(clientAddr);
|
||||||
|
// Prepare a string with address:port
|
||||||
|
wxString clientAddStr = clientAddr.IPAddress() + ":" + wxString::Format(wxT("%i"),clientAddr.Service());
|
||||||
|
LogServer("Dropping client " + clientAddStr);
|
||||||
|
|
||||||
|
if (currentClient == it->first)
|
||||||
|
{
|
||||||
|
currentClient = NULL; // Clear current client if this is the one disconnecting
|
||||||
|
}
|
||||||
|
|
||||||
|
clientMap.erase( it->first ); // Remove client from map of connected clients
|
||||||
|
|
||||||
|
it->first->Destroy();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
113
Samples/tcptest/tcpserver.h
Normal file
113
Samples/tcptest/tcpserver.h
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
#ifndef TCPSERVER_H
|
||||||
|
#define TCPSERVER_H
|
||||||
|
|
||||||
|
#include "wx/wx.h"
|
||||||
|
#include "wx/socket.h"
|
||||||
|
#include "wx/event.h"
|
||||||
|
#include <list>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_EVENT_TYPE(EV_CLIENTCONNECTED, wxCommandEvent);
|
||||||
|
DECLARE_EVENT_TYPE(EV_CLIENTDISCONNECTED, wxCommandEvent);
|
||||||
|
DECLARE_EVENT_TYPE(EV_ONDATA, wxCommandEvent);
|
||||||
|
DECLARE_EVENT_TYPE(EV_ONERROR, wxCommandEvent);
|
||||||
|
DECLARE_EVENT_TYPE(EV_ONCLOSE, wxCommandEvent);
|
||||||
|
|
||||||
|
|
||||||
|
class SimpleTCPServer : public wxEvtHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
int maxClients;
|
||||||
|
|
||||||
|
int logLevel;
|
||||||
|
|
||||||
|
SimpleTCPServer(wxEvtHandler* parent, wxWindowID id); // Constructor
|
||||||
|
virtual ~SimpleTCPServer(); // Destructor
|
||||||
|
|
||||||
|
void Open( unsigned int port = NULL ); // This will start listening (address is optional, port can be also set with different function)
|
||||||
|
|
||||||
|
wxSocketBase *currentClient; // Client currently interacting with server (automatically updated when someone connects or send data)
|
||||||
|
|
||||||
|
wxString ReadStr( wxSocketBase* sock = NULL ); // Read from buffer as string, provide socket to read or use default one
|
||||||
|
|
||||||
|
// Write string to socket (provide a socket or use currentClient)
|
||||||
|
void WriteStr( wxString str_in, wxSocketBase* sock = NULL );
|
||||||
|
|
||||||
|
// Write string to provided "ip:port" if a matching socket is connected
|
||||||
|
void WriteStr( wxString str_in, wxString ip_port );
|
||||||
|
|
||||||
|
// Write data (for example char array) to socket (provide a socket or use currentClient)
|
||||||
|
void Write( const void *data, unsigned int dataBytes, wxSocketBase* sock = NULL );
|
||||||
|
|
||||||
|
// Write data (for example char array) to provided "ip:port" if a matching socket is connected
|
||||||
|
void Write( const void *data, unsigned int dataBytes, wxString ip_port );
|
||||||
|
|
||||||
|
// Peek buffer as string, provide socket to read or use default one
|
||||||
|
wxString PeekStr(wxSocketBase* sock = NULL);
|
||||||
|
|
||||||
|
// Peek buffer, provide socket to read or use default one
|
||||||
|
int Peek( void *buffer, unsigned int nbytes, wxSocketBase* sock = NULL );
|
||||||
|
|
||||||
|
// Read buffer, provide socket to read or use default one
|
||||||
|
int Read( void *buffer, unsigned int nbytes, wxSocketBase* sock = NULL );
|
||||||
|
|
||||||
|
void Close(); // This will stop listening and disconnect everyone
|
||||||
|
|
||||||
|
void DropClient(wxSocketBase *sock); // This will disconnect chosen client
|
||||||
|
|
||||||
|
void DropClient(wxString ip_port); // This will disconnect chosen client
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int Port( unsigned int port = 0 ); // Return current port number (if no arguments) or set new port number (if specified)
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int clientCount() { return connectedClients; }; // Returns number of connected clients
|
||||||
|
|
||||||
|
// Connected clients will be stored here along with info
|
||||||
|
// wxSocketBase* is the actual socket, wxString is human-readable representation of address
|
||||||
|
std::map<wxSocketBase*, wxString> clientMap;
|
||||||
|
|
||||||
|
wxTextCtrl *logBox; // Text control to be used as log output (optional)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void OnServerEvent(wxSocketEvent &event);
|
||||||
|
void OnClientEvent(wxSocketEvent &event);
|
||||||
|
|
||||||
|
void OnRecv(wxSocketBase *sock);
|
||||||
|
void OnConnLost(wxSocketBase *sock);
|
||||||
|
|
||||||
|
bool IsOk()
|
||||||
|
{
|
||||||
|
if (Listener) return Listener->IsOk();
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
wxEvtHandler * m_parent; // Parent form
|
||||||
|
wxWindowID m_id; // ID assigned to current instance of server
|
||||||
|
|
||||||
|
wxSocketServer* Listener; // Server things will be handled here
|
||||||
|
|
||||||
|
unsigned int connectedClients; // Client count is stored here
|
||||||
|
|
||||||
|
unsigned int srvPort;
|
||||||
|
|
||||||
|
void LogServer( wxString logText ); // Log will be printed with this function if required
|
||||||
|
|
||||||
|
|
||||||
|
static const long SERVER_ID; // For event handling
|
||||||
|
static const long CLIENT_ID; // For event handling
|
||||||
|
DECLARE_EVENT_TABLE() // For event handling
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TCPSERVER_H
|
148
Samples/tcptest/tcptest.cbp
Normal file
148
Samples/tcptest/tcptest.cbp
Normal file
|
@ -0,0 +1,148 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocks_project_file>
|
||||||
|
<FileVersion major="1" minor="6" />
|
||||||
|
<Project>
|
||||||
|
<Option title="tcptest" />
|
||||||
|
<Option pch_mode="2" />
|
||||||
|
<Option compiler="bcc" />
|
||||||
|
<Build>
|
||||||
|
<Target title="Win32s">
|
||||||
|
<Option output="bin/Win32s/tcptest" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option working_dir="bin/Win32s" />
|
||||||
|
<Option object_output="obj/Win32s/" />
|
||||||
|
<Option type="0" />
|
||||||
|
<Option compiler="bcc" />
|
||||||
|
<Option projectCompilerOptionsRelation="1" />
|
||||||
|
<Option projectLinkerOptionsRelation="1" />
|
||||||
|
<Option projectIncludeDirsRelation="1" />
|
||||||
|
<Option projectResourceIncludeDirsRelation="1" />
|
||||||
|
<Option projectLibDirsRelation="1" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-D__WXMSW__" />
|
||||||
|
<Add option="-q" />
|
||||||
|
<Add option="-c" />
|
||||||
|
<Add option="-P" />
|
||||||
|
<Add option="-tWM" />
|
||||||
|
<Add option="-a8" />
|
||||||
|
<Add option="-DNDEBUG" />
|
||||||
|
<Add option="-w" />
|
||||||
|
<Add option="-O2" />
|
||||||
|
<Add directory="$(#wx28)/include" />
|
||||||
|
<Add directory="$(#wx28)/lib/bcc_lib/msw" />
|
||||||
|
</Compiler>
|
||||||
|
<ResourceCompiler>
|
||||||
|
<Add directory="$(#wx28)/include" />
|
||||||
|
<Add directory="$(#wx28)/lib/bcc_lib/msw" />
|
||||||
|
</ResourceCompiler>
|
||||||
|
<Linker>
|
||||||
|
<Add option="-Tpe" />
|
||||||
|
<Add option="-aa" />
|
||||||
|
<Add library="import32.lib" />
|
||||||
|
<Add library="cw32mt.lib" />
|
||||||
|
<Add library="ole2w32.lib" />
|
||||||
|
<Add library="wxmsw28.lib" />
|
||||||
|
<Add library="wxpng.lib" />
|
||||||
|
<Add library="wxjpeg.lib" />
|
||||||
|
<Add library="wxtiff.lib" />
|
||||||
|
<Add library="wxzlib.lib" />
|
||||||
|
<Add library="wxregex.lib" />
|
||||||
|
<Add library="wxexpat.lib" />
|
||||||
|
<Add library="kernel32.lib" />
|
||||||
|
<Add library="user32.lib" />
|
||||||
|
<Add library="gdi32.lib" />
|
||||||
|
<Add library="winspool.lib" />
|
||||||
|
<Add library="comdlg32.lib" />
|
||||||
|
<Add library="advapi32.lib" />
|
||||||
|
<Add library="shell32.lib" />
|
||||||
|
<Add library="ole32.lib" />
|
||||||
|
<Add library="oleaut32.lib" />
|
||||||
|
<Add library="uuid.lib" />
|
||||||
|
<Add library="comctl32.lib" />
|
||||||
|
<Add library="wsock32.lib" />
|
||||||
|
<Add directory="$(#wx28)/lib/bcc_lib" />
|
||||||
|
</Linker>
|
||||||
|
</Target>
|
||||||
|
<Target title="W95wx3A">
|
||||||
|
<Option output="bin/W95wx3A/tcptest" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option working_dir="bin/W95wx3A/" />
|
||||||
|
<Option object_output="obj/W95wx3A/" />
|
||||||
|
<Option type="0" />
|
||||||
|
<Option compiler="tdm-gcc_471_32bit" />
|
||||||
|
<Option projectCompilerOptionsRelation="1" />
|
||||||
|
<Option projectLinkerOptionsRelation="1" />
|
||||||
|
<Option projectIncludeDirsRelation="1" />
|
||||||
|
<Option projectResourceIncludeDirsRelation="1" />
|
||||||
|
<Option projectLibDirsRelation="1" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-O2" />
|
||||||
|
<Add option="-Wall" />
|
||||||
|
<Add option="-pipe" />
|
||||||
|
<Add option="-mthreads" />
|
||||||
|
<Add option="-D__GNUWIN32__" />
|
||||||
|
<Add option="-D__WXMSW__" />
|
||||||
|
<Add option="-DwxUSE_UNICODE=0" />
|
||||||
|
<Add option="-DNDEBUG" />
|
||||||
|
<Add option="-DwxDEBUG_LEVEL=0" />
|
||||||
|
<Add directory="$(#wx30)/include" />
|
||||||
|
<Add directory="$(#wx30)/lib/gcc_lib/msw" />
|
||||||
|
</Compiler>
|
||||||
|
<ResourceCompiler>
|
||||||
|
<Add option="-DwxUSE_DPI_AWARE_MANIFEST=2" />
|
||||||
|
<Add directory="$(#wx30)/include" />
|
||||||
|
<Add directory="$(#wx30)/lib/gcc_lib/msw" />
|
||||||
|
</ResourceCompiler>
|
||||||
|
<Linker>
|
||||||
|
<Add option="-s" />
|
||||||
|
<Add option="-mthreads" />
|
||||||
|
<Add library="libwxmsw30.a" />
|
||||||
|
<Add library="libwxpng.a" />
|
||||||
|
<Add library="libwxjpeg.a" />
|
||||||
|
<Add library="libwxtiff.a" />
|
||||||
|
<Add library="libwxzlib.a" />
|
||||||
|
<Add library="libwxregex.a" />
|
||||||
|
<Add library="libwxscintilla.a" />
|
||||||
|
<Add library="libwxexpat.a" />
|
||||||
|
<Add library="libkernel32.a" />
|
||||||
|
<Add library="libuser32.a" />
|
||||||
|
<Add library="libgdi32.a" />
|
||||||
|
<Add library="libwinspool.a" />
|
||||||
|
<Add library="libcomdlg32.a" />
|
||||||
|
<Add library="libadvapi32.a" />
|
||||||
|
<Add library="libshell32.a" />
|
||||||
|
<Add library="libole32.a" />
|
||||||
|
<Add library="liboleaut32.a" />
|
||||||
|
<Add library="libuuid.a" />
|
||||||
|
<Add library="libcomctl32.a" />
|
||||||
|
<Add library="libwsock32.a" />
|
||||||
|
<Add directory="$(#wx30)/lib/gcc_lib" />
|
||||||
|
</Linker>
|
||||||
|
</Target>
|
||||||
|
</Build>
|
||||||
|
<Unit filename="resource.rc">
|
||||||
|
<Option compilerVar="WINDRES" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="tcpclient.cpp" />
|
||||||
|
<Unit filename="tcpclient.h" />
|
||||||
|
<Unit filename="tcpserver.cpp" />
|
||||||
|
<Unit filename="tcpserver.h" />
|
||||||
|
<Unit filename="tcptestApp.cpp" />
|
||||||
|
<Unit filename="tcptestApp.h" />
|
||||||
|
<Unit filename="tcptestMain.cpp" />
|
||||||
|
<Unit filename="tcptestMain.h" />
|
||||||
|
<Unit filename="wxsmith/tcptestframe.wxs" />
|
||||||
|
<Extensions>
|
||||||
|
<debugger>
|
||||||
|
<remote_debugging target="Win32s">
|
||||||
|
<options conn_type="2" additional_cmds="q" additional_shell_cmds_before='$(APPPATH)\dosboxw31\w31launcher.bat "$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).exe"' />
|
||||||
|
</remote_debugging>
|
||||||
|
</debugger>
|
||||||
|
<lib_finder disable_auto="1" />
|
||||||
|
<wxsmith version="1">
|
||||||
|
<gui name="wxWidgets" src="tcptestApp.cpp" main="tcptestFrame" init_handlers="necessary" language="CPP" />
|
||||||
|
<resources>
|
||||||
|
<wxFrame wxs="wxsmith/tcptestframe.wxs" src="tcptestMain.cpp" hdr="tcptestMain.h" fwddecl="0" i18n="1" name="tcptestFrame" language="CPP" />
|
||||||
|
</resources>
|
||||||
|
</wxsmith>
|
||||||
|
</Extensions>
|
||||||
|
</Project>
|
||||||
|
</CodeBlocks_project_file>
|
9893
Samples/tcptest/tcptest.depend
Normal file
9893
Samples/tcptest/tcptest.depend
Normal file
File diff suppressed because it is too large
Load diff
35
Samples/tcptest/tcptest.layout
Normal file
35
Samples/tcptest/tcptest.layout
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocks_layout_file>
|
||||||
|
<FileVersion major="1" minor="0" />
|
||||||
|
<ActiveTarget name="Win32s" />
|
||||||
|
<File name="tcpserver.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="3422" topLine="42" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="tcpclient.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="0" topLine="27" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="tcpclient.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="4201" topLine="139" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="tcpserver.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="7373" topLine="246" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="tcptestMain.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="391" topLine="0" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="tcptestMain.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="5645" topLine="146" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
</CodeBlocks_layout_file>
|
33
Samples/tcptest/tcptestApp.cpp
Normal file
33
Samples/tcptest/tcptestApp.cpp
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/***************************************************************
|
||||||
|
* Name: tcptestApp.cpp
|
||||||
|
* Purpose: Code for Application Class
|
||||||
|
* Author: ()
|
||||||
|
* Created: 2023-11-10
|
||||||
|
* Copyright: ()
|
||||||
|
* License:
|
||||||
|
**************************************************************/
|
||||||
|
|
||||||
|
#include "tcptestApp.h"
|
||||||
|
|
||||||
|
//(*AppHeaders
|
||||||
|
#include "tcptestMain.h"
|
||||||
|
#include <wx/image.h>
|
||||||
|
//*)
|
||||||
|
|
||||||
|
IMPLEMENT_APP(tcptestApp);
|
||||||
|
|
||||||
|
bool tcptestApp::OnInit()
|
||||||
|
{
|
||||||
|
//(*AppInitialize
|
||||||
|
bool wxsOK = true;
|
||||||
|
wxInitAllImageHandlers();
|
||||||
|
if ( wxsOK )
|
||||||
|
{
|
||||||
|
tcptestFrame* Frame = new tcptestFrame(0);
|
||||||
|
Frame->Show();
|
||||||
|
SetTopWindow(Frame);
|
||||||
|
}
|
||||||
|
//*)
|
||||||
|
return wxsOK;
|
||||||
|
|
||||||
|
}
|
21
Samples/tcptest/tcptestApp.h
Normal file
21
Samples/tcptest/tcptestApp.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/***************************************************************
|
||||||
|
* Name: tcptestApp.h
|
||||||
|
* Purpose: Defines Application Class
|
||||||
|
* Author: ()
|
||||||
|
* Created: 2023-11-10
|
||||||
|
* Copyright: ()
|
||||||
|
* License:
|
||||||
|
**************************************************************/
|
||||||
|
|
||||||
|
#ifndef TCPTESTAPP_H
|
||||||
|
#define TCPTESTAPP_H
|
||||||
|
|
||||||
|
#include <wx/app.h>
|
||||||
|
|
||||||
|
class tcptestApp : public wxApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool OnInit();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TCPTESTAPP_H
|
764
Samples/tcptest/tcptestMain.cpp
Normal file
764
Samples/tcptest/tcptestMain.cpp
Normal file
|
@ -0,0 +1,764 @@
|
||||||
|
/***************************************************************
|
||||||
|
* Name: tcptestMain.cpp
|
||||||
|
* Purpose: Code for Application Frame
|
||||||
|
* Author: ()
|
||||||
|
* Created: 2023-11-10
|
||||||
|
* Copyright: ()
|
||||||
|
* License:
|
||||||
|
**************************************************************/
|
||||||
|
|
||||||
|
#include "tcptestMain.h"
|
||||||
|
#include <wx/msgdlg.h>
|
||||||
|
|
||||||
|
//(*InternalHeaders(tcptestFrame)
|
||||||
|
#include <wx/intl.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
#include <wx/string.h>
|
||||||
|
//*)
|
||||||
|
|
||||||
|
//helper functions
|
||||||
|
enum wxbuildinfoformat {
|
||||||
|
short_f, long_f };
|
||||||
|
|
||||||
|
wxString wxbuildinfo(wxbuildinfoformat format)
|
||||||
|
{
|
||||||
|
wxString wxbuild(wxVERSION_STRING);
|
||||||
|
|
||||||
|
if (format == long_f )
|
||||||
|
{
|
||||||
|
#if defined(__WXMSW__)
|
||||||
|
wxbuild << _T("-Windows");
|
||||||
|
#elif defined(__UNIX__)
|
||||||
|
wxbuild << _T("-Linux");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxbuild << _T("-Unicode build");
|
||||||
|
#else
|
||||||
|
wxbuild << _T("-ANSI build");
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxbuild;
|
||||||
|
}
|
||||||
|
|
||||||
|
//(*IdInit(tcptestFrame)
|
||||||
|
const long tcptestFrame::ID_STATICTEXT3 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_STATICTEXT4 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_TEXTCTRL2 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_BUTTON1 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_BUTTON2 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL5 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_STATICTEXT1 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_LISTBOX1 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_BUTTON8 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL6 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_STATICTEXT2 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_TEXTCTRL1 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL7 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL2 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_TEXTCTRL3 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_CHECKBOX1 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_SPINCTRL1 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL10 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL8 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_BUTTON3 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_BUTTON4 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL9 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL4 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL3 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_STATICTEXT5 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_TEXTCTRL7 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_STATICTEXT6 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_TEXTCTRL4 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_BUTTON5 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_BUTTON6 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL14 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_STATICTEXT8 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_TEXTCTRL5 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL16 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL13 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_TEXTCTRL6 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_CHECKBOX2 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_SPINCTRL2 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL19 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL18 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_BUTTON7 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL20 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL17 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL12 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_NOTEBOOK1 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_PANEL1 = wxNewId();
|
||||||
|
const long tcptestFrame::idMenuQuit = wxNewId();
|
||||||
|
const long tcptestFrame::idMenuAbout = wxNewId();
|
||||||
|
const long tcptestFrame::ID_STATUSBAR1 = wxNewId();
|
||||||
|
//*)
|
||||||
|
|
||||||
|
|
||||||
|
const long tcptestFrame::ID_TCPSERVER1 = wxNewId();
|
||||||
|
const long tcptestFrame::ID_TCPCLIENT1 = wxNewId();
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(tcptestFrame,wxFrame)
|
||||||
|
//(*EventTable(tcptestFrame)
|
||||||
|
//*)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
tcptestFrame::tcptestFrame(wxWindow* parent,wxWindowID id)
|
||||||
|
{
|
||||||
|
//(*Initialize(tcptestFrame)
|
||||||
|
wxBoxSizer* BoxSizer10;
|
||||||
|
wxBoxSizer* BoxSizer11;
|
||||||
|
wxBoxSizer* BoxSizer12;
|
||||||
|
wxBoxSizer* BoxSizer13;
|
||||||
|
wxBoxSizer* BoxSizer14;
|
||||||
|
wxBoxSizer* BoxSizer16;
|
||||||
|
wxBoxSizer* BoxSizer17;
|
||||||
|
wxBoxSizer* BoxSizer18;
|
||||||
|
wxBoxSizer* BoxSizer19;
|
||||||
|
wxBoxSizer* BoxSizer1;
|
||||||
|
wxBoxSizer* BoxSizer20;
|
||||||
|
wxBoxSizer* BoxSizer2;
|
||||||
|
wxBoxSizer* BoxSizer3;
|
||||||
|
wxBoxSizer* BoxSizer4;
|
||||||
|
wxBoxSizer* BoxSizer5;
|
||||||
|
wxBoxSizer* BoxSizer6;
|
||||||
|
wxBoxSizer* BoxSizer7;
|
||||||
|
wxBoxSizer* BoxSizer8;
|
||||||
|
wxBoxSizer* BoxSizer9;
|
||||||
|
wxMenu* Menu1;
|
||||||
|
wxMenu* Menu2;
|
||||||
|
wxMenuBar* MenuBar1;
|
||||||
|
wxMenuItem* MenuItem1;
|
||||||
|
wxMenuItem* MenuItem2;
|
||||||
|
|
||||||
|
Create(parent, wxID_ANY, _("TCP Client/Server"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE, _T("wxID_ANY"));
|
||||||
|
SetMinSize(wxSize(340,320));
|
||||||
|
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
|
||||||
|
// This code will set a smaller font if Win 3.11 is detected:
|
||||||
|
int majorVer; int minorVer;
|
||||||
|
wxGetOsVersion(&majorVer, &minorVer);
|
||||||
|
if (minorVer == 30 || majorVer == 30 || majorVer == 3)
|
||||||
|
{
|
||||||
|
wxFont thisFont(8,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,wxEmptyString,wxFONTENCODING_DEFAULT);
|
||||||
|
SetFont(thisFont);
|
||||||
|
}
|
||||||
|
BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
Panel1 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxSize(286,334), wxTAB_TRAVERSAL, _T("ID_PANEL1"));
|
||||||
|
BoxSizer2 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
Notebook1 = new wxNotebook(Panel1, ID_NOTEBOOK1, wxDefaultPosition, wxDefaultSize, 0, _T("ID_NOTEBOOK1"));
|
||||||
|
Panel3 = new wxPanel(Notebook1, ID_PANEL3, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL3"));
|
||||||
|
BoxSizer4 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
Panel2 = new wxPanel(Panel3, ID_PANEL2, wxDefaultPosition, wxSize(330,191), wxTAB_TRAVERSAL, _T("ID_PANEL2"));
|
||||||
|
BoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
Panel5 = new wxPanel(Panel2, ID_PANEL5, wxDefaultPosition, wxDLG_UNIT(Panel2,wxSize(58,36)), wxTAB_TRAVERSAL, _T("ID_PANEL5"));
|
||||||
|
BoxSizer7 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
LabelCount1 = new wxStaticText(Panel5, ID_STATICTEXT3, _("Client count: 0"), wxDefaultPosition, wxDLG_UNIT(Panel5,wxSize(56,8)), wxST_NO_AUTORESIZE, _T("ID_STATICTEXT3"));
|
||||||
|
BoxSizer7->Add(LabelCount1, 0, wxALIGN_LEFT, 0);
|
||||||
|
BoxSizer7->Add(20,1,0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
StaticText4 = new wxStaticText(Panel5, ID_STATICTEXT4, _("Port"), wxDefaultPosition, wxDLG_UNIT(Panel5,wxSize(38,8)), wxST_NO_AUTORESIZE, _T("ID_STATICTEXT4"));
|
||||||
|
BoxSizer7->Add(StaticText4, 0, wxALIGN_LEFT, 5);
|
||||||
|
PortSrvText1 = new wxTextCtrl(Panel5, ID_TEXTCTRL2, _("3000"), wxDefaultPosition, wxDLG_UNIT(Panel5,wxSize(30,-1)), wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_TEXTCTRL2"));
|
||||||
|
BoxSizer7->Add(PortSrvText1, 0, wxTOP|wxBOTTOM, 0);
|
||||||
|
BtnOpenSrv = new wxButton(Panel5, ID_BUTTON1, _("Open server"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
|
||||||
|
BoxSizer7->Add(BtnOpenSrv, 0, wxTOP|wxEXPAND, 8);
|
||||||
|
BtnCloseSrv = new wxButton(Panel5, ID_BUTTON2, _("Close server"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
|
||||||
|
BoxSizer7->Add(BtnCloseSrv, 0, wxTOP|wxBOTTOM|wxEXPAND, 4);
|
||||||
|
Panel5->SetSizer(BoxSizer7);
|
||||||
|
BoxSizer3->Add(Panel5, 0, wxALL|wxEXPAND, 5);
|
||||||
|
Panel6 = new wxPanel(Panel2, ID_PANEL6, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL6"));
|
||||||
|
BoxSizer5 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
StaticText1 = new wxStaticText(Panel6, ID_STATICTEXT1, _("Client list"), wxDefaultPosition, wxDLG_UNIT(Panel6,wxSize(45,8)), wxST_NO_AUTORESIZE, _T("ID_STATICTEXT1"));
|
||||||
|
BoxSizer5->Add(StaticText1, 0, wxALL|wxALIGN_LEFT, 5);
|
||||||
|
ListBox1 = new wxListBox(Panel6, ID_LISTBOX1, wxDefaultPosition, wxDefaultSize, 0, 0, wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_LISTBOX1"));
|
||||||
|
BoxSizer5->Add(ListBox1, 1, wxALL|wxEXPAND, 5);
|
||||||
|
BtnDropClient = new wxButton(Panel6, ID_BUTTON8, _("Drop client"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON8"));
|
||||||
|
BoxSizer5->Add(BtnDropClient, 0, wxALL|wxALIGN_LEFT, 4);
|
||||||
|
Panel6->SetSizer(BoxSizer5);
|
||||||
|
BoxSizer3->Add(Panel6, 1, wxALL|wxEXPAND, 0);
|
||||||
|
Panel7 = new wxPanel(Panel2, ID_PANEL7, wxDefaultPosition, wxSize(360,172), wxTAB_TRAVERSAL, _T("ID_PANEL7"));
|
||||||
|
BoxSizer6 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
StaticText2 = new wxStaticText(Panel7, ID_STATICTEXT2, _("Log"), wxDefaultPosition, wxDLG_UNIT(Panel7,wxSize(61,8)), wxST_NO_AUTORESIZE, _T("ID_STATICTEXT2"));
|
||||||
|
BoxSizer6->Add(StaticText2, 0, wxALL|wxALIGN_LEFT, 5);
|
||||||
|
LogSrv1 = new wxTextCtrl(Panel7, ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_TEXTCTRL1"));
|
||||||
|
BoxSizer6->Add(LogSrv1, 1, wxALL|wxEXPAND, 5);
|
||||||
|
Panel7->SetSizer(BoxSizer6);
|
||||||
|
BoxSizer3->Add(Panel7, 2, wxALL|wxEXPAND, 0);
|
||||||
|
Panel2->SetSizer(BoxSizer3);
|
||||||
|
BoxSizer4->Add(Panel2, 1, wxALL|wxEXPAND, 5);
|
||||||
|
Panel4 = new wxPanel(Panel3, ID_PANEL4, wxDefaultPosition, wxSize(646,79), wxTAB_TRAVERSAL, _T("ID_PANEL4"));
|
||||||
|
BoxSizer8 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
Panel8 = new wxPanel(Panel4, ID_PANEL8, wxDefaultPosition, wxDLG_UNIT(Panel4,wxSize(68,26)), wxTAB_TRAVERSAL, _T("ID_PANEL8"));
|
||||||
|
BoxSizer9 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
TextSendSrv1 = new wxTextCtrl(Panel8, ID_TEXTCTRL3, _("Message"), wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_TEXTCTRL3"));
|
||||||
|
BoxSizer9->Add(TextSendSrv1, 0, wxEXPAND, 0);
|
||||||
|
Panel10 = new wxPanel(Panel8, ID_PANEL10, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL10"));
|
||||||
|
BoxSizer10 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
CheckBinarySrv = new wxCheckBox(Panel10, ID_CHECKBOX1, _("Binary mode (send a number)"), wxDefaultPosition, wxDLG_UNIT(Panel10,wxSize(119,8)), 0, wxDefaultValidator, _T("ID_CHECKBOX1"));
|
||||||
|
CheckBinarySrv->SetValue(false);
|
||||||
|
BoxSizer10->Add(CheckBinarySrv, 1, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
SpinCtrlSrv1 = new wxSpinCtrl(Panel10, ID_SPINCTRL1, _T("12345"), wxDefaultPosition, wxDLG_UNIT(Panel10,wxSize(80,-1)), wxBORDER_SIMPLE, -32737, 32737, 12345, _T("ID_SPINCTRL1"));
|
||||||
|
SpinCtrlSrv1->SetValue(_T("12345"));
|
||||||
|
SpinCtrlSrv1->Disable();
|
||||||
|
BoxSizer10->Add(SpinCtrlSrv1, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
Panel10->SetSizer(BoxSizer10);
|
||||||
|
BoxSizer9->Add(Panel10, 1, wxALL|wxEXPAND, 0);
|
||||||
|
Panel8->SetSizer(BoxSizer9);
|
||||||
|
BoxSizer8->Add(Panel8, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 4);
|
||||||
|
Panel9 = new wxPanel(Panel4, ID_PANEL9, wxDefaultPosition, wxSize(139,95), wxTAB_TRAVERSAL, _T("ID_PANEL9"));
|
||||||
|
BoxSizer11 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
BtnSrvSendAll = new wxButton(Panel9, ID_BUTTON3, _("Send to all"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON3"));
|
||||||
|
BtnSrvSendAll->SetMinSize(wxDLG_UNIT(Panel9,wxSize(48,13)));
|
||||||
|
BoxSizer11->Add(BtnSrvSendAll, 0, wxEXPAND, 0);
|
||||||
|
BtnSrvSendSel = new wxButton(Panel9, ID_BUTTON4, _("Send to sel"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON4"));
|
||||||
|
BtnSrvSendSel->SetMinSize(wxDLG_UNIT(Panel9,wxSize(48,13)));
|
||||||
|
BoxSizer11->Add(BtnSrvSendSel, 0, wxTOP|wxEXPAND, 4);
|
||||||
|
Panel9->SetSizer(BoxSizer11);
|
||||||
|
BoxSizer8->Add(Panel9, 0, wxLEFT|wxEXPAND, 2);
|
||||||
|
Panel4->SetSizer(BoxSizer8);
|
||||||
|
BoxSizer4->Add(Panel4, 0, wxALL|wxEXPAND, 5);
|
||||||
|
Panel3->SetSizer(BoxSizer4);
|
||||||
|
Panel12 = new wxPanel(Notebook1, ID_PANEL12, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL12"));
|
||||||
|
BoxSizer12 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
Panel13 = new wxPanel(Panel12, ID_PANEL13, wxDefaultPosition, wxSize(330,191), wxTAB_TRAVERSAL, _T("ID_PANEL13"));
|
||||||
|
BoxSizer13 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
Panel14 = new wxPanel(Panel13, ID_PANEL14, wxDefaultPosition, wxDLG_UNIT(Panel13,wxSize(58,36)), wxTAB_TRAVERSAL, _T("ID_PANEL14"));
|
||||||
|
BoxSizer14 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
StaticText3 = new wxStaticText(Panel14, ID_STATICTEXT5, _("Address"), wxDefaultPosition, wxDLG_UNIT(Panel14,wxSize(56,8)), wxST_NO_AUTORESIZE, _T("ID_STATICTEXT5"));
|
||||||
|
BoxSizer14->Add(StaticText3, 0, wxBOTTOM|wxALIGN_LEFT, 5);
|
||||||
|
TextClientHost1 = new wxTextCtrl(Panel14, ID_TEXTCTRL7, _("127.0.0.1"), wxDefaultPosition, wxDLG_UNIT(Panel14,wxSize(30,-1)), wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_TEXTCTRL7"));
|
||||||
|
BoxSizer14->Add(TextClientHost1, 0, wxTOP|wxBOTTOM|wxEXPAND, 0);
|
||||||
|
StaticText5 = new wxStaticText(Panel14, ID_STATICTEXT6, _("Port"), wxDefaultPosition, wxDLG_UNIT(Panel14,wxSize(38,8)), wxST_NO_AUTORESIZE, _T("ID_STATICTEXT6"));
|
||||||
|
BoxSizer14->Add(StaticText5, 0, wxALIGN_LEFT, 5);
|
||||||
|
TextClientPort1 = new wxTextCtrl(Panel14, ID_TEXTCTRL4, _("3000"), wxDefaultPosition, wxDLG_UNIT(Panel14,wxSize(30,-1)), wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_TEXTCTRL4"));
|
||||||
|
BoxSizer14->Add(TextClientPort1, 0, wxTOP|wxBOTTOM, 0);
|
||||||
|
BtnClientConn = new wxButton(Panel14, ID_BUTTON5, _("Connect"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON5"));
|
||||||
|
BoxSizer14->Add(BtnClientConn, 0, wxTOP|wxEXPAND, 8);
|
||||||
|
BtnClientDisconn = new wxButton(Panel14, ID_BUTTON6, _("Disconnect"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON6"));
|
||||||
|
BoxSizer14->Add(BtnClientDisconn, 0, wxTOP|wxBOTTOM|wxEXPAND, 4);
|
||||||
|
Panel14->SetSizer(BoxSizer14);
|
||||||
|
BoxSizer13->Add(Panel14, 0, wxALL|wxEXPAND, 5);
|
||||||
|
Panel16 = new wxPanel(Panel13, ID_PANEL16, wxDefaultPosition, wxSize(360,172), wxTAB_TRAVERSAL, _T("ID_PANEL16"));
|
||||||
|
BoxSizer16 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
StaticText7 = new wxStaticText(Panel16, ID_STATICTEXT8, _("Log"), wxDefaultPosition, wxDLG_UNIT(Panel16,wxSize(61,8)), wxST_NO_AUTORESIZE, _T("ID_STATICTEXT8"));
|
||||||
|
BoxSizer16->Add(StaticText7, 0, wxALL|wxALIGN_LEFT, 5);
|
||||||
|
LogClient1 = new wxTextCtrl(Panel16, ID_TEXTCTRL5, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_TEXTCTRL5"));
|
||||||
|
BoxSizer16->Add(LogClient1, 1, wxALL|wxEXPAND, 5);
|
||||||
|
Panel16->SetSizer(BoxSizer16);
|
||||||
|
BoxSizer13->Add(Panel16, 2, wxALL|wxEXPAND, 0);
|
||||||
|
Panel13->SetSizer(BoxSizer13);
|
||||||
|
BoxSizer12->Add(Panel13, 1, wxALL|wxEXPAND, 5);
|
||||||
|
Panel17 = new wxPanel(Panel12, ID_PANEL17, wxDefaultPosition, wxSize(646,79), wxTAB_TRAVERSAL, _T("ID_PANEL17"));
|
||||||
|
BoxSizer17 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
Panel18 = new wxPanel(Panel17, ID_PANEL18, wxDefaultPosition, wxDLG_UNIT(Panel17,wxSize(68,26)), wxTAB_TRAVERSAL, _T("ID_PANEL18"));
|
||||||
|
BoxSizer18 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
TextSendClient1 = new wxTextCtrl(Panel18, ID_TEXTCTRL6, _("Message"), wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_TEXTCTRL6"));
|
||||||
|
BoxSizer18->Add(TextSendClient1, 0, wxEXPAND, 0);
|
||||||
|
Panel19 = new wxPanel(Panel18, ID_PANEL19, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL19"));
|
||||||
|
BoxSizer19 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
CheckBinaryClient = new wxCheckBox(Panel19, ID_CHECKBOX2, _("Binary mode (send a number)"), wxDefaultPosition, wxDLG_UNIT(Panel19,wxSize(119,8)), 0, wxDefaultValidator, _T("ID_CHECKBOX2"));
|
||||||
|
CheckBinaryClient->SetValue(false);
|
||||||
|
BoxSizer19->Add(CheckBinaryClient, 1, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
SpinCtrlClient1 = new wxSpinCtrl(Panel19, ID_SPINCTRL2, _T("12345"), wxDefaultPosition, wxDLG_UNIT(Panel19,wxSize(80,-1)), wxBORDER_SIMPLE, -32737, 32737, 12345, _T("ID_SPINCTRL2"));
|
||||||
|
SpinCtrlClient1->SetValue(_T("12345"));
|
||||||
|
SpinCtrlClient1->Disable();
|
||||||
|
BoxSizer19->Add(SpinCtrlClient1, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5);
|
||||||
|
Panel19->SetSizer(BoxSizer19);
|
||||||
|
BoxSizer18->Add(Panel19, 1, wxALL|wxEXPAND, 0);
|
||||||
|
Panel18->SetSizer(BoxSizer18);
|
||||||
|
BoxSizer17->Add(Panel18, 1, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 4);
|
||||||
|
Panel20 = new wxPanel(Panel17, ID_PANEL20, wxDefaultPosition, wxSize(139,95), wxTAB_TRAVERSAL, _T("ID_PANEL20"));
|
||||||
|
BoxSizer20 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
BtnClientSend = new wxButton(Panel20, ID_BUTTON7, _("Send"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON7"));
|
||||||
|
BtnClientSend->SetMinSize(wxDLG_UNIT(Panel20,wxSize(48,13)));
|
||||||
|
BoxSizer20->Add(BtnClientSend, 0, wxEXPAND, 0);
|
||||||
|
Panel20->SetSizer(BoxSizer20);
|
||||||
|
BoxSizer17->Add(Panel20, 0, wxLEFT|wxEXPAND, 2);
|
||||||
|
Panel17->SetSizer(BoxSizer17);
|
||||||
|
BoxSizer12->Add(Panel17, 0, wxALL|wxEXPAND, 5);
|
||||||
|
Panel12->SetSizer(BoxSizer12);
|
||||||
|
Notebook1->AddPage(Panel3, _("Server"), false);
|
||||||
|
Notebook1->AddPage(Panel12, _("Client"), false);
|
||||||
|
BoxSizer2->Add(Notebook1, 1, wxALL|wxEXPAND, 5);
|
||||||
|
Panel1->SetSizer(BoxSizer2);
|
||||||
|
BoxSizer1->Add(Panel1, 1, wxALL|wxEXPAND, 0);
|
||||||
|
SetSizer(BoxSizer1);
|
||||||
|
MenuBar1 = new wxMenuBar();
|
||||||
|
Menu1 = new wxMenu();
|
||||||
|
MenuItem1 = new wxMenuItem(Menu1, idMenuQuit, _("Quit\tAlt-F4"), _("Quit the application"), wxITEM_NORMAL);
|
||||||
|
Menu1->Append(MenuItem1);
|
||||||
|
MenuBar1->Append(Menu1, _("&File"));
|
||||||
|
Menu2 = new wxMenu();
|
||||||
|
MenuItem2 = new wxMenuItem(Menu2, idMenuAbout, _("About\tF1"), _("Show info about this application"), wxITEM_NORMAL);
|
||||||
|
Menu2->Append(MenuItem2);
|
||||||
|
MenuBar1->Append(Menu2, _("Help"));
|
||||||
|
SetMenuBar(MenuBar1);
|
||||||
|
StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
|
||||||
|
int __wxStatusBarWidths_1[1] = { -1 };
|
||||||
|
int __wxStatusBarStyles_1[1] = { wxSB_NORMAL };
|
||||||
|
StatusBar1->SetFieldsCount(1,__wxStatusBarWidths_1);
|
||||||
|
StatusBar1->SetStatusStyles(1,__wxStatusBarStyles_1);
|
||||||
|
SetStatusBar(StatusBar1);
|
||||||
|
Fit();
|
||||||
|
|
||||||
|
Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnBtnOpenSrvClick1);
|
||||||
|
Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnBtnCloseSrvClick);
|
||||||
|
Connect(ID_BUTTON8,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnBtnDropClientClick);
|
||||||
|
Connect(ID_CHECKBOX1,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnCheckBinarySrvClick);
|
||||||
|
Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnBtnSrvSendAllClick);
|
||||||
|
Connect(ID_BUTTON4,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnBtnSrvSendSelClick);
|
||||||
|
Connect(ID_BUTTON5,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnBtnClientConnClick);
|
||||||
|
Connect(ID_BUTTON6,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnBtnClientDisconnClick);
|
||||||
|
Connect(ID_CHECKBOX2,wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnCheckBinaryClientClick);
|
||||||
|
Connect(ID_BUTTON7,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&tcptestFrame::OnBtnClientSendClick);
|
||||||
|
Connect(idMenuQuit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&tcptestFrame::OnQuit);
|
||||||
|
Connect(idMenuAbout,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&tcptestFrame::OnAbout);
|
||||||
|
//*)
|
||||||
|
|
||||||
|
TCPServer1 = new SimpleTCPServer(this, ID_TCPSERVER1);
|
||||||
|
Connect(ID_TCPSERVER1, EV_CLIENTCONNECTED,(wxObjectEventFunction)&tcptestFrame::TCPServer1OnConnected);
|
||||||
|
Connect(ID_TCPSERVER1, EV_CLIENTDISCONNECTED,(wxObjectEventFunction)&tcptestFrame::TCPServer1OnDisconnected);
|
||||||
|
Connect(ID_TCPSERVER1, EV_ONDATA,(wxObjectEventFunction)&tcptestFrame::TCPServer1OnData);
|
||||||
|
|
||||||
|
|
||||||
|
TCPClient1 = new SimpleTCPClient(this, ID_TCPCLIENT1);
|
||||||
|
Connect(ID_TCPCLIENT1, EV_CLIENTONDATA,(wxObjectEventFunction)&tcptestFrame::TCPClient1OnData);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Old habits...
|
||||||
|
wxString IntToStr( int num_in )
|
||||||
|
{
|
||||||
|
wxString str_out = wxString::Format(wxT("%i"),num_in);
|
||||||
|
return str_out;
|
||||||
|
}
|
||||||
|
int StrToInt( wxString str_in )
|
||||||
|
{
|
||||||
|
int int_out = wxAtoi(str_in);
|
||||||
|
return int_out;
|
||||||
|
}
|
||||||
|
void tcptestFrame::LogServer( wxString logText )
|
||||||
|
{
|
||||||
|
// Prints log to a text control
|
||||||
|
// "(GUI)" is prepended to make it easier to understand how the application works
|
||||||
|
// It will show which part of log was generated here
|
||||||
|
LogSrv1->WriteText("(GUI) " + logText + "\n");
|
||||||
|
}
|
||||||
|
void tcptestFrame::LogClient( wxString logText )
|
||||||
|
{
|
||||||
|
// Prints log to a text control
|
||||||
|
// "(GUI)" is prepended to make it easier to understand how the application works
|
||||||
|
// It will show which part of log was generated here
|
||||||
|
LogClient1->WriteText("(GUI) " + logText + "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::TCPClient1OnData(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
|
||||||
|
// This will turn true if we find non-string data
|
||||||
|
bool binaryData = false;
|
||||||
|
|
||||||
|
LogClient("Incoming data:");
|
||||||
|
|
||||||
|
// Peek single byte (peeking doesn't clear data that was read)
|
||||||
|
unsigned char peekBuf[1];
|
||||||
|
TCPClient1->Peek(peekBuf, 1);
|
||||||
|
|
||||||
|
// If data starts with 0x00 or 0x01 we assume that it is binary data
|
||||||
|
// This is just an example and not a standard of any kind
|
||||||
|
if (peekBuf[0] == 0x00 || peekBuf[0] == 0x01) binaryData = true;
|
||||||
|
|
||||||
|
|
||||||
|
// If this is not binary data, just read it as text string and print to log
|
||||||
|
if ( !binaryData )
|
||||||
|
{
|
||||||
|
LogClient( TCPClient1->ReadStr() );
|
||||||
|
}
|
||||||
|
else if ( binaryData ) // If it is binary data, then proceed with it
|
||||||
|
{
|
||||||
|
LogClient("Found binary data");
|
||||||
|
|
||||||
|
// Prepare 8-byte data buffer to receive data
|
||||||
|
// because currently we are only handling 8-byte data packets
|
||||||
|
|
||||||
|
unsigned char recvBuf[8];
|
||||||
|
memset(recvBuf, 0, 8); // Fill with zeros
|
||||||
|
|
||||||
|
// Read 8 bytes to buffer
|
||||||
|
TCPClient1->Read(recvBuf, 8);
|
||||||
|
|
||||||
|
// Check if data contains header and termination that we can understand
|
||||||
|
// Currently we are only expecting data in this format:
|
||||||
|
// 0x01 0x49 0x04 X X X X 0x04
|
||||||
|
// where X X X X are 4 bytes of 32-bit integer number
|
||||||
|
//
|
||||||
|
if (recvBuf[0] == 0x01 && recvBuf[1] == 0x49 && recvBuf[2] == 0x04 && recvBuf[7] == 0x04)
|
||||||
|
{
|
||||||
|
// Resulting number will be stored here
|
||||||
|
long integerValue = 0;
|
||||||
|
|
||||||
|
// Read 4 bytes of data into 32-bit integer
|
||||||
|
// i<4 means 4 bytes, recvBuf[3+i] means we start reading from 3rd byte of buffer
|
||||||
|
for (int i=0; i<4; i++) integerValue |= (recvBuf[3+i] << i*8);
|
||||||
|
|
||||||
|
// Print received integer value in log
|
||||||
|
LogClient("Received 32-bit integer value:\n"
|
||||||
|
+ wxString::Format(wxT("%i"),integerValue) );
|
||||||
|
|
||||||
|
}
|
||||||
|
else LogClient("Unknown format of data"); // Warn about unrecognized data if it didn't met specified conditions
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::TCPServer1OnConnected(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
LogServer("Client connected");
|
||||||
|
UpdateGUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::TCPServer1OnDisconnected(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
LogServer("Client disconnected");
|
||||||
|
UpdateGUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::TCPServer1OnData(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
|
||||||
|
wxSocketBase *sock = (wxSocketBase*) event.GetClientData();
|
||||||
|
wxIPV4address addr;
|
||||||
|
sock->GetPeer(addr);
|
||||||
|
|
||||||
|
//LogServer( "Data from " + addr.IPAddress() + ":\n"
|
||||||
|
// + TCPServer1->ReadStr( sock ) );
|
||||||
|
|
||||||
|
|
||||||
|
// This will turn true if we find non-string data
|
||||||
|
bool binaryData = false;
|
||||||
|
|
||||||
|
LogServer( "Data from " + addr.IPAddress() + "\n" );
|
||||||
|
|
||||||
|
// Peek single byte (peeking doesn't clear data that was read)
|
||||||
|
unsigned char peekBuf[1];
|
||||||
|
TCPServer1->Peek(peekBuf, 1, sock);
|
||||||
|
|
||||||
|
// If data starts with 0x00 or 0x01 we assume that it is binary data
|
||||||
|
// This is just an example and not a standard of any kind
|
||||||
|
if (peekBuf[0] == 0x00 || peekBuf[0] == 0x01) binaryData = true;
|
||||||
|
|
||||||
|
|
||||||
|
// If this is not binary data, just read it as text string and print to log
|
||||||
|
if ( !binaryData )
|
||||||
|
{
|
||||||
|
LogServer( TCPServer1->ReadStr(sock) );
|
||||||
|
}
|
||||||
|
else if ( binaryData ) // If it is binary data, then proceed with it
|
||||||
|
{
|
||||||
|
LogServer("Found binary data");
|
||||||
|
|
||||||
|
// Prepare 8-byte data buffer to receive data
|
||||||
|
// because currently we are only handling 8-byte data packets
|
||||||
|
|
||||||
|
unsigned char recvBuf[8];
|
||||||
|
memset(recvBuf, 0, 8); // Fill with zeros
|
||||||
|
|
||||||
|
// Read 8 bytes to buffer
|
||||||
|
TCPServer1->Read(recvBuf, 8, sock);
|
||||||
|
|
||||||
|
// Check if data contains header and termination that we can understand
|
||||||
|
// Currently we are only expecting data in this format:
|
||||||
|
// 0x01 0x49 0x04 X X X X 0x04
|
||||||
|
// where X X X X are 4 bytes of 32-bit integer number
|
||||||
|
//
|
||||||
|
if (recvBuf[0] == 0x01 && recvBuf[1] == 0x49 && recvBuf[2] == 0x04 && recvBuf[7] == 0x04)
|
||||||
|
{
|
||||||
|
// Resulting number will be stored here
|
||||||
|
long integerValue = 0;
|
||||||
|
|
||||||
|
// Read 4 bytes of data into 32-bit integer
|
||||||
|
// i<4 means 4 bytes, recvBuf[3+i] means we start reading from 3rd byte of buffer
|
||||||
|
for (int i=0; i<4; i++) integerValue |= (recvBuf[3+i] << i*8);
|
||||||
|
|
||||||
|
// Print received integer value in log
|
||||||
|
LogServer("Received 32-bit integer value:\n"
|
||||||
|
+ wxString::Format(wxT("%i"),integerValue) );
|
||||||
|
|
||||||
|
}
|
||||||
|
else LogServer("Unknown format of data"); // Warn about unrecognized data if it didn't met specified conditions
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tcptestFrame::~tcptestFrame()
|
||||||
|
{
|
||||||
|
//(*Destroy(tcptestFrame)
|
||||||
|
//*)
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnQuit(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void tcptestFrame::UpdateGUI()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (TCPServer1) // Update IP list and client count with current server data
|
||||||
|
{
|
||||||
|
// Display client count
|
||||||
|
LabelCount1->SetLabel( "Client count: " + IntToStr( TCPServer1->clientCount() ) );
|
||||||
|
|
||||||
|
// Get target address from selected IP list field
|
||||||
|
int lastIndex = ListBox1->GetSelection();
|
||||||
|
wxString lastSelection = "";
|
||||||
|
if (lastIndex >= 0) lastSelection = ListBox1->GetString(lastIndex);
|
||||||
|
|
||||||
|
ListBox1->Clear(); // Temporarily clear list of clients
|
||||||
|
|
||||||
|
// Iterate over map of connected clients and update list
|
||||||
|
for( std::map<wxSocketBase*, wxString>::const_iterator it = TCPServer1->clientMap.begin();
|
||||||
|
it != TCPServer1->clientMap.end(); ++it)
|
||||||
|
{
|
||||||
|
ListBox1->Append( it->second );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bring back the last selection
|
||||||
|
if (lastIndex >= 0) ListBox1->SetStringSelection(lastSelection);
|
||||||
|
|
||||||
|
}
|
||||||
|
else // Clear everything if server is not active
|
||||||
|
{
|
||||||
|
ListBox1->Clear();
|
||||||
|
LabelCount1->SetLabel( "Client count: 0" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void tcptestFrame::OnAbout(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxString msg = "TCP test built with \n" + wxbuildinfo(long_f);
|
||||||
|
wxMessageBox(msg, _("About"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnOpenSrvClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnSrvSendSelClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
|
||||||
|
// If no binary mode checked, just send text string
|
||||||
|
if (!CheckBinarySrv->GetValue())
|
||||||
|
{
|
||||||
|
// Get target address from selected IP list field
|
||||||
|
int selectedAddrIndex = ListBox1->GetSelection();
|
||||||
|
|
||||||
|
// Proceed only if selection index is 0 or greater (-1 would mean no selection)
|
||||||
|
if (selectedAddrIndex >= 0)
|
||||||
|
{
|
||||||
|
wxString targetAddr = ListBox1->GetString(selectedAddrIndex);
|
||||||
|
// Send to target address
|
||||||
|
TCPServer1->WriteStr(TextSendSrv1->GetValue(), targetAddr );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Prepare 8-byte data buffer
|
||||||
|
unsigned char sendBuf[8];
|
||||||
|
memset(sendBuf, 0, 8); // Fill with zeros
|
||||||
|
|
||||||
|
// Get a number that we want to send as binary data
|
||||||
|
// It will be stored in 32-bit integer, that means 4 bytes of data
|
||||||
|
long integerValue = SpinCtrlSrv1->GetValue();
|
||||||
|
|
||||||
|
// Create a header in first three bytes (we are counting bytes from zero)
|
||||||
|
// this is just an example and not some standard format, client application needs to recognize our format
|
||||||
|
sendBuf[0] = 0x01; // Receiver will read this as beginning of binary packet
|
||||||
|
sendBuf[1] = 0x49; // This is hex code of "I" letter, that will mean signed integer
|
||||||
|
sendBuf[2] = 0x04; // 0x04 will mean we are sending 4 bytes of 32-bit integer
|
||||||
|
|
||||||
|
// Put 32-bit integer into buffer
|
||||||
|
// 3 in sendBuf[3+i] means that value will be placed starting with 3rd byte of buffer
|
||||||
|
// i<4 means that we are writing 4 bytes
|
||||||
|
for (int i=0; i<4; i++) sendBuf[3+i] = (integerValue >> i*8) & 0xFF;
|
||||||
|
|
||||||
|
sendBuf[7] = 0x04; // Set last byte to 0x04 as a footer (this is just an arbitrary choice)
|
||||||
|
|
||||||
|
// Get target address from selected IP list field
|
||||||
|
int selectedAddrIndex = ListBox1->GetSelection();
|
||||||
|
|
||||||
|
// Proceed only if selection index is 0 or greater (-1 would mean no selection)
|
||||||
|
if (selectedAddrIndex >= 0)
|
||||||
|
{
|
||||||
|
wxString targetAddr = ListBox1->GetString(selectedAddrIndex);
|
||||||
|
// Send to target address
|
||||||
|
TCPServer1->Write(sendBuf, 8, targetAddr );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Note: because we are sending binary data, it also needs to be read as such.
|
||||||
|
// Reading it as text would result in empty string or random characters.
|
||||||
|
// Receiver should read first bytes of our header, recognize format of the data
|
||||||
|
// and process it properly (this is done in client receiving example).
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnOpenSrvClick1(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
TCPServer1->logBox = LogSrv1;
|
||||||
|
TCPServer1->Port( wxAtoi( PortSrvText1->GetValue() ) );
|
||||||
|
TCPServer1->Open();
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnCloseSrvClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
TCPServer1->Close();
|
||||||
|
UpdateGUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnClientConnClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
TCPClient1->logBox = LogClient1;
|
||||||
|
TCPClient1->Connect( TextClientHost1->GetValue(), wxAtoi( TextClientPort1->GetValue() ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnClientDisconnClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
TCPClient1->Disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnClientSendClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (!CheckBinaryClient->GetValue())
|
||||||
|
{
|
||||||
|
TCPClient1->WriteStr( TextSendClient1->GetValue() );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Prepare 8-byte data buffer
|
||||||
|
unsigned char sendBuf[8];
|
||||||
|
memset(sendBuf, 0, 8); // Fill with zeros
|
||||||
|
|
||||||
|
// Get a number that we want to send as binary data
|
||||||
|
// It will be stored in 32-bit integer, that means 4 bytes of data
|
||||||
|
long integerValue = SpinCtrlClient1->GetValue();
|
||||||
|
|
||||||
|
// Create a header in first three bytes (we are counting bytes from zero)
|
||||||
|
// this is just an example and not some standard format, client application needs to recognize our format
|
||||||
|
sendBuf[0] = 0x01; // Receiver will read this as beginning of binary packet
|
||||||
|
sendBuf[1] = 0x49; // This is hex code of "I" letter, that will mean signed integer
|
||||||
|
sendBuf[2] = 0x04; // 0x04 will mean we are sending 4 bytes of 32-bit integer
|
||||||
|
|
||||||
|
// Put 32-bit integer into buffer
|
||||||
|
// 3 in sendBuf[3+i] means that value will be placed starting with 3rd byte of buffer
|
||||||
|
// i<4 means that we are writing 4 bytes
|
||||||
|
for (int i=0; i<4; i++) sendBuf[3+i] = (integerValue >> i*8) & 0xFF;
|
||||||
|
|
||||||
|
sendBuf[7] = 0x04; // Set last byte to 0x04 as a footer (this is just an arbitrary choice)
|
||||||
|
|
||||||
|
TCPClient1->Write(sendBuf, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnSrvSendAllClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
// If no binary mode checked, just send text string
|
||||||
|
if (!CheckBinarySrv->GetValue())
|
||||||
|
{
|
||||||
|
TCPServer1->WriteStr(TextSendSrv1->GetValue());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Prepare 8-byte data buffer
|
||||||
|
unsigned char sendBuf[8];
|
||||||
|
memset(sendBuf, 0, 8); // Fill with zeros
|
||||||
|
|
||||||
|
// Get a number that we want to send as binary data
|
||||||
|
// It will be stored in 32-bit integer, that means 4 bytes of data
|
||||||
|
long integerValue = SpinCtrlSrv1->GetValue();
|
||||||
|
|
||||||
|
// Create a header in first three bytes (we are counting bytes from zero)
|
||||||
|
// this is just an example and not some standard format, client application needs to recognize our format
|
||||||
|
sendBuf[0] = 0x01; // Receiver will read this as beginning of binary packet
|
||||||
|
sendBuf[1] = 0x49; // This is hex code of "I" letter, that will mean signed integer
|
||||||
|
sendBuf[2] = 0x04; // 0x04 will mean we are sending 4 bytes of 32-bit integer
|
||||||
|
|
||||||
|
// Put 32-bit integer into buffer
|
||||||
|
// 3 in sendBuf[3+i] means that value will be placed starting with 3rd byte of buffer
|
||||||
|
// i<4 means that we are writing 4 bytes
|
||||||
|
for (int i=0; i<4; i++) sendBuf[3+i] = (integerValue >> i*8) & 0xFF;
|
||||||
|
|
||||||
|
sendBuf[7] = 0x04; // Set last byte to 0x04 as a footer (this is just an arbitrary choice)
|
||||||
|
|
||||||
|
// Iterate over list of all clients and send data
|
||||||
|
for (int i=0; i< ListBox1->GetCount(); i++)
|
||||||
|
{
|
||||||
|
wxString targetAddr = ListBox1->GetString(i);
|
||||||
|
TCPServer1->Write(sendBuf, 8, targetAddr );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Note: because we are sending binary data, it also needs to be read as such.
|
||||||
|
// Reading it as text would result in empty string or random characters.
|
||||||
|
// Receiver should read first bytes of our header, recognize format of the data
|
||||||
|
// and process it properly (this is done in client receiving example).
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnCheckBinarySrvClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
if (CheckBinarySrv->GetValue())
|
||||||
|
{
|
||||||
|
SpinCtrlSrv1->Enable();
|
||||||
|
TextSendSrv1->Disable();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SpinCtrlSrv1->Disable();
|
||||||
|
TextSendSrv1->Enable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnBtnDropClientClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
// Get target address from selected IP list field
|
||||||
|
int selectedAddrIndex = ListBox1->GetSelection();
|
||||||
|
|
||||||
|
// Proceed only if selection index is 0 or greater (-1 would mean no selection)
|
||||||
|
if (selectedAddrIndex >= 0)
|
||||||
|
{
|
||||||
|
wxString targetAddr = ListBox1->GetString(selectedAddrIndex);
|
||||||
|
// Send to target address
|
||||||
|
TCPServer1->DropClient(targetAddr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void tcptestFrame::OnCheckBinaryClientClick(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
if (CheckBinaryClient->GetValue())
|
||||||
|
{
|
||||||
|
SpinCtrlClient1->Enable();
|
||||||
|
TextSendClient1->Disable();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SpinCtrlClient1->Disable();
|
||||||
|
TextSendClient1->Enable();
|
||||||
|
}
|
||||||
|
}
|
183
Samples/tcptest/tcptestMain.h
Normal file
183
Samples/tcptest/tcptestMain.h
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
#ifndef HEADER_878F1DDCB707631B
|
||||||
|
#define HEADER_878F1DDCB707631B
|
||||||
|
|
||||||
|
/***************************************************************
|
||||||
|
* Name: tcptestMain.h
|
||||||
|
* Purpose: Defines Application Frame
|
||||||
|
* Author: ()
|
||||||
|
* Created: 2023-11-10
|
||||||
|
* Copyright: ()
|
||||||
|
* License:
|
||||||
|
**************************************************************/
|
||||||
|
|
||||||
|
#ifndef TCPTESTMAIN_H
|
||||||
|
#define TCPTESTMAIN_H
|
||||||
|
|
||||||
|
//(*Headers(tcptestFrame)
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/frame.h>
|
||||||
|
#include <wx/listbox.h>
|
||||||
|
#include <wx/menu.h>
|
||||||
|
#include <wx/notebook.h>
|
||||||
|
#include <wx/panel.h>
|
||||||
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/spinctrl.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/statusbr.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
//*)
|
||||||
|
|
||||||
|
#include "tcpserver.h"
|
||||||
|
#include "tcpclient.h"
|
||||||
|
|
||||||
|
class tcptestFrame: public wxFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
tcptestFrame(wxWindow* parent,wxWindowID id = -1);
|
||||||
|
virtual ~tcptestFrame();
|
||||||
|
|
||||||
|
void LogServer(wxString logText);
|
||||||
|
void LogClient(wxString logText);
|
||||||
|
void UpdateGUI();
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
//(*Handlers(tcptestFrame)
|
||||||
|
void OnQuit(wxCommandEvent& event);
|
||||||
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
void OnBtnOpenSrvClick(wxCommandEvent& event);
|
||||||
|
void OnBtnSrvSendSelClick(wxCommandEvent& event);
|
||||||
|
void OnBtnOpenSrvClick1(wxCommandEvent& event);
|
||||||
|
void OnBtnCloseSrvClick(wxCommandEvent& event);
|
||||||
|
void OnBtnClientConnClick(wxCommandEvent& event);
|
||||||
|
void OnBtnClientDisconnClick(wxCommandEvent& event);
|
||||||
|
void OnBtnClientSendClick(wxCommandEvent& event);
|
||||||
|
void OnBtnSrvSendAllClick(wxCommandEvent& event);
|
||||||
|
void OnCheckBinarySrvClick(wxCommandEvent& event);
|
||||||
|
void OnBtnDropClientClick(wxCommandEvent& event);
|
||||||
|
void OnCheckBinaryClientClick(wxCommandEvent& event);
|
||||||
|
//*)
|
||||||
|
|
||||||
|
//(*Identifiers(tcptestFrame)
|
||||||
|
static const long ID_STATICTEXT3;
|
||||||
|
static const long ID_STATICTEXT4;
|
||||||
|
static const long ID_TEXTCTRL2;
|
||||||
|
static const long ID_BUTTON1;
|
||||||
|
static const long ID_BUTTON2;
|
||||||
|
static const long ID_PANEL5;
|
||||||
|
static const long ID_STATICTEXT1;
|
||||||
|
static const long ID_LISTBOX1;
|
||||||
|
static const long ID_BUTTON8;
|
||||||
|
static const long ID_PANEL6;
|
||||||
|
static const long ID_STATICTEXT2;
|
||||||
|
static const long ID_TEXTCTRL1;
|
||||||
|
static const long ID_PANEL7;
|
||||||
|
static const long ID_PANEL2;
|
||||||
|
static const long ID_TEXTCTRL3;
|
||||||
|
static const long ID_CHECKBOX1;
|
||||||
|
static const long ID_SPINCTRL1;
|
||||||
|
static const long ID_PANEL10;
|
||||||
|
static const long ID_PANEL8;
|
||||||
|
static const long ID_BUTTON3;
|
||||||
|
static const long ID_BUTTON4;
|
||||||
|
static const long ID_PANEL9;
|
||||||
|
static const long ID_PANEL4;
|
||||||
|
static const long ID_PANEL3;
|
||||||
|
static const long ID_STATICTEXT5;
|
||||||
|
static const long ID_TEXTCTRL7;
|
||||||
|
static const long ID_STATICTEXT6;
|
||||||
|
static const long ID_TEXTCTRL4;
|
||||||
|
static const long ID_BUTTON5;
|
||||||
|
static const long ID_BUTTON6;
|
||||||
|
static const long ID_PANEL14;
|
||||||
|
static const long ID_STATICTEXT8;
|
||||||
|
static const long ID_TEXTCTRL5;
|
||||||
|
static const long ID_PANEL16;
|
||||||
|
static const long ID_PANEL13;
|
||||||
|
static const long ID_TEXTCTRL6;
|
||||||
|
static const long ID_CHECKBOX2;
|
||||||
|
static const long ID_SPINCTRL2;
|
||||||
|
static const long ID_PANEL19;
|
||||||
|
static const long ID_PANEL18;
|
||||||
|
static const long ID_BUTTON7;
|
||||||
|
static const long ID_PANEL20;
|
||||||
|
static const long ID_PANEL17;
|
||||||
|
static const long ID_PANEL12;
|
||||||
|
static const long ID_NOTEBOOK1;
|
||||||
|
static const long ID_PANEL1;
|
||||||
|
static const long idMenuQuit;
|
||||||
|
static const long idMenuAbout;
|
||||||
|
static const long ID_STATUSBAR1;
|
||||||
|
//*)
|
||||||
|
|
||||||
|
//(*Declarations(tcptestFrame)
|
||||||
|
wxButton* BtnClientConn;
|
||||||
|
wxButton* BtnClientDisconn;
|
||||||
|
wxButton* BtnClientSend;
|
||||||
|
wxButton* BtnCloseSrv;
|
||||||
|
wxButton* BtnDropClient;
|
||||||
|
wxButton* BtnOpenSrv;
|
||||||
|
wxButton* BtnSrvSendAll;
|
||||||
|
wxButton* BtnSrvSendSel;
|
||||||
|
wxCheckBox* CheckBinaryClient;
|
||||||
|
wxCheckBox* CheckBinarySrv;
|
||||||
|
wxListBox* ListBox1;
|
||||||
|
wxNotebook* Notebook1;
|
||||||
|
wxPanel* Panel10;
|
||||||
|
wxPanel* Panel12;
|
||||||
|
wxPanel* Panel13;
|
||||||
|
wxPanel* Panel14;
|
||||||
|
wxPanel* Panel16;
|
||||||
|
wxPanel* Panel17;
|
||||||
|
wxPanel* Panel18;
|
||||||
|
wxPanel* Panel19;
|
||||||
|
wxPanel* Panel1;
|
||||||
|
wxPanel* Panel20;
|
||||||
|
wxPanel* Panel2;
|
||||||
|
wxPanel* Panel3;
|
||||||
|
wxPanel* Panel4;
|
||||||
|
wxPanel* Panel5;
|
||||||
|
wxPanel* Panel6;
|
||||||
|
wxPanel* Panel7;
|
||||||
|
wxPanel* Panel8;
|
||||||
|
wxPanel* Panel9;
|
||||||
|
wxSpinCtrl* SpinCtrlClient1;
|
||||||
|
wxSpinCtrl* SpinCtrlSrv1;
|
||||||
|
wxStaticText* LabelCount1;
|
||||||
|
wxStaticText* StaticText1;
|
||||||
|
wxStaticText* StaticText2;
|
||||||
|
wxStaticText* StaticText3;
|
||||||
|
wxStaticText* StaticText4;
|
||||||
|
wxStaticText* StaticText5;
|
||||||
|
wxStaticText* StaticText7;
|
||||||
|
wxStatusBar* StatusBar1;
|
||||||
|
wxTextCtrl* LogClient1;
|
||||||
|
wxTextCtrl* LogSrv1;
|
||||||
|
wxTextCtrl* PortSrvText1;
|
||||||
|
wxTextCtrl* TextClientHost1;
|
||||||
|
wxTextCtrl* TextClientPort1;
|
||||||
|
wxTextCtrl* TextSendClient1;
|
||||||
|
wxTextCtrl* TextSendSrv1;
|
||||||
|
//*)
|
||||||
|
|
||||||
|
SimpleTCPServer *TCPServer1;
|
||||||
|
static const long ID_TCPSERVER1;
|
||||||
|
void TCPServer1OnConnected( wxCommandEvent& event ); // When new client is connected
|
||||||
|
void TCPServer1OnDisconnected( wxCommandEvent& event ); // When a client is disconnected
|
||||||
|
void TCPServer1OnData( wxCommandEvent& event ); // When new data is available
|
||||||
|
void TCPServer1OnError( wxCommandEvent& event ); // When an error happens
|
||||||
|
|
||||||
|
SimpleTCPClient *TCPClient1;
|
||||||
|
static const long ID_TCPCLIENT1;
|
||||||
|
void TCPClient1OnData( wxCommandEvent& event ); // When new data is available
|
||||||
|
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // TCPTESTMAIN_H
|
||||||
|
#endif // header guard
|
||||||
|
|
455
Samples/tcptest/wxsmith/tcptestframe.wxs
Normal file
455
Samples/tcptest/wxsmith/tcptestframe.wxs
Normal file
|
@ -0,0 +1,455 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<wxsmith>
|
||||||
|
<object class="wxFrame" name="tcptestFrame">
|
||||||
|
<title>TCP Client/Server</title>
|
||||||
|
<bg>wxSYS_COLOUR_BTNFACE</bg>
|
||||||
|
<minsize>340,320</minsize>
|
||||||
|
<extra_code>// This code will set a smaller font if Win 3.11 is detected:
int majorVer; int minorVer;
wxGetOsVersion(&majorVer, &minorVer);
if (minorVer == 30 || majorVer == 30 || majorVer == 3)
{
 wxFont thisFont(8,wxFONTFAMILY__DEFAULT,wxFONTSTYLE__NORMAL,wxFONTWEIGHT__NORMAL,false,wxEmptyString,wxFONTENCODING__DEFAULT);
 SetFont(thisFont);
}</extra_code>
|
||||||
|
<id_arg>0</id_arg>
|
||||||
|
<style>wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE</style>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer1" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL1" variable="Panel1" member="yes">
|
||||||
|
<size>286,334</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer2" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxNotebook" name="ID_NOTEBOOK1" variable="Notebook1" member="yes">
|
||||||
|
<object class="notebookpage">
|
||||||
|
<object class="wxPanel" name="ID_PANEL3" variable="Panel3" member="yes">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer4" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL2" variable="Panel2" member="yes">
|
||||||
|
<size>330,191</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer3" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL5" variable="Panel5" member="yes">
|
||||||
|
<size>58,36d</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer7" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="ID_STATICTEXT3" variable="LabelCount1" member="yes">
|
||||||
|
<label>Client count: 0</label>
|
||||||
|
<size>56,8d</size>
|
||||||
|
<style>wxST_NO_AUTORESIZE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALIGN_LEFT</flag>
|
||||||
|
</object>
|
||||||
|
<object class="spacer">
|
||||||
|
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<size>20,1</size>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="ID_STATICTEXT4" variable="StaticText4" member="yes">
|
||||||
|
<label>Port</label>
|
||||||
|
<size>38,8d</size>
|
||||||
|
<style>wxST_NO_AUTORESIZE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALIGN_LEFT</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxTextCtrl" name="ID_TEXTCTRL2" variable="PortSrvText1" member="yes">
|
||||||
|
<value>3000</value>
|
||||||
|
<size>30,-1d</size>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM</flag>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ID_BUTTON1" variable="BtnOpenSrv" member="yes">
|
||||||
|
<label>Open server</label>
|
||||||
|
<handler function="OnBtnOpenSrvClick1" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxEXPAND</flag>
|
||||||
|
<border>8</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ID_BUTTON2" variable="BtnCloseSrv" member="yes">
|
||||||
|
<label>Close server</label>
|
||||||
|
<handler function="OnBtnCloseSrvClick" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM|wxEXPAND</flag>
|
||||||
|
<border>4</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL6" variable="Panel6" member="yes">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer5" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="ID_STATICTEXT1" variable="StaticText1" member="yes">
|
||||||
|
<label>Client list</label>
|
||||||
|
<size>45,8d</size>
|
||||||
|
<style>wxST_NO_AUTORESIZE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_LEFT</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxListBox" name="ID_LISTBOX1" variable="ListBox1" member="yes">
|
||||||
|
<default>-1</default>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ID_BUTTON8" variable="BtnDropClient" member="yes">
|
||||||
|
<label>Drop client</label>
|
||||||
|
<handler function="OnBtnDropClientClick" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_LEFT</flag>
|
||||||
|
<border>4</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL7" variable="Panel7" member="yes">
|
||||||
|
<size>360,172</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer6" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="ID_STATICTEXT2" variable="StaticText2" member="yes">
|
||||||
|
<label>Log</label>
|
||||||
|
<size>61,8d</size>
|
||||||
|
<style>wxST_NO_AUTORESIZE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_LEFT</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxTextCtrl" name="ID_TEXTCTRL1" variable="LogSrv1" member="yes">
|
||||||
|
<style>wxTE_MULTILINE|wxTE_READONLY|wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<option>2</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL4" variable="Panel4" member="yes">
|
||||||
|
<size>646,79</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer8" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL8" variable="Panel8" member="yes">
|
||||||
|
<size>68,26d</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer9" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxTextCtrl" name="ID_TEXTCTRL3" variable="TextSendSrv1" member="yes">
|
||||||
|
<value>Message</value>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL10" variable="Panel10" member="yes">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer10" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxCheckBox" name="ID_CHECKBOX1" variable="CheckBinarySrv" member="yes">
|
||||||
|
<label>Binary mode (send a number)</label>
|
||||||
|
<size>119,8d</size>
|
||||||
|
<handler function="OnCheckBinarySrvClick" entry="EVT_CHECKBOX" />
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxSpinCtrl" name="ID_SPINCTRL1" variable="SpinCtrlSrv1" member="yes">
|
||||||
|
<value>12345</value>
|
||||||
|
<min>-32737</min>
|
||||||
|
<max>32737</max>
|
||||||
|
<size>80,-1d</size>
|
||||||
|
<enabled>0</enabled>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND</flag>
|
||||||
|
<border>4</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL9" variable="Panel9" member="yes">
|
||||||
|
<size>139,95</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer11" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ID_BUTTON3" variable="BtnSrvSendAll" member="yes">
|
||||||
|
<label>Send to all</label>
|
||||||
|
<minsize>48,13d</minsize>
|
||||||
|
<handler function="OnBtnSrvSendAllClick" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<flag>wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ID_BUTTON4" variable="BtnSrvSendSel" member="yes">
|
||||||
|
<label>Send to sel</label>
|
||||||
|
<minsize>48,13d</minsize>
|
||||||
|
<handler function="OnBtnSrvSendSelClick" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxEXPAND</flag>
|
||||||
|
<border>4</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxLEFT|wxEXPAND</flag>
|
||||||
|
<border>2</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<label>Server</label>
|
||||||
|
</object>
|
||||||
|
<object class="notebookpage">
|
||||||
|
<object class="wxPanel" name="ID_PANEL12" variable="Panel12" member="yes">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer12" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL13" variable="Panel13" member="yes">
|
||||||
|
<size>330,191</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer13" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL14" variable="Panel14" member="yes">
|
||||||
|
<size>58,36d</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer14" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="ID_STATICTEXT5" variable="StaticText3" member="yes">
|
||||||
|
<label>Address</label>
|
||||||
|
<size>56,8d</size>
|
||||||
|
<style>wxST_NO_AUTORESIZE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxBOTTOM|wxALIGN_LEFT</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxTextCtrl" name="ID_TEXTCTRL7" variable="TextClientHost1" member="yes">
|
||||||
|
<value>127.0.0.1</value>
|
||||||
|
<size>30,-1d</size>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM|wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="ID_STATICTEXT6" variable="StaticText5" member="yes">
|
||||||
|
<label>Port</label>
|
||||||
|
<size>38,8d</size>
|
||||||
|
<style>wxST_NO_AUTORESIZE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALIGN_LEFT</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxTextCtrl" name="ID_TEXTCTRL4" variable="TextClientPort1" member="yes">
|
||||||
|
<value>3000</value>
|
||||||
|
<size>30,-1d</size>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM</flag>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ID_BUTTON5" variable="BtnClientConn" member="yes">
|
||||||
|
<label>Connect</label>
|
||||||
|
<handler function="OnBtnClientConnClick" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxEXPAND</flag>
|
||||||
|
<border>8</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ID_BUTTON6" variable="BtnClientDisconn" member="yes">
|
||||||
|
<label>Disconnect</label>
|
||||||
|
<handler function="OnBtnClientDisconnClick" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM|wxEXPAND</flag>
|
||||||
|
<border>4</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL16" variable="Panel16" member="yes">
|
||||||
|
<size>360,172</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer16" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxStaticText" name="ID_STATICTEXT8" variable="StaticText7" member="yes">
|
||||||
|
<label>Log</label>
|
||||||
|
<size>61,8d</size>
|
||||||
|
<style>wxST_NO_AUTORESIZE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxALIGN_LEFT</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxTextCtrl" name="ID_TEXTCTRL5" variable="LogClient1" member="yes">
|
||||||
|
<style>wxTE_MULTILINE|wxTE_READONLY|wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<option>2</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL17" variable="Panel17" member="yes">
|
||||||
|
<size>646,79</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer17" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL18" variable="Panel18" member="yes">
|
||||||
|
<size>68,26d</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer18" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxTextCtrl" name="ID_TEXTCTRL6" variable="TextSendClient1" member="yes">
|
||||||
|
<value>Message</value>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL19" variable="Panel19" member="yes">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer19" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxCheckBox" name="ID_CHECKBOX2" variable="CheckBinaryClient" member="yes">
|
||||||
|
<label>Binary mode (send a number)</label>
|
||||||
|
<size>119,8d</size>
|
||||||
|
<handler function="OnCheckBinaryClientClick" entry="EVT_CHECKBOX" />
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxSpinCtrl" name="ID_SPINCTRL2" variable="SpinCtrlClient1" member="yes">
|
||||||
|
<value>12345</value>
|
||||||
|
<min>-32737</min>
|
||||||
|
<max>32737</max>
|
||||||
|
<size>80,-1d</size>
|
||||||
|
<enabled>0</enabled>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<flag>wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND</flag>
|
||||||
|
<border>4</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL20" variable="Panel20" member="yes">
|
||||||
|
<size>139,95</size>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer20" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxButton" name="ID_BUTTON7" variable="BtnClientSend" member="yes">
|
||||||
|
<label>Send</label>
|
||||||
|
<minsize>48,13d</minsize>
|
||||||
|
<handler function="OnBtnClientSendClick" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<flag>wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxLEFT|wxEXPAND</flag>
|
||||||
|
<border>2</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<label>Client</label>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>5</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="wxMenuBar" variable="MenuBar1" member="no">
|
||||||
|
<object class="wxMenu" variable="Menu1" member="no">
|
||||||
|
<label>&File</label>
|
||||||
|
<object class="wxMenuItem" name="idMenuQuit" variable="MenuItem1" member="no">
|
||||||
|
<label>Quit</label>
|
||||||
|
<accel>Alt-F4</accel>
|
||||||
|
<help>Quit the application</help>
|
||||||
|
<handler function="OnQuit" entry="EVT_MENU" />
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="wxMenu" variable="Menu2" member="no">
|
||||||
|
<label>Help</label>
|
||||||
|
<object class="wxMenuItem" name="idMenuAbout" variable="MenuItem2" member="no">
|
||||||
|
<label>About</label>
|
||||||
|
<accel>F1</accel>
|
||||||
|
<help>Show info about this application</help>
|
||||||
|
<handler function="OnAbout" entry="EVT_MENU" />
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="wxStatusBar" name="ID_STATUSBAR1" variable="StatusBar1" member="yes">
|
||||||
|
<fields>1</fields>
|
||||||
|
<widths>-1</widths>
|
||||||
|
<styles>wxSB_NORMAL</styles>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</wxsmith>
|
3
Samples/vidplay/resource.rc
Normal file
3
Samples/vidplay/resource.rc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
aaaa ICON "wx/msw/std.ico"
|
||||||
|
|
||||||
|
#include "wx/msw/wx.rc"
|
BIN
Samples/vidplay/video.avi
Normal file
BIN
Samples/vidplay/video.avi
Normal file
Binary file not shown.
BIN
Samples/vidplay/video.mpg
Normal file
BIN
Samples/vidplay/video.mpg
Normal file
Binary file not shown.
159
Samples/vidplay/vidplay.cbp
Normal file
159
Samples/vidplay/vidplay.cbp
Normal file
|
@ -0,0 +1,159 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocks_project_file>
|
||||||
|
<FileVersion major="1" minor="6" />
|
||||||
|
<Project>
|
||||||
|
<Option title="vidplay" />
|
||||||
|
<Option pch_mode="2" />
|
||||||
|
<Option compiler="bcc" />
|
||||||
|
<Build>
|
||||||
|
<Target title="Win32s">
|
||||||
|
<Option output="bin/Win32s/vidplay" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option object_output="obj/Win32s/" />
|
||||||
|
<Option type="0" />
|
||||||
|
<Option compiler="bcc" />
|
||||||
|
<Option projectCompilerOptionsRelation="1" />
|
||||||
|
<Option projectLinkerOptionsRelation="1" />
|
||||||
|
<Option projectIncludeDirsRelation="1" />
|
||||||
|
<Option projectResourceIncludeDirsRelation="1" />
|
||||||
|
<Option projectLibDirsRelation="1" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-w" />
|
||||||
|
<Add option="-tWM" />
|
||||||
|
<Add option="-a8" />
|
||||||
|
<Add option="-O2" />
|
||||||
|
<Add option="-q" />
|
||||||
|
<Add option="-c" />
|
||||||
|
<Add option="-P" />
|
||||||
|
<Add option="-D__WXMSW__" />
|
||||||
|
<Add option="-DNDEBUG" />
|
||||||
|
<Add directory="$(#wx28)/include" />
|
||||||
|
<Add directory="$(#wx28)/lib/bcc_lib/msw" />
|
||||||
|
</Compiler>
|
||||||
|
<ResourceCompiler>
|
||||||
|
<Add directory="$(#wx28)/include" />
|
||||||
|
<Add directory="$(#wx28)/lib/bcc_lib/msw" />
|
||||||
|
</ResourceCompiler>
|
||||||
|
<Linker>
|
||||||
|
<Add option="-Tpe" />
|
||||||
|
<Add option="-aa" />
|
||||||
|
<Add library="import32.lib" />
|
||||||
|
<Add library="cw32mt.lib" />
|
||||||
|
<Add library="ole2w32.lib" />
|
||||||
|
<Add library="wxmsw28.lib" />
|
||||||
|
<Add library="wxpng.lib" />
|
||||||
|
<Add library="wxjpeg.lib" />
|
||||||
|
<Add library="wxtiff.lib" />
|
||||||
|
<Add library="wxzlib.lib" />
|
||||||
|
<Add library="wxregex.lib" />
|
||||||
|
<Add library="wxexpat.lib" />
|
||||||
|
<Add library="kernel32.lib" />
|
||||||
|
<Add library="user32.lib" />
|
||||||
|
<Add library="gdi32.lib" />
|
||||||
|
<Add library="winspool.lib" />
|
||||||
|
<Add library="comdlg32.lib" />
|
||||||
|
<Add library="advapi32.lib" />
|
||||||
|
<Add library="shell32.lib" />
|
||||||
|
<Add library="ole32.lib" />
|
||||||
|
<Add library="oleaut32.lib" />
|
||||||
|
<Add library="uuid.lib" />
|
||||||
|
<Add library="comctl32.lib" />
|
||||||
|
<Add library="wsock32.lib" />
|
||||||
|
<Add directory="$(#wx28)/lib/bcc_lib" />
|
||||||
|
</Linker>
|
||||||
|
<ExtraCommands>
|
||||||
|
<Add after='$(CMD_CP) "$(PROJECT_DIR)\video.avi" "$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)\video.avi"' />
|
||||||
|
<Add after='$(CMD_CP) "$(PROJECT_DIR)\video.mpg" "$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)\video.mpg"' />
|
||||||
|
</ExtraCommands>
|
||||||
|
</Target>
|
||||||
|
<Target title="W95wx3U">
|
||||||
|
<Option output="bin/W95wx3U/vidplay" prefix_auto="1" extension_auto="1" />
|
||||||
|
<Option working_dir="bin/W95wx3U/" />
|
||||||
|
<Option object_output="obj/W95wx3U/" />
|
||||||
|
<Option type="0" />
|
||||||
|
<Option compiler="tdm-gcc_471_32bit" />
|
||||||
|
<Option projectCompilerOptionsRelation="1" />
|
||||||
|
<Option projectLinkerOptionsRelation="1" />
|
||||||
|
<Option projectIncludeDirsRelation="1" />
|
||||||
|
<Option projectResourceIncludeDirsRelation="1" />
|
||||||
|
<Option projectLibDirsRelation="1" />
|
||||||
|
<Compiler>
|
||||||
|
<Add option="-O2" />
|
||||||
|
<Add option="-Wall" />
|
||||||
|
<Add option="-pipe" />
|
||||||
|
<Add option="-mthreads" />
|
||||||
|
<Add option="-D__GNUWIN32__" />
|
||||||
|
<Add option="-D__WXMSW__" />
|
||||||
|
<Add option="-DwxUSE_UNICODE" />
|
||||||
|
<Add option="-DNDEBUG" />
|
||||||
|
<Add option="-DwxDEBUG_LEVEL=0" />
|
||||||
|
<Add directory="$(#wx30)/include" />
|
||||||
|
<Add directory="$(#wx30)/lib/gcc_lib/mswu" />
|
||||||
|
</Compiler>
|
||||||
|
<ResourceCompiler>
|
||||||
|
<Add option="-DwxUSE_DPI_AWARE_MANIFEST=2" />
|
||||||
|
<Add directory="$(#wx30)/include" />
|
||||||
|
<Add directory="$(#wx30)/lib/gcc_lib/mswu" />
|
||||||
|
</ResourceCompiler>
|
||||||
|
<Linker>
|
||||||
|
<Add option="-s" />
|
||||||
|
<Add option="-mthreads" />
|
||||||
|
<Add library="libwxmsw30u.a" />
|
||||||
|
<Add library="libwxpng.a" />
|
||||||
|
<Add library="libwxjpeg.a" />
|
||||||
|
<Add library="libwxtiff.a" />
|
||||||
|
<Add library="libwxzlib.a" />
|
||||||
|
<Add library="libwxregexu.a" />
|
||||||
|
<Add library="libwxscintilla.a" />
|
||||||
|
<Add library="libwxexpat.a" />
|
||||||
|
<Add library="libunicows.a" />
|
||||||
|
<Add library="libkernel32.a" />
|
||||||
|
<Add library="libuser32.a" />
|
||||||
|
<Add library="libgdi32.a" />
|
||||||
|
<Add library="libwinspool.a" />
|
||||||
|
<Add library="libcomdlg32.a" />
|
||||||
|
<Add library="libadvapi32.a" />
|
||||||
|
<Add library="libshell32.a" />
|
||||||
|
<Add library="libole32.a" />
|
||||||
|
<Add library="liboleaut32.a" />
|
||||||
|
<Add library="libuuid.a" />
|
||||||
|
<Add library="libcomctl32.a" />
|
||||||
|
<Add library="libwsock32.a" />
|
||||||
|
<Add directory="$(#wx30)/lib/gcc_lib" />
|
||||||
|
</Linker>
|
||||||
|
<ExtraCommands>
|
||||||
|
<Add after='$(CMD_CP) "$(CODEBLOCKS)\redist\unicows\unicows.dll" "$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)\unicows.dll"' />
|
||||||
|
<Add after='$(CMD_CP) "$(PROJECT_DIR)\video.avi" "$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)\video.avi"' />
|
||||||
|
<Add after='$(CMD_CP) "$(PROJECT_DIR)\video.mpg" "$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)\video.mpg"' />
|
||||||
|
</ExtraCommands>
|
||||||
|
</Target>
|
||||||
|
</Build>
|
||||||
|
<Unit filename="resource.rc">
|
||||||
|
<Option compilerVar="WINDRES" />
|
||||||
|
</Unit>
|
||||||
|
<Unit filename="vidplayApp.cpp" />
|
||||||
|
<Unit filename="vidplayApp.h" />
|
||||||
|
<Unit filename="vidplayMain.cpp" />
|
||||||
|
<Unit filename="vidplayMain.h" />
|
||||||
|
<Unit filename="wxsmith/vidplayframe.wxs" />
|
||||||
|
<Extensions>
|
||||||
|
<debugger>
|
||||||
|
<remote_debugging>
|
||||||
|
<options conn_type="2" additional_cmds="q" />
|
||||||
|
</remote_debugging>
|
||||||
|
<remote_debugging target="W95wx3U">
|
||||||
|
<options conn_type="2" additional_cmds="q" additional_shell_cmds_before='$(APPPATH)\dosboxw95\w95launcher.bat "$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).exe"' />
|
||||||
|
</remote_debugging>
|
||||||
|
<remote_debugging target="Win32s">
|
||||||
|
<options conn_type="2" additional_cmds="q" additional_shell_cmds_before='$(APPPATH)\dosboxw31\w31launcher.bat "$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).exe"' />
|
||||||
|
</remote_debugging>
|
||||||
|
</debugger>
|
||||||
|
<lib_finder disable_auto="1" />
|
||||||
|
<wxsmith version="1">
|
||||||
|
<gui name="wxWidgets" src="vidplayApp.cpp" main="vidplayFrame" init_handlers="necessary" language="CPP" />
|
||||||
|
<resources>
|
||||||
|
<wxFrame wxs="wxsmith/vidplayframe.wxs" src="vidplayMain.cpp" hdr="vidplayMain.h" fwddecl="0" i18n="1" name="vidplayFrame" language="CPP" />
|
||||||
|
</resources>
|
||||||
|
</wxsmith>
|
||||||
|
</Extensions>
|
||||||
|
</Project>
|
||||||
|
</CodeBlocks_project_file>
|
3125
Samples/vidplay/vidplay.depend
Normal file
3125
Samples/vidplay/vidplay.depend
Normal file
File diff suppressed because it is too large
Load diff
15
Samples/vidplay/vidplay.layout
Normal file
15
Samples/vidplay/vidplay.layout
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocks_layout_file>
|
||||||
|
<FileVersion major="1" minor="0" />
|
||||||
|
<ActiveTarget name="Win32s" />
|
||||||
|
<File name="vidplayMain.cpp" open="1" top="1" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="10106" topLine="278" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
<File name="vidplayMain.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
|
||||||
|
<Cursor>
|
||||||
|
<Cursor1 position="1540" topLine="41" />
|
||||||
|
</Cursor>
|
||||||
|
</File>
|
||||||
|
</CodeBlocks_layout_file>
|
33
Samples/vidplay/vidplayApp.cpp
Normal file
33
Samples/vidplay/vidplayApp.cpp
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
/***************************************************************
|
||||||
|
* Name: vidplayApp.cpp
|
||||||
|
* Purpose: Code for Application Class
|
||||||
|
* Author: ()
|
||||||
|
* Created: 2023-11-12
|
||||||
|
* Copyright: ()
|
||||||
|
* License:
|
||||||
|
**************************************************************/
|
||||||
|
|
||||||
|
#include "vidplayApp.h"
|
||||||
|
|
||||||
|
//(*AppHeaders
|
||||||
|
#include "vidplayMain.h"
|
||||||
|
#include <wx/image.h>
|
||||||
|
//*)
|
||||||
|
|
||||||
|
IMPLEMENT_APP(vidplayApp);
|
||||||
|
|
||||||
|
bool vidplayApp::OnInit()
|
||||||
|
{
|
||||||
|
//(*AppInitialize
|
||||||
|
bool wxsOK = true;
|
||||||
|
wxInitAllImageHandlers();
|
||||||
|
if ( wxsOK )
|
||||||
|
{
|
||||||
|
vidplayFrame* Frame = new vidplayFrame(0);
|
||||||
|
Frame->Show();
|
||||||
|
SetTopWindow(Frame);
|
||||||
|
}
|
||||||
|
//*)
|
||||||
|
return wxsOK;
|
||||||
|
|
||||||
|
}
|
21
Samples/vidplay/vidplayApp.h
Normal file
21
Samples/vidplay/vidplayApp.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/***************************************************************
|
||||||
|
* Name: vidplayApp.h
|
||||||
|
* Purpose: Defines Application Class
|
||||||
|
* Author: ()
|
||||||
|
* Created: 2023-11-12
|
||||||
|
* Copyright: ()
|
||||||
|
* License:
|
||||||
|
**************************************************************/
|
||||||
|
|
||||||
|
#ifndef VIDPLAYAPP_H
|
||||||
|
#define VIDPLAYAPP_H
|
||||||
|
|
||||||
|
#include <wx/app.h>
|
||||||
|
|
||||||
|
class vidplayApp : public wxApp
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool OnInit();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // VIDPLAYAPP_H
|
361
Samples/vidplay/vidplayMain.cpp
Normal file
361
Samples/vidplay/vidplayMain.cpp
Normal file
|
@ -0,0 +1,361 @@
|
||||||
|
/***************************************************************
|
||||||
|
* Name: vidplayMain.cpp
|
||||||
|
* Purpose: Code for Application Frame
|
||||||
|
* Author: ()
|
||||||
|
* Created: 2023-11-12
|
||||||
|
* Copyright: ()
|
||||||
|
* License:
|
||||||
|
******************************************Œ********************/
|
||||||
|
|
||||||
|
#include "vidplayMain.h"
|
||||||
|
#include <wx/msgdlg.h>
|
||||||
|
//#include <commdlg.h>
|
||||||
|
|
||||||
|
//(*InternalHeaders(vidplayFrame)
|
||||||
|
#include <wx/intl.h>
|
||||||
|
#include <wx/settings.h>
|
||||||
|
#include <wx/string.h>
|
||||||
|
//*)
|
||||||
|
|
||||||
|
#include <wx/version.h>
|
||||||
|
#include <wx/filedlg.h>
|
||||||
|
|
||||||
|
// Load additional backend for newer wx versions
|
||||||
|
#if wxCHECK_VERSION(3, 0, 0)
|
||||||
|
#if defined(__WXMSW__) && !defined(WXUSINGDLL)
|
||||||
|
#include "wx/link.h"
|
||||||
|
wxFORCE_LINK_MODULE(wxmediabackend_am)
|
||||||
|
#endif // static wxMSW build
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//helper functions
|
||||||
|
enum wxbuildinfoformat {
|
||||||
|
short_f, long_f };
|
||||||
|
|
||||||
|
wxString wxbuildinfo(wxbuildinfoformat format)
|
||||||
|
{
|
||||||
|
wxString wxbuild(wxVERSION_STRING);
|
||||||
|
|
||||||
|
if (format == long_f )
|
||||||
|
{
|
||||||
|
#if defined(__WXMSW__)
|
||||||
|
wxbuild << _T("-Windows");
|
||||||
|
#elif defined(__UNIX__)
|
||||||
|
wxbuild << _T("-Linux");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
wxbuild << _T("-Unicode build");
|
||||||
|
#else
|
||||||
|
wxbuild << _T("-ANSI build");
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxbuild;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const long vidplayFrame::ID_MEDIACTRL1 = wxNewId();
|
||||||
|
|
||||||
|
//(*IdInit(vidplayFrame)
|
||||||
|
const long vidplayFrame::ID_PANEL2 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_BUTTON1 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_STATICTEXT1 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_TEXTCTRL1 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_BUTTON3 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_BUTTON2 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_PANEL1 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_SLIDER1 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_PANEL3 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_PANEL4 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_TIMER1 = wxNewId();
|
||||||
|
const long vidplayFrame::ID_TIMER2 = wxNewId();
|
||||||
|
//*)
|
||||||
|
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(vidplayFrame,wxFrame)
|
||||||
|
//(*EventTable(vidplayFrame)
|
||||||
|
//*)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
wxString wxItoa(int number)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
vidplayFrame::vidplayFrame(wxWindow* parent,wxWindowID id)
|
||||||
|
{
|
||||||
|
//(*Initialize(vidplayFrame)
|
||||||
|
wxBoxSizer* BoxSizer1;
|
||||||
|
wxBoxSizer* BoxSizer3;
|
||||||
|
wxBoxSizer* BoxSizer4;
|
||||||
|
wxBoxSizer* BoxSizer5;
|
||||||
|
wxBoxSizer* BoxSizer6;
|
||||||
|
wxBoxSizer* BoxSizer7;
|
||||||
|
wxBoxSizer* BoxSizer8;
|
||||||
|
|
||||||
|
Create(parent, wxID_ANY, _("Video player"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE, _T("wxID_ANY"));
|
||||||
|
SetMinSize(wxSize(-1,250));
|
||||||
|
SetBackgroundColour(wxColour(0,0,0));
|
||||||
|
// This code will set a smaller font if Win 3.11 is detected:
|
||||||
|
int majorVer; int minorVer;
|
||||||
|
wxGetOsVersion(&majorVer, &minorVer);
|
||||||
|
if (minorVer == 30 || majorVer == 30 || majorVer == 3)
|
||||||
|
{
|
||||||
|
wxFont thisFont(8,wxFONTFAMILY_DEFAULT,wxFONTSTYLE_NORMAL,wxFONTWEIGHT_NORMAL,false,wxEmptyString,wxFONTENCODING_DEFAULT);
|
||||||
|
SetFont(thisFont);
|
||||||
|
}
|
||||||
|
BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
BoxSizer3 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
BoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
BoxSizer5 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
BoxSizer4->Add(BoxSizer5, 1, wxALL|wxEXPAND, 0);
|
||||||
|
Placeholder = new wxPanel(this, ID_PANEL2, wxDefaultPosition, wxSize(10,156), wxTAB_TRAVERSAL, _T("ID_PANEL2"));
|
||||||
|
Placeholder->SetMaxSize(wxSize(-1,-1));
|
||||||
|
Placeholder->Hide();
|
||||||
|
Placeholder->SetBackgroundColour(wxColour(0,0,0));
|
||||||
|
BoxSizer4->Add(Placeholder, 0, wxALL, 0);
|
||||||
|
BoxSizer3->Add(BoxSizer4, 1, wxALL|wxEXPAND, 1);
|
||||||
|
BoxSizer6 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
Panel1 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxSize(406,77), wxTAB_TRAVERSAL, _T("ID_PANEL1"));
|
||||||
|
Panel1->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
|
||||||
|
Button1 = new wxButton(Panel1, ID_BUTTON1, _("Play"), wxPoint(8,8), wxSize(72,32), 0, wxDefaultValidator, _T("ID_BUTTON1"));
|
||||||
|
StaticText1 = new wxStaticText(Panel1, ID_STATICTEXT1, _("Time"), wxPoint(8,48), wxSize(184,24), wxST_NO_AUTORESIZE, _T("ID_STATICTEXT1"));
|
||||||
|
TextCtrl1 = new wxTextCtrl(Panel1, ID_TEXTCTRL1, _("video.avi"), wxPoint(224,8), wxSize(173,32), wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_TEXTCTRL1"));
|
||||||
|
Button3 = new wxButton(Panel1, ID_BUTTON3, _("Load"), wxPoint(160,8), wxSize(56,32), 0, wxDefaultValidator, _T("ID_BUTTON3"));
|
||||||
|
Button2 = new wxButton(Panel1, ID_BUTTON2, _("Pause"), wxPoint(88,8), wxSize(64,32), 0, wxDefaultValidator, _T("ID_BUTTON2"));
|
||||||
|
BoxSizer6->Add(Panel1, 0, wxEXPAND|wxFIXED_MINSIZE, 0);
|
||||||
|
BoxSizer3->Add(BoxSizer6, 0, wxALL|wxEXPAND, 0);
|
||||||
|
Panel2 = new wxPanel(this, ID_PANEL3, wxDefaultPosition, wxSize(362,24), wxTAB_TRAVERSAL, _T("ID_PANEL3"));
|
||||||
|
Panel2->SetMinSize(wxDLG_UNIT(this,wxSize(-1,16)));
|
||||||
|
Panel2->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW));
|
||||||
|
BoxSizer7 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
Slider1 = new wxSlider(Panel2, ID_SLIDER1, 0, 0, 200, wxDefaultPosition, wxDLG_UNIT(Panel2,wxSize(-1,10)), wxSL_BOTH|wxBORDER_SIMPLE, wxDefaultValidator, _T("ID_SLIDER1"));
|
||||||
|
BoxSizer7->Add(Slider1, 1, wxEXPAND, 0);
|
||||||
|
Panel2->SetSizer(BoxSizer7);
|
||||||
|
BoxSizer3->Add(Panel2, 0, wxALL|wxEXPAND, 0);
|
||||||
|
BoxSizer8 = new wxBoxSizer(wxVERTICAL);
|
||||||
|
Panel3 = new wxPanel(this, ID_PANEL4, wxDefaultPosition, wxSize(362,16), wxTAB_TRAVERSAL, _T("ID_PANEL4"));
|
||||||
|
Panel3->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
|
||||||
|
BoxSizer8->Add(Panel3, 0, wxALL|wxEXPAND, 0);
|
||||||
|
BoxSizer3->Add(BoxSizer8, 0, wxALL|wxEXPAND, 0);
|
||||||
|
BoxSizer1->Add(BoxSizer3, 2, wxALL|wxEXPAND, 0);
|
||||||
|
SetSizer(BoxSizer1);
|
||||||
|
Timer1.SetOwner(this, ID_TIMER1);
|
||||||
|
Timer1.Start(66, false);
|
||||||
|
Timer2.SetOwner(this, ID_TIMER2);
|
||||||
|
Fit();
|
||||||
|
|
||||||
|
Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&vidplayFrame::OnButton1Click);
|
||||||
|
Connect(ID_BUTTON3,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&vidplayFrame::OnButton3Click);
|
||||||
|
Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&vidplayFrame::OnButton2Click);
|
||||||
|
Connect(ID_SLIDER1,wxEVT_COMMAND_SLIDER_UPDATED,(wxObjectEventFunction)&vidplayFrame::OnSlider1CmdSliderUpdated);
|
||||||
|
Connect(ID_TIMER1,wxEVT_TIMER,(wxObjectEventFunction)&vidplayFrame::OnTimer1Trigger);
|
||||||
|
Connect(ID_TIMER2,wxEVT_TIMER,(wxObjectEventFunction)&vidplayFrame::OnTimer2Trigger);
|
||||||
|
Connect(wxEVT_SIZE,(wxObjectEventFunction)&vidplayFrame::OnResize);
|
||||||
|
//*)
|
||||||
|
|
||||||
|
|
||||||
|
// Create a media player control and load media backend.
|
||||||
|
// Note: it uses wxMEDIABACKEND_MCI, which is considered to be obsolete,
|
||||||
|
// but that's the only thing that also works under Win 3.11
|
||||||
|
|
||||||
|
// wxMEDIABACKEND_MCI currently will work only with wx 2.8
|
||||||
|
|
||||||
|
m_mediactrl = new wxMediaCtrl();
|
||||||
|
|
||||||
|
wxString mediaBackend = wxMEDIABACKEND_MCI;
|
||||||
|
|
||||||
|
// Use direct show backend on newer wx versions, because MCI wouldn't work
|
||||||
|
#if wxCHECK_VERSION(3, 0, 0)
|
||||||
|
mediaBackend = wxMEDIABACKEND_DIRECTSHOW;
|
||||||
|
#endif // wxCHECK_VERSION
|
||||||
|
|
||||||
|
bool bOK = m_mediactrl->Create(this, ID_MEDIACTRL1, wxEmptyString, wxDefaultPosition, wxSize(320,240), NULL, mediaBackend );
|
||||||
|
|
||||||
|
Connect(ID_MEDIACTRL1, wxEVT_MEDIA_LOADED, wxMediaEventHandler(vidplayFrame::OnMediaLoaded));
|
||||||
|
|
||||||
|
VideoSizer = BoxSizer5;
|
||||||
|
|
||||||
|
VideoSizer->Add(m_mediactrl, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND|wxSHAPED, 0);
|
||||||
|
|
||||||
|
if (m_mediactrl) m_mediactrl->Load(TextCtrl1->GetValue());
|
||||||
|
|
||||||
|
if (!bOK) wxMessageBox("Could not load media backend");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
vidplayFrame::~vidplayFrame()
|
||||||
|
{
|
||||||
|
//(*Destroy(vidplayFrame)
|
||||||
|
//*)
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnMediaLoaded(wxMediaEvent& WXUNUSED(evt))
|
||||||
|
{
|
||||||
|
// This will determine the proper size
|
||||||
|
wxSize vidsize = m_mediactrl->GetBestSize();
|
||||||
|
wxString sizeStr;
|
||||||
|
|
||||||
|
sizeStr << vidsize.GetWidth();
|
||||||
|
|
||||||
|
VideoSizer->GetItem(m_mediactrl)->SetRatio(vidsize.GetWidth(), vidsize.GetHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void vidplayFrame::OnQuit(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnAbout(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
wxString msg = wxbuildinfo(long_f);
|
||||||
|
wxMessageBox(msg, _("Welcome to..."));
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnButton1Click(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
m_mediactrl->Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnSlider1CmdSliderUpdated(wxScrollEvent& event)
|
||||||
|
{
|
||||||
|
if (m_mediactrl)
|
||||||
|
{
|
||||||
|
long newOffset = 0;
|
||||||
|
long maxVal = Slider1->GetMax();
|
||||||
|
long mediaLength = m_mediactrl->Length();
|
||||||
|
long sliderVal = Slider1->GetValue();
|
||||||
|
if (sliderVal > 0)
|
||||||
|
{
|
||||||
|
newOffset = (mediaLength) * (float(sliderVal)/maxVal);
|
||||||
|
}
|
||||||
|
else newOffset = 0;
|
||||||
|
|
||||||
|
m_mediactrl->Seek(newOffset);
|
||||||
|
|
||||||
|
wxString progressStr;
|
||||||
|
progressStr << newOffset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnButton2Click(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
if (m_mediactrl) m_mediactrl->Pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnTimer1Trigger(wxTimerEvent& event)
|
||||||
|
{
|
||||||
|
if (m_mediactrl)
|
||||||
|
{
|
||||||
|
long maxVal = Slider1->GetMax();
|
||||||
|
long mediaPos = m_mediactrl->Tell();
|
||||||
|
long mediaLength = m_mediactrl->Length();
|
||||||
|
|
||||||
|
if (mediaLength > 0 && (m_mediactrl->GetState() == wxMEDIASTATE_PLAYING) )
|
||||||
|
{
|
||||||
|
int newSliderVal = (float(mediaPos)/mediaLength)*maxVal;
|
||||||
|
Slider1->SetValue(newSliderVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
int minutes = (mediaPos/1000)/60;
|
||||||
|
int hours = minutes/60;
|
||||||
|
int seconds = (mediaPos/1000);
|
||||||
|
int milliseconds = mediaPos - (seconds*1000);
|
||||||
|
|
||||||
|
wxString durationString = wxString::Format(("%02d:%02d:%02d,%02d"),hours,minutes,seconds,milliseconds);
|
||||||
|
|
||||||
|
StaticText1->SetLabel(durationString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnResize(wxSizeEvent& event)
|
||||||
|
{
|
||||||
|
// This will check one time after 100 milliseconds if the player window is correct size
|
||||||
|
// May look like a hack, but works rather well
|
||||||
|
Timer2.Start(100, true);
|
||||||
|
|
||||||
|
// Skip means process the rest of events normally
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnTimer2Trigger(wxTimerEvent& event)
|
||||||
|
{
|
||||||
|
if (m_mediactrl)
|
||||||
|
{
|
||||||
|
VideoSizer->Fit(m_mediactrl);
|
||||||
|
Layout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void vidplayFrame::OnButton3Click(wxCommandEvent& event)
|
||||||
|
{
|
||||||
|
|
||||||
|
// This button is used to open a file browser
|
||||||
|
// and load a media file. This is one of the trickier
|
||||||
|
// examples when we want to have Win 3.11 compatibility.
|
||||||
|
|
||||||
|
// This code will check if Win 3.11 is running:
|
||||||
|
int majorVer; int minorVer;
|
||||||
|
wxGetOsVersion(&majorVer, &minorVer);
|
||||||
|
if (minorVer == 30 || majorVer == 30 || majorVer == 3)
|
||||||
|
{
|
||||||
|
// Would not compile in unicode
|
||||||
|
#ifndef wxUSE_UNICODE
|
||||||
|
// The following code is only for Win 3.11,
|
||||||
|
// it invokes legacy file browser
|
||||||
|
typedef BOOL WINAPI (*GetOpenFileName_f)( LPOPENFILENAME ofn );
|
||||||
|
GetOpenFileName_f func_GetOpenFileName;
|
||||||
|
|
||||||
|
static char achFileName[128];
|
||||||
|
static char szAppFilter[]="Media files\0*.avi;*.mpg;*.mp4;*.ts\0";
|
||||||
|
OPENFILENAME ofn;
|
||||||
|
|
||||||
|
HWND hwnd = (HWND)this->GetHWND();
|
||||||
|
|
||||||
|
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||||
|
ofn.hwndOwner = hwnd;
|
||||||
|
ofn.hInstance = NULL;
|
||||||
|
ofn.lpstrFilter = szAppFilter;
|
||||||
|
ofn.lpstrCustomFilter = NULL;
|
||||||
|
ofn.nMaxCustFilter = 0;
|
||||||
|
ofn.nFilterIndex = 0;
|
||||||
|
ofn.lpstrFile = achFileName;
|
||||||
|
ofn.nMaxFile = sizeof(achFileName);
|
||||||
|
ofn.lpstrFileTitle = NULL;
|
||||||
|
ofn.nMaxFileTitle = 0;
|
||||||
|
ofn.lpstrInitialDir = NULL;
|
||||||
|
ofn.lpstrTitle = NULL;
|
||||||
|
ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
|
||||||
|
ofn.nFileOffset = 0;
|
||||||
|
ofn.nFileExtension = 0;
|
||||||
|
ofn.lpstrDefExt = NULL;
|
||||||
|
ofn.lCustData = 0;
|
||||||
|
ofn.lpfnHook = NULL;
|
||||||
|
ofn.lpTemplateName = NULL;
|
||||||
|
|
||||||
|
if(GetOpenFileNameA(&ofn))
|
||||||
|
{
|
||||||
|
TextCtrl1->SetValue( ofn.lpstrFile );
|
||||||
|
}
|
||||||
|
if (m_mediactrl) m_mediactrl->Load(TextCtrl1->GetValue());
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
}
|
||||||
|
|
||||||
|
else // if Win 3.11 is NOT detected, then it is really easy:
|
||||||
|
{
|
||||||
|
// This will work if we are using Win 95 or anything newer
|
||||||
|
wxFileDialog* FileDialog1 = new wxFileDialog(this, _("Select file"),
|
||||||
|
wxEmptyString, wxEmptyString, wxFileSelectorDefaultWildcardStr,
|
||||||
|
wxFD_DEFAULT_STYLE, wxDefaultPosition, wxDefaultSize, _T("wxFileDialog"));
|
||||||
|
|
||||||
|
bool dialog = FileDialog1->ShowModal();
|
||||||
|
if (dialog) TextCtrl1->SetValue(FileDialog1->GetFilename());
|
||||||
|
if (m_mediactrl) m_mediactrl->Load(TextCtrl1->GetValue());
|
||||||
|
|
||||||
|
FileDialog1->Destroy();
|
||||||
|
}
|
||||||
|
}
|
88
Samples/vidplay/vidplayMain.h
Normal file
88
Samples/vidplay/vidplayMain.h
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
/***************************************************************
|
||||||
|
* Name: vidplayMain.h
|
||||||
|
* Purpose: Defines Application Frame
|
||||||
|
* Author: ()
|
||||||
|
* Created: 2023-11-12
|
||||||
|
* Copyright: ()
|
||||||
|
* License:
|
||||||
|
**************************************************************/
|
||||||
|
|
||||||
|
#ifndef VIDPLAYMAIN_H
|
||||||
|
#define VIDPLAYMAIN_H
|
||||||
|
|
||||||
|
//(*Headers(vidplayFrame)
|
||||||
|
#include <wx/button.h>
|
||||||
|
#include <wx/frame.h>
|
||||||
|
#include <wx/panel.h>
|
||||||
|
#include <wx/sizer.h>
|
||||||
|
#include <wx/slider.h>
|
||||||
|
#include <wx/stattext.h>
|
||||||
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/timer.h>
|
||||||
|
//*)
|
||||||
|
|
||||||
|
#include <wx/mediactrl.h>
|
||||||
|
|
||||||
|
class vidplayFrame: public wxFrame
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
vidplayFrame(wxWindow* parent,wxWindowID id = -1);
|
||||||
|
virtual ~vidplayFrame();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
//(*Handlers(vidplayFrame)
|
||||||
|
void OnQuit(wxCommandEvent& event);
|
||||||
|
void OnAbout(wxCommandEvent& event);
|
||||||
|
void OnButton1Click(wxCommandEvent& event);
|
||||||
|
void OnSlider1CmdSliderUpdated(wxScrollEvent& event);
|
||||||
|
void OnButton2Click(wxCommandEvent& event);
|
||||||
|
void OnTimer1Trigger(wxTimerEvent& event);
|
||||||
|
void OnResize(wxSizeEvent& event);
|
||||||
|
void OnTimer2Trigger(wxTimerEvent& event);
|
||||||
|
void OnButton3Click(wxCommandEvent& event);
|
||||||
|
//*)
|
||||||
|
|
||||||
|
//(*Identifiers(vidplayFrame)
|
||||||
|
static const long ID_PANEL2;
|
||||||
|
static const long ID_BUTTON1;
|
||||||
|
static const long ID_STATICTEXT1;
|
||||||
|
static const long ID_TEXTCTRL1;
|
||||||
|
static const long ID_BUTTON3;
|
||||||
|
static const long ID_BUTTON2;
|
||||||
|
static const long ID_PANEL1;
|
||||||
|
static const long ID_SLIDER1;
|
||||||
|
static const long ID_PANEL3;
|
||||||
|
static const long ID_PANEL4;
|
||||||
|
static const long ID_TIMER1;
|
||||||
|
static const long ID_TIMER2;
|
||||||
|
//*)
|
||||||
|
|
||||||
|
//(*Declarations(vidplayFrame)
|
||||||
|
wxButton* Button1;
|
||||||
|
wxButton* Button2;
|
||||||
|
wxButton* Button3;
|
||||||
|
wxPanel* Panel1;
|
||||||
|
wxPanel* Panel2;
|
||||||
|
wxPanel* Panel3;
|
||||||
|
wxPanel* Placeholder;
|
||||||
|
wxSlider* Slider1;
|
||||||
|
wxStaticText* StaticText1;
|
||||||
|
wxTextCtrl* TextCtrl1;
|
||||||
|
wxTimer Timer1;
|
||||||
|
wxTimer Timer2;
|
||||||
|
//*)
|
||||||
|
|
||||||
|
|
||||||
|
static const long ID_MEDIACTRL1;
|
||||||
|
wxMediaCtrl* m_mediactrl;
|
||||||
|
|
||||||
|
void OnMediaLoaded(wxMediaEvent& event);
|
||||||
|
|
||||||
|
wxSizer * VideoSizer;
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // VIDPLAYMAIN_H
|
129
Samples/vidplay/wxsmith/vidplayframe.wxs
Normal file
129
Samples/vidplay/wxsmith/vidplayframe.wxs
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<wxsmith>
|
||||||
|
<object class="wxFrame" name="vidplayFrame">
|
||||||
|
<title>Video player</title>
|
||||||
|
<bg>#000000</bg>
|
||||||
|
<minsize>-1,250</minsize>
|
||||||
|
<extra_code>// This code will set a smaller font if Win 3.11 is detected:
int majorVer; int minorVer;
wxGetOsVersion(&majorVer, &minorVer);
if (minorVer == 30 || majorVer == 30 || majorVer == 3)
{
 wxFont thisFont(8,wxFONTFAMILY__DEFAULT,wxFONTSTYLE__NORMAL,wxFONTWEIGHT__NORMAL,false,wxEmptyString,wxFONTENCODING__DEFAULT);
 SetFont(thisFont);
}</extra_code>
|
||||||
|
<id_arg>0</id_arg>
|
||||||
|
<style>wxDEFAULT_FRAME_STYLE|wxFULL_REPAINT_ON_RESIZE</style>
|
||||||
|
<handler function="OnResize" entry="EVT_SIZE" />
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer1" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer3" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer4" member="no">
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer5" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL2" variable="Placeholder" member="yes">
|
||||||
|
<size>10,156</size>
|
||||||
|
<hidden>1</hidden>
|
||||||
|
<bg>#000000</bg>
|
||||||
|
<maxsize>-1,-1</maxsize>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL</flag>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<border>1</border>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer6" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL1" variable="Panel1" member="yes">
|
||||||
|
<size>406,77</size>
|
||||||
|
<bg>wxSYS_COLOUR_BTNFACE</bg>
|
||||||
|
<object class="wxButton" name="ID_BUTTON1" variable="Button1" member="yes">
|
||||||
|
<label>Play</label>
|
||||||
|
<pos>8,8</pos>
|
||||||
|
<size>72,32</size>
|
||||||
|
<handler function="OnButton1Click" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<object class="wxStaticText" name="ID_STATICTEXT1" variable="StaticText1" member="yes">
|
||||||
|
<label>Time</label>
|
||||||
|
<pos>8,48</pos>
|
||||||
|
<size>184,24</size>
|
||||||
|
<style>wxST_NO_AUTORESIZE</style>
|
||||||
|
</object>
|
||||||
|
<object class="wxTextCtrl" name="ID_TEXTCTRL1" variable="TextCtrl1" member="yes">
|
||||||
|
<value>video.avi</value>
|
||||||
|
<pos>224,8</pos>
|
||||||
|
<size>173,32</size>
|
||||||
|
<style>wxBORDER_SIMPLE</style>
|
||||||
|
</object>
|
||||||
|
<object class="wxButton" name="ID_BUTTON3" variable="Button3" member="yes">
|
||||||
|
<label>Load</label>
|
||||||
|
<pos>160,8</pos>
|
||||||
|
<size>56,32</size>
|
||||||
|
<handler function="OnButton3Click" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
<object class="wxButton" name="ID_BUTTON2" variable="Button2" member="yes">
|
||||||
|
<label>Pause</label>
|
||||||
|
<pos>88,8</pos>
|
||||||
|
<size>64,32</size>
|
||||||
|
<handler function="OnButton2Click" entry="EVT_BUTTON" />
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxEXPAND|wxFIXED_MINSIZE</flag>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL3" variable="Panel2" member="yes">
|
||||||
|
<size>362,24</size>
|
||||||
|
<bg>wxSYS_COLOUR_BTNSHADOW</bg>
|
||||||
|
<minsize>-1,16d</minsize>
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer7" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxSlider" name="ID_SLIDER1" variable="Slider1" member="yes">
|
||||||
|
<max>200</max>
|
||||||
|
<size>-1,10d</size>
|
||||||
|
<style>wxSL_BOTH|wxBORDER_SIMPLE</style>
|
||||||
|
<handler function="OnSlider1CmdSliderUpdated" entry="EVT_COMMAND_SLIDER_UPDATED" />
|
||||||
|
</object>
|
||||||
|
<flag>wxEXPAND</flag>
|
||||||
|
<option>1</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxBoxSizer" variable="BoxSizer8" member="no">
|
||||||
|
<orient>wxVERTICAL</orient>
|
||||||
|
<object class="sizeritem">
|
||||||
|
<object class="wxPanel" name="ID_PANEL4" variable="Panel3" member="yes">
|
||||||
|
<size>362,16</size>
|
||||||
|
<bg>wxSYS_COLOUR_BTNFACE</bg>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<flag>wxALL|wxEXPAND</flag>
|
||||||
|
<option>2</option>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="wxTimer" name="ID_TIMER1" variable="Timer1" member="yes">
|
||||||
|
<interval>66</interval>
|
||||||
|
<handler function="OnTimer1Trigger" entry="EVT_TIMER" />
|
||||||
|
</object>
|
||||||
|
<object class="wxTimer" name="ID_TIMER2" variable="Timer2" member="yes">
|
||||||
|
<oneshot>1</oneshot>
|
||||||
|
<handler function="OnTimer2Trigger" entry="EVT_TIMER" />
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</wxsmith>
|
206
SetupCodeBlocks_AllInOne.bat
Normal file
206
SetupCodeBlocks_AllInOne.bat
Normal file
|
@ -0,0 +1,206 @@
|
||||||
|
@echo off
|
||||||
|
echo CB4LSD+ : CodeBlocks for Legacy Software Development (+ modern) installer bundle
|
||||||
|
echo This scripts automatically installs CodeBlocks IDE (https://www.codeblocks.org/) and various compilers
|
||||||
|
echo.
|
||||||
|
echo This package allows building software for Windows 3.11 (Win32s), ANSI Windows 9x,
|
||||||
|
echo Windows 9x with Unicode (MSLU/Unicows), modern 64-bit Windows, MS-DOS
|
||||||
|
echo.
|
||||||
|
echo This script will download and prepare for use following software:
|
||||||
|
echo Code::Blocks 64-bit IDE wxWidgets 2.8.12, wxWidgets 3.0.5, wxWidgets 3.2.1
|
||||||
|
echo Compilers: Borland BCC5.5 (free version), TDM-GCC 32bit, MinGW-W64, DJGPP, OpenWatcom
|
||||||
|
echo.
|
||||||
|
echo DOSBox-X will also be installed to allow executing and testing MS-DOS software.
|
||||||
|
echo Windows 3.11 and Windows 95 will also be installed and configured
|
||||||
|
echo to allow automatic execution IF YOU PROVIDE YOUR OWN installation files.
|
||||||
|
echo Only English Windows 95 OSR2 and English WfW 3.11 are supported now.
|
||||||
|
echo.
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
|
||||||
|
|
||||||
|
SET ZPATH=%~dp0\installers\7-zip
|
||||||
|
|
||||||
|
if not exist "%ZPATH%\7zr.exe" (
|
||||||
|
mkdir .\installers\7-zip
|
||||||
|
echo Downloading 7-zip
|
||||||
|
powershell wget https://www.7-zip.org/a/7zr.exe -UseBasicParsing -OutFile "%~dp0\installers\7-zip\7zr.exe"
|
||||||
|
powershell wget https://www.7-zip.org/a/7z2201.exe -UseBasicParsing -OutFile "%~dp0\installers\7-zip\7z2201.exe"
|
||||||
|
"%~dp0\installers\7-zip\7zr.exe" x "%~dp0\installers\7-zip\7z2201.exe" -o"%~dp0\installers\7-zip"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%ZPATH%\7z.exe" (
|
||||||
|
"%~dp0\installers\7-zip\7zr.exe" x "%~dp0\installers\7-zip\7z2201.exe" -o"%~dp0\installers\7-zip"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
xcopy "%~dp0\installers\_install-*.bat" "%~dp0"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
REM CODE::BLOCKS INSTALLATION
|
||||||
|
REM =========================
|
||||||
|
pushd "%~dp0"
|
||||||
|
if not exist "%~dp0\installers\CB_202*.<7z" (
|
||||||
|
mkdir installers
|
||||||
|
echo Downloading Code::Blocks 2022.06.19 Win 64-bit
|
||||||
|
powershell Invoke-WebRequest https://master.dl.sourceforge.net/project/codeblocks/Binaries/Nightlies/2022/CB_20220619_rev12839_win64.7z -UserAgent "Wget" -OutFile '%~dp0\installers\CB_20220619_rev12839_win64.7z'
|
||||||
|
echo Downloading prerequisites
|
||||||
|
powershell Invoke-WebRequest https://kumisystems.dl.sourceforge.net/project/codeblocks/Binaries/Nightlies/Prerequisites/wxmsw31u_gcc_cb_wx315_2D_gcc810-mingw64.7z -UserAgent "Wget" -OutFile '%~dp0\installers\wxmsw31u_gcc_cb_wx315_2D_gcc810-mingw64.7z'
|
||||||
|
powershell Invoke-WebRequest https://altushost-swe.dl.sourceforge.net/project/codeblocks/Binaries/Nightlies/Prerequisites/Mingw64dlls8.1.0.7z -UserAgent "Wget" -OutFile '%~dp0\installers\Mingw64dlls8.1.0.7z'
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist .\CodeBlocks\ (
|
||||||
|
echo.
|
||||||
|
echo Extracting Code::Blocks
|
||||||
|
REM powershell "Expand-Archive '%~dp0\installers\codeblocks-20.03-nosetup.zip' '%~dp0\CodeBlocks'"
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\CB_202*" -o"%~dp0\CodeBlocks"
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\wxmsw3*" -o"%~dp0\CodeBlocks"
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\mingw64dlls*" -o"%~dp0\CodeBlocks"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
REM BCC5.5 INSTALLATION
|
||||||
|
call _install-bcc55.bat
|
||||||
|
|
||||||
|
REM TDM-GCC 4.7.1 32-bit installation
|
||||||
|
call _install-tdmgcc32.bat
|
||||||
|
|
||||||
|
REM MinGW-W64 8.1.0 64-bit installation
|
||||||
|
call _install-mingw64.bat
|
||||||
|
|
||||||
|
REM DJGPP INSTALLATION
|
||||||
|
call _install-djgpp.bat
|
||||||
|
|
||||||
|
REM OPENWATCOM INSTALLATION
|
||||||
|
call _install-openwatcom.bat
|
||||||
|
|
||||||
|
REM WXWIDGETS 2.8.12 BUILD
|
||||||
|
if not exist "%~dp0\installers\wxMSW-2.8.12_prebuild.7z" (
|
||||||
|
call _install-wxmsw28bcc.bat
|
||||||
|
call _install-wxmsw28tdm32.bat
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%~dp0\installers\wxMSW-2.8.12_prebuild.7z" (
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\bcc_lib\wxmsw28.lib" (
|
||||||
|
echo Unpacking pre-built wxWidgets 2.8.12
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\wxMSW-2.8.12_prebuild.7z" -o"%~dp0\CodeBlocks"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
REM ===============================
|
||||||
|
|
||||||
|
REM WXWIDGETS 3.0.5 TDM-GCC32 BUILD
|
||||||
|
if not exist "%~dp0\installers\wxWidgets-3.0.5_prebuild.7z" (
|
||||||
|
call _install-wxmsw305tdm32.bat
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%~dp0\installers\wxWidgets-3.0.5_prebuild.7z" (
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\libwxmsw30u.a" (
|
||||||
|
echo Unpacking pre-built wxWidgets 3.0.5 for TDM-GCC 32bit
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\wxWidgets-3.0.5_prebuild.7z" -o"%~dp0\CodeBlocks"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
REM ===============================
|
||||||
|
|
||||||
|
REM WXWIDGETS 3.2.1 MINGW-W64 BUILD
|
||||||
|
if not exist "%~dp0\installers\wxWidgets-3.2.1_mingw64-810_msw64_prebuild.7z" (
|
||||||
|
call _install-wxmsw321mingw64.bat
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%~dp0\installers\wxWidgets-3.2.1_mingw64-810_msw64_prebuild.7z" (
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxWidgets-3.2.1\lib\gcc_lib\libwxmsw32u.a" (
|
||||||
|
echo Unpacking pre-built wxWidgets 3.2.1 for MinGW-W64 8.1.0
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\wxWidgets-3.2.1_mingw64-810_msw64_prebuild.7z" -o"%~dp0\CodeBlocks"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
REM ===============================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
echo Copying project templates
|
||||||
|
xcopy /E /Y ".\installers\wizard\*.*" "%~dp0\CodeBlocks\share\CodeBlocks\templates\wizard\*.*"
|
||||||
|
|
||||||
|
|
||||||
|
echo Copying DOSBOX
|
||||||
|
xcopy /E /Y ".\installers\dosbox\*.*" "%~dp0\CodeBlocks\dosbox\*.*"
|
||||||
|
|
||||||
|
echo Copying DOSBOX-X
|
||||||
|
xcopy /E /Y ".\installers\dosboxx\*.*" "%~dp0\CodeBlocks\dosboxx\*.*"
|
||||||
|
|
||||||
|
echo Copying DOSBOXW31
|
||||||
|
xcopy /E /Y ".\installers\dosboxw31\*.*" "%~dp0\CodeBlocks\dosboxw31\*.*"
|
||||||
|
|
||||||
|
|
||||||
|
echo Copying DOSBOXW95
|
||||||
|
xcopy /E /Y ".\installers\dosboxw95\*.*" "%~dp0\CodeBlocks\dosboxw95\*.*"
|
||||||
|
|
||||||
|
|
||||||
|
echo Copying utils
|
||||||
|
xcopy /E /Y ".\installers\utils\*.*" "%~dp0\CodeBlocks\utils\*.*"
|
||||||
|
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Generating run script
|
||||||
|
|
||||||
|
|
||||||
|
echo @echo off > runCodeBlocks.bat
|
||||||
|
echo cd /D ""%%~dp0"" >> runCodeBlocks.bat
|
||||||
|
echo cd CodeBlocks >> runCodeBlocks.bat
|
||||||
|
echo cd BCC55 >> runCodeBlocks.bat
|
||||||
|
echo set PATH=%%PATH%%;%%CD%% >> runCodeBlocks.bat
|
||||||
|
echo cd.. >> runCodeBlocks.bat
|
||||||
|
echo cd CodeBlocks >> runCodeBlocks.bat
|
||||||
|
echo START """" ""CbLauncher.exe"" >> runCodeBlocks.bat
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Copying default config file
|
||||||
|
mkdir "%~dp0\CodeBlocks\AppData\codeblocks\"
|
||||||
|
copy "%~dp0\installers\default.conf" "%~dp0\CodeBlocks\AppData\codeblocks\default.conf"
|
||||||
|
echo.
|
||||||
|
echo.
|
||||||
|
echo Updating config file with local paths
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd CodeBlocks
|
||||||
|
cd watcom
|
||||||
|
set WATCOMPATH=%CD%
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd CodeBlocks
|
||||||
|
cd AppData
|
||||||
|
cd codeblocks
|
||||||
|
powershell "((Get-Content -path default.conf -Raw) -replace '\$\(APP-PATH\)\\watcom','%WATCOMPATH%') | Set-Content -Path default.conf"
|
||||||
|
pushd "%~dp0"
|
||||||
|
echo.
|
||||||
|
echo Unpacking samples
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\Samples.zip" -o"%~dp0"
|
||||||
|
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
del /Q _install-*.bat
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Installing DOSBOX and DOSBOX-X w/ Win3.11, Win95
|
||||||
|
|
||||||
|
pushd "%~dp0\CodeBlocks\dosboxx"
|
||||||
|
call dosboxx_install.bat
|
||||||
|
|
||||||
|
pushd "%~dp0\CodeBlocks\dosboxw31"
|
||||||
|
call _WFW311AUTOINSTALLER_.bat
|
||||||
|
|
||||||
|
pushd "%~dp0\CodeBlocks\dosboxw95"
|
||||||
|
call SetupW95DosboxX.bat
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
|
||||||
|
echo All done.
|
||||||
|
echo.
|
||||||
|
echo Run runCodeBlocks.bat file to start the IDE.
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
ren SetupCodeBlocks_AllInOne.bat SetupCodeBlocks_AllInOne.bak
|
||||||
|
|
||||||
|
|
35
installers/DEPENDENCIES.txt
Normal file
35
installers/DEPENDENCIES.txt
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
These files should be included in release version.
|
||||||
|
|
||||||
|
Installation script should be able to download necessary files
|
||||||
|
and build them even if they are not present, but this process takes quite a bit of time
|
||||||
|
and there may be some errors at the current stage.
|
||||||
|
|
||||||
|
* 7-zip
|
||||||
|
|
||||||
|
* CodeBlocks:
|
||||||
|
CB_20220619_rev12839_win64.7z
|
||||||
|
|
||||||
|
* Dosbox-x:
|
||||||
|
dosbox-x-mingw-win64-20220901233004.zip
|
||||||
|
|
||||||
|
* Compilers:
|
||||||
|
djgpp-mingw-gcc930-standalone.zip
|
||||||
|
open-watcom-c-win32-1.9.exe
|
||||||
|
x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
|
||||||
|
tdm-gcc-4.7.1-2.exe
|
||||||
|
|
||||||
|
* Additional files:
|
||||||
|
libunicows-1.1.1-mingw32.zip
|
||||||
|
Mingw64dlls8.1.0.7z
|
||||||
|
wxmsw31u_gcc_cb_wx315_2D_gcc810-mingw64.7z
|
||||||
|
|
||||||
|
* Source code for wxWidgets:
|
||||||
|
wxMSW-2.8.12.zip
|
||||||
|
wxWidgets-3.0.5.zip
|
||||||
|
wxWidgets-3.2.1.7z
|
||||||
|
|
||||||
|
* Pre-built wxWidgets:
|
||||||
|
wxMSW-2.8.12_BCC55_prebuild.7z
|
||||||
|
wxMSW-2.8.12_prebuild.7z
|
||||||
|
wxWidgets-3.0.5_prebuild.7z
|
||||||
|
wxWidgets-3.2.1_mingw64-810_msw64_prebuild.7z
|
27
installers/THIRD_PARTY_FILES.txt
Normal file
27
installers/THIRD_PARTY_FILES.txt
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
* WfW 3.11 and Win 95 files: you need to provide those on your own
|
||||||
|
Installation disks of English Windows for Workgroups 3.11 (images 1-8)
|
||||||
|
Installation CD of English Windows 95 OSR2 (WIN95 subdirectory)
|
||||||
|
|
||||||
|
These files need to be downloaded by the autoinstaller or manually:
|
||||||
|
|
||||||
|
* Borland BCC5.5 compiler (freecommandLinetools.exe)
|
||||||
|
SHA256: 433B44741F07F2AD673EB936511D498C5A6B7F260F98C4D9A6DA70C41A56D855
|
||||||
|
|
||||||
|
* Files required for Win 3.11 installation:
|
||||||
|
|
||||||
|
Win32S PW1118.exe
|
||||||
|
TCP32B tcp32b.exe
|
||||||
|
Video for Windows wv1160.exe
|
||||||
|
Windows Media Player MPSetup.exe
|
||||||
|
WingG 1.0 wing10.exe
|
||||||
|
S3 driver w3117004.zip
|
||||||
|
|
||||||
|
* Files required for Win 95 installation:
|
||||||
|
|
||||||
|
DirectX 7.0A DX7Aeng.exe 564de93dcc50691480332e2ccb5565908760b295faa70f8c68854f69dad87189
|
||||||
|
DCOM95 dcom95.exe 6706f79435d75682b0ce69b144108b3c344cae9f7aee7490de47aa20b4f311d3
|
||||||
|
Year 2000 patch w95y2k.exe d3c063f2b04311ddbffd8461aa47147d6307f26d2163bef2c715cd168657aa3f
|
||||||
|
Windows Media Player 6.4 mpfull.exe a39b2b9735cedd513fcb78f8634695d35073e9d7e865e536a0da6db38c7225e4
|
||||||
|
Winsock 2 Update W95WS2setup.exe 48c82825328ef63bce1d471d505f0e243cae94b5b05c66cf2e51b75c6d4d4922
|
||||||
|
3Dfx Voodoo Graphics driver vg-w9x-q3.exe afde9cfc18080ba4bd94972b783867a9c713e6df3643fef84db5da19414ceea8
|
||||||
|
S3 Graphics driver w9521103.zip fb691c872cd7dcc00d7b9445af6d82777586e356e165d5db56f213fa81e96881
|
55
installers/_install-bcc55.bat
Normal file
55
installers/_install-bcc55.bat
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
@echo off
|
||||||
|
REM BCC5.5 INSTALLATION
|
||||||
|
REM =========================
|
||||||
|
|
||||||
|
set PATH=%PATH%;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
if not exist "%~dp0\CodeBlocks\" mkdir CodeBlocks
|
||||||
|
cd CodeBlocks
|
||||||
|
if not exist "%~dp0\installers\freecommandLinetools.exe" (
|
||||||
|
mkdir installers
|
||||||
|
echo Downloading BCC5.5 compiler from http://altd.embarcadero.com/download/bcppbuilder/freecommandLinetools.exe
|
||||||
|
powershell wget http://altd.embarcadero.com/download/bcppbuilder/freecommandLinetools.exe -UseBasicParsing -OutFile "%~dp0\installers\freecommandLinetools.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
echo Checking SHA256 of freecommandLinetools.exe (433B44741F07F2AD673EB936511D498C5A6B7F260F98C4D9A6DA70C41A56D855 expected)
|
||||||
|
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\freecommandLinetools.exe' -Algorithm SHA256 | %% { if($_.Hash -match '433B44741F07F2AD673EB936511D498C5A6B7F260F98C4D9A6DA70C41A56D855') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad freecommandLinetools.exe checksum
|
||||||
|
echo Trying to download again from another sourcce
|
||||||
|
powershell wget http://web.archive.org/web/20220816023824if_/http://altd.embarcadero.com/download/bcppbuilder/freecommandLinetools.exe -UseBasicParsing -OutFile "%~dp0\installers\freecommandLinetools.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Checking SHA256 of freecommandLinetools.exe (433B44741F07F2AD673EB936511D498C5A6B7F260F98C4D9A6DA70C41A56D855 expected)
|
||||||
|
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\freecommandLinetools.exe' -Algorithm SHA256 | %% { if($_.Hash -match '433B44741F07F2AD673EB936511D498C5A6B7F260F98C4D9A6DA70C41A56D855') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad freecommandLinetools.exe checksum
|
||||||
|
echo Download the file manually and place freecommandLinetools.exe in directory
|
||||||
|
echo then press any key to continue, or close the console window and exit
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\CodeBlocks\BCC55\bin\bcc32.exe" (
|
||||||
|
echo Unpacking BCC55
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\freecommandLinetools.exe" -o"%~dp0\CodeBlocks\BCC55"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Updating BCC55 default path
|
||||||
|
|
||||||
|
cd /D "%~dp0"
|
||||||
|
cd CodeBlocks\share\CodeBlocks\compilers
|
||||||
|
powershell "((Get-Content -path compiler_bcc.xml -Raw) -replace 'C:\\Borland\\BCC55','\$(APPPATH)\\BCC55') | Set-Content -Path compiler_bcc.xml"
|
||||||
|
|
||||||
|
REM add additional path for resource compiler
|
||||||
|
powershell "((Get-Content -path compiler_bcc.xml -Raw) -replace ' <Path type=\""include\"">','<Path type=\""resource\""><Add><master/>\include</Add></Path><Path type=\""include\"">') | Set-Content -Path compiler_bcc.xml"
|
||||||
|
|
||||||
|
pushd %~dp0
|
35
installers/_install-djgpp.bat
Normal file
35
installers/_install-djgpp.bat
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
@echo off
|
||||||
|
REM DJGPP INSTALLATION
|
||||||
|
REM =========================
|
||||||
|
|
||||||
|
set PATH=%PATH%;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
if not exist "%~dp0\installers\djgpp-mingw-gcc930-standalone.zip" (
|
||||||
|
echo Downloading DJGPP
|
||||||
|
powershell wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.0/djgpp-mingw-gcc930-standalone.zip -UseBasicParsing -OutFile '%~dp0\installers\djgpp-mingw-gcc930-standalone.zip'
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist .\CodeBlocks\djgpp (
|
||||||
|
echo.
|
||||||
|
mkdir "%~dp0\CodeBlocks"
|
||||||
|
echo Extracting DJGPP
|
||||||
|
REM powershell "Expand-Archive '%~dp0\installers\djgpp-mingw-gcc930-standalone.zip' '%~dp0\CodeBlocks'"
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\djgpp-mingw-gcc930-standalone.zip" -o"%~dp0\CodeBlocks"
|
||||||
|
)
|
||||||
|
|
||||||
|
REM hardcode some defs to fix not working code completion
|
||||||
|
REM this is probably not a great thing to do, but is important from user experience perspective
|
||||||
|
cd "%~dp0\CodeBlocks\djgpp\lib\gcc\i586-pc-msdosdjgpp\9.3.0\include\c++\"
|
||||||
|
|
||||||
|
|
||||||
|
if exist "cstdio" (
|
||||||
|
echo // Prepended hardcoded __STDC_VERSION__ to fix problems with CodeBlocks parser > cstdio.tmp
|
||||||
|
echo #ifndef __STDC_VERSION__ >> cstdio.tmp
|
||||||
|
echo #define __STDC_VERSION__ 199901L >> cstdio.tmp
|
||||||
|
echo #endif >> cstdio.tmp
|
||||||
|
type cstdio >> cstdio.tmp
|
||||||
|
del cstdio
|
||||||
|
ren cstdio.tmp cstdio
|
||||||
|
)
|
||||||
|
pushd "%~dp0"
|
16
installers/_install-mingw64.bat
Normal file
16
installers/_install-mingw64.bat
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
@echo off
|
||||||
|
REM MinGW-W64 installation
|
||||||
|
REM =================================
|
||||||
|
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
mkdir CodeBlocks
|
||||||
|
if not exist "%~dp0\installers\x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z" (
|
||||||
|
mkdir installers
|
||||||
|
echo Downloading MinGW-W64 8.1.0 compiler
|
||||||
|
|
||||||
|
powershell Invoke-WebRequest 'https://altushost-swe.dl.sourceforge.net/project/mingw-w64/Toolchains targetting Win64/Personal Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z' -UserAgent "Wget" -OutFile "%~dp0\installers\x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Unpacking MinGW-W64 8.1.0
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z" -o"%~dp0\CodeBlocks"
|
15
installers/_install-openwatcom.bat
Normal file
15
installers/_install-openwatcom.bat
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
@echo off
|
||||||
|
REM OPENWATCOM INSTALLATION
|
||||||
|
REM =========================
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
if not exist "%~dp0\installers\open-watcom-c-win32-1.9.exe" (
|
||||||
|
echo Downloading OpenWatcom 1.9
|
||||||
|
powershell wget https://github.com/open-watcom/open-watcom-1.9/releases/download/ow1.9/open-watcom-c-win32-1.9.exe -UseBasicParsing -OutFile '%~dp0\installers\open-watcom-c-win32-1.9.exe'
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist .\CodeBlocks\watcom (
|
||||||
|
echo.
|
||||||
|
echo Extracting OpenWatcom
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\open-watcom-c-win32-1.9.exe" -o"%~dp0\CodeBlocks\watcom"
|
||||||
|
)
|
63
installers/_install-tdmgcc32.bat
Normal file
63
installers/_install-tdmgcc32.bat
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
@echo off
|
||||||
|
REM TDM-GCC 4.7.1 32-bit installation
|
||||||
|
REM =================================
|
||||||
|
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
mkdir CodeBlocks
|
||||||
|
if not exist "%~dp0\installers\tdm-gcc-4.7.1-2.exe" (
|
||||||
|
mkdir installers
|
||||||
|
echo Downloading TDM-GCC 4.7.1 32-bit compiler
|
||||||
|
|
||||||
|
REM powershell "$client = New-Object System.Net.WebClient; $client.DownloadFile('https://downloads.sourceforge.net/project/tdm-gcc/TDM-GCC Installer/Previous/1.1006.0/tdm-gcc-4.7.1-2.exe','%~dp0\installers\tdm-gcc-4.7.1-2.exe')"
|
||||||
|
|
||||||
|
powershell Invoke-WebRequest 'https://master.dl.sourceforge.net/project/tdm-gcc/TDM-GCC Installer/Previous/1.1006.0/tdm-gcc-4.7.1-2.exe?viasf=1' -UserAgent "Wget" -OutFile '%~dp0\installers\tdm-gcc-4.7.1-2.exe'
|
||||||
|
|
||||||
|
REM powershell "wget 'https://master.dl.sourceforge.net/project/tdm-gcc/TDM-GCC Installer/Previous/1.1006.0/tdm-gcc-4.7.1-2.exe?viasf=1' -UseBasicParsing -OutFile "%~dp0\installers\tdm-gcc-4.7.1-2.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Unpacking TDM-GCC installer
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\tdm-gcc-4.7.1-2.exe" -o"%~dp0\installers\tdm-gcc-4.7.1-2"
|
||||||
|
|
||||||
|
cd "%~dp0\installers\tdm-gcc-4.7.1-2\$PLUGINSDIR"
|
||||||
|
|
||||||
|
"%ZPATH%\7z.exe" x "*.lzma" -o".\tdmgcc32"
|
||||||
|
"%ZPATH%\7z.exe" x "*.gz" -o".\tdmgcc32"
|
||||||
|
|
||||||
|
cd tdmgcc32
|
||||||
|
|
||||||
|
"%ZPATH%\7z.exe" x "*.tar" -o"%~dp0\CodeBlocks\tdmgcc32" -aos
|
||||||
|
del /Q *.tar
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
cd installers
|
||||||
|
rmdir /S /Q "tdm-gcc-4.7.1-2"
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\libunicows-1.1.1-mingw32.zip" (
|
||||||
|
echo Downloading libunicows-1.1.1-mingw32.zip
|
||||||
|
powershell wget https://master.dl.sourceforge.net/project/libunicows/libunicows/1.1.1/libunicows-1.1.1-mingw32.zip?viasf=1 -UseBasicParsing -OutFile '%~dp0\installers\libunicows-1.1.1-mingw32.zip'
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\libunicows-1.1.1-mingw32\libunicows.a" (
|
||||||
|
echo Extracting libunicows-1.1.1-mingw32
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\libunicows-1.1.1-mingw32.zip" -o"%~dp0\installers"
|
||||||
|
)
|
||||||
|
|
||||||
|
copy "%~dp0\installers\libunicows-1.1.1-mingw32\libunicows.a" "%~dp0\CodeBlocks\tdmgcc32\lib\libunicows.a"
|
||||||
|
copy "%~dp0\installers\libunicows-1.1.1-mingw32\liblibunicows.a" "%~dp0\CodeBlocks\tdmgcc32\lib\liblibunicows.a"
|
||||||
|
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
if not exist "%~dp0\installers\unicows.exe" (
|
||||||
|
echo Downloading unicows redistributable
|
||||||
|
powershell wget http://web.archive.org/web/20051029063254if_/http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe -UseBasicParsing -OutFile '%~dp0\installers\unicows.exe'
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\CodeBlocks\redist\unicows\unicows.dll" (
|
||||||
|
echo Extracting unicows.dll
|
||||||
|
mkdir "%~dp0\CodeBlocks\redist\unicows"
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\unicows.exe" -o"%~dp0\CodeBlocks\redist\unicows"
|
||||||
|
)
|
81
installers/_install-wxmsw28bcc.bat
Normal file
81
installers/_install-wxmsw28bcc.bat
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
@echo off
|
||||||
|
REM WXWIDGETS 2.8.12 INSTALLATION
|
||||||
|
REM =============================
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\wxMSW-2.8.12.zip" (
|
||||||
|
echo Downloading wxWidgets 2.8.12
|
||||||
|
powershell wget https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxMSW-2.8.12.zip -UseBasicParsing -OutFile '%~dp0\installers\wxMSW-2.8.12.zip'
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxMSW-2.8.12\" (
|
||||||
|
echo.
|
||||||
|
mkdir "%~dp0\CodeBlocks"
|
||||||
|
echo Extracting wxWidgets 2.8.12
|
||||||
|
REM powershell "Expand-Archive '%~dp0\installers\wxMSW-2.8.12.zip' '%~dp0\CodeBlocks'"
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\wxMSW-2.8.12.zip" -o"%~dp0\CodeBlocks"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Applying patches for Win32s/Win3.11 compatibility
|
||||||
|
xcopy /Y /E "%~dp0\installers\patch_wx28_win32s\*.*" "%~dp0\CodeBlocks\wxMSW-2.8.12"
|
||||||
|
|
||||||
|
SET BUILDTYPE=release
|
||||||
|
SET UNICODE=0
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
SET BUILDTYPE=debug
|
||||||
|
SET UNICODE=0
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
:BUILDWX
|
||||||
|
echo.
|
||||||
|
echo Building wxWidgets 2.8.12 with BCC5.5 compiler
|
||||||
|
cd /D %~dp0
|
||||||
|
cd CodeBlocks
|
||||||
|
cd BCC55
|
||||||
|
cd Bin
|
||||||
|
echo Updating environmental variables
|
||||||
|
set PATH=%WINDIR%;%WINDIR%\System32;%CD%
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd CodeBlocks
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo wxWidgets 2.8.12 %BUILDTYPE% UNICODE=%UNICODE% WINVER=0x0400
|
||||||
|
|
||||||
|
echo Cleaning up
|
||||||
|
|
||||||
|
cd .\wxMSW-2.8.12\build\msw
|
||||||
|
make SHELL=CMD.exe -f makefile.bcc -DWINVER=0x0400 SHARED=0 MONOLITHIC=1 UNICODE=%UNICODE% BUILD=%BUILDTYPE% clean
|
||||||
|
|
||||||
|
echo Building
|
||||||
|
make SHELL=CMD.exe -f makefile.bcc -DWINVER=0x0400 SHARED=0 MONOLITHIC=1 UNICODE=%UNICODE% BUILD=%BUILDTYPE%
|
||||||
|
|
||||||
|
echo Building done
|
||||||
|
|
||||||
|
echo Prepending __WXMSW__ to setup.h to fix not working code completion in wx 2.8.12
|
||||||
|
pushd "%~dp0"
|
||||||
|
if "%BUILDTYPE%"=="release" (
|
||||||
|
if "%UNICODE%"=="0" cd CodeBlocks\wxMSW-2.8.12\lib\bcc_lib\msw\wx
|
||||||
|
if "%UNICODE%"=="1" cd CodeBlocks\wxMSW-2.8.12\lib\bcc_lib\mswu\wx
|
||||||
|
)
|
||||||
|
if "%BUILDTYPE%"=="debug" (
|
||||||
|
if "%UNICODE%"=="0" cd CodeBlocks\wxMSW-2.8.12\lib\bcc_lib\mswd\wx
|
||||||
|
if "%UNICODE%"=="1" cd CodeBlocks\wxMSW-2.8.12\lib\bcc_lib\mswud\wx
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "setup.h" (
|
||||||
|
echo // Prepended __WXMSW__ to fix problems with CodeBlocks parser > setup0.tmp
|
||||||
|
echo #ifndef __WXMSW__ >> setup0.tmp
|
||||||
|
echo #define __WXMSW__ >> setup0.tmp
|
||||||
|
echo #endif >> setup0.tmp
|
||||||
|
type setup.h >> setup0.tmp
|
||||||
|
del setup.h
|
||||||
|
ren setup0.tmp setup.h
|
||||||
|
)
|
||||||
|
pushd "%~dp0"
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
:END
|
119
installers/_install-wxmsw28tdm32.bat
Normal file
119
installers/_install-wxmsw28tdm32.bat
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
@echo on
|
||||||
|
REM WXWIDGETS 2.8.12 INSTALLATION
|
||||||
|
REM =============================
|
||||||
|
|
||||||
|
set PATH=%PATH%;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
if not exist "%~dp0\installers\wxMSW-2.8.12.zip" (
|
||||||
|
echo Downloading wxWidgets 2.8.12
|
||||||
|
powershell wget https://github.com/wxWidgets/wxWidgets/releases/download/v2.8.12/wxMSW-2.8.12.zip -UseBasicParsing -OutFile '%~dp0\installers\wxMSW-2.8.12.zip'
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxMSW-2.8.12\" (
|
||||||
|
echo.
|
||||||
|
mkdir "%~dp0\CodeBlocks"
|
||||||
|
echo Extracting wxWidgets 2.8.12
|
||||||
|
REM powershell "Expand-Archive '%~dp0\installers\wxMSW-2.8.12.zip' '%~dp0\CodeBlocks'"
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\wxMSW-2.8.12.zip" -o"%~dp0\CodeBlocks"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
SET BUILDTYPE=release
|
||||||
|
SET UNICODE=1
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswu\wx\setup.h" (
|
||||||
|
mkdir "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswu\wx"
|
||||||
|
copy "%~dp0\CodeBlocks\wxMSW-2.8.12\include\wx\msw\setup.h" "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswu\wx\setup.h"
|
||||||
|
)
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
SET BUILDTYPE=debug
|
||||||
|
SET UNICODE=1
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswud\wx\setup.h" (
|
||||||
|
mkdir "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswud\wx"
|
||||||
|
copy "%~dp0\CodeBlocks\wxMSW-2.8.12\include\wx\msw\setup.h" "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswud\wx\setup.h"
|
||||||
|
)
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
SET BUILDTYPE=release
|
||||||
|
SET UNICODE=0
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\msw\wx\setup.h" (
|
||||||
|
mkdir "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\msw\wx"
|
||||||
|
copy "%~dp0\CodeBlocks\wxMSW-2.8.12\include\wx\msw\setup.h" "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\msw\wx\setup.h"
|
||||||
|
)
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
SET BUILDTYPE=debug
|
||||||
|
SET UNICODE=0
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswd\wx\setup.h" (
|
||||||
|
mkdir "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswd\wx"
|
||||||
|
copy "%~dp0\CodeBlocks\wxMSW-2.8.12\include\wx\msw\setup.h" "%~dp0\CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswd\wx\setup.h"
|
||||||
|
)
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
:BUILDWX
|
||||||
|
echo ========================================
|
||||||
|
echo ==Building %BUILDTYPE% UNICODE=%UNICODE%
|
||||||
|
echo ========================================
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ".\CodeBlocks\tdmgcc32"
|
||||||
|
SET MINGWPATH=%CD%
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
cd ".\CodeBlocks\tdmgcc32\bin"
|
||||||
|
SET PATH=%PATH%;%WINDIR%;%WINDIR%\System32;%CD%
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ".\CodeBlocks\tdmgcc32\libexec\gcc\mingw32\4.7.1"
|
||||||
|
SET PATH=%PATH%;%WINDIR%;%WINDIR%\System32;%CD%
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
echo Cleaning up
|
||||||
|
cd ".\CodeBlocks\wxMSW-2.8.12\build\msw"
|
||||||
|
SET WXBUILDPATH=%CD%
|
||||||
|
|
||||||
|
SET DEBUGFLAG=0
|
||||||
|
if "%BUILDTYPE%"=="debug" SET DEBUGFLAG=1
|
||||||
|
|
||||||
|
@echo on
|
||||||
|
"%MINGWPATH%\bin\mingw32-make.exe" SHELL=CMD.exe -f makefile.gcc SHARED=0 DEBUG_FLAG=%DEBUGFLAG% MONOLITHIC=1 MSLU=%UNICODE% UNICODE=%UNICODE% BUILD=%BUILDTYPE% clean CXXFLAGS="-DWINVER=0x0400"
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
echo Building
|
||||||
|
"%MINGWPATH%\bin\mingw32-make.exe" SHELL=CMD.exe -f makefile.gcc SHARED=0 DEBUG_FLAG=%DEBUGFLAG% MONOLITHIC=1 MSLU=%UNICODE% UNICODE=%UNICODE% BUILD=%BUILDTYPE% CXXFLAGS="-DWINVER=0x0400" -j4
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
echo Building done
|
||||||
|
|
||||||
|
echo Prepending __WXMSW__ to setup.h to fix not working code completion in wxWidgets-2.8.12
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
if "%BUILDTYPE%"=="release" (
|
||||||
|
if "%UNICODE%"=="0" cd CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\msw\wx
|
||||||
|
if "%UNICODE%"=="1" cd CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswu\wx
|
||||||
|
)
|
||||||
|
if "%BUILDTYPE%"=="debug" (
|
||||||
|
if "%UNICODE%"=="0" cd CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswd\wx
|
||||||
|
if "%UNICODE%"=="1" cd CodeBlocks\wxMSW-2.8.12\lib\gcc_lib\mswud\wx
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "setup.h" (
|
||||||
|
echo // Prepended __WXMSW__ to fix problems with CodeBlocks parser > setup0.tmp
|
||||||
|
echo #ifndef __WXMSW__ >> setup0.tmp
|
||||||
|
echo #define __WXMSW__ >> setup0.tmp
|
||||||
|
echo #endif >> setup0.tmp
|
||||||
|
type setup.h >> setup0.tmp
|
||||||
|
del setup.h
|
||||||
|
ren setup0.tmp setup.h
|
||||||
|
)
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
|
:END
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
119
installers/_install-wxmsw305tdm32.bat
Normal file
119
installers/_install-wxmsw305tdm32.bat
Normal file
|
@ -0,0 +1,119 @@
|
||||||
|
@echo off
|
||||||
|
REM WXWIDGETS 3.0.5 INSTALLATION
|
||||||
|
REM =============================
|
||||||
|
|
||||||
|
set PATH=%PATH%;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
if not exist "%~dp0\installers\wxWidgets-3.0.5.zip" (
|
||||||
|
echo Downloading wxWidgets-3.0.5.zip
|
||||||
|
powershell wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.zip -UseBasicParsing -OutFile '%~dp0\installers\wxWidgets-3.0.5.zip'
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxWidgets-3.0.5\" (
|
||||||
|
echo.
|
||||||
|
mkdir "%~dp0\CodeBlocks"
|
||||||
|
echo Extracting wxWidgets-3.0.5
|
||||||
|
REM powershell "Expand-Archive '%~dp0\installers\wxWidgets-3.0.5.zip' '%~dp0\CodeBlocks\wxWidgets-3.0.5'"
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\wxWidgets-3.0.5.zip" -o"%~dp0\CodeBlocks\wxWidgets-3.0.5"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Applying patches for Win9x compatibility
|
||||||
|
xcopy /Y /E "%~dp0\installers\patch_wx305_9x\*.*" "%~dp0\CodeBlocks\wxWidgets-3.0.5"
|
||||||
|
|
||||||
|
|
||||||
|
SET BUILDTYPE=release
|
||||||
|
SET UNICODE=1
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswu\wx\setup.h" (
|
||||||
|
mkdir "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswu\wx"
|
||||||
|
copy "%~dp0\CodeBlocks\wxWidgets-3.0.5\include\wx\msw\setup.h" "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswu\wx\setup.h"
|
||||||
|
)
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
SET BUILDTYPE=debug
|
||||||
|
SET UNICODE=1
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswud\wx\setup.h" (
|
||||||
|
mkdir "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswud\wx"
|
||||||
|
copy "%~dp0\CodeBlocks\wxWidgets-3.0.5\include\wx\msw\setup.h" "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswud\wx\setup.h"
|
||||||
|
)
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
SET BUILDTYPE=release
|
||||||
|
SET UNICODE=0
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\msw\wx\setup.h" (
|
||||||
|
mkdir "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\msw\wx"
|
||||||
|
copy "%~dp0\CodeBlocks\wxWidgets-3.0.5\include\wx\msw\setup.h" "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\msw\wx\setup.h"
|
||||||
|
)
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
SET BUILDTYPE=debug
|
||||||
|
SET UNICODE=0
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswd\wx\setup.h" (
|
||||||
|
mkdir "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswd\wx"
|
||||||
|
copy "%~dp0\CodeBlocks\wxWidgets-3.0.5\include\wx\msw\setup.h" "%~dp0\CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswd\wx\setup.h"
|
||||||
|
)
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
:BUILDWX
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ".\CodeBlocks\tdmgcc32"
|
||||||
|
SET MINGWPATH=%CD%
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
cd ".\CodeBlocks\tdmgcc32\bin"
|
||||||
|
SET PATH=%PATH%;%WINDIR%;%WINDIR%\System32;%CD%
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ".\CodeBlocks\tdmgcc32\libexec\gcc\mingw32\4.7.1"
|
||||||
|
SET PATH=%PATH%;%WINDIR%;%WINDIR%\System32;%CD%
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
echo Cleaning up
|
||||||
|
cd ".\CodeBlocks\wxWidgets-3.0.5\build\msw"
|
||||||
|
SET WXBUILDPATH=%CD%
|
||||||
|
|
||||||
|
SET DEBUGFLAG=0
|
||||||
|
if "%BUILDTYPE%"=="debug" SET DEBUGFLAG=1
|
||||||
|
|
||||||
|
@echo on
|
||||||
|
"%MINGWPATH%\bin\mingw32-make.exe" SHELL=CMD.exe -f makefile.gcc SHARED=0 DEBUG_FLAG=%DEBUGFLAG% MONOLITHIC=1 MSLU=%UNICODE% UNICODE=%UNICODE% BUILD=%BUILDTYPE% clean CXXFLAGS="-DWINVER=0x0400"
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
echo Building
|
||||||
|
"%MINGWPATH%\bin\mingw32-make.exe" SHELL=CMD.exe -f makefile.gcc SHARED=0 DEBUG_FLAG=%DEBUGFLAG% MONOLITHIC=1 MSLU=%UNICODE% UNICODE=%UNICODE% BUILD=%BUILDTYPE% CXXFLAGS="-DWINVER=0x0400" -j4
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
echo Building done
|
||||||
|
|
||||||
|
echo Prepending __WXMSW__ to setup.h to fix not working code completion in wxWidgets-3.0.5
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
if "%BUILDTYPE%"=="release" (
|
||||||
|
if "%UNICODE%"=="0" cd CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\msw\wx
|
||||||
|
if "%UNICODE%"=="1" cd CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswu\wx
|
||||||
|
)
|
||||||
|
if "%BUILDTYPE%"=="debug" (
|
||||||
|
if "%UNICODE%"=="0" cd CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswd\wx
|
||||||
|
if "%UNICODE%"=="1" cd CodeBlocks\wxWidgets-3.0.5\lib\gcc_lib\mswud\wx
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "setup.h" (
|
||||||
|
echo // Prepended __WXMSW__ to fix problems with CodeBlocks parser > setup0.tmp
|
||||||
|
echo #ifndef __WXMSW__ >> setup0.tmp
|
||||||
|
echo #define __WXMSW__ >> setup0.tmp
|
||||||
|
echo #endif >> setup0.tmp
|
||||||
|
type setup.h >> setup0.tmp
|
||||||
|
del setup.h
|
||||||
|
ren setup0.tmp setup.h
|
||||||
|
)
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
|
:END
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
88
installers/_install-wxmsw321mingw64.bat
Normal file
88
installers/_install-wxmsw321mingw64.bat
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
@echo off
|
||||||
|
REM WXWIDGETS 3.2.1 INSTALLATION
|
||||||
|
REM =============================
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
if not exist "%~dp0\installers\wxWidgets-3.2.1.7z" (
|
||||||
|
echo Downloading wxWidgets-3.2.1.7z
|
||||||
|
powershell wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.7z -UseBasicParsing -OutFile '%~dp0\installers\wxWidgets-3.2.1.7z'
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\CodeBlocks\wxWidgets-3.2.1\" (
|
||||||
|
echo.
|
||||||
|
mkdir "%~dp0\CodeBlocks"
|
||||||
|
echo Extracting wxWidgets-3.2.1
|
||||||
|
"%ZPATH%\7z.exe" x "%~dp0\installers\wxWidgets-3.2.1.7z" -o"%~dp0\CodeBlocks\wxWidgets-3.2.1"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
SET BUILDTYPE=release
|
||||||
|
SET UNICODE=1
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
SET BUILDTYPE=debug
|
||||||
|
SET UNICODE=1
|
||||||
|
call :BUILDWX
|
||||||
|
|
||||||
|
GOTO END
|
||||||
|
|
||||||
|
:BUILDWX
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ".\CodeBlocks\mingw64"
|
||||||
|
SET MINGWPATH=%CD%
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
cd ".\CodeBlocks\mingw64\bin"
|
||||||
|
SET PATH = %WINDIR%;%WINDIR%\System32;%CD%
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ".\CodeBlocks\mingw64\libexec\gcc\x86_64-w64-mingw32\8.1.0"
|
||||||
|
SET PATH = %WINDIR%;%WINDIR%\System32;%CD%
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
echo Cleaning up
|
||||||
|
cd ".\CodeBlocks\wxWidgets-3.2.1\build\msw"
|
||||||
|
SET WXBUILDPATH=%CD%
|
||||||
|
|
||||||
|
SET DEBUGFLAG=0
|
||||||
|
if "%BUILDTYPE%"=="debug" SET DEBUGFLAG=1
|
||||||
|
|
||||||
|
@echo on
|
||||||
|
mingw32-make SHELL=CMD.exe -f makefile.gcc SHARED=0 DEBUG_FLAG=%DEBUGFLAG% MONOLITHIC=1 UNICODE=%UNICODE% BUILD=%BUILDTYPE% CXXFLAGS="-march=x86-64" LDFLAGS="-m64" clean
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
echo Building
|
||||||
|
mingw32-make SHELL=CMD.exe -f makefile.gcc SHARED=0 DEBUG_FLAG=%DEBUGFLAG% MONOLITHIC=1 UNICODE=%UNICODE% BUILD=%BUILDTYPE% CXXFLAGS="-march=x86-64" LDFLAGS="-m64"
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
echo Building done
|
||||||
|
|
||||||
|
echo Prepending __WXMSW__ to setup.h because it might make code completion work better
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
if "%BUILDTYPE%"=="release" (
|
||||||
|
if "%UNICODE%"=="0" cd CodeBlocks\wxWidgets-3.2.1\lib\gcc_lib\msw\wx
|
||||||
|
if "%UNICODE%"=="1" cd CodeBlocks\wxWidgets-3.2.1\lib\gcc_lib\mswu\wx
|
||||||
|
)
|
||||||
|
if "%BUILDTYPE%"=="debug" (
|
||||||
|
if "%UNICODE%"=="0" cd CodeBlocks\wxWidgets-3.2.1\lib\gcc_lib\mswd\wx
|
||||||
|
if "%UNICODE%"=="1" cd CodeBlocks\wxWidgets-3.2.1\lib\gcc_lib\mswud\wx
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "setup.h" (
|
||||||
|
echo // Prepended __WXMSW__ to fix problems with CodeBlocks parser > setup0.tmp
|
||||||
|
echo #ifndef __WXMSW__ >> setup0.tmp
|
||||||
|
echo #define __WXMSW__ >> setup0.tmp
|
||||||
|
echo #endif >> setup0.tmp
|
||||||
|
type setup.h >> setup0.tmp
|
||||||
|
del setup.h
|
||||||
|
ren setup0.tmp setup.h
|
||||||
|
)
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
|
:END
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
635
installers/default.conf
Normal file
635
installers/default.conf
Normal file
|
@ -0,0 +1,635 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
|
<CodeBlocksConfig version="1">
|
||||||
|
<!-- application info:
|
||||||
|
svn_revision: 12839
|
||||||
|
build_date: Jun 19 2022, 15:39:28
|
||||||
|
compiler_version: gcc 8.1.0
|
||||||
|
Windows Unicode
|
||||||
|
-->
|
||||||
|
|
||||||
|
<gcv>
|
||||||
|
<sets>
|
||||||
|
<default>
|
||||||
|
<wx>
|
||||||
|
<BASE>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\wxWidgets-3.0.5]]>
|
||||||
|
</str>
|
||||||
|
</BASE>
|
||||||
|
</wx>
|
||||||
|
<wx28>
|
||||||
|
<BASE>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\wxMSW-2.8.12]]>
|
||||||
|
</str>
|
||||||
|
</BASE>
|
||||||
|
</wx28>
|
||||||
|
<wx30>
|
||||||
|
<BASE>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\wxWidgets-3.0.5]]>
|
||||||
|
</str>
|
||||||
|
</BASE>
|
||||||
|
</wx30>
|
||||||
|
<wx32>
|
||||||
|
<BASE>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\wxWidgets-3.2.1]]>
|
||||||
|
</str>
|
||||||
|
</BASE>
|
||||||
|
</wx32>
|
||||||
|
</default>
|
||||||
|
</sets>
|
||||||
|
<ACTIVE>
|
||||||
|
<str>
|
||||||
|
<![CDATA[default]]>
|
||||||
|
</str>
|
||||||
|
</ACTIVE>
|
||||||
|
</gcv>
|
||||||
|
<compiler>
|
||||||
|
<DEFAULT_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[bcc]]>
|
||||||
|
</str>
|
||||||
|
</DEFAULT_COMPILER>
|
||||||
|
<SETTINGS_VERSION>
|
||||||
|
<str>
|
||||||
|
<![CDATA[0.0.3]]>
|
||||||
|
</str>
|
||||||
|
</SETTINGS_VERSION>
|
||||||
|
<PARALLEL_PROCESSES int="1" />
|
||||||
|
<sets>
|
||||||
|
<bcc>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[Borland C++ Compiler (5.5, 5.82)]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$TO_NATIVE_PATH{$(APPPATH)\BCC55\include};]]>
|
||||||
|
</str>
|
||||||
|
</INCLUDE_DIRS>
|
||||||
|
<RES_INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$TO_NATIVE_PATH{$(APPPATH)\BCC55\include};]]>
|
||||||
|
</str>
|
||||||
|
</RES_INCLUDE_DIRS>
|
||||||
|
<LIBRARY_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$TO_NATIVE_PATH{$(APPPATH)\BCC55\lib};$TO_NATIVE_PATH{$(APPPATH)\BCC55\lib\psdk};]]>
|
||||||
|
</str>
|
||||||
|
</LIBRARY_DIRS>
|
||||||
|
<MASTER_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\BCC55]]>
|
||||||
|
</str>
|
||||||
|
</MASTER_PATH>
|
||||||
|
<DEBUGGER_CONFIG>
|
||||||
|
<str>
|
||||||
|
<![CDATA[gdb_debugger:Default]]>
|
||||||
|
</str>
|
||||||
|
</DEBUGGER_CONFIG>
|
||||||
|
</bcc>
|
||||||
|
<ow>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[OpenWatcom (W32) Compiler]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom\h;$(APP-PATH)\watcom\h\nt;]]>
|
||||||
|
</str>
|
||||||
|
</INCLUDE_DIRS>
|
||||||
|
<RES_INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom\h;$(APP-PATH)\watcom\h\nt;]]>
|
||||||
|
</str>
|
||||||
|
</RES_INCLUDE_DIRS>
|
||||||
|
<LIBRARY_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom\lib386;$(APP-PATH)\watcom\lib386\nt;$(APP-PATH)\watcom\lib286;]]>
|
||||||
|
</str>
|
||||||
|
</LIBRARY_DIRS>
|
||||||
|
<MASTER_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom]]>
|
||||||
|
</str>
|
||||||
|
</MASTER_PATH>
|
||||||
|
<EXTRA_PATHS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom\binnt;.\watcom;.\watcom\binnt]]>
|
||||||
|
</str>
|
||||||
|
</EXTRA_PATHS>
|
||||||
|
<C_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[wcc386.exe]]>
|
||||||
|
</str>
|
||||||
|
</C_COMPILER>
|
||||||
|
<CPP_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[wpp386.exe]]>
|
||||||
|
</str>
|
||||||
|
</CPP_COMPILER>
|
||||||
|
<macros>
|
||||||
|
<compile_single_file_to_object_file>
|
||||||
|
<tool0>
|
||||||
|
<COMMAND>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$compiler -q $options $includes -fo=$object $file]]>
|
||||||
|
</str>
|
||||||
|
</COMMAND>
|
||||||
|
<EXTENSIONS>
|
||||||
|
<astr />
|
||||||
|
</EXTENSIONS>
|
||||||
|
<GENERATEDFILES>
|
||||||
|
<astr />
|
||||||
|
</GENERATEDFILES>
|
||||||
|
</tool0>
|
||||||
|
</compile_single_file_to_object_file>
|
||||||
|
</macros>
|
||||||
|
<regex>
|
||||||
|
<re001>
|
||||||
|
<DESCRIPTION>
|
||||||
|
<str>
|
||||||
|
<![CDATA[Note]]>
|
||||||
|
</str>
|
||||||
|
</DESCRIPTION>
|
||||||
|
<TYPE int="1" />
|
||||||
|
<REGEX>
|
||||||
|
<str>
|
||||||
|
<![CDATA[([][{}() #%$~[:alnum:]&_:+/\.-]+)\(([0-9]+)\): Note! (.+)]]>
|
||||||
|
</str>
|
||||||
|
</REGEX>
|
||||||
|
<MSG1 int="3" />
|
||||||
|
<FILENAME int="1" />
|
||||||
|
<LINE int="2" />
|
||||||
|
</re001>
|
||||||
|
<re002>
|
||||||
|
<DESCRIPTION>
|
||||||
|
<str>
|
||||||
|
<![CDATA[Compiler error]]>
|
||||||
|
</str>
|
||||||
|
</DESCRIPTION>
|
||||||
|
<TYPE int="2" />
|
||||||
|
<REGEX>
|
||||||
|
<str>
|
||||||
|
<![CDATA[([][{}() #%$~[:alnum:]&_:+/\.-]+)\(([0-9]+)\): Error! (.+)]]>
|
||||||
|
</str>
|
||||||
|
</REGEX>
|
||||||
|
<MSG1 int="3" />
|
||||||
|
<FILENAME int="1" />
|
||||||
|
<LINE int="2" />
|
||||||
|
</re002>
|
||||||
|
<re003>
|
||||||
|
<DESCRIPTION>
|
||||||
|
<str>
|
||||||
|
<![CDATA[Compiler warning]]>
|
||||||
|
</str>
|
||||||
|
</DESCRIPTION>
|
||||||
|
<TYPE int="1" />
|
||||||
|
<REGEX>
|
||||||
|
<str>
|
||||||
|
<![CDATA[([][{}() #%$~[:alnum:]&_:+/\.-]+)\(([0-9]+)\): Warning! (.+)]]>
|
||||||
|
</str>
|
||||||
|
</REGEX>
|
||||||
|
<MSG1 int="3" />
|
||||||
|
<FILENAME int="1" />
|
||||||
|
<LINE int="2" />
|
||||||
|
</re003>
|
||||||
|
</regex>
|
||||||
|
</ow>
|
||||||
|
</sets>
|
||||||
|
<user_sets>
|
||||||
|
<djgpp>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[DJGPP]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<PARENT>
|
||||||
|
<str>
|
||||||
|
<![CDATA[gcc]]>
|
||||||
|
</str>
|
||||||
|
</PARENT>
|
||||||
|
<INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\djgpp\lib\gcc\i586-pc-msdosdjgpp\9.3.0\include;$(APPPATH)\djgpp\lib\gcc\i586-pc-msdosdjgpp\9.3.0\include\c++;$(APPPATH)\djgpp\lib\gcc\i586-pc-msdosdjgpp\9.3.0\include-fixed;$(APPPATH)\djgpp\i586-pc-msdosdjgpp\sys-include;]]>
|
||||||
|
</str>
|
||||||
|
</INCLUDE_DIRS>
|
||||||
|
<MASTER_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\djgpp]]>
|
||||||
|
</str>
|
||||||
|
</MASTER_PATH>
|
||||||
|
<C_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[i586-pc-msdosdjgpp-gcc.exe]]>
|
||||||
|
</str>
|
||||||
|
</C_COMPILER>
|
||||||
|
<CPP_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[i586-pc-msdosdjgpp-gcc.exe]]>
|
||||||
|
</str>
|
||||||
|
</CPP_COMPILER>
|
||||||
|
<LINKER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[i586-pc-msdosdjgpp-g++.exe]]>
|
||||||
|
</str>
|
||||||
|
</LINKER>
|
||||||
|
<LIB_LINKER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[i586-pc-msdosdjgpp-ar.exe]]>
|
||||||
|
</str>
|
||||||
|
</LIB_LINKER>
|
||||||
|
</djgpp>
|
||||||
|
<openwatcom_dos_compiler>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[OpenWatcom (DOS) Compiler]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<PARENT>
|
||||||
|
<str>
|
||||||
|
<![CDATA[ow]]>
|
||||||
|
</str>
|
||||||
|
</PARENT>
|
||||||
|
<COMPILER_OPTIONS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[-bt=dos;-bcl=dos;]]>
|
||||||
|
</str>
|
||||||
|
</COMPILER_OPTIONS>
|
||||||
|
<LINKER_OPTIONS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[form dos;]]>
|
||||||
|
</str>
|
||||||
|
</LINKER_OPTIONS>
|
||||||
|
<INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom\h;]]>
|
||||||
|
</str>
|
||||||
|
</INCLUDE_DIRS>
|
||||||
|
<RES_INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom\h;]]>
|
||||||
|
</str>
|
||||||
|
</RES_INCLUDE_DIRS>
|
||||||
|
<LIBRARY_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom\lib386;$(APP-PATH)\watcom\lib386\dos;$(APP-PATH)\watcom\lib286;$(APP-PATH)\watcom\lib286\dos;]]>
|
||||||
|
</str>
|
||||||
|
</LIBRARY_DIRS>
|
||||||
|
<MASTER_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom]]>
|
||||||
|
</str>
|
||||||
|
</MASTER_PATH>
|
||||||
|
<EXTRA_PATHS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APP-PATH)\watcom\binnt;$(APP-PATH)\watcom\binw;]]>
|
||||||
|
</str>
|
||||||
|
</EXTRA_PATHS>
|
||||||
|
<C_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[wcl.exe]]>
|
||||||
|
</str>
|
||||||
|
</C_COMPILER>
|
||||||
|
<CPP_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[wcl.exe]]>
|
||||||
|
</str>
|
||||||
|
</CPP_COMPILER>
|
||||||
|
<macros>
|
||||||
|
<compile_single_file_to_object_file>
|
||||||
|
<tool7>
|
||||||
|
<COMMAND>
|
||||||
|
<str>
|
||||||
|
<![CDATA[wasm -0 -ms -fo=$object $file]]>
|
||||||
|
</str>
|
||||||
|
</COMMAND>
|
||||||
|
<EXTENSIONS>
|
||||||
|
<astr>
|
||||||
|
<s>
|
||||||
|
<![CDATA[asm]]>
|
||||||
|
</s>
|
||||||
|
</astr>
|
||||||
|
</EXTENSIONS>
|
||||||
|
<GENERATEDFILES>
|
||||||
|
<astr />
|
||||||
|
</GENERATEDFILES>
|
||||||
|
</tool7>
|
||||||
|
</compile_single_file_to_object_file>
|
||||||
|
<link_object_files_to_executable>
|
||||||
|
<tool0>
|
||||||
|
<COMMAND>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$linker option quiet $link_options $libdirs file $link_objects name $exe_output $libs $link_resobjects]]>
|
||||||
|
</str>
|
||||||
|
</COMMAND>
|
||||||
|
<EXTENSIONS>
|
||||||
|
<astr />
|
||||||
|
</EXTENSIONS>
|
||||||
|
<GENERATEDFILES>
|
||||||
|
<astr />
|
||||||
|
</GENERATEDFILES>
|
||||||
|
</tool0>
|
||||||
|
</link_object_files_to_executable>
|
||||||
|
<link_object_files_to_console_executable>
|
||||||
|
<tool0>
|
||||||
|
<COMMAND>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$linker option quiet $link_options $libdirs file $link_objects name $exe_output $libs $link_resobjects]]>
|
||||||
|
</str>
|
||||||
|
</COMMAND>
|
||||||
|
<EXTENSIONS>
|
||||||
|
<astr />
|
||||||
|
</EXTENSIONS>
|
||||||
|
<GENERATEDFILES>
|
||||||
|
<astr />
|
||||||
|
</GENERATEDFILES>
|
||||||
|
</tool0>
|
||||||
|
</link_object_files_to_console_executable>
|
||||||
|
<link_object_files_to_native_executable>
|
||||||
|
<tool0>
|
||||||
|
<COMMAND>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$linker option quiet $link_options $libdirs file $link_objects name $exe_output $libs $link_resobjects]]>
|
||||||
|
</str>
|
||||||
|
</COMMAND>
|
||||||
|
<EXTENSIONS>
|
||||||
|
<astr />
|
||||||
|
</EXTENSIONS>
|
||||||
|
<GENERATEDFILES>
|
||||||
|
<astr />
|
||||||
|
</GENERATEDFILES>
|
||||||
|
</tool0>
|
||||||
|
</link_object_files_to_native_executable>
|
||||||
|
</macros>
|
||||||
|
<regex>
|
||||||
|
<re001>
|
||||||
|
<DESCRIPTION>
|
||||||
|
<str>
|
||||||
|
<![CDATA[Note]]>
|
||||||
|
</str>
|
||||||
|
</DESCRIPTION>
|
||||||
|
<TYPE int="1" />
|
||||||
|
<REGEX>
|
||||||
|
<str>
|
||||||
|
<![CDATA[([][{}() #%$~[:alnum:]&_:+/\.-]+)\(([0-9]+)\): Note! (.+)]]>
|
||||||
|
</str>
|
||||||
|
</REGEX>
|
||||||
|
<MSG1 int="3" />
|
||||||
|
<FILENAME int="1" />
|
||||||
|
<LINE int="2" />
|
||||||
|
</re001>
|
||||||
|
</regex>
|
||||||
|
</openwatcom_dos_compiler>
|
||||||
|
<tdm_gcc_471_32bit>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[TDM-GCC 4.7.1 32bit]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<PARENT>
|
||||||
|
<str>
|
||||||
|
<![CDATA[gcc]]>
|
||||||
|
</str>
|
||||||
|
</PARENT>
|
||||||
|
<INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\tdmgcc32\include;]]>
|
||||||
|
</str>
|
||||||
|
</INCLUDE_DIRS>
|
||||||
|
<RES_INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\tdmgcc32\include;]]>
|
||||||
|
</str>
|
||||||
|
</RES_INCLUDE_DIRS>
|
||||||
|
<LIBRARY_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\tdmgcc32\lib\gcc\mingw32\4.7.1;$(APPPATH)\tdmgcc32\lib;]]>
|
||||||
|
</str>
|
||||||
|
</LIBRARY_DIRS>
|
||||||
|
<MASTER_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\tdmgcc32]]>
|
||||||
|
</str>
|
||||||
|
</MASTER_PATH>
|
||||||
|
<DEBUGGER_CONFIG>
|
||||||
|
<str>
|
||||||
|
<![CDATA[gdb_debugger:GDB32]]>
|
||||||
|
</str>
|
||||||
|
</DEBUGGER_CONFIG>
|
||||||
|
</tdm_gcc_471_32bit>
|
||||||
|
<mingw_w64_810_64bit>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[MinGW-W64 8.1.0 64bit]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<PARENT>
|
||||||
|
<str>
|
||||||
|
<![CDATA[gcc]]>
|
||||||
|
</str>
|
||||||
|
</PARENT>
|
||||||
|
<COMPILER_OPTIONS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[-m64;]]>
|
||||||
|
</str>
|
||||||
|
</COMPILER_OPTIONS>
|
||||||
|
<RESOURCE_COMPILER_OPTIONS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[--target=pe-x86-64;]]>
|
||||||
|
</str>
|
||||||
|
</RESOURCE_COMPILER_OPTIONS>
|
||||||
|
<LINKER_OPTIONS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[-m64;]]>
|
||||||
|
</str>
|
||||||
|
</LINKER_OPTIONS>
|
||||||
|
<INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\mingw64\include;]]>
|
||||||
|
</str>
|
||||||
|
</INCLUDE_DIRS>
|
||||||
|
<RES_INCLUDE_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\mingw64\include;]]>
|
||||||
|
</str>
|
||||||
|
</RES_INCLUDE_DIRS>
|
||||||
|
<LIBRARY_DIRS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\mingw64\lib\gcc\x86_64-w64-mingw32\8.1.0;$(APPPATH)\mingw64\lib;]]>
|
||||||
|
</str>
|
||||||
|
</LIBRARY_DIRS>
|
||||||
|
<MASTER_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\mingw64]]>
|
||||||
|
</str>
|
||||||
|
</MASTER_PATH>
|
||||||
|
<C_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[gcc.exe]]>
|
||||||
|
</str>
|
||||||
|
</C_COMPILER>
|
||||||
|
<CPP_COMPILER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[g++.exe]]>
|
||||||
|
</str>
|
||||||
|
</CPP_COMPILER>
|
||||||
|
<LINKER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[g++.exe]]>
|
||||||
|
</str>
|
||||||
|
</LINKER>
|
||||||
|
<DEBUGGER_CONFIG>
|
||||||
|
<str>
|
||||||
|
<![CDATA[gdb_debugger:GDB64]]>
|
||||||
|
</str>
|
||||||
|
</DEBUGGER_CONFIG>
|
||||||
|
</mingw_w64_810_64bit>
|
||||||
|
</user_sets>
|
||||||
|
<VERSION>
|
||||||
|
<str>
|
||||||
|
<![CDATA[svn-r12839]]>
|
||||||
|
</str>
|
||||||
|
</VERSION>
|
||||||
|
</compiler>
|
||||||
|
<debugger_common>
|
||||||
|
<common>
|
||||||
|
<disassembly />
|
||||||
|
<examine_memory />
|
||||||
|
<AUTO_BUILD bool="1" />
|
||||||
|
<AUTO_SWITCH_FRAME bool="1" />
|
||||||
|
<DEBUG_LOG bool="1" />
|
||||||
|
<JUMP_ON_DOUBLE_CLICK bool="0" />
|
||||||
|
<REQUIRE_CTRL_FOR_TOOLTIPS bool="0" />
|
||||||
|
<PERSPECTIVE int="2" />
|
||||||
|
</common>
|
||||||
|
<sets>
|
||||||
|
<gdb_debugger>
|
||||||
|
<conf0>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[Default]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<values>
|
||||||
|
<EXECUTABLE_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\tdmgcc32\bin\gdb.exe]]>
|
||||||
|
</str>
|
||||||
|
</EXECUTABLE_PATH>
|
||||||
|
<DISABLE_INIT bool="1" />
|
||||||
|
<USER_ARGUMENTS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</USER_ARGUMENTS>
|
||||||
|
<TYPE int="0" />
|
||||||
|
<INIT_COMMANDS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</INIT_COMMANDS>
|
||||||
|
<WATCH_ARGS bool="1" />
|
||||||
|
<WATCH_LOCALS bool="1" />
|
||||||
|
<CATCH_EXCEPTIONS bool="1" />
|
||||||
|
<EVAL_TOOLTIP bool="0" />
|
||||||
|
<ADD_OTHER_SEARCH_DIRS bool="0" />
|
||||||
|
<DO_NOT_RUN bool="0" />
|
||||||
|
<DISASSEMBLY_FLAVOR int="0" />
|
||||||
|
<INSTRUCTION_SET>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</INSTRUCTION_SET>
|
||||||
|
</values>
|
||||||
|
</conf0>
|
||||||
|
<conf1>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[GDB64]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<values>
|
||||||
|
<EXECUTABLE_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\mingw64\bin\gdb.exe]]>
|
||||||
|
</str>
|
||||||
|
</EXECUTABLE_PATH>
|
||||||
|
<DISABLE_INIT bool="1" />
|
||||||
|
<USER_ARGUMENTS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</USER_ARGUMENTS>
|
||||||
|
<TYPE int="0" />
|
||||||
|
<INIT_COMMANDS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</INIT_COMMANDS>
|
||||||
|
<WATCH_ARGS bool="1" />
|
||||||
|
<WATCH_LOCALS bool="1" />
|
||||||
|
<CATCH_EXCEPTIONS bool="1" />
|
||||||
|
<EVAL_TOOLTIP bool="0" />
|
||||||
|
<ADD_OTHER_SEARCH_DIRS bool="0" />
|
||||||
|
<DO_NOT_RUN bool="0" />
|
||||||
|
<DISASSEMBLY_FLAVOR int="0" />
|
||||||
|
<INSTRUCTION_SET>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</INSTRUCTION_SET>
|
||||||
|
</values>
|
||||||
|
</conf1>
|
||||||
|
<conf2>
|
||||||
|
<NAME>
|
||||||
|
<str>
|
||||||
|
<![CDATA[GDB32]]>
|
||||||
|
</str>
|
||||||
|
</NAME>
|
||||||
|
<values>
|
||||||
|
<EXECUTABLE_PATH>
|
||||||
|
<str>
|
||||||
|
<![CDATA[$(APPPATH)\tdmgcc32\bin\gdb.exe]]>
|
||||||
|
</str>
|
||||||
|
</EXECUTABLE_PATH>
|
||||||
|
<DISABLE_INIT bool="1" />
|
||||||
|
<USER_ARGUMENTS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</USER_ARGUMENTS>
|
||||||
|
<TYPE int="0" />
|
||||||
|
<INIT_COMMANDS>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</INIT_COMMANDS>
|
||||||
|
<WATCH_ARGS bool="1" />
|
||||||
|
<WATCH_LOCALS bool="1" />
|
||||||
|
<CATCH_EXCEPTIONS bool="1" />
|
||||||
|
<EVAL_TOOLTIP bool="0" />
|
||||||
|
<ADD_OTHER_SEARCH_DIRS bool="0" />
|
||||||
|
<DO_NOT_RUN bool="0" />
|
||||||
|
<DISASSEMBLY_FLAVOR int="0" />
|
||||||
|
<INSTRUCTION_SET>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</INSTRUCTION_SET>
|
||||||
|
</values>
|
||||||
|
</conf2>
|
||||||
|
</gdb_debugger>
|
||||||
|
</sets>
|
||||||
|
<ACTIVE_DEBUGGER>
|
||||||
|
<str>
|
||||||
|
<![CDATA[]]>
|
||||||
|
</str>
|
||||||
|
</ACTIVE_DEBUGGER>
|
||||||
|
<ACTIVE_DEBUGGER_CONFIG int="-1" />
|
||||||
|
</debugger_common>
|
||||||
|
</CodeBlocksConfig>
|
7
installers/dosbox/dosbox.conf
Normal file
7
installers/dosbox/dosbox.conf
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[sdl]
|
||||||
|
windowresolution=1080x600
|
||||||
|
output=opengl
|
||||||
|
[cpu]
|
||||||
|
core=dynamic
|
||||||
|
[render]
|
||||||
|
scaler=normal2x forced
|
4
installers/dosboxw31/INSTALLERS/CFG/AUTOEXEC.BAT
Normal file
4
installers/dosboxw31/INSTALLERS/CFG/AUTOEXEC.BAT
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
C:\WINDOWS\SMARTDRV.EXE
|
||||||
|
C:\WINDOWS\net start
|
||||||
|
PATH C:\WINDOWS;
|
||||||
|
SET TEMP=C:\WINDOWS\TEMP
|
7
installers/dosboxw31/INSTALLERS/CFG/CONFIG.SYS
Normal file
7
installers/dosboxw31/INSTALLERS/CFG/CONFIG.SYS
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
FILES=30
|
||||||
|
BUFFERS=30
|
||||||
|
LASTDRIVE=Z
|
||||||
|
DEVICE=C:\WINDOWS\HIMEM.SYS
|
||||||
|
DEVICE=C:\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER
|
||||||
|
DEVICE=C:\WINDOWS\IFSHLP.SYS
|
||||||
|
STACKS=9,256
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WIN32APP.GRP
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WIN32APP.GRP
Normal file
Binary file not shown.
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/ACCESSOR.GRP
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/ACCESSOR.GRP
Normal file
Binary file not shown.
94
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/CONTROL.INI
Normal file
94
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/CONTROL.INI
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
[current]
|
||||||
|
color schemes=Dark Blue
|
||||||
|
|
||||||
|
[color schemes]
|
||||||
|
Arizona=804000,FFFFFF,FFFFFF,0,FFFFFF,0,808040,C0C0C0,FFFFFF,4080FF,C0C0C0,0,C0C0C0,C0C0C0,808080,0,808080,808000,FFFFFF,0,FFFFFF
|
||||||
|
Black Leather Jacket=0,C0C0C0,FFFFFF,0,C0C0C0,0,800040,808080,FFFFFF,808080,808080,0,10E0E0E0,C0C0C0,808080,0,808080,0,FFFFFF,0,FFFFFF
|
||||||
|
Bordeaux=400080,C0C0C0,FFFFFF,0,FFFFFF,0,800080,C0C0C0,FFFFFF,FF0080,C0C0C0,0,C0C0C0,C0C0C0,808080,0,808080,800080,FFFFFF,0,FFFFFF
|
||||||
|
Cinnamon=404080,C0C0C0,FFFFFF,0,FFFFFF,0,80,C0C0C0,FFFFFF,80,C0C0C0,0,C0C0C0,C0C0C0,808080,0,808080,80,FFFFFF,0,FFFFFF
|
||||||
|
Designer=7C7C3F,C0C0C0,FFFFFF,0,FFFFFF,0,808000,C0C0C0,FFFFFF,C0C0C0,C0C0C0,0,C0C0C0,C0C0C0,808080,0,C0C0C0,808000,0,0,FFFFFF
|
||||||
|
Emerald City=404000,C0C0C0,FFFFFF,0,C0C0C0,0,408000,808040,FFFFFF,408000,808040,0,C0C0C0,C0C0C0,808080,0,808080,8000,FFFFFF,0,FFFFFF
|
||||||
|
Fluorescent=0,FFFFFF,FFFFFF,0,FF00,0,FF00FF,C0C0C0,0,FF80,C0C0C0,0,C0C0C0,C0C0C0,808080,0,808080,0,FFFFFF,0,FFFFFF
|
||||||
|
Hotdog Stand=FFFF,FFFF,FF,FFFFFF,FFFFFF,0,0,FF,FFFFFF,FF,FF,0,C0C0C0,C0C0C0,808080,0,808080,0,FFFFFF,FFFFFF,FFFFFF
|
||||||
|
LCD Default Screen Settings=808080,C0C0C0,C0C0C0,0,C0C0C0,0,800000,C0C0C0,FFFFFF,800000,C0C0C0,0,C0C0C0,C0C0C0,7F8080,0,808080,800000,FFFFFF,0,FFFFFF
|
||||||
|
LCD Reversed - Dark=0,80,80,FFFFFF,8080,0,8080,800000,0,8080,800000,0,8080,C0C0C0,7F8080,0,C0C0C0,800000,FFFFFF,828282,FFFFFF
|
||||||
|
LCD Reversed - Light=800000,FFFFFF,FFFFFF,0,FFFFFF,0,808040,FFFFFF,0,C0C0C0,C0C0C0,800000,C0C0C0,C0C0C0,7F8080,0,808040,800000,FFFFFF,0,FFFFFF
|
||||||
|
Mahogany=404040,C0C0C0,FFFFFF,0,FFFFFF,0,40,C0C0C0,FFFFFF,C0C0C0,C0C0C0,0,C0C0C0,C0C0C0,808080,0,C0C0C0,80,FFFFFF,0,FFFFFF
|
||||||
|
Monochrome=C0C0C0,FFFFFF,FFFFFF,0,FFFFFF,0,0,C0C0C0,FFFFFF,C0C0C0,C0C0C0,0,808080,C0C0C0,808080,0,808080,0,FFFFFF,0,FFFFFF
|
||||||
|
Ocean=808000,408000,FFFFFF,0,FFFFFF,0,804000,C0C0C0,FFFFFF,C0C0C0,C0C0C0,0,C0C0C0,C0C0C0,808080,0,0,808000,0,0,FFFFFF
|
||||||
|
Pastel=C0FF82,80FFFF,FFFFFF,0,FFFFFF,0,FFFF80,FFFFFF,0,C080FF,FFFFFF,808080,C0C0C0,C0C0C0,808080,0,C0C0C0,FFFF00,0,0,FFFFFF
|
||||||
|
Patchwork=9544BB,C1FBFA,FFFFFF,0,FFFFFF,0,FFFF80,FFFFFF,0,64B14E,FFFFFF,0,C0C0C0,C0C0C0,808080,0,808080,FFFF00,0,0,FFFFFF
|
||||||
|
Plasma Power Saver=0,FF0000,0,FFFFFF,FF00FF,0,800000,C0C0C0,0,80,FFFFFF,C0C0C0,FF0000,C0C0C0,808080,0,C0C0C0,FFFFFF,0,0,FFFFFF
|
||||||
|
Rugby=C0C0C0,80FFFF,FFFFFF,0,FFFFFF,0,800000,FFFFFF,FFFFFF,80,FFFFFF,0,C0C0C0,C0C0C0,808080,0,808080,800000,FFFFFF,0,FFFFFF
|
||||||
|
The Blues=804000,C0C0C0,FFFFFF,0,FFFFFF,0,800000,C0C0C0,FFFFFF,C0C0C0,C0C0C0,0,C0C0C0,C0C0C0,808080,0,C0C0C0,800000,FFFFFF,0,FFFFFF
|
||||||
|
Tweed=6A619E,C0C0C0,FFFFFF,0,FFFFFF,0,408080,C0C0C0,FFFFFF,404080,C0C0C0,0,10E0E0E0,C0C0C0,808080,0,C0C0C0,8080,0,0,FFFFFF
|
||||||
|
Valentine=C080FF,FFFFFF,FFFFFF,0,FFFFFF,0,8000FF,400080,FFFFFF,C080FF,C080FF,0,C0C0C0,C0C0C0,808080,0,808080,FF00FF,0,FFFFFF,FFFFFF
|
||||||
|
Wingtips=408080,C0C0C0,FFFFFF,0,FFFFFF,0,808080,FFFFFF,FFFFFF,4080,FFFFFF,0,808080,C0C0C0,808080,0,C0C0C0,808080,FFFFFF,0,FFFFFF
|
||||||
|
Dark Blue=800000,FFFFFF,FFFFFF,0,FFFFFF,0,800000,FFFFFF,FFFFFF,C0C0C0,C0C0C0,0,C0C0C0,C0C0C0,808080,0,C0C0C0,800000,FFFFFF,0,FFFFFF
|
||||||
|
|
||||||
|
[Custom Colors]
|
||||||
|
ColorA=FFFFFF
|
||||||
|
ColorB=FFFFFF
|
||||||
|
ColorC=FFFFFF
|
||||||
|
ColorD=FFFFFF
|
||||||
|
ColorE=FFFFFF
|
||||||
|
ColorF=FFFFFF
|
||||||
|
ColorG=FFFFFF
|
||||||
|
ColorH=FFFFFF
|
||||||
|
ColorI=FFFFFF
|
||||||
|
ColorJ=FFFFFF
|
||||||
|
ColorK=FFFFFF
|
||||||
|
ColorL=FFFFFF
|
||||||
|
ColorM=FFFFFF
|
||||||
|
ColorN=FFFFFF
|
||||||
|
ColorO=FFFFFF
|
||||||
|
ColorP=FFFFFF
|
||||||
|
|
||||||
|
[Patterns]
|
||||||
|
(None)=(None)
|
||||||
|
Boxes=127 65 65 65 65 65 127 0
|
||||||
|
Paisley=2 7 7 2 32 80 80 32
|
||||||
|
Weave=136 84 34 69 136 21 34 81
|
||||||
|
Waffle=0 0 0 0 128 128 128 240
|
||||||
|
Tulip=0 0 84 124 124 56 146 124
|
||||||
|
Spinner=20 12 200 121 158 19 48 40
|
||||||
|
Scottie=64 192 200 120 120 72 0 0
|
||||||
|
Critters=0 80 114 32 0 5 39 2
|
||||||
|
50% Gray=170 85 170 85 170 85 170 85
|
||||||
|
Quilt=130 68 40 17 40 68 130 1
|
||||||
|
Diamonds=32 80 136 80 32 0 0 0
|
||||||
|
Thatches=248 116 34 71 143 23 34 113
|
||||||
|
Pattern=224 128 142 136 234 10 14 0
|
||||||
|
|
||||||
|
[MMCPL]
|
||||||
|
NumApps=16
|
||||||
|
X=22
|
||||||
|
Y=22
|
||||||
|
W=430
|
||||||
|
H=240
|
||||||
|
|
||||||
|
[drivers.desc]
|
||||||
|
msacm.drv=Microsoft Sound Mapper V2.00
|
||||||
|
msadpcm.acm=Microsoft ADPCM Codec V2.00
|
||||||
|
imaadpcm.acm=Microsoft IMA ADPCM Codec V2.00
|
||||||
|
mciwave.drv=[MCI] Sound
|
||||||
|
mciseq.drv=[MCI] MIDI Sequencer
|
||||||
|
mciavi.drv=[MCI] Microsoft Video for Windows
|
||||||
|
UDH.DLL=Universal Draw Handler
|
||||||
|
timer.drv=Timer
|
||||||
|
midimap.drv=MIDI Mapper
|
||||||
|
iccvid.drv=SuperMatch Cinepak Codec
|
||||||
|
msvidc.drv=Microsoft Video 1 Compressor
|
||||||
|
ir32.dll=Intel Indeo(TM) Video R3.2
|
||||||
|
MSRLE.drv=Microsoft RLE Compressor
|
||||||
|
ir21_r.dll=Intel Indeo(TM) Video R2.1/Raw
|
||||||
|
sndblst2.drv=Creative Labs Sound Blaster 1.5
|
||||||
|
msadlib.drv=Ad Lib
|
||||||
|
|
||||||
|
[Userinstallable.drivers]
|
||||||
|
Wave=sndblst2.drv
|
||||||
|
MIDI1=msadlib.drv
|
||||||
|
|
||||||
|
[related.desc]
|
||||||
|
Wave=msadlib.drv,
|
||||||
|
MIDI1=
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/DOSPRMPT.PIF
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/DOSPRMPT.PIF
Normal file
Binary file not shown.
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/GAMES.GRP
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/GAMES.GRP
Normal file
Binary file not shown.
2
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/INDEO.INI
Normal file
2
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/INDEO.INI
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[dcisvga.dll]
|
||||||
|
chipset=S3
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/MAIN.GRP
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/MAIN.GRP
Normal file
Binary file not shown.
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/MICROSOF.GRP
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/MICROSOF.GRP
Normal file
Binary file not shown.
4
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/MSACM.INI
Normal file
4
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/MSACM.INI
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[Priority]
|
||||||
|
Priority1=1, MS-ADPCM, Microsoft ADPCM CODEC
|
||||||
|
Priority2=1, Microsoft IMA ADPCM, Microsoft IMA ADPCM CODEC
|
||||||
|
Priority3=1, MS-PCM, Microsoft PCM Converter
|
5
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/NCDINFO.INI
Normal file
5
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/NCDINFO.INI
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
[NCD]
|
||||||
|
NETCARD1=214,-1,0x300,32,0xffff,-1,0xffff,-1,-1,0,-1,0xffffffff,-1,0xd9b5
|
||||||
|
|
||||||
|
[LastDetectedFromSetup]
|
||||||
|
NETCARD1=214,-1,0x300,32,0xffff,-1,0xffff,-1,-1,0,-1,0xffffffff,-1,0xd9b5
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/NETWORK.GRP
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/NETWORK.GRP
Normal file
Binary file not shown.
14
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/PROGMAN.INI
Normal file
14
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/PROGMAN.INI
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[Settings]
|
||||||
|
display.drv=s3trio.drv
|
||||||
|
Order= 8 1 4 5 6 7 3 2
|
||||||
|
Window=68 48 580 384 1
|
||||||
|
|
||||||
|
[Groups]
|
||||||
|
Group1=C:\WINDOWS\MICROSOF.GRP
|
||||||
|
Group2=C:\WINDOWS\MAIN.GRP
|
||||||
|
Group3=C:\WINDOWS\ACCESSOR.GRP
|
||||||
|
Group4=C:\WINDOWS\NETWORK.GRP
|
||||||
|
Group5=C:\WINDOWS\GAMES.GRP
|
||||||
|
Group6=C:\WINDOWS\STARTUP.GRP
|
||||||
|
Group7=C:\WINDOWS\WINGSDK.GRP
|
||||||
|
Group8=C:\WIN32APP.GRP
|
42
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/PROTOCOL.CLN
Normal file
42
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/PROTOCOL.CLN
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
[network.setup]
|
||||||
|
version=0x3110
|
||||||
|
netcard=ms$ne2clone,1,MS$NE2CLONE,3
|
||||||
|
transport=ms$nwlinknb,NWLINK
|
||||||
|
transport=ms$ndishlp,MS$NDISHLP
|
||||||
|
transport=ms$netbeui,NETBEUI
|
||||||
|
transport=tcpip-32r,MSTCP32
|
||||||
|
lana0=ms$ne2clone,1,tcpip-32r
|
||||||
|
lana1=ms$ne2clone,1,ms$nwlinknb
|
||||||
|
lana2=ms$ne2clone,1,ms$ndishlp
|
||||||
|
lana3=ms$ne2clone,1,ms$netbeui
|
||||||
|
|
||||||
|
|
||||||
|
[protman]
|
||||||
|
DriverName=PROTMAN$
|
||||||
|
PRIORITY=MS$NDISHLP
|
||||||
|
|
||||||
|
[MS$NE2CLONE]
|
||||||
|
DriverName=MS2000$
|
||||||
|
INTERRUPT=10
|
||||||
|
IOBASE=0x300
|
||||||
|
|
||||||
|
[NE2000]
|
||||||
|
Adapters=MS$NE2CLONE
|
||||||
|
|
||||||
|
[NWLINK]
|
||||||
|
|
||||||
|
BINDINGS=MS$NE2CLONE
|
||||||
|
[MS$NDISHLP]
|
||||||
|
DriverName=ndishlp$
|
||||||
|
BINDINGS=MS$NE2CLONE
|
||||||
|
|
||||||
|
[NETBEUI]
|
||||||
|
DriverName=netbeui$
|
||||||
|
SESSIONS=10
|
||||||
|
NCBS=12
|
||||||
|
BINDINGS=MS$NE2CLONE
|
||||||
|
LANABASE=2
|
||||||
|
|
||||||
|
[MSTCP32]
|
||||||
|
BINDINGS=MS$NE2CLONE
|
||||||
|
LANABASE=0
|
42
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/PROTOCOL.INI
Normal file
42
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/PROTOCOL.INI
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
[network.setup]
|
||||||
|
version=0x3110
|
||||||
|
netcard=ms$ne2clone,1,MS$NE2CLONE,3
|
||||||
|
transport=ms$nwlinknb,NWLINK
|
||||||
|
transport=ms$ndishlp,MS$NDISHLP
|
||||||
|
transport=ms$netbeui,NETBEUI
|
||||||
|
transport=tcpip-32r,MSTCP32
|
||||||
|
lana0=ms$ne2clone,1,tcpip-32r
|
||||||
|
lana1=ms$ne2clone,1,ms$nwlinknb
|
||||||
|
lana2=ms$ne2clone,1,ms$ndishlp
|
||||||
|
lana3=ms$ne2clone,1,ms$netbeui
|
||||||
|
|
||||||
|
|
||||||
|
[protman]
|
||||||
|
DriverName=PROTMAN$
|
||||||
|
PRIORITY=MS$NDISHLP
|
||||||
|
|
||||||
|
[MS$NE2CLONE]
|
||||||
|
DriverName=MS2000$
|
||||||
|
INTERRUPT=10
|
||||||
|
IOBASE=0x300
|
||||||
|
|
||||||
|
[NE2000]
|
||||||
|
Adapters=MS$NE2CLONE
|
||||||
|
|
||||||
|
[NWLINK]
|
||||||
|
|
||||||
|
BINDINGS=MS$NE2CLONE
|
||||||
|
[MS$NDISHLP]
|
||||||
|
DriverName=ndishlp$
|
||||||
|
BINDINGS=MS$NE2CLONE
|
||||||
|
|
||||||
|
[NETBEUI]
|
||||||
|
DriverName=netbeui$
|
||||||
|
SESSIONS=10
|
||||||
|
NCBS=12
|
||||||
|
BINDINGS=MS$NE2CLONE
|
||||||
|
LANABASE=2
|
||||||
|
|
||||||
|
[MSTCP32]
|
||||||
|
BINDINGS=MS$NE2CLONE
|
||||||
|
LANABASE=0
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/REG.DAT
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/REG.DAT
Normal file
Binary file not shown.
7
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/SERIALNO.INI
Normal file
7
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/SERIALNO.INI
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[Microsoft Products]
|
||||||
|
mswindows=Microsoft Windows for Workgrou
|
||||||
|
|
||||||
|
[mswindows]
|
||||||
|
username=WIN311
|
||||||
|
company=
|
||||||
|
serialno=
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/SHARES.PWL
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/SHARES.PWL
Normal file
Binary file not shown.
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/STARTUP.GRP
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/STARTUP.GRP
Normal file
Binary file not shown.
170
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/SYSTEM.CLN
Normal file
170
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/SYSTEM.CLN
Normal file
|
@ -0,0 +1,170 @@
|
||||||
|
[boot]
|
||||||
|
oemfonts.fon=vgaoem.fon
|
||||||
|
fixedfon.fon=vgafix.fon
|
||||||
|
fonts.fon=vgasys.fon
|
||||||
|
display.drv=s3trio.drv
|
||||||
|
shell=progman.exe
|
||||||
|
network.drv=wfwnet.drv
|
||||||
|
mouse.drv=dboxmpi.drv
|
||||||
|
language.dll=
|
||||||
|
sound.drv=mmsound.drv
|
||||||
|
comm.drv=comm.drv
|
||||||
|
keyboard.drv=keyboard.drv
|
||||||
|
system.drv=system.drv
|
||||||
|
386grabber=vga_eng.3gr
|
||||||
|
drivers=mmsystem.dll
|
||||||
|
|
||||||
|
[keyboard]
|
||||||
|
subtype=
|
||||||
|
type=4
|
||||||
|
keyboard.dll=
|
||||||
|
oemansi.bin=
|
||||||
|
|
||||||
|
[boot.description]
|
||||||
|
keyboard.typ=Enhanced 101 or 102 key US and Non US keyboards
|
||||||
|
mouse.drv=DOSBox-X Mouse Pointer Integration
|
||||||
|
language.dll=English (American)
|
||||||
|
system.drv=MS-DOS System
|
||||||
|
codepage=852
|
||||||
|
woafont.fon=
|
||||||
|
aspect=100,96,96
|
||||||
|
display.drv=S3 Trio64V 1.70.04 640x480 256
|
||||||
|
network.drv=Microsoft Windows Network (version 3.11)
|
||||||
|
secondnet.drv=No Additional Network Installed
|
||||||
|
|
||||||
|
[386Enh]
|
||||||
|
device=*vpd
|
||||||
|
mouse=*vmd
|
||||||
|
ebios=*ebios
|
||||||
|
woafont=
|
||||||
|
display=vdds3764.386
|
||||||
|
EGA80WOA.FON=EGA80WOA.FON
|
||||||
|
EGA40WOA.FON=EGA40WOA.FON
|
||||||
|
CGA80WOA.FON=CGA80WOA.FON
|
||||||
|
CGA40WOA.FON=CGA40WOA.FON
|
||||||
|
keyboard=*vkd
|
||||||
|
network=*vnetbios,*vwc,vnetsup.386,vredir.386,vserver.386
|
||||||
|
netheapsize=20
|
||||||
|
device=*vcd
|
||||||
|
device=*vpicd
|
||||||
|
device=*vtd
|
||||||
|
device=*reboot
|
||||||
|
device=*vdmad
|
||||||
|
device=*vsd
|
||||||
|
device=*v86mmgr
|
||||||
|
device=*pageswap
|
||||||
|
device=*dosmgr
|
||||||
|
device=*vmpoll
|
||||||
|
device=*wshell
|
||||||
|
device=*PAGEFILE
|
||||||
|
device=*BLOCKDEV
|
||||||
|
device=*vfd
|
||||||
|
device=*parity
|
||||||
|
device=*biosxlat
|
||||||
|
device=*vmcpd
|
||||||
|
device=*combuff
|
||||||
|
device=*cdpscsi
|
||||||
|
device=vtdapi.386
|
||||||
|
device=vpmtd.386
|
||||||
|
device=vcomm.386
|
||||||
|
device=serial.386
|
||||||
|
device=lpt.386
|
||||||
|
device=ifsmgr.386
|
||||||
|
device=vcache.386
|
||||||
|
device=vshare.386
|
||||||
|
local=CON
|
||||||
|
FileSysChange=off
|
||||||
|
COM3Irq=4
|
||||||
|
COM3Base=03E8
|
||||||
|
COM4Irq=3
|
||||||
|
COM4Base=02E8
|
||||||
|
PagingFile=C:\WINDOWS\WIN386.SWP
|
||||||
|
MaxPagingFileSize=61440
|
||||||
|
netmisc=ndis.386,ndis2sup.386,wsock.386,wstcp.386
|
||||||
|
netcard=ne2000.386
|
||||||
|
transport=nwlink.386,nwnblink.386,netbeui.386,vip.386,vdhcp.386,vtdi.386,vtcp.386,vnbt.386
|
||||||
|
InDOSPolling=FALSE
|
||||||
|
|
||||||
|
[NonWindowsApp]
|
||||||
|
localtsrs=dosedit,ced
|
||||||
|
|
||||||
|
[vcache]
|
||||||
|
minfilecache=512
|
||||||
|
|
||||||
|
[mci]
|
||||||
|
WaveAudio=mciwave.drv
|
||||||
|
Sequencer=mciseq.drv
|
||||||
|
CDAudio=mcicda.drv
|
||||||
|
|
||||||
|
[drivers]
|
||||||
|
DCI=RFMDCI
|
||||||
|
VIDS.DRAW=UDH.DLL
|
||||||
|
timer=timer.drv
|
||||||
|
midimapper=midimap.drv
|
||||||
|
|
||||||
|
[DDEShares]
|
||||||
|
CHAT$=winchat,chat,,31,,0,,0,0,0
|
||||||
|
SCHAT$=winchat,chat,,31,,0,,0,0,0
|
||||||
|
CLPBK$=clipsrv,system,,31,,0,,0,0,0
|
||||||
|
HEARTS$=mshearts,hearts,,15,,0,,0,0,0
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
winnet=wfwnet/00025100
|
||||||
|
multinet=nonet
|
||||||
|
FileSharing=Yes
|
||||||
|
PrintSharing=Yes
|
||||||
|
LogonDisconnected=yes
|
||||||
|
EnableSharing=Yes
|
||||||
|
UserName=WIN311
|
||||||
|
Workgroup=WORKGROUP
|
||||||
|
ComputerName=WIN311
|
||||||
|
Comment=WIN311
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[Debug]
|
||||||
|
OutputTo=NUL
|
||||||
|
|
||||||
|
[DISPLAY]
|
||||||
|
dpi=96
|
||||||
|
color-format=8
|
||||||
|
screen-size=640
|
||||||
|
fastmmio=on
|
||||||
|
textrmw=0
|
||||||
|
scache=on
|
||||||
|
ellipse-support=on
|
||||||
|
polygon-support=on
|
||||||
|
dac-type=nbt
|
||||||
|
|
||||||
|
[network drivers]
|
||||||
|
netcard=ne2000.dos
|
||||||
|
transport=ndishlp.sys,*netbeui
|
||||||
|
devdir=C:\WINDOWS
|
||||||
|
LoadRMDrivers=No
|
||||||
|
|
||||||
|
[NWNBLINK]
|
||||||
|
LANABASE=1
|
||||||
|
|
||||||
|
[ms$ne2clone0]
|
||||||
|
DefaultGateway=10.0.2.2
|
||||||
|
IPMask=255.255.255.0
|
||||||
|
IPAddress=10.0.2.15
|
||||||
|
Description=NE2000 Compatible
|
||||||
|
Binding=ms$ne2clone
|
||||||
|
|
||||||
|
[MSTCP]
|
||||||
|
EnableRouting=0
|
||||||
|
Interfaces=ms$ne2clone0
|
||||||
|
deadgwdetect=1
|
||||||
|
pmtudiscovery=1
|
||||||
|
|
||||||
|
[DNS]
|
||||||
|
DNSServers=10.0.2.3
|
||||||
|
HostName=WIN311
|
||||||
|
DomainName=
|
||||||
|
DNSDomains=
|
||||||
|
|
||||||
|
[NBT]
|
||||||
|
LANABASE=0
|
||||||
|
EnableProxy=0
|
||||||
|
EnableDNS=0
|
198
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/SYSTEM.INI
Normal file
198
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/SYSTEM.INI
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
[boot]
|
||||||
|
oemfonts.fon=vgaoem.fon
|
||||||
|
fixedfon.fon=vgafix.fon
|
||||||
|
fonts.fon=vgasys.fon
|
||||||
|
display.drv=s3trio.drv
|
||||||
|
shell=progman.exe
|
||||||
|
network.drv=wfwnet.drv
|
||||||
|
mouse.drv=dboxmpi.drv
|
||||||
|
language.dll=
|
||||||
|
sound.drv=mmsound.drv
|
||||||
|
comm.drv=comm.drv
|
||||||
|
keyboard.drv=keyboard.drv
|
||||||
|
system.drv=system.drv
|
||||||
|
386grabber=vga_eng.3gr
|
||||||
|
drivers=mmsystem.dll winmm16.dll
|
||||||
|
SCRNSAVE.EXE=(None)
|
||||||
|
|
||||||
|
[keyboard]
|
||||||
|
subtype=
|
||||||
|
type=4
|
||||||
|
keyboard.dll=
|
||||||
|
oemansi.bin=
|
||||||
|
|
||||||
|
[boot.description]
|
||||||
|
keyboard.typ=Enhanced 101 or 102 key US and Non US keyboards
|
||||||
|
mouse.drv=DOSBox-X Mouse Pointer Integration
|
||||||
|
language.dll=English (American)
|
||||||
|
system.drv=MS-DOS System
|
||||||
|
codepage=852
|
||||||
|
woafont.fon=
|
||||||
|
aspect=100,96,96
|
||||||
|
display.drv=S3 Trio64V 1.70.04 640x480 256
|
||||||
|
network.drv=Microsoft Windows Network (version 3.11)
|
||||||
|
secondnet.drv=No Additional Network Installed
|
||||||
|
|
||||||
|
[386Enh]
|
||||||
|
device=C:\WINDOWS\SYSTEM\WIN32S\W32S.386
|
||||||
|
device=dva.386
|
||||||
|
device=*vpd
|
||||||
|
mouse=*vmd
|
||||||
|
ebios=*ebios
|
||||||
|
woafont=
|
||||||
|
display=vdds3764.386
|
||||||
|
EGA80WOA.FON=EGA80WOA.FON
|
||||||
|
EGA40WOA.FON=EGA40WOA.FON
|
||||||
|
CGA80WOA.FON=CGA80WOA.FON
|
||||||
|
CGA40WOA.FON=CGA40WOA.FON
|
||||||
|
keyboard=*vkd
|
||||||
|
network=*vnetbios,*vwc,vnetsup.386,vredir.386,vserver.386
|
||||||
|
netheapsize=20
|
||||||
|
device=*vcd
|
||||||
|
device=*vpicd
|
||||||
|
device=*vtd
|
||||||
|
device=*reboot
|
||||||
|
device=*vdmad
|
||||||
|
device=*vsd
|
||||||
|
device=*v86mmgr
|
||||||
|
device=*pageswap
|
||||||
|
device=*dosmgr
|
||||||
|
device=*vmpoll
|
||||||
|
device=*wshell
|
||||||
|
device=*PAGEFILE
|
||||||
|
device=*BLOCKDEV
|
||||||
|
device=*vfd
|
||||||
|
device=*parity
|
||||||
|
device=*biosxlat
|
||||||
|
device=*vmcpd
|
||||||
|
device=*combuff
|
||||||
|
device=*cdpscsi
|
||||||
|
device=vtdapi.386
|
||||||
|
device=vpmtd.386
|
||||||
|
device=vcomm.386
|
||||||
|
device=serial.386
|
||||||
|
device=lpt.386
|
||||||
|
device=ifsmgr.386
|
||||||
|
device=vcache.386
|
||||||
|
device=vshare.386
|
||||||
|
local=CON
|
||||||
|
FileSysChange=off
|
||||||
|
COM3Irq=4
|
||||||
|
COM3Base=03E8
|
||||||
|
COM4Irq=3
|
||||||
|
COM4Base=02E8
|
||||||
|
PagingFile=C:\WINDOWS\WIN386.SWP
|
||||||
|
MaxPagingFileSize=61440
|
||||||
|
netmisc=ndis.386,ndis2sup.386,wsock.386,wstcp.386
|
||||||
|
netcard=ne2000.386
|
||||||
|
transport=nwlink.386,nwnblink.386,netbeui.386,vip.386,vdhcp.386,vtdi.386,vtcp.386,vnbt.386
|
||||||
|
InDOSPolling=FALSE
|
||||||
|
|
||||||
|
device=vsbd.386
|
||||||
|
device=vadlibd.386
|
||||||
|
[NonWindowsApp]
|
||||||
|
localtsrs=dosedit,ced
|
||||||
|
|
||||||
|
[vcache]
|
||||||
|
minfilecache=512
|
||||||
|
|
||||||
|
[mci]
|
||||||
|
WaveAudio=mciwave.drv
|
||||||
|
Sequencer=mciseq.drv
|
||||||
|
CDAudio=mcicda.drv
|
||||||
|
AVIVideo=mciavi.drv
|
||||||
|
|
||||||
|
[drivers]
|
||||||
|
DCI=RFMDCI
|
||||||
|
VIDS.DRAW=UDH.DLL
|
||||||
|
timer=timer.drv
|
||||||
|
midimapper=midimap.drv
|
||||||
|
VIDC.CVID=iccvid.drv
|
||||||
|
VIDC.MSVC=msvidc.drv
|
||||||
|
VIDC.IV32=ir32.dll
|
||||||
|
VIDC.IV31=IR32.dll
|
||||||
|
VIDC.MRLE=MSRLE.drv
|
||||||
|
VIDC.RT21=ir21_r.dll
|
||||||
|
VIDC.YVU9=ir21_r.dll
|
||||||
|
WaveMapper=msacm.drv
|
||||||
|
MSACM.msadpcm=msadpcm.acm
|
||||||
|
MSACM.imaadpcm=imaadpcm.acm
|
||||||
|
Wave=sndblst2.drv
|
||||||
|
MIDI=sndblst2.drv
|
||||||
|
MIDI1=msadlib.drv
|
||||||
|
|
||||||
|
[DDEShares]
|
||||||
|
CHAT$=winchat,chat,,31,,0,,0,0,0
|
||||||
|
SCHAT$=winchat,chat,,31,,0,,0,0,0
|
||||||
|
CLPBK$=clipsrv,system,,31,,0,,0,0,0
|
||||||
|
HEARTS$=mshearts,hearts,,15,,0,,0,0,0
|
||||||
|
|
||||||
|
[Network]
|
||||||
|
winnet=wfwnet/00025100
|
||||||
|
multinet=nonet
|
||||||
|
FileSharing=Yes
|
||||||
|
PrintSharing=Yes
|
||||||
|
LogonDisconnected=yes
|
||||||
|
EnableSharing=Yes
|
||||||
|
UserName=WIN311
|
||||||
|
Workgroup=WORKGROUP
|
||||||
|
ComputerName=WIN311
|
||||||
|
Comment=WIN311
|
||||||
|
logonvalidated=no
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[Debug]
|
||||||
|
OutputTo=NUL
|
||||||
|
|
||||||
|
[DISPLAY]
|
||||||
|
dpi=96
|
||||||
|
color-format=8
|
||||||
|
screen-size=640
|
||||||
|
fastmmio=on
|
||||||
|
textrmw=0
|
||||||
|
scache=on
|
||||||
|
ellipse-support=on
|
||||||
|
polygon-support=on
|
||||||
|
dac-type=nbt
|
||||||
|
|
||||||
|
[network drivers]
|
||||||
|
netcard=ne2000.dos
|
||||||
|
transport=ndishlp.sys,*netbeui
|
||||||
|
devdir=C:\WINDOWS
|
||||||
|
LoadRMDrivers=No
|
||||||
|
|
||||||
|
[NWNBLINK]
|
||||||
|
LANABASE=1
|
||||||
|
|
||||||
|
[ms$ne2clone0]
|
||||||
|
DefaultGateway=10.0.2.2
|
||||||
|
IPMask=255.255.255.0
|
||||||
|
IPAddress=10.0.2.15
|
||||||
|
Description=NE2000 Compatible
|
||||||
|
Binding=ms$ne2clone
|
||||||
|
|
||||||
|
[MSTCP]
|
||||||
|
EnableRouting=0
|
||||||
|
Interfaces=ms$ne2clone0
|
||||||
|
deadgwdetect=1
|
||||||
|
pmtudiscovery=1
|
||||||
|
|
||||||
|
[DNS]
|
||||||
|
DNSServers=10.0.2.3
|
||||||
|
HostName=WIN311
|
||||||
|
DomainName=
|
||||||
|
DNSDomains=
|
||||||
|
|
||||||
|
[NBT]
|
||||||
|
LANABASE=0
|
||||||
|
EnableProxy=0
|
||||||
|
EnableDNS=0
|
||||||
|
|
||||||
|
[Password Lists]
|
||||||
|
*Shares=C:\WINDOWS\Share000.PWL
|
||||||
|
WIN311=C:\WINDOWS\WIN311.PWL
|
||||||
|
|
||||||
|
[sndblst.drv]
|
||||||
|
port=220
|
||||||
|
int=7
|
|
@ -0,0 +1,14 @@
|
||||||
|
[Win32s]
|
||||||
|
Setup=1
|
||||||
|
Version=1.30.172.0
|
||||||
|
|
||||||
|
[OLE]
|
||||||
|
Setup=1
|
||||||
|
Version=2.3.130.168
|
||||||
|
|
||||||
|
[Nls]
|
||||||
|
AnsiCP=1252
|
||||||
|
|
||||||
|
[Freecell]
|
||||||
|
Setup=1
|
||||||
|
Version=1.30.172.0
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WFWSYS.CFG
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WFWSYS.CFG
Normal file
Binary file not shown.
167
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WIN.CLN
Normal file
167
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WIN.CLN
Normal file
|
@ -0,0 +1,167 @@
|
||||||
|
[windows]
|
||||||
|
spooler=yes
|
||||||
|
load=
|
||||||
|
run=
|
||||||
|
Beep=yes
|
||||||
|
NullPort=None
|
||||||
|
device=
|
||||||
|
BorderWidth=3
|
||||||
|
CursorBlinkRate=530
|
||||||
|
DoubleClickSpeed=452
|
||||||
|
Programs=com exe bat pif
|
||||||
|
Documents=
|
||||||
|
DeviceNotSelectedTimeout=15
|
||||||
|
TransmissionRetryTimeout=45
|
||||||
|
KeyboardDelay=2
|
||||||
|
KeyboardSpeed=31
|
||||||
|
ScreenSaveActive=0
|
||||||
|
ScreenSaveTimeOut=120
|
||||||
|
|
||||||
|
[Desktop]
|
||||||
|
Pattern=(None)
|
||||||
|
TileWallPaper=0
|
||||||
|
GridGranularity=0
|
||||||
|
|
||||||
|
[Extensions]
|
||||||
|
crd=cardfile.exe ^.crd
|
||||||
|
trm=terminal.exe ^.trm
|
||||||
|
txt=notepad.exe ^.txt
|
||||||
|
ini=notepad.exe ^.ini
|
||||||
|
pcx=pbrush.exe ^.pcx
|
||||||
|
bmp=pbrush.exe ^.bmp
|
||||||
|
wri=write.exe ^.wri
|
||||||
|
rec=recorder.exe ^.rec
|
||||||
|
hlp=winhelp.exe ^.hlp
|
||||||
|
mmf=msmail.exe /f ^.mmf
|
||||||
|
|
||||||
|
[intl]
|
||||||
|
sLanguage=enu
|
||||||
|
sCountry=United States
|
||||||
|
iCountry=1
|
||||||
|
iDate=0
|
||||||
|
iTime=0
|
||||||
|
iTLZero=0
|
||||||
|
iCurrency=0
|
||||||
|
iCurrDigits=2
|
||||||
|
iNegCurr=0
|
||||||
|
iLzero=1
|
||||||
|
iDigits=2
|
||||||
|
iMeasure=1
|
||||||
|
s1159=AM
|
||||||
|
s2359=PM
|
||||||
|
sCurrency=$
|
||||||
|
sThousand=,
|
||||||
|
sDecimal=.
|
||||||
|
sDate=/
|
||||||
|
sTime=:
|
||||||
|
sList=,
|
||||||
|
sShortDate=M/d/yy
|
||||||
|
sLongDate=dddd, MMMM dd, yyyy
|
||||||
|
|
||||||
|
[ports]
|
||||||
|
; A line with [filename].PRN followed by an equal sign causes
|
||||||
|
; [filename] to appear in the Control Panel's Printer Configuration dialog
|
||||||
|
; box. A printer connected to [filename] directs its output into this file.
|
||||||
|
; The file must be on one of your local drives; you cannot print to a network
|
||||||
|
; file.
|
||||||
|
LPT1:=
|
||||||
|
LPT2:=
|
||||||
|
LPT3:=
|
||||||
|
COM1:=9600,n,8,1,x
|
||||||
|
COM2:=9600,n,8,1,x
|
||||||
|
COM3:=9600,n,8,1,x
|
||||||
|
COM4:=9600,n,8,1,x
|
||||||
|
EPT:=
|
||||||
|
FILE:=
|
||||||
|
LPT1.DOS=
|
||||||
|
LPT2.DOS=
|
||||||
|
|
||||||
|
[FontSubstitutes]
|
||||||
|
Helv=MS Sans Serif
|
||||||
|
Tms Rmn=MS Serif
|
||||||
|
Times=Times New Roman
|
||||||
|
Helvetica=Arial
|
||||||
|
|
||||||
|
[TrueType]
|
||||||
|
|
||||||
|
[Sounds]
|
||||||
|
SystemDefault=ding.wav, Default Beep
|
||||||
|
SystemExclamation=ding.wav, Exclamation
|
||||||
|
SystemStart=chimes.wav, Windows Start
|
||||||
|
SystemExit=chimes.wav, Windows Exit
|
||||||
|
SystemHand=ding.wav, Critical Stop
|
||||||
|
SystemQuestion=ding.wav, Question
|
||||||
|
SystemAsterisk=ding.wav, Asterisk
|
||||||
|
RingIn=ringin.wav, Incoming Call
|
||||||
|
RingOut=ringout.wav, Outgoing Call
|
||||||
|
|
||||||
|
[mci extensions]
|
||||||
|
wav=waveaudio
|
||||||
|
mid=sequencer
|
||||||
|
rmi=sequencer
|
||||||
|
|
||||||
|
[Compatibility]
|
||||||
|
NOTSHELL=0x0001
|
||||||
|
WPWINFIL=0x0006
|
||||||
|
CCMAIL=0x0008
|
||||||
|
AMIPRO=0x0010
|
||||||
|
REM=0x8022
|
||||||
|
PIXIE=0x0040
|
||||||
|
CP=0x0040
|
||||||
|
JW=0x42080
|
||||||
|
TME=0x0100
|
||||||
|
VB=0x0200
|
||||||
|
WIN2WRS=0x1210
|
||||||
|
PACKRAT=0x0800
|
||||||
|
VISION=0x0040
|
||||||
|
MCOURIER=0x0800
|
||||||
|
_BNOTES=0x24000
|
||||||
|
MILESV3=0x1000
|
||||||
|
PM4=0x2000
|
||||||
|
DESIGNER=0x2000
|
||||||
|
PLANNER=0x2000
|
||||||
|
DRAW=0x2000
|
||||||
|
WINSIM=0x2000
|
||||||
|
CHARISMA=0x2000
|
||||||
|
PR2=0x2000
|
||||||
|
PLUS=0x1000
|
||||||
|
ED=0x00010000
|
||||||
|
APORIA=0x0100
|
||||||
|
EXCEL=0x1000
|
||||||
|
GUIDE=0x1000
|
||||||
|
NETSET2=0x0100
|
||||||
|
W4GL=0x4000
|
||||||
|
W4GLR=0x4000
|
||||||
|
TURBOTAX=0x00080000
|
||||||
|
|
||||||
|
[winsetup]
|
||||||
|
source_disk_path=C:\INST311
|
||||||
|
|
||||||
|
[fonts]
|
||||||
|
Arial (TrueType)=ARIAL.FOT
|
||||||
|
Arial Bold (TrueType)=ARIALBD.FOT
|
||||||
|
Arial Bold Italic (TrueType)=ARIALBI.FOT
|
||||||
|
Arial Italic (TrueType)=ARIALI.FOT
|
||||||
|
Courier New (TrueType)=COUR.FOT
|
||||||
|
Courier New Bold (TrueType)=COURBD.FOT
|
||||||
|
Courier New Bold Italic (TrueType)=COURBI.FOT
|
||||||
|
Courier New Italic (TrueType)=COURI.FOT
|
||||||
|
Times New Roman (TrueType)=TIMES.FOT
|
||||||
|
Times New Roman Bold (TrueType)=TIMESBD.FOT
|
||||||
|
Times New Roman Bold Italic (TrueType)=TIMESBI.FOT
|
||||||
|
Times New Roman Italic (TrueType)=TIMESI.FOT
|
||||||
|
WingDings (TrueType)=WINGDING.FOT
|
||||||
|
MS Sans Serif 8,10,12,14,18,24 (VGA res)=SSERIFE.FON
|
||||||
|
Courier 10,12,15 (VGA res)=COURE.FON
|
||||||
|
MS Serif 8,10,12,14,18,24 (VGA res)=SERIFE.FON
|
||||||
|
Symbol 8,10,12,14,18,24 (VGA res)=SYMBOLE.FON
|
||||||
|
Roman (Plotter)=ROMAN.FON
|
||||||
|
Script (Plotter)=SCRIPT.FON
|
||||||
|
Modern (Plotter)=MODERN.FON
|
||||||
|
Small Fonts (VGA res)=SMALLE.FON
|
||||||
|
Symbol (TrueType)=SYMBOL.FOT
|
||||||
|
|
||||||
|
[embedding]
|
||||||
|
SoundRec=Sound,Sound,SoundRec.exe,picture
|
||||||
|
Package=Package,Package,packager.exe,picture
|
||||||
|
PBrush=Paintbrush Picture,Paintbrush Picture,pbrush.exe,picture
|
202
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WIN.INI
Normal file
202
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WIN.INI
Normal file
|
@ -0,0 +1,202 @@
|
||||||
|
[windows]
|
||||||
|
spooler=yes
|
||||||
|
load=
|
||||||
|
run=
|
||||||
|
Beep=yes
|
||||||
|
NullPort=None
|
||||||
|
device=
|
||||||
|
BorderWidth=3
|
||||||
|
CursorBlinkRate=530
|
||||||
|
DoubleClickSpeed=452
|
||||||
|
Programs=com exe bat pif
|
||||||
|
Documents=
|
||||||
|
DeviceNotSelectedTimeout=15
|
||||||
|
TransmissionRetryTimeout=45
|
||||||
|
KeyboardDelay=2
|
||||||
|
KeyboardSpeed=31
|
||||||
|
ScreenSaveActive=0
|
||||||
|
ScreenSaveTimeOut=120
|
||||||
|
CoolSwitch=1
|
||||||
|
|
||||||
|
[Desktop]
|
||||||
|
Pattern=136 84 34 69 136 21 34 81
|
||||||
|
TileWallPaper=0
|
||||||
|
GridGranularity=0
|
||||||
|
IconSpacing=75
|
||||||
|
WallPaper=(None)
|
||||||
|
|
||||||
|
[Extensions]
|
||||||
|
crd=cardfile.exe ^.crd
|
||||||
|
trm=terminal.exe ^.trm
|
||||||
|
txt=notepad.exe ^.txt
|
||||||
|
ini=notepad.exe ^.ini
|
||||||
|
pcx=pbrush.exe ^.pcx
|
||||||
|
bmp=pbrush.exe ^.bmp
|
||||||
|
wri=write.exe ^.wri
|
||||||
|
rec=recorder.exe ^.rec
|
||||||
|
hlp=winhelp.exe ^.hlp
|
||||||
|
mmf=msmail.exe /f ^.mmf
|
||||||
|
|
||||||
|
[intl]
|
||||||
|
sLanguage=enu
|
||||||
|
sCountry=United States
|
||||||
|
iCountry=1
|
||||||
|
iDate=0
|
||||||
|
iTime=0
|
||||||
|
iTLZero=0
|
||||||
|
iCurrency=0
|
||||||
|
iCurrDigits=2
|
||||||
|
iNegCurr=0
|
||||||
|
iLzero=1
|
||||||
|
iDigits=2
|
||||||
|
iMeasure=1
|
||||||
|
s1159=AM
|
||||||
|
s2359=PM
|
||||||
|
sCurrency=$
|
||||||
|
sThousand=,
|
||||||
|
sDecimal=.
|
||||||
|
sDate=/
|
||||||
|
sTime=:
|
||||||
|
sList=,
|
||||||
|
sShortDate=M/d/yy
|
||||||
|
sLongDate=dddd, MMMM dd, yyyy
|
||||||
|
|
||||||
|
[ports]
|
||||||
|
; A line with [filename].PRN followed by an equal sign causes
|
||||||
|
; [filename] to appear in the Control Panel's Printer Configuration dialog
|
||||||
|
; box. A printer connected to [filename] directs its output into this file.
|
||||||
|
; The file must be on one of your local drives; you cannot print to a network
|
||||||
|
; file.
|
||||||
|
LPT1:=
|
||||||
|
LPT2:=
|
||||||
|
LPT3:=
|
||||||
|
COM1:=9600,n,8,1,x
|
||||||
|
COM2:=9600,n,8,1,x
|
||||||
|
COM3:=9600,n,8,1,x
|
||||||
|
COM4:=9600,n,8,1,x
|
||||||
|
EPT:=
|
||||||
|
FILE:=
|
||||||
|
LPT1.DOS=
|
||||||
|
LPT2.DOS=
|
||||||
|
|
||||||
|
[FontSubstitutes]
|
||||||
|
Helv=MS Sans Serif
|
||||||
|
Tms Rmn=MS Serif
|
||||||
|
Times=Times New Roman
|
||||||
|
Helvetica=Arial
|
||||||
|
|
||||||
|
[TrueType]
|
||||||
|
|
||||||
|
[mci extensions]
|
||||||
|
wav=waveaudio
|
||||||
|
mid=sequencer
|
||||||
|
rmi=sequencer
|
||||||
|
avi=AVIVideo
|
||||||
|
|
||||||
|
[Compatibility]
|
||||||
|
NOTSHELL=0x0001
|
||||||
|
WPWINFIL=0x0006
|
||||||
|
CCMAIL=0x0008
|
||||||
|
AMIPRO=0x0010
|
||||||
|
REM=0x8022
|
||||||
|
PIXIE=0x0040
|
||||||
|
CP=0x0040
|
||||||
|
JW=0x42080
|
||||||
|
TME=0x0100
|
||||||
|
VB=0x0200
|
||||||
|
WIN2WRS=0x1210
|
||||||
|
PACKRAT=0x0800
|
||||||
|
VISION=0x0040
|
||||||
|
MCOURIER=0x0800
|
||||||
|
_BNOTES=0x24000
|
||||||
|
MILESV3=0x1000
|
||||||
|
PM4=0x2000
|
||||||
|
DESIGNER=0x2000
|
||||||
|
PLANNER=0x2000
|
||||||
|
DRAW=0x2000
|
||||||
|
WINSIM=0x2000
|
||||||
|
CHARISMA=0x2000
|
||||||
|
PR2=0x2000
|
||||||
|
PLUS=0x1000
|
||||||
|
ED=0x00010000
|
||||||
|
APORIA=0x0100
|
||||||
|
EXCEL=0x1000
|
||||||
|
GUIDE=0x1000
|
||||||
|
NETSET2=0x0100
|
||||||
|
W4GL=0x4000
|
||||||
|
W4GLR=0x4000
|
||||||
|
TURBOTAX=0x00080000
|
||||||
|
|
||||||
|
[winsetup]
|
||||||
|
source_disk_path=C:\INST311
|
||||||
|
|
||||||
|
[fonts]
|
||||||
|
Arial (TrueType)=ARIAL.FOT
|
||||||
|
Arial Bold (TrueType)=ARIALBD.FOT
|
||||||
|
Arial Bold Italic (TrueType)=ARIALBI.FOT
|
||||||
|
Arial Italic (TrueType)=ARIALI.FOT
|
||||||
|
Courier New (TrueType)=COUR.FOT
|
||||||
|
Courier New Bold (TrueType)=COURBD.FOT
|
||||||
|
Courier New Bold Italic (TrueType)=COURBI.FOT
|
||||||
|
Courier New Italic (TrueType)=COURI.FOT
|
||||||
|
Times New Roman (TrueType)=TIMES.FOT
|
||||||
|
Times New Roman Bold (TrueType)=TIMESBD.FOT
|
||||||
|
Times New Roman Bold Italic (TrueType)=TIMESBI.FOT
|
||||||
|
Times New Roman Italic (TrueType)=TIMESI.FOT
|
||||||
|
WingDings (TrueType)=WINGDING.FOT
|
||||||
|
MS Sans Serif 8,10,12,14,18,24 (VGA res)=SSERIFE.FON
|
||||||
|
Courier 10,12,15 (VGA res)=COURE.FON
|
||||||
|
MS Serif 8,10,12,14,18,24 (VGA res)=SERIFE.FON
|
||||||
|
Symbol 8,10,12,14,18,24 (VGA res)=SYMBOLE.FON
|
||||||
|
Roman (Plotter)=ROMAN.FON
|
||||||
|
Script (Plotter)=SCRIPT.FON
|
||||||
|
Modern (Plotter)=MODERN.FON
|
||||||
|
Small Fonts (VGA res)=SMALLE.FON
|
||||||
|
Symbol (TrueType)=SYMBOL.FOT
|
||||||
|
|
||||||
|
[embedding]
|
||||||
|
SoundRec=Sound,Sound,SoundRec.exe,picture
|
||||||
|
Package=Package,Package,packager.exe,picture
|
||||||
|
PBrush=Paintbrush Picture,Paintbrush Picture,pbrush.exe,picture
|
||||||
|
MPlayer=Media Clip,Media Clip,mplayer.exe,picture
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
Background=0 0 128
|
||||||
|
AppWorkspace=255 255 255
|
||||||
|
Window=255 255 255
|
||||||
|
WindowText=0 0 0
|
||||||
|
Menu=255 255 255
|
||||||
|
MenuText=0 0 0
|
||||||
|
ActiveTitle=0 0 128
|
||||||
|
InactiveTitle=255 255 255
|
||||||
|
TitleText=255 255 255
|
||||||
|
ActiveBorder=192 192 192
|
||||||
|
InactiveBorder=192 192 192
|
||||||
|
WindowFrame=0 0 0
|
||||||
|
Scrollbar=192 192 192
|
||||||
|
ButtonFace=192 192 192
|
||||||
|
ButtonShadow=128 128 128
|
||||||
|
ButtonText=0 0 0
|
||||||
|
GrayText=192 192 192
|
||||||
|
Hilight=0 0 128
|
||||||
|
HilightText=255 255 255
|
||||||
|
InactiveTitleText=0 0 0
|
||||||
|
ButtonHilight=255 255 255
|
||||||
|
|
||||||
|
[drawdib]
|
||||||
|
s3trio.drv 640x480x8(5)=1,0,0,0
|
||||||
|
|
||||||
|
[sounds]
|
||||||
|
SystemAsterisk=ding.wav,Asterisk
|
||||||
|
SystemHand=ding.wav,Critical Stop
|
||||||
|
SystemDefault=ding.wav,Default Beep
|
||||||
|
SystemExclamation=ding.wav,Exclamation
|
||||||
|
RingIn=ringin.wav,Incoming Call
|
||||||
|
RingOut=ringout.wav,Outgoing Call
|
||||||
|
SystemQuestion=ding.wav,Question
|
||||||
|
SystemExit=,Windows Exit
|
||||||
|
SystemStart=,Windows Start
|
||||||
|
|
||||||
|
[WinG]
|
||||||
|
s3trio.drv640x480x8(0,12)v1.70.4.0-2336-1.0.0.37=ECHGECHGECHGECHGDDFFDDFFDDFFDDFFZZZZZZZZZZZZZZZZDDFGDGFGDDFFDDFG1F
|
||||||
|
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WIN311.PWL
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WIN311.PWL
Normal file
Binary file not shown.
3
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WINFILE.INI
Normal file
3
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WINFILE.INI
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[Settings]
|
||||||
|
Window=0,0,640,480, , ,1
|
||||||
|
dir1=0,0,522,249,-1,-1,1,0,201,1905,174,C:\*.*
|
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WINGSDK.GRP
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/WINGSDK.GRP
Normal file
Binary file not shown.
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/_DEFAULT.PIF
Normal file
BIN
installers/dosboxw31/INSTALLERS/CFG/WINDOWS/_DEFAULT.PIF
Normal file
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
""
|
25
installers/dosboxw31/INSTALLERS/LINKS.txt
Normal file
25
installers/dosboxw31/INSTALLERS/LINKS.txt
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
S3:
|
||||||
|
http://web.archive.org/web/20070404005124/http://drivers.s3graphics.com/en/download/drivers/legacy/Trio64V_765/w3117004.zip
|
||||||
|
http://web.archive.org/web/19980623182122/http://www.s3.com/bbs/764drv/w3117004.zip
|
||||||
|
|
||||||
|
PW1118.exe (Win32s):
|
||||||
|
https://web.archive.org/web/20220831184504/http://ftpmirror.your.org/pub/misc/ftp.microsoft.com/Softlib/MSLFILES/PW1118.EXE
|
||||||
|
http://web.mit.edu/cascon/microsoft/pw1118.exe
|
||||||
|
http://web.archive.org/web/20010430062244if_/http://web.mit.edu:80/cascon/microsoft/pw1118.exe
|
||||||
|
|
||||||
|
TCP32b:
|
||||||
|
http://web.archive.org/web/20010526175751/http://mssjus.www.conxion.com/download/wfw311/update/3.11b/wfw/en-us/tcp32b.exe
|
||||||
|
http://web.archive.org/web/20061212121000/http://download.microsoft.com/download/wfw311/update/3.11b/wfw/en-us/tcp32b.exe
|
||||||
|
|
||||||
|
WV1160 (Video for Windows)
|
||||||
|
http://web.archive.org/web/20021016075846/http://www.ic.sunysb.edu/pub/wv1160.exe
|
||||||
|
http://ftp.lanet.lv/ftp/windows/www/netscape3.0/wv1160.exe
|
||||||
|
*BROKEN* web.archive.org/web/20150714132235/http://web1.toshiba.ca/support/isg/drivers/archives/files_Archive/win3x/wv1160.exe
|
||||||
|
|
||||||
|
WING10
|
||||||
|
http://web.archive.org/web/20040604045533/http://download.microsoft.com/download/platformsdk/wing/1/win98/en-us/wing10.exe
|
||||||
|
http://ftpmirror.your.org/pub/misc/ftp.microsoft.com/Softlib/MSLFILES/WING10.EXE
|
||||||
|
http://web.archive.org/web/20220831185005/http://ftpmirror.your.org/pub/misc/ftp.microsoft.com/Softlib/MSLFILES/WING10.EXE
|
||||||
|
|
||||||
|
WMP
|
||||||
|
http://web.archive.org/web/20011206032410/http://msdl.microsoft.com/msdownload/mplayer/3.0/b1/en/MPSetup.exe
|
1297
installers/dosboxw31/INSTALLERS/dosbox-x.conf
Normal file
1297
installers/dosboxw31/INSTALLERS/dosbox-x.conf
Normal file
File diff suppressed because it is too large
Load diff
11
installers/dosboxw31/INSTALLERS/mouse/oemsetup.inf
Normal file
11
installers/dosboxw31/INSTALLERS/mouse/oemsetup.inf
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[data]
|
||||||
|
Version = "3.1"
|
||||||
|
|
||||||
|
[disks]
|
||||||
|
1 =. ,"DOSBox-X Guest Additions for Windows 3.1 Disk",disk1
|
||||||
|
|
||||||
|
[pointing.device]
|
||||||
|
;profile = mouse driver, description, vmd, dos mouse driver base name
|
||||||
|
;
|
||||||
|
dboxmpi = 1:dboxmpi.drv, "DOSBox-X Mouse Pointer Integration", x:*vmd,dboxmpi
|
||||||
|
|
BIN
installers/dosboxw31/INSTALLERS/mouse/source.zip
Normal file
BIN
installers/dosboxw31/INSTALLERS/mouse/source.zip
Normal file
Binary file not shown.
BIN
installers/dosboxw31/INSTALLERS/msunpak-source.zip
Normal file
BIN
installers/dosboxw31/INSTALLERS/msunpak-source.zip
Normal file
Binary file not shown.
BIN
installers/dosboxw31/INSTALLERS/msunpak.exe
Normal file
BIN
installers/dosboxw31/INSTALLERS/msunpak.exe
Normal file
Binary file not shown.
1228
installers/dosboxw31/_WFW311AUTOINSTALLER_.bat
Normal file
1228
installers/dosboxw31/_WFW311AUTOINSTALLER_.bat
Normal file
File diff suppressed because it is too large
Load diff
20
installers/dosboxw31/w31launcher.bat
Normal file
20
installers/dosboxw31/w31launcher.bat
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
if exist "%~1" (
|
||||||
|
echo Startup directory: %~dp1
|
||||||
|
echo Executable name: %~nx1
|
||||||
|
|
||||||
|
echo Executing in DOSBox-X Win3.11...
|
||||||
|
cd "%~dp0"
|
||||||
|
dosbox-x.exe -c "MOUNT D: '%~dp1' " -c "C:\WINDOWS\WIN.COM D:\%~nx1 " -c "exit "
|
||||||
|
REM timeout /t 5
|
||||||
|
REM del /Q "%~dp1\launchit.cfg"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~1" (
|
||||||
|
echo This scripts will run given executable in Windows 3.11 inside DOSBox-X.
|
||||||
|
echo.
|
||||||
|
echo Usage:
|
||||||
|
echo w31launcher.bat "PathToExecutable.exe"
|
||||||
|
echo.
|
||||||
|
)
|
|
@ -0,0 +1,30 @@
|
||||||
|
@echo off
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo Checking DPI and setting correct scaling for 1024x768
|
||||||
|
echo.
|
||||||
|
echo System DPI:
|
||||||
|
powershell "$dpi = try { (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop' -Name 'LogPixels') } catch { try { powershell (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop\WindowMetrics' -Name 'AppliedDPI') } catch { 96 } }; echo $dpi "
|
||||||
|
echo.
|
||||||
|
|
||||||
|
set "tempfile=tmpresfil.tmp"
|
||||||
|
>"%tempfile%" powershell "$dpi = try { (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop' -Name 'LogPixels') } catch { try { powershell (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop\WindowMetrics' -Name 'AppliedDPI') } catch { 96 } }; if ($dpi -In -999..113) { echo 1024x768 } ; if ($dpi -In 114..134) { echo 1280x960 } ; if ($dpi -In 135..164) { echo 1536x1152 } ; if ($dpi -In 165..182) { echo 1792x1344 } ; if ($dpi -In 183..999) { echo 2048x1536 } "
|
||||||
|
|
||||||
|
set /p RESOLUTIONSTRING=<"%tempfile%"
|
||||||
|
del /q "%tempfile%"
|
||||||
|
|
||||||
|
echo Scaling 1024x768 to:
|
||||||
|
echo %RESOLUTIONSTRING%
|
||||||
|
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace '^windowresolution.+$','windowresolution = %RESOLUTIONSTRING%'} | Set-Content 'dosbox-x.new'"
|
||||||
|
|
||||||
|
if exist "dosbox-x.new" (
|
||||||
|
del /Q dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.conf dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.new dosbox-x.conf
|
||||||
|
)
|
||||||
|
|
||||||
|
REM del /Q ".\guest_tools\runonce\runonce.bat"
|
||||||
|
echo. >> ".\guest_tools\runonce\runonce.bat"
|
||||||
|
type ".\guest_tools\guest-scripts\1024_16bpp.bat" >> ".\guest_tools\runonce\runonce.bat"
|
|
@ -0,0 +1,30 @@
|
||||||
|
@echo off
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo Checking DPI and setting correct scaling for 640x480
|
||||||
|
echo.
|
||||||
|
echo System DPI:
|
||||||
|
powershell "$dpi = try { (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop' -Name 'LogPixels') } catch { try { powershell (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop\WindowMetrics' -Name 'AppliedDPI') } catch { 96 } }; echo $dpi "
|
||||||
|
echo.
|
||||||
|
|
||||||
|
set "tempfile=tmpresfil.tmp"
|
||||||
|
>"%tempfile%" powershell "$dpi = try { (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop' -Name 'LogPixels') } catch { try { powershell (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop\WindowMetrics' -Name 'AppliedDPI') } catch { 96 } } ; if ($dpi -In -999..113) { echo 640x480 } ; if ($dpi -In 114..134) { echo 800x600 } ; if ($dpi -In 135..164) { echo 960x720 } ; if ($dpi -In 165..182) { echo 1120x840 } ; if ($dpi -In 183..999) { echo 1280x960 } "
|
||||||
|
|
||||||
|
set /p RESOLUTIONSTRING=<"%tempfile%"
|
||||||
|
del /q "%tempfile%"
|
||||||
|
|
||||||
|
echo Scaling 640x480 to:
|
||||||
|
echo %RESOLUTIONSTRING%
|
||||||
|
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace '^windowresolution.+$','windowresolution = %RESOLUTIONSTRING%'} | Set-Content 'dosbox-x.new'"
|
||||||
|
|
||||||
|
if exist "dosbox-x.new" (
|
||||||
|
del /Q dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.conf dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.new dosbox-x.conf
|
||||||
|
)
|
||||||
|
|
||||||
|
REM del /Q ".\guest_tools\runonce\runonce.bat"
|
||||||
|
echo. >> ".\guest_tools\runonce\runonce.bat"
|
||||||
|
type ".\guest_tools\guest-scripts\640_16bpp.bat" >> ".\guest_tools\runonce\runonce.bat"
|
|
@ -0,0 +1,32 @@
|
||||||
|
@echo off
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo Checking DPI and setting correct scaling for 800x600
|
||||||
|
echo.
|
||||||
|
echo System DPI:
|
||||||
|
powershell "$dpi = try { (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop' -Name 'LogPixels') } catch { try { powershell (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop\WindowMetrics' -Name 'AppliedDPI') } catch { 96 } }; echo $dpi "
|
||||||
|
|
||||||
|
IF ERRORLEVEL 1 powershell "$dpi = 96 ; $echo scaling not detected, setting default $dpi DPI "
|
||||||
|
echo.
|
||||||
|
|
||||||
|
set "tempfile=tmpresfil.tmp"
|
||||||
|
>"%tempfile%" powershell "$dpi = try { (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop' -Name 'LogPixels') } catch { try { powershell (Get-ItemPropertyValue -Path 'HKCU:\Control Panel\Desktop\WindowMetrics' -Name 'AppliedDPI') } catch { 96 } } ; if ($dpi -In -999..113) { echo 800x600 } ; if ($dpi -In 114..134) { echo 1000x750 } ; if ($dpi -In 135..164) { echo 1200x900 } ; if ($dpi -In 165..182) { echo 1400x1050 } ; if ($dpi -In 183..999) { echo 1600x1200 } "
|
||||||
|
|
||||||
|
set /p RESOLUTIONSTRING=<"%tempfile%"
|
||||||
|
del /q "%tempfile%"
|
||||||
|
|
||||||
|
echo Scaling 800x600 to:
|
||||||
|
echo %RESOLUTIONSTRING%
|
||||||
|
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace '^windowresolution.+$','windowresolution = %RESOLUTIONSTRING%'} | Set-Content 'dosbox-x.new'"
|
||||||
|
|
||||||
|
if exist "dosbox-x.new" (
|
||||||
|
del /Q dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.conf dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.new dosbox-x.conf
|
||||||
|
)
|
||||||
|
|
||||||
|
REM del /Q ".\guest_tools\runonce\runonce.bat"
|
||||||
|
echo. >> ".\guest_tools\runonce\runonce.bat"
|
||||||
|
type ".\guest_tools\guest-scripts\800_16bpp.bat" >> ".\guest_tools\runonce\runonce.bat"
|
|
@ -0,0 +1,22 @@
|
||||||
|
@echo off
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo Disabling mouse integration
|
||||||
|
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace '^integration device.+$','integration device = false'} | Set-Content 'dosbox-x.new'"
|
||||||
|
|
||||||
|
if exist "dosbox-x.new" (
|
||||||
|
del /Q dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.conf dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.new dosbox-x.conf
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
REM del /Q ".\guest_tools\runonce\runonce.bat"
|
||||||
|
echo @echo off >> ".\guest_tools\runonce\runonce.bat"
|
||||||
|
echo O:\setmdrv.exe ps2 >> ".\guest_tools\runonce\runonce.bat"
|
||||||
|
|
||||||
|
if not exist ".\guest_tools\runonce\setmdrv.exe" (
|
||||||
|
copy ".\guest_tools\setmdrv\setmdrv.exe" ".\guest_tools\runonce\setmdrv.exe"
|
||||||
|
)
|
|
@ -0,0 +1,22 @@
|
||||||
|
@echo off
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo Disabling mouse integration
|
||||||
|
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace '^integration device.+$','integration device = true'} | Set-Content 'dosbox-x.new'"
|
||||||
|
|
||||||
|
if exist "dosbox-x.new" (
|
||||||
|
del /Q dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.conf dosbox-x.conf.bak
|
||||||
|
rename dosbox-x.new dosbox-x.conf
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
REM del /Q ".\guest_tools\runonce\runonce.bat"
|
||||||
|
echo @echo off >> ".\guest_tools\runonce\runonce.bat"
|
||||||
|
echo O:\setmdrv.exe dbox >> ".\guest_tools\runonce\runonce.bat"
|
||||||
|
|
||||||
|
if not exist ".\guest_tools\runonce\setmdrv.exe" (
|
||||||
|
copy ".\guest_tools\setmdrv\setmdrv.exe" ".\guest_tools\runonce\setmdrv.exe"
|
||||||
|
)
|
2
installers/dosboxw95/SHARED_DRIVE/readme.txt
Normal file
2
installers/dosboxw95/SHARED_DRIVE/readme.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
You can place here any files from the host operating system that need to be shared with Windows 95 emulated machine.
|
||||||
|
NOTE: emulated guest machine can read these files and can write to this directory while running, but the changes will NOT be written to this directory after the machine is powered off.
|
406
installers/dosboxw95/SetupW95DosboxX.bat
Normal file
406
installers/dosboxw95/SetupW95DosboxX.bat
Normal file
|
@ -0,0 +1,406 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
REM === CUSTOM SETTINGS ====================
|
||||||
|
|
||||||
|
|
||||||
|
REM Select virtual hard drive size.
|
||||||
|
REM Valid choices: 504MB, 2GB, 4GB, 8GB.
|
||||||
|
SET HDSIZE=504MB
|
||||||
|
|
||||||
|
REM Select resolution here. May be changed later.
|
||||||
|
REM Valid choices: 640x480x16bpp, 800x600x16bpp
|
||||||
|
SET SCREENRES=800x600x16bpp
|
||||||
|
|
||||||
|
REM SET PRODUCTKEY=ask
|
||||||
|
SET PRODUCTKEY=na
|
||||||
|
|
||||||
|
REM this disables startup/shutdown sounds
|
||||||
|
SET DISABLEONOFFSOUNDS=true
|
||||||
|
|
||||||
|
|
||||||
|
REM === DO NOT EDIT BELOW THIS LINE ========
|
||||||
|
REM ========================================
|
||||||
|
|
||||||
|
|
||||||
|
echo Dosbox-x + Windows 95 OSR2 ENG autoinstaller
|
||||||
|
echo.
|
||||||
|
echo This installed DOES NOT provide Windows 95 files.
|
||||||
|
echo.
|
||||||
|
echo You need to place your own installation files in .\installers\WIN95 directory.
|
||||||
|
echo Only English OSR2 OEM CD version will work with this script.
|
||||||
|
echo Other files - redistributables, updates and configuration files - will be downloaded automatically.
|
||||||
|
echo.
|
||||||
|
echo If required Windows 95 files are not present, you will be prompted to copy them to appropriate directory.
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
|
||||||
|
|
||||||
|
REM default virtual hard drive size
|
||||||
|
SET HDCHS=512,63,16,1023
|
||||||
|
SET HDTEMPLATE=hd_520
|
||||||
|
|
||||||
|
if "%HDSIZE%"=="2GB" SET HDCHS=512,63,64,1023
|
||||||
|
if "%HDSIZE%"=="2GB" SET HDTEMPLATE=hd_2gig
|
||||||
|
|
||||||
|
if "%HDSIZE%"=="4GB" SET HDCHS=512,63,130,1023
|
||||||
|
if "%HDSIZE%"=="4GB" SET HDTEMPLATE=hd_4gig
|
||||||
|
|
||||||
|
if "%HDSIZE%"=="8GB" SET HDCHS=512,63,255,1023
|
||||||
|
if "%HDSIZE%"=="8GB" SET HDTEMPLATE=hd_8gig
|
||||||
|
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
cd ..
|
||||||
|
cd ..
|
||||||
|
cd installers
|
||||||
|
SET DBOXIN=%CD%
|
||||||
|
cd 7-zip
|
||||||
|
SET ZPATH=%CD%
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\" (
|
||||||
|
mkdir "%~dp0\installers"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\WIN95\WIN95_02.cab" (
|
||||||
|
mkdir "%~dp0\installers\WIN95"
|
||||||
|
echo "" > "%~dp0\installers\WIN95\_PLACE_WIN95_FILES_HERE_"
|
||||||
|
echo.
|
||||||
|
echo Windows 95 files not found. Please copy them from CD-ROM .\WIN95 directory.
|
||||||
|
timeout /t 1 > nul
|
||||||
|
cd "%~dp0\installers\WIN95\"
|
||||||
|
start.
|
||||||
|
cd "%~dp0"
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist "%~dp0\installers\WIN95\_PLACE_WIN95_FILES_HERE_" (
|
||||||
|
del "%~dp0\installers\WIN95\_PLACE_WIN95_FILES_HERE_"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\WIN95\WIN95_02.cab" (
|
||||||
|
echo Windows 95 installation files still not found.
|
||||||
|
echo Restart the script after copying installation files.
|
||||||
|
pause
|
||||||
|
exit
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%ZPATH%\7za.exe" (
|
||||||
|
mkdir .\installers\7-zip
|
||||||
|
echo Downloading 7-zip
|
||||||
|
powershell wget https://www.7-zip.org/a/7zr.exe -UseBasicParsing -OutFile "%~dp0\installers\7-zip\7zr.exe"
|
||||||
|
powershell wget https://www.7-zip.org/a/7z2201-extra.7z -UseBasicParsing -OutFile "%~dp0\installers\7-zip\7z2201-extra.7z"
|
||||||
|
"%~dp0\installers\7-zip\7zr.exe" x "%~dp0\installers\7-zip\7z2201-extra.7z" -o"%~dp0\installers\7-zip"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%ZPATH%\7za.exe" (
|
||||||
|
"%~dp0\installers\7-zip\7zr.exe" x "%~dp0\installers\7-zip\7z2201-extra.7z" -o"%ZPATH%"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
REM =============================
|
||||||
|
REM WIN95 FILES EXTRACTION
|
||||||
|
REM =============================
|
||||||
|
echo.
|
||||||
|
echo Extracting Windows 95 installation files
|
||||||
|
echo.
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\WIN95\MINI\KRNL386.EXE" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\WIN95\MINI.CAB" -o"%~dp0\installers\WIN95\MINI"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\WIN95\WIN95_02\VMM32.VXD" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\WIN95\WIN95_02.CAB" -o"%~dp0\installers\WIN95\WIN95_02"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\WIN95\PRECOPY1\COMMAND.COM" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\WIN95\PRECOPY1.CAB" -o"%~dp0\installers\WIN95\PRECOPY1"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\WIN95\SWINST4\REGSVR32.EXE" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\WIN95\SWINST4.EXE" -o"%~dp0\installers\WIN95\SWINST4"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\WIN95\WIN95_02\SETUPSLT\REGSVR32.EXE" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\WIN95\WIN95_02\SETUPSLT.EXE" -o"%~dp0\installers\WIN95\WIN95_02\SETUPSLT"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\WIN95\WIN95_02\SETUP32" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\WIN95\WIN95_02\SETUP32.EXE" -o"%~dp0\installers\WIN95\WIN95_02\SETUP32"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\WIN95\WIN95_02\SETUP25i" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\WIN95\WIN95_02\SETUP25i.EXE" -o"%~dp0\installers\WIN95\WIN95_02\SETUP25i"
|
||||||
|
)
|
||||||
|
REM =============================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
REM =============================
|
||||||
|
REM WIN95 UPDATES DOWNLOAD
|
||||||
|
REM =============================
|
||||||
|
if not exist "%~dp0\installers\DX7Aeng.exe" (
|
||||||
|
echo Downloading DirectX 7.0A DX7Aeng.exe
|
||||||
|
powershell wget http://web.archive.org/web/20020607231943if_/http://download.microsoft.com/download/win98SE/Update/7.0a/W9X/EN-US/DX7Aeng.exe -UseBasicParsing -OutFile "%~dp0\installers\DX7Aeng.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\dcom95.exe" (
|
||||||
|
echo Downloading DCOM95 dcom95.exe
|
||||||
|
powershell wget http://web.archive.org/web/20020223193556if_/http://msdl.microsoft.com/msdownload/dcom/95/x86/en/dcom95.exe -UseBasicParsing -OutFile "%~dp0\installers\dcom95.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\w95y2k.exe" (
|
||||||
|
echo Downloading Year 2000 patch w95y2k.exe
|
||||||
|
powershell wget http://web.archive.org/web/20010607121741if_/http://msdownload.microsoft.com/msdownload/w95/y2kupdate/x86/en/w95y2k.exe -UseBasicParsing -OutFile "%~dp0\installers\w95y2k.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\mpfull.exe" (
|
||||||
|
echo Downloading Windows Media Player 6.4 mpfull.exe
|
||||||
|
powershell wget http://web.archive.org/web/20040612122847if_/http://download.microsoft.com/download/winmediaplayer/update/6.4/w9xnt4/en-us/mpfull.exe -UseBasicParsing -OutFile "%~dp0\installers\mpfull.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\W95WS2setup.exe" (
|
||||||
|
echo Downloading Winsock 2 Update W95WS2setup.exe
|
||||||
|
powershell wget http://web.archive.org/web/20010418081915if_/http://microsoft.com/windows/downloads/bin/W95WS2setup.exe -UseBasicParsing -OutFile "%~dp0\installers\W95WS2setup.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\vg-w9x-q3.exe" (
|
||||||
|
echo Downloading 3Dfx Voodoo Graphics driver vg-w9x-q3.exe
|
||||||
|
powershell wget http://web.archive.org/web/20031111193444if_/https://www.3dfxzone.it/voodoo1/3dfx/vg-w9x-q3.exe -UseBasicParsing -OutFile "%~dp0\installers\vg-w9x-q3.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\w9521103.zip" (
|
||||||
|
echo Downloading S3 Graphics driver w9521103.zip
|
||||||
|
powershell wget http://web.archive.org/web/19970625230911if_/http://www.s3.com/bbs/764drv/w9521103.zip -UseBasicParsing -OutFile "%~dp0\installers\w9521103.zip"
|
||||||
|
)
|
||||||
|
REM =============================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
REM =============================
|
||||||
|
REM DOWNLOADS CHECKSUM VALIDATION
|
||||||
|
REM =============================
|
||||||
|
echo Checking SHA256 of DX7Aeng.exe (564de93dcc50691480332e2ccb5565908760b295faa70f8c68854f69dad87189 expected)
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\DX7Aeng.exe' -Algorithm SHA256 | %% { if($_.Hash -match '564de93dcc50691480332e2ccb5565908760b295faa70f8c68854f69dad87189') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad DX7Aeng.exe checksum
|
||||||
|
echo Download file manually before continuing or press any key to ignore
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Checking SHA256 of dcom95.exe (6706f79435d75682b0ce69b144108b3c344cae9f7aee7490de47aa20b4f311d3 expected)
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\dcom95.exe' -Algorithm SHA256 | %% { if($_.Hash -match '6706f79435d75682b0ce69b144108b3c344cae9f7aee7490de47aa20b4f311d3') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad dcom95.exe checksum
|
||||||
|
echo Download file manually before continuing or press any key to ignore
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Checking SHA256 of w95y2k.exe (d3c063f2b04311ddbffd8461aa47147d6307f26d2163bef2c715cd168657aa3f expected)
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\w95y2k.exe' -Algorithm SHA256 | %% { if($_.Hash -match 'd3c063f2b04311ddbffd8461aa47147d6307f26d2163bef2c715cd168657aa3f') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad w95y2k.exe checksum
|
||||||
|
echo Download file manually before continuing or press any key to ignore
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Checking SHA256 of mpfull.exe (a39b2b9735cedd513fcb78f8634695d35073e9d7e865e536a0da6db38c7225e4 expected)
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\mpfull.exe' -Algorithm SHA256 | %% { if($_.Hash -match 'a39b2b9735cedd513fcb78f8634695d35073e9d7e865e536a0da6db38c7225e4') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad mpfull.exe checksum
|
||||||
|
echo Download file manually before continuing or press any key to ignore
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Checking SHA256 of W95WS2setup.exe (48c82825328ef63bce1d471d505f0e243cae94b5b05c66cf2e51b75c6d4d4922 expected)
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\W95WS2setup.exe' -Algorithm SHA256 | %% { if($_.Hash -match '48c82825328ef63bce1d471d505f0e243cae94b5b05c66cf2e51b75c6d4d4922') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad W95WS2setup.exe checksum
|
||||||
|
echo Download file manually before continuing or press any key to ignore
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Checking SHA256 of vg-w9x-q3.exe (afde9cfc18080ba4bd94972b783867a9c713e6df3643fef84db5da19414ceea8 expected)
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\vg-w9x-q3.exe' -Algorithm SHA256 | %% { if($_.Hash -match 'afde9cfc18080ba4bd94972b783867a9c713e6df3643fef84db5da19414ceea8') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad vg-w9x-q3.exe checksum
|
||||||
|
echo Download file manually before continuing or press any key to ignore
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Checking SHA256 of w9521103.zip (fb691c872cd7dcc00d7b9445af6d82777586e356e165d5db56f213fa81e96881 expected)
|
||||||
|
powershell "Get-FileHash '%~dp0\installers\w9521103.zip' -Algorithm SHA256 | %% { if($_.Hash -match 'fb691c872cd7dcc00d7b9445af6d82777586e356e165d5db56f213fa81e96881') {Echo 'SHA256 OK'} else{exit 1} }"
|
||||||
|
if errorlevel 1 (
|
||||||
|
echo.
|
||||||
|
echo Bad w9521103.zip checksum
|
||||||
|
echo Download file manually before continuing or press any key to ignore
|
||||||
|
pause
|
||||||
|
)
|
||||||
|
REM =============================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
REM =============================
|
||||||
|
REM UPDATES EXTRACTION
|
||||||
|
REM =============================
|
||||||
|
echo.
|
||||||
|
echo Extracting Windows 95 installation files
|
||||||
|
echo.
|
||||||
|
|
||||||
|
mkdir "%~dp0\installers\expanded"
|
||||||
|
|
||||||
|
if not exist "%~dp0\installers\expanded\dcom95\dllhost.exe" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\dcom95.exe" -o"%~dp0\installers\expanded\dcom95"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\expanded\DX7Aeng\ddraw.dll" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\DX7Aeng.exe" -o"%~dp0\installers\expanded\DX7Aeng"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\expanded\mpfull\mplayer2.exe" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\mpfull.exe" -o"%~dp0\installers\expanded\mpfull"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\expanded\mpfull\dxmini\ddhelp.exe" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\mpfull\dxmini.exe" -o"%~dp0\installers\expanded\mpfull\dxmini"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\expanded\vg-w9x-q3\voodoo.inf" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\vg-w9x-q3.exe" -o"%~dp0\installers\expanded\vg-w9x-q3"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\expanded\w9521103\S3.INF" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\w9521103.zip" -o"%~dp0\installers\expanded\w9521103"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\expanded\w95y2k\WINFILE.EXE" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\w95y2k.exe" -o"%~dp0\installers\expanded\w95y2k"
|
||||||
|
)
|
||||||
|
if not exist "%~dp0\installers\expanded\W95WS2setup\ping.exe" (
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\W95WS2setup.exe" -o"%~dp0\installers\expanded\W95WS2setup"
|
||||||
|
)
|
||||||
|
REM =============================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Extracting config files and utilities
|
||||||
|
"%ZPATH%\7za.exe" x "%~dp0\installers\w95-inst-utils-cfgfiles.7z" -o"%~dp0\installers"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Creating Windows 95 directory structure
|
||||||
|
echo.
|
||||||
|
pushd "%~dp0\installers"
|
||||||
|
call makewin95dir.bat
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Applying patches
|
||||||
|
cd "%~dp0\installers\xdelta"
|
||||||
|
call "%~dp0\installers\xdelta\undelta.bat"
|
||||||
|
cd "%~dp0\installers"
|
||||||
|
call "%~dp0\installers\copypatched.bat"
|
||||||
|
|
||||||
|
if not exist "%~dp0\dosbox-x.exe" (
|
||||||
|
|
||||||
|
|
||||||
|
if not exist "%DBOXIN%\dosbox-x-mingw*.<zip" (
|
||||||
|
echo Downloading DOSbox-X
|
||||||
|
powershell wget https://github.com/joncampbell123/dosbox-x/releases/download/dosbox-x-v0.84.3/dosbox-x-mingw-win64-20220901233004.zip -UseBasicParsing -OutFile "%DBOXIN%\dosbox-x-mingw-win64-20220901233004.zip"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Extracting DOSbox-X
|
||||||
|
"%ZPATH%\7za.exe" x "%DBOXIN%\dosbox-x-*" -o"%~dp0" mingw-build\mingw\*
|
||||||
|
|
||||||
|
pushd "%~dp0\mingw-build\mingw"
|
||||||
|
for %%i in (*) do move "%%i" "%~dp0"
|
||||||
|
for /d %%i in (*) do move "%%i" "%~dp0"
|
||||||
|
pushd "%~dp0"
|
||||||
|
rmdir "%~dp0\mingw-build\mingw"
|
||||||
|
rmdir "%~dp0\mingw-build"
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Copying DOSbox-X config files and utilities
|
||||||
|
xcopy /Y /E "%~dp0\installers\dosbox-utils\*.*" "%~dp0\*.*"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Starting auto-installation procedure in DOSbox-X, please wait and do not interfere...
|
||||||
|
echo.
|
||||||
|
timeout /t 2 > nul
|
||||||
|
|
||||||
|
mkdir "%~dp0\HDD"
|
||||||
|
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
dosbox-x.exe -noautoexec -c "config -set turbo=true " -c "IMGMAKE .\HDD\WIN95.IMG -t %HDTEMPLATE% " -c "IMGMOUNT C .\HDD\WIN95.IMG -size %HDCHS% " -c "MOUNT D: .\installers " -c "4dos D:\prephdd.bat"
|
||||||
|
|
||||||
|
timeout /t 1 > NUL
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Setting pre-selected screen resolution
|
||||||
|
if "%SCREENRES%"=="800x600x16bpp" call "%~dp0\CONFIG_SCRIPTS\800x600_16bpp_DPI-scaled.bat"
|
||||||
|
if "%SCREENRES%"=="640x480x16bpp" call "%~dp0\CONFIG_SCRIPTS\640x480_16bpp_DPI-scaled.bat"
|
||||||
|
|
||||||
|
REM ask for product key on first boot
|
||||||
|
if "%PRODUCTKEY%"=="ask" echo. >> "%~dp0\guest_tools\runonce\runonce.bat"
|
||||||
|
if "%PRODUCTKEY%"=="ask" type "%~dp0\guest_tools\guest-scripts\prodtyp9.bat" >> "%~dp0\guest_tools\runonce\runonce.bat"
|
||||||
|
|
||||||
|
|
||||||
|
REM disable startup/shutdown sounds
|
||||||
|
if "%DISABLEONOFFSOUNDS%"=="true" echo. >> "%~dp0\guest_tools\runonce\runonce.bat"
|
||||||
|
if "%DISABLEONOFFSOUNDS%"=="true" type "%~dp0\guest_tools\guest-scripts\nostsnd.bat" >> "%~dp0\guest_tools\runonce\runonce.bat"
|
||||||
|
|
||||||
|
|
||||||
|
timeout /t 1 > NUL
|
||||||
|
|
||||||
|
|
||||||
|
echo Setting HDD size in config file
|
||||||
|
pushd "%~dp0"
|
||||||
|
del /Q dosbox-x.new
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace 'size 512,63,16,1023 -ide 1m','size %HDCHS% -ide 1m'} | Set-Content 'dosbox-x.new'"
|
||||||
|
del /Q dosbox-x.conf
|
||||||
|
copy dosbox-x.new dosbox-x.conf
|
||||||
|
|
||||||
|
REM that will make the machine turn off after first boot
|
||||||
|
copy dosbox-x.new dosbox-x.conf
|
||||||
|
echo SHUTDOWN > .\SHARED_DRIVE\launchit.cfg
|
||||||
|
|
||||||
|
echo Trying to boot for first time...
|
||||||
|
dosbox-x.exe -c "MOUNT D: .\SHARED_DRIVE -ide 2s " -c "BOOT C: "
|
||||||
|
|
||||||
|
del /Q .\SHARED_DRIVE\launchit.cfg
|
||||||
|
|
||||||
|
|
||||||
|
echo Enabling turbo on boot time
|
||||||
|
pushd "%~dp0"
|
||||||
|
del /Q dosbox-x.new
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace '#turbo last second','turbo last second'} | Set-Content 'dosbox-x.new'"
|
||||||
|
del /Q dosbox-x.conf
|
||||||
|
copy dosbox-x.new dosbox-x.conf
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace '#stop turbo after second','stop turbo after second'} | Set-Content 'dosbox-x.new'"
|
||||||
|
del /Q dosbox-x.conf
|
||||||
|
copy dosbox-x.new dosbox-x.conf
|
||||||
|
powershell "Get-Content 'dosbox-x.conf' | Foreach-Object {$_ -replace '#stop turbo on key','stop turbo on key'} | Set-Content 'dosbox-x.new'"
|
||||||
|
del /Q dosbox-x.conf
|
||||||
|
copy dosbox-x.new dosbox-x.conf
|
||||||
|
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done! Start dosbox-x.exe to launch Windows 95.
|
||||||
|
echo.
|
||||||
|
|
||||||
|
pause
|
||||||
|
|
29
installers/dosboxw95/_startinw95.bat
Normal file
29
installers/dosboxw95/_startinw95.bat
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
if exist "%~1" (
|
||||||
|
echo Startup directory: %~dp1
|
||||||
|
echo Executable name: %~nx1
|
||||||
|
echo Adding launchit.cfg to startup directory...
|
||||||
|
echo %~nx1 > "%~dp1\launchit.cfg"
|
||||||
|
|
||||||
|
if not [%2]==[] (
|
||||||
|
if "%2"=="NOSHUTDOWN" echo Adding NOSHUTDOWN flag
|
||||||
|
if "%2"=="NOSHUTDOWN" echo NOSHUTDOWN >> "%~dp1\launchit.cfg"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Executing in DOSBox-X Win95...
|
||||||
|
cd "%~dp0"
|
||||||
|
start dosbox-x.exe -c "MOUNT D: '%~dp1' -ide 2s " -c "BOOT C: "
|
||||||
|
REM timeout /t 5
|
||||||
|
REM del /Q "%~dp1\launchit.cfg"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%~1" (
|
||||||
|
echo This scripts will run given executable in Windows 95 inside DOSBox-X.
|
||||||
|
echo.
|
||||||
|
echo Usage:
|
||||||
|
echo _startinwin95.bat "PathToExecutable.exe"
|
||||||
|
echo.
|
||||||
|
echo Note: a file "launchit.cfg" will be created in executable directory at launch time, it can be safely removed at any time.
|
||||||
|
echo Emulated machine also needs to have "alaucnhr.exe" installed in autostart directory.
|
||||||
|
)
|
1281
installers/dosboxw95/dosbox-x.conf
Normal file
1281
installers/dosboxw95/dosbox-x.conf
Normal file
File diff suppressed because it is too large
Load diff
3
installers/dosboxw95/guest_tools/alaunchr/alaunchr.cfg
Normal file
3
installers/dosboxw95/guest_tools/alaunchr/alaunchr.cfg
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
D:
|
||||||
|
launchit.cfg
|
||||||
|
SHUTDOWN
|
1
installers/dosboxw95/guest_tools/alaunchr/launchit.cfg
Normal file
1
installers/dosboxw95/guest_tools/alaunchr/launchit.cfg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
exampleapp.exe
|
15
installers/dosboxw95/guest_tools/alaunchr/readme.txt
Normal file
15
installers/dosboxw95/guest_tools/alaunchr/readme.txt
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
This application can be placed in Startup directory inside virtual/emulated machine.
|
||||||
|
It will check if a file launchit.cfg (or other pre-configured name) is located in D: (or other drive) and if yes, then it will launch an application specified in launchit.cfg file. It can also turn the computer off after execution is completed.
|
||||||
|
|
||||||
|
Create config file for auto-launcher.
|
||||||
|
Place it next to launcher executable or in %WINDIR%\alaunchr.cfg
|
||||||
|
|
||||||
|
Example contents:
|
||||||
|
|
||||||
|
D:
|
||||||
|
launchit.cfg
|
||||||
|
SHUTDOWN\
|
||||||
|
|
||||||
|
D: is working directory
|
||||||
|
launchit.cfg is the name of file containing name of executable to launch (both located in working directory)
|
||||||
|
SHUTDOWN (optional) means the computer will turn off automatically after launched app is closed (only for Win 9x).
|
435
installers/dosboxw95/guest_tools/alaunchr/src/alaunchr.cpp
Normal file
435
installers/dosboxw95/guest_tools/alaunchr/src/alaunchr.cpp
Normal file
|
@ -0,0 +1,435 @@
|
||||||
|
#if defined(UNICODE) && !defined(_UNICODE)
|
||||||
|
#define _UNICODE
|
||||||
|
#elif defined(_UNICODE) && !defined(UNICODE)
|
||||||
|
#define UNICODE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <tchar.h>
|
||||||
|
#include <windows.h>
|
||||||
|
#include <string>
|
||||||
|
#include <fstream.h>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <tlhelp32.h>
|
||||||
|
|
||||||
|
#define IDT_TIMER1 1001
|
||||||
|
|
||||||
|
/* Declare Windows procedure */
|
||||||
|
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
|
||||||
|
|
||||||
|
/* Make the class name into a global variable */
|
||||||
|
TCHAR szClassName[ ] = _T("AutoAppLauncher");
|
||||||
|
|
||||||
|
PROCESS_INFORMATION pi;
|
||||||
|
|
||||||
|
bool shutdownOnEnd = false;
|
||||||
|
bool shutdownOnlyLegacyOS = true; // Shutdown only for Win9x and < XP
|
||||||
|
|
||||||
|
bool pauseEnd = false;
|
||||||
|
|
||||||
|
bool timerOn = false;
|
||||||
|
|
||||||
|
DWORD dwVersion = 0;
|
||||||
|
DWORD dwMajorVersion = 0;
|
||||||
|
DWORD dwMinorVersion = 0;
|
||||||
|
DWORD dwBuild = 0;
|
||||||
|
|
||||||
|
|
||||||
|
std::string globalConfigFile = std::string(getenv("WINDIR")) + "\\alaunchr.cfg";
|
||||||
|
std::string cfgFile = "";
|
||||||
|
std::string startupPath = "";
|
||||||
|
|
||||||
|
std::string ReadNthLine(const std::string& filename, int N)
|
||||||
|
{
|
||||||
|
std::ifstream in(filename.c_str());
|
||||||
|
|
||||||
|
std::string s;
|
||||||
|
//for performance
|
||||||
|
s.reserve(1024);
|
||||||
|
|
||||||
|
//skip N lines
|
||||||
|
for(int i = 0; i < N; ++i)
|
||||||
|
std::getline(in, s);
|
||||||
|
|
||||||
|
std::getline(in,s);
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL FileExists(LPCTSTR szPath)
|
||||||
|
{
|
||||||
|
DWORD dwAttrib = GetFileAttributes(szPath);
|
||||||
|
|
||||||
|
return (dwAttrib != -1 &&
|
||||||
|
!(dwAttrib & FILE_ATTRIBUTE_DIRECTORY));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool CheckOneInstance()
|
||||||
|
{
|
||||||
|
|
||||||
|
HANDLE m_hStartEvent = CreateEventA( NULL, FALSE, FALSE, "Global\\BALAUNCR" );
|
||||||
|
|
||||||
|
if(m_hStartEvent == NULL)
|
||||||
|
{
|
||||||
|
CloseHandle( m_hStartEvent );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ( GetLastError() == ERROR_ALREADY_EXISTS ) {
|
||||||
|
|
||||||
|
CloseHandle( m_hStartEvent );
|
||||||
|
m_hStartEvent = NULL;
|
||||||
|
// already exist
|
||||||
|
// send message from here to existing copy of the application
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// the only instance, start in a usual way
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool startup(LPSTR lpApplicationName, PROCESS_INFORMATION &pi)
|
||||||
|
{
|
||||||
|
STARTUPINFO si;
|
||||||
|
//PROCESS_INFORMATION pi;
|
||||||
|
|
||||||
|
ZeroMemory( &si, sizeof(si) );
|
||||||
|
si.cb = sizeof(si);
|
||||||
|
ZeroMemory( &pi, sizeof(pi) );
|
||||||
|
|
||||||
|
// Start the child process.
|
||||||
|
if( !CreateProcessA( NULL, // No module name (use command line)
|
||||||
|
lpApplicationName, // Command line
|
||||||
|
NULL, // Process handle not inheritable
|
||||||
|
NULL, // Thread handle not inheritable
|
||||||
|
FALSE, // Set handle inheritance to FALSE
|
||||||
|
0, // No creation flags
|
||||||
|
NULL, // Use parent's environment block
|
||||||
|
startupPath.c_str(), // Start in...
|
||||||
|
&si, // Pointer to STARTUPINFO structure
|
||||||
|
&pi ) // Pointer to PROCESS_INFORMATION structure
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// Failed
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wait until child process exits.
|
||||||
|
//WaitForSingleObject( pi.hProcess, INFINITE );
|
||||||
|
|
||||||
|
// Close process and thread handles.
|
||||||
|
//CloseHandle( pi.hProcess );
|
||||||
|
//CloseHandle( pi.hThread );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int WINAPI WinMain (HINSTANCE hThisInstance,
|
||||||
|
HINSTANCE hPrevInstance,
|
||||||
|
LPSTR lpszArgument,
|
||||||
|
int nCmdShow)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Kill older process if needed (when abort option is passed as an argument)
|
||||||
|
if ( strstr(lpszArgument, "abort") || strstr(lpszArgument, "ABORT"))
|
||||||
|
{
|
||||||
|
PostQuitMessage (0);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Don't proceed if there is more than one instance of app
|
||||||
|
if (!CheckOneInstance())
|
||||||
|
{
|
||||||
|
|
||||||
|
pauseEnd = true;
|
||||||
|
|
||||||
|
int msgboxID = MessageBox(
|
||||||
|
NULL,
|
||||||
|
(LPCSTR) "Launcher is already running",
|
||||||
|
(LPCSTR)"Launcher already running",
|
||||||
|
MB_ICONWARNING | MB_OK
|
||||||
|
);
|
||||||
|
|
||||||
|
switch (msgboxID)
|
||||||
|
{
|
||||||
|
case IDOK:
|
||||||
|
|
||||||
|
pauseEnd = false;
|
||||||
|
PostQuitMessage (0); // Quit if no success launching
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PostQuitMessage (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the Windows version.
|
||||||
|
dwVersion = GetVersion();
|
||||||
|
dwMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
|
||||||
|
dwMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
|
||||||
|
|
||||||
|
// Get the build number.
|
||||||
|
|
||||||
|
if (dwVersion < 0x80000000)
|
||||||
|
dwBuild = (DWORD)(HIWORD(dwVersion));
|
||||||
|
|
||||||
|
|
||||||
|
// Load global application config file
|
||||||
|
// First line = working drive/directory path (example: D: )
|
||||||
|
startupPath = ReadNthLine(globalConfigFile,0);
|
||||||
|
|
||||||
|
if (startupPath == "")
|
||||||
|
{
|
||||||
|
globalConfigFile = "alaunchr.cfg";
|
||||||
|
startupPath = ReadNthLine(globalConfigFile,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (startupPath == "")
|
||||||
|
{
|
||||||
|
pauseEnd = true;
|
||||||
|
|
||||||
|
int msgboxID = MessageBox(
|
||||||
|
NULL,
|
||||||
|
(LPCSTR) "This application can be used as auto-launcher for other applications (useful for auto-starting applications from VM shared drives).\n"
|
||||||
|
"Place it in startup directory to use it when Windows starts."
|
||||||
|
"\n\nCreate config file for auto-launcher.\nPlace it next to launcher executable or in %WINDIR%\\alaunchr.cfg.\n"
|
||||||
|
"Example contents:\n\nD:\n\launchit.cfg\nSHUTDOWN\n\nD: is working directory\n"
|
||||||
|
"launchit.cfg is the name of file containing name of executable to launch (both located in working directory)\n"
|
||||||
|
"SHUTDOWN (optional) means the computer will turn off automatically after launched app is closed (only for Win 9x).",
|
||||||
|
(LPCSTR)"Auto-launcher",
|
||||||
|
MB_ICONWARNING | MB_OK
|
||||||
|
);
|
||||||
|
|
||||||
|
switch (msgboxID)
|
||||||
|
{
|
||||||
|
case IDOK:
|
||||||
|
|
||||||
|
pauseEnd = false;
|
||||||
|
PostQuitMessage (0); // Quit if no success launching
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Read app startup path from global config file
|
||||||
|
startupPath = ReadNthLine(globalConfigFile,0);
|
||||||
|
if (startupPath == "") PostQuitMessage (0); // Quit if it was not there
|
||||||
|
|
||||||
|
// Read app config file name from global config file
|
||||||
|
cfgFile = ReadNthLine(globalConfigFile,1);
|
||||||
|
|
||||||
|
if (cfgFile == "") PostQuitMessage (0); // Quit if it was not there
|
||||||
|
|
||||||
|
cfgFile = startupPath + "\\" + cfgFile;
|
||||||
|
|
||||||
|
// Exit if file is not found on drive
|
||||||
|
if (!FileExists(cfgFile.c_str()))
|
||||||
|
{
|
||||||
|
PostQuitMessage (0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read shutdown setting in global configuration file
|
||||||
|
std::string shouldShutdown = ReadNthLine(globalConfigFile,2);
|
||||||
|
shouldShutdown.erase(std::remove_if(shouldShutdown.begin(), shouldShutdown.end(), ::isspace), shouldShutdown.end());
|
||||||
|
if (shouldShutdown == "SHUTDOWN" || shouldShutdown == "shutdown") shutdownOnEnd = true;
|
||||||
|
else shutdownOnEnd = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Read app config file
|
||||||
|
std::string cmdLine = ReadNthLine(cfgFile,0);
|
||||||
|
if (cmdLine == "") PostQuitMessage (0); // Quit if command was not there
|
||||||
|
|
||||||
|
|
||||||
|
// Override shutdown setting in app configuration file
|
||||||
|
std::string arg = ReadNthLine(cfgFile,1);
|
||||||
|
arg.erase(std::remove_if(arg.begin(), arg.end(), ::isspace), arg.end());
|
||||||
|
if (arg == "SHUTDOWN" || arg == "shutdown") shutdownOnEnd = true;
|
||||||
|
if (arg == "NOSHUTDOWN" || arg == "noshutdown") shutdownOnEnd = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
HWND hwnd; /* This is the handle for our window */
|
||||||
|
MSG messages; /* Here messages to the application are saved */
|
||||||
|
WNDCLASSEX wincl; /* Data structure for the windowclass */
|
||||||
|
|
||||||
|
/* The Window structure */
|
||||||
|
wincl.hInstance = hThisInstance;
|
||||||
|
wincl.lpszClassName = szClassName;
|
||||||
|
wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
|
||||||
|
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
|
||||||
|
wincl.cbSize = sizeof (WNDCLASSEX);
|
||||||
|
|
||||||
|
/* Use default icon and mouse-pointer */
|
||||||
|
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
|
||||||
|
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
|
||||||
|
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
|
||||||
|
wincl.lpszMenuName = NULL; /* No menu */
|
||||||
|
wincl.cbClsExtra = 0; /* No extra bytes after the window class */
|
||||||
|
wincl.cbWndExtra = 0; /* structure or the window instance */
|
||||||
|
/* Use Windows's default colour as the background of the window */
|
||||||
|
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
|
||||||
|
|
||||||
|
/* Register the window class, and if it fails quit the program */
|
||||||
|
if (!RegisterClassEx (&wincl))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* The class is registered, let's create the program*/
|
||||||
|
hwnd = CreateWindowEx (
|
||||||
|
0, /* Extended possibilites for variation */
|
||||||
|
szClassName, /* Classname */
|
||||||
|
_T("AutoAppLauncher"), /* Title Text */
|
||||||
|
WS_OVERLAPPEDWINDOW, /* default window */
|
||||||
|
CW_USEDEFAULT, /* Windows decides the position */
|
||||||
|
CW_USEDEFAULT, /* where the window ends up on the screen */
|
||||||
|
200, /* The programs width */
|
||||||
|
200, /* and height in pixels */
|
||||||
|
HWND_DESKTOP, /* The window is a child-window to desktop */
|
||||||
|
NULL, /* No menu */
|
||||||
|
hThisInstance, /* Program Instance handler */
|
||||||
|
NULL /* No Window Creation data */
|
||||||
|
);
|
||||||
|
|
||||||
|
/* Make the window visible on the screen */
|
||||||
|
//ShowWindow (hwnd, nCmdShow);
|
||||||
|
|
||||||
|
std::string cmdToLaunch = startupPath + "\\" + cmdLine;
|
||||||
|
|
||||||
|
|
||||||
|
bool forceShutdown = false;
|
||||||
|
|
||||||
|
std::string cmd = cmdLine;
|
||||||
|
cmd.erase(std::remove_if(cmd.begin(), cmd.end(), ::isspace), cmd.end());
|
||||||
|
if (cmd == "SHUTDOWN" || cmd == "shutdown")
|
||||||
|
{
|
||||||
|
shutdownOnEnd = false;
|
||||||
|
pauseEnd = true;
|
||||||
|
|
||||||
|
if (shutdownOnlyLegacyOS)
|
||||||
|
{
|
||||||
|
if (dwMajorVersion >= 3 && dwMajorVersion <= 5) WinExec("C:\\WINDOWS\\RUNDLL32.EXE user.exe,ExitWindows",0);
|
||||||
|
}
|
||||||
|
else WinExec("C:\\WINDOWS\\RUNDLL32.EXE user.exe,ExitWindows",0);
|
||||||
|
PostQuitMessage(0);
|
||||||
|
|
||||||
|
forceShutdown = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else timerOn = true;
|
||||||
|
|
||||||
|
|
||||||
|
if (arg == "NOWORKINGDIR" || arg == "noworkingdir")
|
||||||
|
{
|
||||||
|
cmdToLaunch = cmdLine;
|
||||||
|
startupPath = "C:\\";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!forceShutdown && cmdToLaunch != "" && !startup((char*) cmdToLaunch.c_str(), pi))
|
||||||
|
{
|
||||||
|
|
||||||
|
pauseEnd = true;
|
||||||
|
|
||||||
|
int msgboxID = MessageBox(
|
||||||
|
NULL,
|
||||||
|
(LPCSTR) (std::string("Unable to execute file:\n") + cmdToLaunch).c_str(),
|
||||||
|
(LPCSTR)"Launcher error",
|
||||||
|
MB_ICONWARNING | MB_OK
|
||||||
|
);
|
||||||
|
|
||||||
|
switch (msgboxID)
|
||||||
|
{
|
||||||
|
case IDOK:
|
||||||
|
|
||||||
|
pauseEnd = false;
|
||||||
|
PostQuitMessage (0); // Quit if no success launching
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SetTimer(hwnd, // handle to main window
|
||||||
|
IDT_TIMER1, // timer identifier
|
||||||
|
200, // interval in milliseconds
|
||||||
|
(TIMERPROC) NULL); // no timer callback
|
||||||
|
|
||||||
|
|
||||||
|
//PostQuitMessage (0);
|
||||||
|
|
||||||
|
|
||||||
|
/* Run the message loop. It will run until GetMessage() returns 0 */
|
||||||
|
while (GetMessage (&messages, NULL, 0, 0))
|
||||||
|
{
|
||||||
|
/* Translate virtual-key messages into character messages */
|
||||||
|
TranslateMessage(&messages);
|
||||||
|
/* Send message to WindowProcedure */
|
||||||
|
DispatchMessage(&messages);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The program return-value is 0 - The value that PostQuitMessage() gave */
|
||||||
|
return messages.wParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* This function is called by the Windows function DispatchMessage() */
|
||||||
|
|
||||||
|
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message) /* handle the messages */
|
||||||
|
{
|
||||||
|
case WM_DESTROY:
|
||||||
|
PostQuitMessage (0); /* send a WM_QUIT to the message queue */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WM_TIMER:
|
||||||
|
switch (wParam)
|
||||||
|
{
|
||||||
|
case IDT_TIMER1:
|
||||||
|
|
||||||
|
if (timerOn)
|
||||||
|
{
|
||||||
|
// process the timer
|
||||||
|
// Check if launched application is still working
|
||||||
|
DWORD exitCode;
|
||||||
|
GetExitCodeProcess(pi.hProcess, &exitCode);
|
||||||
|
if (exitCode != STILL_ACTIVE && !pauseEnd)
|
||||||
|
{
|
||||||
|
if (shutdownOnEnd)
|
||||||
|
{
|
||||||
|
if (shutdownOnlyLegacyOS)
|
||||||
|
{
|
||||||
|
if (dwMajorVersion >= 3 && dwMajorVersion <= 5) WinExec("C:\\WINDOWS\\RUNDLL32.EXE user.exe,ExitWindows",0);
|
||||||
|
}
|
||||||
|
else WinExec("C:\\WINDOWS\\RUNDLL32.EXE user.exe,ExitWindows",0);
|
||||||
|
}
|
||||||
|
|
||||||
|
PostQuitMessage(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
default: /* for messages that we don't deal with */
|
||||||
|
return DefWindowProc (hwnd, message, wParam, lParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
BIN
installers/dosboxw95/guest_tools/emptycd.iso
Normal file
BIN
installers/dosboxw95/guest_tools/emptycd.iso
Normal file
Binary file not shown.
BIN
installers/dosboxw95/guest_tools/emptyfdd.IMG
Normal file
BIN
installers/dosboxw95/guest_tools/emptyfdd.IMG
Normal file
Binary file not shown.
|
@ -0,0 +1,18 @@
|
||||||
|
@echo off
|
||||||
|
mkdir C:\WINDOWS\TEMP
|
||||||
|
echo REGEDIT4 > C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo. >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo [HKEY_LOCAL_MACHINE\Config\0001\Display\Settings\] >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "fonts.fon"="vgasys.fon" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "fixedfon.fon"="vgafix.fon" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "oemfonts.fon"="vgaoem.fon" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "DPILogicalX"="96" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "DPILogicalY"="96" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "DPIPhysicalX"="96" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "DPIPhysicalY"="96" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "BitsPerPixel"="16" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "Resolution"="1024,768" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
echo "DisplayFlags"="0" >> C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
|
||||||
|
C:\WINDOWS\REGEDIT.EXE /L:C:\WINDOWS\SYSTEM.DAT /R:C:\WINDOWS\USER.DAT C:\WINDOWS\TEMP\set1024.reg
|
||||||
|
del C:\WINDOWS\TEMP\set1024.reg
|
18
installers/dosboxw95/guest_tools/guest-scripts/640_16bpp.bat
Normal file
18
installers/dosboxw95/guest_tools/guest-scripts/640_16bpp.bat
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
@echo off
|
||||||
|
mkdir C:\WINDOWS\TEMP
|
||||||
|
echo REGEDIT4 > C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo. >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo [HKEY_LOCAL_MACHINE\Config\0001\Display\Settings\] >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "fonts.fon"="vgasys.fon" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "fixedfon.fon"="vgafix.fon" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "oemfonts.fon"="vgaoem.fon" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "DPILogicalX"="96" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "DPILogicalY"="96" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "DPIPhysicalX"="96" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "DPIPhysicalY"="96" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "BitsPerPixel"="16" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "Resolution"="640,480" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
echo "DisplayFlags"="0" >> C:\WINDOWS\TEMP\set640.reg
|
||||||
|
|
||||||
|
C:\WINDOWS\REGEDIT.EXE /L:C:\WINDOWS\SYSTEM.DAT /R:C:\WINDOWS\USER.DAT C:\WINDOWS\TEMP\set640.reg
|
||||||
|
del C:\WINDOWS\TEMP\set640.reg
|
18
installers/dosboxw95/guest_tools/guest-scripts/800_16bpp.bat
Normal file
18
installers/dosboxw95/guest_tools/guest-scripts/800_16bpp.bat
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
@echo off
|
||||||
|
mkdir C:\WINDOWS\TEMP
|
||||||
|
echo REGEDIT4 > C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo. >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo [HKEY_LOCAL_MACHINE\Config\0001\Display\Settings\] >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "fonts.fon"="vgasys.fon" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "fixedfon.fon"="vgafix.fon" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "oemfonts.fon"="vgaoem.fon" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "DPILogicalX"="96" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "DPILogicalY"="96" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "DPIPhysicalX"="96" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "DPIPhysicalY"="96" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "BitsPerPixel"="16" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "Resolution"="800,600" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
echo "DisplayFlags"="0" >> C:\WINDOWS\TEMP\set800.reg
|
||||||
|
|
||||||
|
C:\WINDOWS\REGEDIT.EXE /L:C:\WINDOWS\SYSTEM.DAT /R:C:\WINDOWS\USER.DAT C:\WINDOWS\TEMP\set800.reg
|
||||||
|
del C:\WINDOWS\TEMP\set800.reg
|
12
installers/dosboxw95/guest_tools/guest-scripts/mruclear.bat
Normal file
12
installers/dosboxw95/guest_tools/guest-scripts/mruclear.bat
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
@echo off
|
||||||
|
mkdir C:\WINDOWS\TEMP
|
||||||
|
echo REGEDIT4 > C:\WINDOWS\TEMP\mruclear.reg
|
||||||
|
echo. >> C:\WINDOWS\TEMP\mruclear.reg
|
||||||
|
echo [HKEY_CURRENT_USER\InstallLocationsMRU] >> C:\WINDOWS\TEMP\mruclear.reg
|
||||||
|
echo "a"="C:\\WIN95" >> C:\WINDOWS\TEMP\mruclear.reg
|
||||||
|
echo "MRUList"="abc" >> C:\WINDOWS\TEMP\mruclear.reg
|
||||||
|
echo "b"="C:\\DRIVERS" >> C:\WINDOWS\TEMP\mruclear.reg
|
||||||
|
echo "c"="A:\\" >> C:\WINDOWS\TEMP\mruclear.reg
|
||||||
|
|
||||||
|
C:\WINDOWS\REGEDIT.EXE /L:C:\WINDOWS\SYSTEM.DAT /R:C:\WINDOWS\USER.DAT C:\WINDOWS\TEMP\mruclear.reg
|
||||||
|
del C:\WINDOWS\TEMP\mruclear.reg
|
17
installers/dosboxw95/guest_tools/guest-scripts/nostsnd.bat
Normal file
17
installers/dosboxw95/guest_tools/guest-scripts/nostsnd.bat
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
@echo off
|
||||||
|
mkdir C:\WINDOWS\TEMP
|
||||||
|
echo REGEDIT4 > C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
echo. >> C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
echo [HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemStart\.Current] >> C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
echo @="" >> C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
|
||||||
|
C:\WINDOWS\REGEDIT.EXE /L:C:\WINDOWS\SYSTEM.DAT /R:C:\WINDOWS\USER.DAT C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
|
||||||
|
echo REGEDIT4 > C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
echo. >> C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
echo [HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\SystemExit\.Current] >> C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
echo @="" >> C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
|
||||||
|
C:\WINDOWS\REGEDIT.EXE /L:C:\WINDOWS\SYSTEM.DAT /R:C:\WINDOWS\USER.DAT C:\WINDOWS\TEMP\nostsnd.reg
|
||||||
|
|
||||||
|
del C:\WINDOWS\TEMP\nostsnd.reg
|
|
@ -0,0 +1,9 @@
|
||||||
|
@echo off
|
||||||
|
mkdir C:\WINDOWS\TEMP
|
||||||
|
echo REGEDIT4 > C:\WINDOWS\TEMP\prodid.reg
|
||||||
|
echo. >> C:\WINDOWS\TEMP\prodid.reg
|
||||||
|
echo [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion] >> C:\WINDOWS\TEMP\prodid.reg
|
||||||
|
echo "ProductId"=- >> C:\WINDOWS\TEMP\prodid.reg
|
||||||
|
|
||||||
|
C:\WINDOWS\REGEDIT.EXE /L:C:\WINDOWS\SYSTEM.DAT /R:C:\WINDOWS\USER.DAT C:\WINDOWS\TEMP\prodid.reg
|
||||||
|
del C:\WINDOWS\TEMP\prodid.reg
|
|
@ -0,0 +1,9 @@
|
||||||
|
@echo off
|
||||||
|
mkdir C:\WINDOWS\TEMP
|
||||||
|
echo REGEDIT4 > C:\WINDOWS\TEMP\prodtyp.reg
|
||||||
|
echo. >> C:\WINDOWS\TEMP\prodtyp.reg
|
||||||
|
echo [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion] >> C:\WINDOWS\TEMP\prodtyp.reg
|
||||||
|
echo "ProductType"="9" >> C:\WINDOWS\TEMP\prodtyp.reg
|
||||||
|
|
||||||
|
C:\WINDOWS\REGEDIT.EXE /L:C:\WINDOWS\SYSTEM.DAT /R:C:\WINDOWS\USER.DAT C:\WINDOWS\TEMP\prodtyp.reg
|
||||||
|
del C:\WINDOWS\TEMP\prodtyp.reg
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue