IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Delphi Discussion :

Mettre à jour son appli


Sujet :

Delphi

  1. #1
    Membre à l'essai
    Inscrit en
    Mars 2006
    Messages
    24
    Détails du profil
    Informations forums :
    Inscription : Mars 2006
    Messages : 24
    Points : 17
    Points
    17
    Par défaut Mettre à jour son appli
    Bonjour,
    J'ai vu que y a beaucoup de topic sur sa, mais je ouvre un nouveau car dans touts les topic j'ai trouve aucun reponse.
    Je cherche comment faire pour mettre mon appli a jour ( avec un methode simple) c'est a dire se connecter sur une page voir la version (dans un .txt) et si la nouvelle version existe, on la telecharge...
    Merci d'avance...

  2. #2
    Membre chevronné
    Avatar de Droïde Système7
    Homme Profil pro
    Inscrit en
    Septembre 2003
    Messages
    2 262
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Septembre 2003
    Messages : 2 262
    Points : 1 928
    Points
    1 928

  3. #3
    Membre à l'essai
    Inscrit en
    Mars 2006
    Messages
    24
    Détails du profil
    Informations forums :
    Inscription : Mars 2006
    Messages : 24
    Points : 17
    Points
    17
    Par défaut
    J'ai telecharge MxWebUpdate...
    Mais je sais pas comment faire fonctioner car en anglais je suis nul...
    Ils disent sa:
    How to use:
    -----------

    Published Properties:
    ---------------------

    Password, UserName : Set these properties if you trying to
    get data from password protected
    folders.

    Taginfo : It allows you to specify the names of each
    tag in update information file. You can
    find sample files in the Information folder.

    Taginfo.Author : Name of author
    Taginfo.ClientFileName : Name of update file on client side
    Taginfo.Download : Download URL of update file
    Taginfo.Email : Name of author's email address
    Taginfo.Product : Name of product
    Taginfo.Redirection : If it is specified the component
    downloads information file from this
    URL.
    Taginfo.RunParameters : Parameters will be used for execution
    of downloaded update.
    Taginfo.Version : Version of update

    ProductInfo : Information of existing product

    ProductInfo.URL : Update info URL
    ProductInfo.Version : Version of your existing application

    ProductInfo.VersionFormat :

    vfNumber - Compares two numbers
    vfString - Compares two strings
    vfStandard - Compares two version numbers.

    Options :

    uoRunUpdate - Executes the update after download.
    UoTerminate - Terminates the application after
    download.
    UoOverwrite - Overwrite the file at client side if
    it is exists.

    InfoCaption : Use this to translate captions of info window.

    Public Properties:
    ------------------

    Active : It is true during update

    You can use following read-only properties after download
    information file:

    * ProductVersion
    * UpdateURL
    * ClientFileName
    * RedirectionURL
    * Author
    * Email
    * ProductName
    * RunParameters

    Methods:
    --------

    CheckForAnUpdate : Get the update from the web specified in
    the URL
    Abort : You can stop the update any time.

    Events:
    -------

    OnBeforeGetInfo: Occurs before checking for an update
    OnAfterGetInfo: Occurs when information is available

    OnBeforeShowInfo: Occurs before show information
    OnAfterShowInfo: Occurs after information has shown.

    OnBeforeDownload: Occurs when the file begins to download
    OnAfterDownload: Occurs when the file is downloaded

    OnUpdateAvailable: Occurs when update is available
    OnNoUpdateFound: Occurs when update is not available

    OnGetClientFileName: Occurs when component needs client file name
    OnClientFileExists: Occurs when client file does exist.

    OnDownload: Occurs at receiving data from the web
    OnDownloadError: Occurs when error happend
    OnCannotExecute: Occurs when component cannot execute update

    If you need more information please have a look at
    the demonstration application.
    Merci

  4. #4
    Membre à l'essai
    Inscrit en
    Mars 2006
    Messages
    24
    Détails du profil
    Informations forums :
    Inscription : Mars 2006
    Messages : 24
    Points : 17
    Points
    17
    Par défaut
    j'ai reussi, mais le seul probleme c'est que quand je telecharge la mise a jour, le .exe ne se met pas dans le meme dossier que l'ancien .exe
    Pourrez vous regarder ce code et dire si on peut chosir l'emplacement ou si on peut ajouter ?
    Merci d'avance
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    Procedure Tform_MainWindow.mxWebUpdateNoUpdateFound( Sender: TObject );
    Begin
      MessageDlg( 'There is no update available!', mtError, [ mbOK ], 0 );
    End;
     
    Procedure Tform_MainWindow.mxWebUpdateUpdateAvailable( Sender: TObject; ActualVersion, NewVersion: String; Var CanUpdate: Boolean );
    Begin
      CanUpdate := MessageDlg( Format( 'You are using version %s, but version %s is available to ' + #13 + #10 + 'download at the author''s website.' + #13 + #10 + 'Do you want to update your application now?', [ ActualVersion, NewVersion ] ), mtWarning, [ mbYes, mbNo ], 0 ) = mrYes;
    End;
     
    Procedure Tform_MainWindow.mxWebUpdateGetClientFileName( Sender: TObject; Var FileName: String );
    Begin
      MessageDlg( Format( 'Update will be downloaded to %s', [ FileName ] ), mtInformation, [ mbOK ], 0 );
         // *** You can modify the client side file name here ***
    End;
     
    Procedure Tform_MainWindow.mxWebUpdateClientFileExists( Sender: TObject; Var FileName: String; Var Overwrite: Boolean );
    Begin
      Overwrite := MessageDlg( Format( 'File %s already exists. Do you want to overwrite it?', [ FileName ] ), mtConfirmation, [ mbYes, mbNo ], 0 ) = mrYes;
    End;
     
    Procedure Tform_MainWindow.mxWebUpdateAfterDownload( Sender: TObject; FileName: String );
    Begin
      MessageDlg( 'Update has been downloaded.', mtInformation, [ mbOK ], 0 );
    End;
     
    Procedure Tform_MainWindow.mxWebUpdateBeforeDownload( Sender: TObject; FileName: String );
    Begin
      lbl_File.Caption := Format( 'Downloading file %s', [ ExtractFileName( FileName ) ] );
    End;
     
    Procedure Tform_MainWindow.mxWebUpdateBeforeShowInfo( Sender: TObject; Var ShowInfo, CheckForUpdate: Boolean );
    Begin
      ShowInfo := MessageDlg( 'Would you like to read the information file?', mtConfirmation, [ mbYes, mbNo ], 0 ) = mrYes;
    End;
     
    Procedure Tform_MainWindow.mxWebUpdateBeforeGetInfo( Sender: TObject );
    Begin
      form_message.panel_message.Caption := 'Checking for an update';
      form_message.Show;
      form_message.Refresh;
    End;
     
    Procedure Tform_MainWindow.mxWebUpdateAfterShowInfo( Sender: TObject; CheckForUpdate: Boolean );
    Begin
         // ** You can save CheckForUpdate checkbox's value for future usage here ***
    End;

Discussions similaires

  1. [Installation] Mettre à jour son installation SAS
    Par Stackware dans le forum Administration et Installation
    Réponses: 8
    Dernier message: 03/09/2015, 11h22
  2. [Pharo] Comment mettre à jour son image
    Par vicnet dans le forum Smalltalk
    Réponses: 2
    Dernier message: 28/08/2009, 13h15
  3. [Audio] Mettre de la musique sur son appli possible ? simple ?
    Par Baptiste Wicht dans le forum Multimédia
    Réponses: 23
    Dernier message: 04/08/2008, 12h56
  4. mettre à jour un objet place dans le contexte de l'appli
    Par lilli1407 dans le forum Struts 1
    Réponses: 6
    Dernier message: 09/11/2006, 16h58
  5. Mettre à jour par le net son application
    Par Malone dans le forum Delphi
    Réponses: 2
    Dernier message: 28/09/2006, 14h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo