Patch level :10.0 CD 210

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :roba per il cd multiproducer (fighissima)


git-svn-id: svn://10.65.10.50/trunk@18008 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2009-01-12 16:51:13 +00:00
parent 9e28cb7601
commit c0350045af
10 changed files with 62 additions and 19 deletions

Binary file not shown.

Before

(image error) Size: 4.7 KiB

BIN
setup/aga_logo.jpg Executable file

Binary file not shown.

After

(image error) Size: 142 KiB

BIN
setup/aga_logo.png Executable file

Binary file not shown.

After

(image error) Size: 109 KiB

18
setup/oem.ini Executable file

@ -0,0 +1,18 @@
[MAIN]
OEM =
[OEM_0]
Name = 敂挀瀎M剤巔翹烴璾
Logo = aga_logo.jpg
Licence = aga_licenza.htm
Web = www.aga.it/agarel100/
Administrator =
Password =
[OEM_1]
Name = 敂挀瀎窙乏坷翂赜敀捗圹茉@枎关渲袛已菑讔暂茏茘蜙鏃恽茮
Logo = sirio_logo.jpg
Licence = sirio_licenza.htm
Web = www.aga.it/release100/
Administrator =
Password =

Binary file not shown.

Before

(image error) Size: 6.8 KiB

BIN
setup/sirio_logo.jpg Executable file

Binary file not shown.

After

(image error) Size: 142 KiB

BIN
setup/sirio_logo.png Executable file

Binary file not shown.

After

(image error) Size: 109 KiB

@ -512,14 +512,36 @@ static wxString CampoDecode(const wxString& data)
return tmp;
}
//chiede se il producer del cd è AGA
bool IsAgaVersion(const wxString& strIniPath)
int FindProducer()
{
//prende l'install.ini del path che gli viene passato
CampoIniFile iniInstall(strIniPath, "Main");
const wxString strCriptedProducer = iniInstall.Get("Producer");
//adesso viene il bello!deve decrittarlo....ci vuole ENIGMA!
const wxString strProducer = CampoDecode(strCriptedProducer);
wxString strWorkingDir = wxFileName::GetCwd();
strWorkingDir << "/oem.ini";
CampoIniFile iniOemMain(strWorkingDir, "MAIN");
const int nOem = iniOemMain.GetInt("OEM");
return nOem;
}
return strProducer.Find("AGA") > 0;
int FindProducerInfos(wxString& strName, wxString& strLogo, wxString& strWeb, wxString& strLicence)
{
int oem = FindProducer();
if (oem < 0)
oem = 0;
wxString strWorkingDir = wxFileName::GetCwd();
strWorkingDir << "/oem.ini";
wxString strParagraph;
strParagraph << "OEM_" << oem;
CampoIniFile iniOem(strWorkingDir, strParagraph);
//raccatta le informazioni dal paragrafo corretto del produttore
const wxString strCriptedProducer = iniOem.Get("Name");
//adesso viene il bello!deve decrittarlo....ci vuole ENIGMA!
strName = CampoDecode(strCriptedProducer);
strLogo = iniOem.Get("Logo");
strWeb = iniOem.Get("Web");
strLicence = iniOem.Get("Licence");
return oem;
}

@ -56,7 +56,8 @@ size_t ListSharedDirectories(wxArrayString& asList);
bool IsSharedDirectory (const wxString& strDir);
//cerca il producer del cd
bool IsAgaVersion(const wxString& strIniPath = wxEmptyString);
//cerca le producer infos del cd
int FindProducer();
int FindProducerInfos(wxString& strName, wxString& strLogo, wxString& strWeb, wxString& strLicence);
#endif

@ -284,7 +284,9 @@ bool CampoWizardPage2::ForwardValidate()
CampoWizardPage2::CampoWizardPage2(wxWizard* parent) : CampoWizardPage(parent)
{
SetHTMLPage("licenza.htm");
wxString strName, strLogo, strWeb, strLicence;
const int nOem = FindProducerInfos(strName, strLogo, strWeb, strLicence);
SetHTMLPage(strLicence);
//radiobutton Accetta / Rifiuta
wxArrayString asAccRef;
@ -1408,8 +1410,7 @@ bool CampoWizardPage9::TransferDataToWindow()
//controlla se il programma di teleassistenza e' gia' installato sul computer e decide se spuntare o meno..
//..il checkbox
bool bChkTeleass = false;
const bool bIsAgaVersion = IsAgaVersion("../install.ini");
if (bIsAgaVersion)
if (FindProducer() <= 0)
{
bChkTeleass = true;
const wxString strWinProgDir = GetWindowsProgramDirectory();
@ -1450,12 +1451,10 @@ CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
{
//l'installatore della teleassistenza ci va solo nella versione AGA;quindi controlla il producer nell'install.ini...
//..che c'è appena sopra di lui in program
const bool bIsAgaVersion = IsAgaVersion("../install.ini");
wxString strTitle = wxT("Collegamenti e Teleassistenza");
wxString strBody;
strBody += wxT("<p>E' possibile creare l'icona di APPNAMEFULL sul desktop.</p>");
if (bIsAgaVersion)
if (FindProducer() <= 0)
{
strBody += wxT("<p>E' possibile installare il programma di teleassistenza. E' il software che consente");
strBody += wxT(" ai tecnici dell'assistenza di controllare il computer su cui si installa APPNAMEFULL in caso di problemi gravi.");
@ -1472,7 +1471,8 @@ CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
wxCheckBox* pTeleass = new wxCheckBox(this, 902, wxT("Installare il programma di teleassistenza"));
GetSizer()->Add(pTeleass, 0, wxALL, 0);
if (!bIsAgaVersion)
if (FindProducer() > 0)
pTeleass->Hide();
//wxCheckBox* pLink = new wxCheckBox(this, 1002, wxT("Associare i file .caz al programma"));
@ -1897,9 +1897,11 @@ CampoWizard::CampoWizard(wxWindow* pParent)
_iSrvAutostartMode = lm_none;//autostart dei servers
_bDesktopShortcut = false; //creazione link sul desktop
wxString strName, strLogo, strWeb, strLicence;
const int nOem = FindProducerInfos(strName, strLogo, strWeb, strLicence);
wxImage iLogo;
wxString strName = wxT("logo.gif");
iLogo.LoadFile(strName, wxBITMAP_TYPE_GIF);
iLogo.LoadFile(strLogo, wxBITMAP_TYPE_ANY);
int nWidth = iLogo.GetWidth();
int nHeight = iLogo.GetHeight();
if (nWidth > 320)