Autor Beitrag
F.Art
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Di 17.06.03 11:45 
Wenn man mein Projekt startet läd es eine TextDatei aus dem Internet. Chackt sie und wenn eine neue Version da ist gibt es ne Meldung. Ich möchte jetzt das wenn eine neue Version da ist das Projekt die Datei direkt läd und mit sich selber ersetzt.

mit ParamStr(0) kann man das Projekt ja dann ersetzen lassen.
Aber wenn es noch gestartet ist geht das so nicht und ich weis auch nicht wie man ein Download macht ohne Abfrage.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 17.06.03 12:40 
speicher die neue version deines programmes unter nem temp dateinamen. z.b update.tmp

dann mach folgendes. lass dein proggi eine batchdatei erstellen, die permanent versucht, dein programm zu löschen und diese update.tmp in deinen dateinamen umzubenennen. das wird erst funktionieren wenn dein orginal proggi zu ist. dann löscht die batchdatei das und ersetzt es durch das update.
am betsen schreibst du auch noch in die batchdatei rein, dass sie sich selber löscht und dann das programm aufruft.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
focus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187

XP, 2k, 98, Me
D6 Prof
BeitragVerfasst: Di 17.06.03 13:27 
Zitat:
[... ]dass sie sich selber löscht und dann das programm aufruft

wohl eher andersrum :P (erst aufrufen dann sich selbst löschen *g*)
aber sonst gut
gruss
michael
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 17.06.03 14:53 
ja klar andersherum !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Di 17.06.03 22:05 
OK ich werde mir da mal was überlegen aber wie downloade ich meine Datei aus dem Internet ohne das sich ein downloadfenster öffnet wo man speichern oder öffnen klicken kann?
hibbert
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1007

WinServer2003, Win XP, Linux
D6 Pers, D05
BeitragVerfasst: Di 17.06.03 22:30 
hi,
ich habe damals so etwas ähnliches gemacht und habe folgenden code verwendet, schau einfach mal nach:
www.swissdelphicente.../showcode.php?id=412

Der einzige nachteil an diesem Code ist, dass deine Form dann "einfriert" sodass du nicht auf den Abbrechen Button klicken kannst, sonst funzt es wunderbar :wink:

mfg hibbert

_________________
I kunnen väl svara endast ja eller nej
Om i viljen eller nej
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Di 17.06.03 22:52 
Zitat:
dass deine Form dann "einfriert"


Das Einfrieren sollte kein Problem darstellen.
Dafür kann man den Download in einem Download-Thread laufen lassen.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 18.06.03 00:51 
OK habe noch ein Problem beim saugen wenn ich die direkte url nehme geht es aber wenn ich de.vu nehme geht es nicht wie kann ich das funzend bekommen?
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 18.06.03 09:58 
du nimmst nicht die de.vu URL sondern die URL auf die de.vu zeigt.

ich würde den download übrigens per INDY machen. da hast du den größten komfort

_________________
In the beginning was the word.
And the word was content-type: text/plain.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Mi 18.06.03 11:50 
Das mit der URL ist mir klar aber er saugt es ja nicht.
Wie bekomme ich das hin?
Und einen kleinen code von Indy hätte ich gerne.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 19.06.03 08:34 
den code für indy gibts schonmal hier im forum.
such doch bitte danach ! evtl. steht das schon ind en FAQs oder in den tuts

_________________
In the beginning was the word.
And the word was content-type: text/plain.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Do 19.06.03 11:49 
Habe mir mal die Datei Feist-Neufahrn.bei.t...ne.de/HTTPClient.zip gesaugt aber es kommen ein paar Fehlermeldungen. Leider ist mir das so nicht möglich das genau zu raffen. Könnte mir einer dies für Delphi7 funzend machen?
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 19.06.03 19:03 
das müsste eigendlich auch mit Delphi 7 gehen. Du musst halt die INDY kompos installiert haben, und ich glaube 2 codezeilen löschen, bei denen was mit proxy param steht.

was sind denn das für fehlermeldungen ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Do 19.06.03 22:42 
Fehler beim lesen von...
HTTP.Request.ProxyParams.BasicAuthentication......
HTTP.Request.ProxyParams.ProxyPort......
idSSLIOHHeaderSocked1.PassTrought.....

und wenn ich die 2 ProxyZeilen lösche

ProxyParams existiert nicht.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 20.06.03 10:28 
lösch doch mal die 3 zeilen, die sind eh nicht soo relevant....
bei mir kommt beim öffen noch ne meldung bei der ich immer auf ignorieren klicke

_________________
In the beginning was the word.
And the word was content-type: text/plain.
F.Art Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 434



BeitragVerfasst: Fr 20.06.03 17:57 
Da ist noch mehr ich habe einfach nicht genug erfahrung mit der indy um es selbst zu packen.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 21.06.03 11:19 
also: eine datei runterladen. du könntest hier im form mal suchen. da gibts echt viele sachen ! ein cod eum es per INDY zu machen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
var File:PChar;
    buffer:tfilestream;
begin
  try
      buffer := tfilestream.create(pathToINI,fmCreate or fmShareExclusive);
      File := Pchar ('http://blablabkla/blabla');
      idhttp1.Get(FileFromScript,buffer);
   finally
     buffer.free;
   end;
end;

_________________
In the beginning was the word.
And the word was content-type: text/plain.