Changeset 187

Show
Ignore:
Timestamp:
05/16/12 19:30:45 (8 years ago)
Author:
vsilva
Message:

First official Release...

Location:
middleware-offline/trunk/_src/eidmw
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • middleware-offline/trunk/_src/eidmw/eidgui/AutoUpdates.cpp

    r124 r187  
    4747std::string remoteversion = "http://svn.gov.pt/projects/ccidadao/repository/middleware-offline/tags/builds/lastversion/version.txt"; 
    4848 
    49 std::string WINDOWS32 = "PteidMW-Basic-en.msi"; 
    50 std::string WINDOWS64 = "PteidMW-Basic-en-x64.msi"; 
     49std::string WINDOWS32 = "PteidMW-Basic.msi"; 
     50std::string WINDOWS64 = "PteidMW-Basic-x64.msi"; 
    5151std::string OSX32 = "pteidgui.dmg"; 
    5252std::string OSX64 = "pteidgui.dmg"; 
     
    6161std::string MANDRIVA32 = "pteid-mw-mandriva.i586.rpm"; 
    6262std::string MANDRIVA64 = "pteid-mw-mandriva.x86_64.rpm"; 
     63 
     64struct PteidVersion 
     65{ 
     66int major; 
     67int minor; 
     68int release; 
     69}; 
     70 
    6371 
    6472AutoUpdates::AutoUpdates(QWidget *parent) 
     
    225233} 
    226234 
     235int compareVersions(PteidVersion v1, PteidVersion v2) 
     236{ 
     237 
     238        unsigned int ret = 0; 
     239        ret = v2.major - v1.major; 
     240        if (ret != 0) 
     241                return ret; 
     242        ret = v2.minor - v1.minor; 
     243        if (ret != 0) 
     244                return ret; 
     245        ret = v2.release - v1.release; 
     246        return ret; 
     247} 
     248 
     249 
    227250bool AutoUpdates::VerifyUpdates(std::string filedata) 
    228251{ 
    229252    std::string distrover; 
    230253        std::string archver; 
    231         std::string ver; 
    232         std::string remoteversion; 
    233         double localverd; 
    234         double remoteversiond; 
     254 
     255 
    235256 
    236257#ifdef WIN32 
     
    242263                VerInfo.QueryStringValue(VI_STR_FILEVERSION, version); 
    243264        } 
    244  
    245         ver = version; 
     265        QString ver = QString::fromAscii(version); 
     266 
    246267#else 
    247268 
    248         QString strVersion (WIN_GUI_VERSION_STRING); 
    249         ver = strVersion.toStdString(); 
    250     std::cout << "LOCAL VER " << ver << std::endl; 
    251         //printf ("value %f\n", localverd); 
     269        QString ver (WIN_GUI_VERSION_STRING); 
    252270#endif 
    253271 
    254         ver.replace(2,1,""); 
    255         ver.replace(3,1,""); 
    256         ver.replace(3,1,""); 
    257         ver.replace(4,6, ""); 
    258  
    259         remoteversion = filedata; 
    260         localverd = atof(ver.c_str()); 
    261         remoteversiond = atof(remoteversion.c_str()); 
     272        QStringList list1 = ver.split(","); 
     273         
     274        QStringList list2 = QString(filedata.c_str()).split(","); 
     275         
     276        //Parse local version into PteidVersion 
     277        PteidVersion local_version; 
     278        local_version.major = list1.at(0).toInt(); 
     279        local_version.minor = list1.at(1).toInt(); 
     280        local_version.release = list1.at(2).toInt(); 
     281 
     282        //Parse remote version into PteidVersion 
     283        PteidVersion remote_version; 
     284        remote_version.major = list2.at(0).toInt(); 
     285        remote_version.minor = list2.at(1).toInt(); 
     286        remote_version.release = list2.at(2).toInt(); 
    262287 
    263288        //return true; 
    264         if (localverd < remoteversiond) 
     289        if (compareVersions(local_version, remote_version) > 0) 
    265290        { 
    266291                this->close(); 
  • middleware-offline/trunk/_src/eidmw/eidgui/dlgprint.cpp

    r146 r187  
    123123            defaultfilepath.append("/CartaoCidadao.pdf"); 
    124124            pdffilepath = QFileDialog::getSaveFileName(this, tr("Save Pdf File"), defaultfilepath, tr("Pdf Files (*.pdf)")); 
     125 
     126            if (pdffilepath.isNull() || pdffilepath.isEmpty()) 
     127                return; 
     128 
    125129            QCoreApplication::processEvents(); 
    126130 
  • middleware-offline/trunk/_src/eidmw/eidgui/dlgsignature.cpp

    r145 r187  
    115115 
    116116        alist.append(list); 
     117 
     118        alist.removeDuplicates(); 
    117119 
    118120        localModel->setStringList(alist); 
  • middleware-offline/trunk/_src/eidmw/eidgui/mainwnd.cpp

    r146 r187  
    6464static unsigned int pinNotes = 1 ; 
    6565 
    66  
     66#ifdef WIN32 
    6767void ImportECRaizCert() 
    6868{ 
     
    155155        } 
    156156} 
     157 
     158#endif 
    157159 
    158160 
     
    899901        } 
    900902 
     903        #ifdef WIN32 
    901904        //Register the 2 higher-level CA Certs from disk files 
    902905        ImportCCCert(); 
    903906        ImportECRaizCert(); 
     907        #endif 
    904908 
    905909        try 
  • middleware-offline/trunk/_src/eidmw/eidgui/pteidgui.rc

    r34 r187  
    99// 
    1010#include "afxres.h" 
     11 
     12#include "../_Builds/pteidversions.h" 
    1113 
    1214///////////////////////////////////////////////////////////////////////////// 
     
    7577 
    7678VS_VERSION_INFO VERSIONINFO 
    77  FILEVERSION 3,0,1,6483 
    78  PRODUCTVERSION 3,0,1,6483 
     79 FILEVERSION WIN_GUI_VERSION1,WIN_GUI_VERSION2,WIN_GUI_VERSION3,WIN_GUI_VERSION4 
     80 PRODUCTVERSION WIN_GUI_VERSION1,WIN_GUI_VERSION2,WIN_GUI_VERSION3,WIN_GUI_VERSION4 
    7981 FILEFLAGSMASK 0x17L 
    8082#ifdef _DEBUG 
     
    9395            VALUE "CompanyName", "Portuguese Government" 
    9496            VALUE "FileDescription", "Portugal Identity Card Utility Application" 
    95             VALUE "FileVersion", "3, 0, 1, 6483" 
     97            VALUE "FileVersion", WIN_GUI_VERSION_STRING 
    9698            VALUE "InternalName", "pteidgui" 
    9799            VALUE "LegalCopyright", "Copyright (C) 2010-2012" 
    98100            VALUE "OriginalFilename", "pteidgui.exe" 
    99101            VALUE "ProductName", "Portugal eID MiddleWare" 
    100             VALUE "ProductVersion", "3.0" 
     102            VALUE "ProductVersion", PTEID_PRODUCT_VERSION 
    101103        END 
    102104    END 
  • middleware-offline/trunk/_src/eidmw/ffpteidcertinstall/xpi/cck.config

    r145 r187  
    1 id=pteidcertinstall@caixamagica.pt 
     1id=pteidcertinstall@caixamagica.pt 
    22name=PTeID Certificate Install 
    33version=1.0 
    44description=A Firefox extension to install PTeID certificates. 
    5 creator=Estado Português 
    6 homepageURL=http://www.caixamagica.pt 
     5creator=Estado Português 
     6homepageURL=http://www.ama.pt 
    77iconURL=/home/metalgod/Projects/trunk/pteid-mw-pt/_src/eidmw/xpi/src/icon.png 
    88filename=pteidcertinstall 
     
    1111ToolbarLocation=Last 
    1212BookmarkLocation=Last 
    13 CertPath1=/home/metalgod/Área de Trabalho/CartaodeCidadao001.pem 
     13CertPath1=/home/metalgod/Área de Trabalho/CartaodeCidadao001.pem 
    1414CertTrust1=C,C,C 
    15 CertPath2=/home/metalgod/Área de Trabalho/ECRaizEstado_novo_assinado_GTE.pem 
     15CertPath2=/home/metalgod/Área de Trabalho/ECRaizEstado_novo_assinado_GTE.pem 
    1616CertTrust2=C,C,C 
    1717networkProxyHTTP_Port=0 
  • middleware-offline/trunk/_src/eidmw/ffpteidcertinstall/xpi/install.rdf

    r145 r187  
    99        <em:description>A Firefox extension to install PTeID certificates.</em:description> 
    1010        <em:creator>Estado Português</em:creator> 
    11         <em:homepageURL>http://www.caixamagica.pt</em:homepageURL> 
     11        <em:homepageURL>http://www.ama.pt</em:homepageURL> 
    1212         
    1313