MySQL database export (dbexport.h / dbexport.cpp): - New files dbexport.h / dbexport.cpp implement late-bound MySQL export. libmysql.dll is loaded at runtime via LoadLibrary/GetProcAddress so no MySQL SDK is required at compile time; the app runs normally if the DLL is absent. - After each print job, match data is exported to a MySQL server before PrintDlg() is called: one row in 'match', one row per player in 'player_result', one row per attacker/victim pair in 'pvp'. An optional 'event' table records every individual SRecScore entry (off by default). Tables are created automatically (CREATE TABLE IF NOT EXISTS) on first connect. - Config stored in mw4print.ini (app directory), section [MySQLExport]: Enabled, Host, Port, Database, Username, Password, ExportEvents. - Config loaded at startup (OnCreate); DB_LoadConfig() / DB_SaveConfig(). - Connection timeout set to 5 seconds so the app does not hang if the server is unreachable. - libmysql.dll (MySQL Connector/C 32-bit) added to Gameleap/mw4/ so the deploy script copies it to MW4/ alongside mw4print.exe. Database Settings dialog (File > Database Settings... / Ctrl+D): - MFC dialog: enable checkbox, Host/Port/Database/Username/Password fields, Export Events checkbox, Test Connection button with live status label, OK/Cancel. OK persists settings to mw4print.ini immediately. Configurable banner text (File > Banner Setting...): - The 'WWW.MECHJOCK.COM' URL string printed at the bottom of every score sheet is now configurable. Stored as BannerText= in options.ini under [battle tech print] (same section/file as the other print layout params). File > Banner Setting... opens a dialog to edit it; OK saves to options.ini and takes effect on the next print job with no restart needed. Default value is the original MECHJOCK string if the key is absent.
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
//{{NO_DEPENDENCIES}}
|
|
// Microsoft Developer Studio generated include file.
|
|
// Used by mw4print.rc
|
|
//
|
|
#define IDD_ABOUTBOX 100
|
|
#define IDR_MAINFRAME 128
|
|
#define IDR_MW4PRITYPE 129
|
|
#define IDD_GET_2DATES 130
|
|
#define IDC_DNT_START 1000
|
|
#define IDC_DNT_END 1001
|
|
#define ID_FILE_LOGREPORT 32771
|
|
#define ID_FILE_LOG2DATES 32772
|
|
#define ID_FILE_DBSETTINGS 32773
|
|
#define ID_FILE_BANNERSETTING 32774
|
|
|
|
#define IDD_DB_SETTINGS 131
|
|
#define IDD_BANNER_SETTING 132
|
|
|
|
#define IDC_DB_ENABLED 1002
|
|
#define IDC_DB_HOST 1003
|
|
#define IDC_DB_PORT 1004
|
|
#define IDC_DB_DATABASE 1005
|
|
#define IDC_DB_USERNAME 1006
|
|
#define IDC_DB_PASSWORD 1007
|
|
#define IDC_DB_TEST 1008
|
|
#define IDC_DB_STATUS 1009
|
|
#define IDC_DB_EXPORTEVENTS 1010
|
|
#define IDC_BANNER_TEXT 1011
|
|
|
|
// Next default values for new objects
|
|
//
|
|
#ifdef APSTUDIO_INVOKED
|
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
|
#define _APS_3D_CONTROLS 1
|
|
#define _APS_NEXT_RESOURCE_VALUE 133
|
|
#define _APS_NEXT_COMMAND_VALUE 32775
|
|
#define _APS_NEXT_CONTROL_VALUE 1012
|
|
#define _APS_NEXT_SYMED_VALUE 101
|
|
#endif
|
|
#endif
|