Patch level :2.0

Files correlati     :ba1.exe installa.exe
Ricompilazione Demo : [ ]
Commento            :sostituita la directory di installazione campo/eurocamp sul cd con program; modificato installa.exe in modo che, in base al producer, sia in grado di riconoscere il nome del programma da installare


git-svn-id: svn://10.65.10.50/trunk@10887 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2003-03-05 15:56:44 +00:00
parent 3123452cb9
commit 7ef25fd6e3
2 changed files with 37 additions and 18 deletions

View File

@ -151,11 +151,27 @@ int ThisYear()
int VersionYear() int VersionYear()
{ {
char ver[32]; char ver[32];
GetPrivateProfileString("ba", "Versione", "", ver, sizeof(ver), "./eurocamp/zip/install.ini"); GetPrivateProfileString("ba", "Versione", "", ver, sizeof(ver), "./program/zip/install.ini");
ver[4] = '\0'; ver[4] = '\0';
return atoi(ver); return atoi(ver);
} }
void ProgramName(char* name)
{
char ver[80];
GetPrivateProfileString("Main", "Producer", "", ver, sizeof(ver), "./program/zip/install.ini");
if (ver[0] != '\0')
{
const char * const encryption_key = "QSECOFR-";
for (int i = 0; ver[i]; i++)
name[i] = ver[i] - (i < 8 ? encryption_key[i] : name[i - 8]);
name[i] = '\0';
}
else
strcpy(name, "Campo");
}
bool DongleTest() bool DongleTest()
{ {
int yearKey = 0; int yearKey = 0;
@ -172,7 +188,7 @@ bool DongleTest()
return TRUE; return TRUE;
bool ok = FALSE; bool ok = FALSE;
ifstream keys("./eurocamp/zip/dninst.zip", ios::in | ios::nocreate); ifstream keys("./program/zip/dninst.zip", ios::in | ios::nocreate);
if (keys.good()) if (keys.good())
{ {
char line[256]; char line[256];
@ -267,8 +283,8 @@ LRESULT CALLBACK MainWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
PAINTSTRUCT ps; PAINTSTRUCT ps;
RECT rct; RECT rct;
const char* s1 = "Installa EUROCAMPO in versione commerciale protetta. E' necessario disporre di una chiave di protezione hardware."; const char* s1 = "Installa la versione commerciale protetta. E' necessario disporre di una chiave di protezione hardware.";
const char* s2 = "Installa EUROCAMPO in versione Demo. La versione Demo è priva di protezione hardware ma soggetta ad alcune limitazioni."; const char* s2 = "Installa la versione Demo. La versione Demo è priva di protezione hardware ma soggetta ad alcune limitazioni.";
const char* s4 = "Termina installazione"; const char* s4 = "Termina installazione";
const char* s5 = "Scelta installazione"; const char* s5 = "Scelta installazione";
@ -311,15 +327,11 @@ LRESULT CALLBACK MainWndProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
if (wParam == 1000) if (wParam == 1000)
{ {
if (DongleTest()) if (DongleTest())
Run("eurocamp\\disk1\\setup.exe"); Run("program\\disk1\\setup.exe");
} }
else if (wParam == 1001) else if (wParam == 1001)
{ {
Run("eurodemo\\disk1\\setup.exe"); Run("demo\\disk1\\setup.exe");
}
else if (wParam == 1002)
{
Run("ce\\setup.exe");
} }
else if (wParam != 2) else if (wParam != 2)
return 0; return 0;
@ -394,20 +406,27 @@ int PASCAL WinMain (HINSTANCE hInst, HINSTANCE hinstPrev, LPSTR pCmdLine, int nC
HWND hwndDlg=CreateWindow("MainWndClass","Scelta installazione",WS_VISIBLE| WS_CAPTION | WS_SYSMENU | WS_MAXIMIZE, HWND hwndDlg=CreateWindow("MainWndClass","Scelta installazione",WS_VISIBLE| WS_CAPTION | WS_SYSMENU | WS_MAXIMIZE,
rect.left,rect.top,rect.right,rect.bottom,NULL,NULL,hInst,NULL ); rect.left,rect.top,rect.right,rect.bottom,NULL,NULL,hInst,NULL );
const int offx=(rect.right - rect.left-640)/2; const int offx=(rect.right - rect.left-700)/2;
const int offy=(rect.bottom - rect.top-260)/2; const int offy=(rect.bottom - rect.top-260)/2;
char name[80];
ProgramName(name);
char prompt[128];
strcpy(prompt, name);
/* Disegna i pulsanti */ /* Disegna i pulsanti */
CreateWindow("BUTTON","Installazione EUROCAMPO", CreateWindow("BUTTON",prompt, WS_CHILD | WS_VISIBLE,
WS_CHILD| WS_VISIBLE ,offx ,offy,256,32, hwndDlg ,(HMENU)1000,hInst,NULL ); offx, offy, 300, 32, hwndDlg , (HMENU)1000, hInst, NULL );
CreateWindow("BUTTON","Installazione EUROCAMPO Demo", strcat(prompt, " DEMO");
WS_CHILD| WS_VISIBLE ,offx ,offy+80,256,32, hwndDlg ,(HMENU)1001,hInst,NULL ); CreateWindow("BUTTON", prompt, WS_CHILD | WS_VISIBLE,
offx, offy+80, 300, 32, hwndDlg , (HMENU)1001, hInst, NULL );
CreateWindow("BUTTON","Uscita", CreateWindow("BUTTON","Uscita",
WS_CHILD| WS_VISIBLE,offx,offy+160,256,32, hwndDlg ,(HMENU)2,hInst,NULL ); WS_CHILD| WS_VISIBLE,offx,offy+160,300,32, hwndDlg ,(HMENU)2,hInst,NULL );
while (GetMessage(&msg, NULL, 0, 0)) while (GetMessage(&msg, NULL, 0, 0))
{ {

View File

@ -26,9 +26,9 @@
#define C_ISPATCH 9 #define C_ISPATCH 9
#ifdef _DEMO_ #ifdef _DEMO_
const char* const http_default_path = "/aga/eurodemo/zipdemo/"; const char* const http_default_path = "/aga/demo/zip/";
#else #else
const char* const http_default_path = "/aga/euro/zip/"; const char* const http_default_path = "/aga/program/zip/";
#endif #endif
HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2) HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2)