Autor Beitrag
Xadron
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 102

XP
C++, D7, HTML
BeitragVerfasst: Fr 13.04.07 17:46 
Kann man irgendwie in die exe dateien einbinden, die wie bei einer Installation dann wieder extrahiert werden?

_________________
|x-32:88x+39-3|+3:21=47-4x
_frank_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 343
Erhaltene Danke: 1

Win XP
Delphi 3 Prof / Turbo Delphi Explorer
BeitragVerfasst: Fr 13.04.07 18:09 
stichwort "resourcen"

schau mal da:
www.delphi-library.de/viewtopic.php?t=98

Gruß Frank
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Fr 13.04.07 18:10 
Moin,

ah seh grad Frank hats schon gesagt. Um die Dateien auszulesen, könntest du sie via Stream in eine temporäre Datei auslagern und beim Beenden des Programms (wenn nötig) wieder löschen.

Gruß
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Fr 13.04.07 18:17 
Man kann sie auch direkt aus der Resource als Stream auslesen. Das extrahieren und als Datei speichern ist nur bei Vorgängen sinnvoll, bei denen nicht aus einem Stream gelesen werden kann. :wink:

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Fr 13.04.07 18:18 
Ich hatte es so verstanden, dass er sie (wie bei einer Installation) auf der Platte speichern will...!?

Gruß
Xadron Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 102

XP
C++, D7, HTML
BeitragVerfasst: Sa 14.04.07 06:29 
Das stimmt schon wie _frank_ geschrieben hat, aber ich möchte ja nichts mit Bildern und Icons machen,
sondern ordner mit dateien und weitere unterordner.

_________________
|x-32:88x+39-3|+3:21=47-4x
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Sa 14.04.07 08:08 
user profile iconXadron hat folgendes geschrieben:
Kann man irgendwie in die exe dateien einbinden, die wie bei einer Installation dann wieder extrahiert werden?


Antwort : Ja

Vieleicht solltest Du mal mit deinen Erläuterungen nicht so sparsam umgehen, es hatt nicht jeder Lust seine Zeit mit dem erraten deines Problems zu verbringen.
Warum benutz Du kein Installationsprogramm.

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Xadron Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 102

XP
C++, D7, HTML
BeitragVerfasst: Sa 14.04.07 11:41 
Das wäre ja zu einfach :wink:

Und außerdem kann man das Design nicht so gravierend verändern, als wenn man es selbe machen könnte.
.....also ich will Dateien und Ordner.. jemand jetzt eine Idea?

_________________
|x-32:88x+39-3|+3:21=47-4x
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Sa 14.04.07 11:44 
Das ganze ZIPen, RARen, sonstwas und dann als Resource anhängen

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Sa 14.04.07 16:39 
user profile iconXadron hat folgendes geschrieben:
Das wäre ja zu einfach :wink:

Und außerdem kann man das Design nicht so gravierend verändern, als wenn man es selbe machen könnte.
.....also ich will Dateien und Ordner.. jemand jetzt eine Idea?

Bahnhof... Ich will Dateien und Ordner, und ? (Ich möchte 120 werden)

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Xadron Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 102

XP
C++, D7, HTML
BeitragVerfasst: Sa 14.04.07 16:53 
user profile iconXadron hat folgendes geschrieben:
...ern und Icons machen,
sondern ordner mit dateien und weitere unterordner.


user profile iconXadron hat folgendes geschrieben:

.....also ich will Dateien und Ordner.. jemand jetzt eine Idea?


komplette Verzeichnisse := (ordner mit dateien und weitere unterordner) + (Dateien und Ordner);

Alles Rogger?

_________________
|x-32:88x+39-3|+3:21=47-4x
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Sa 14.04.07 18:09 
Moin,

ich hab dir mal nen kleinen Routine gebastelt, die Anhand eines PDF soweit funktioniert.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
{$R data.res}

// for i := 1 to ... do begin
procedure GetResData(const Resource: Cardinal);
var Stream: TResourceStream;
    strList: Array [0..255] of Char;
begin
 try
  Stream := TResourceStream.Create(hInstance, PChar('#' + IntToStr(Resource)), 'FILE'); // Stream erstellen
  LoadString(hInstance, Resource, @strList, 255); // Verzeichnis auslesen
  if not DirectoryExists('C:\' + StrPas(strList)) then
   ForceDirectories('C:\' + StrPas(strList));

  Stream.SaveToFile('C:\' + StrPas(strList) + '\test.pdf');
 finally
  Stream.Free;
  end;
end;


Die *.RC würde ungefähr so aussehen

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
#1 FILE "test.pdf"

STRINGTABLE
{
1, "testordner"
2, "testordner\\myfolder"                                
}


das musst du dann für jede Datei machen. Hoffe ich konnte dir n bisserl helfen.

Gruß

Saubäär


Zuletzt bearbeitet von Saubäär am Sa 14.04.07 19:15, insgesamt 2-mal bearbeitet
Xadron Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 102

XP
C++, D7, HTML
BeitragVerfasst: Sa 14.04.07 18:54 
Perfekt Danke

_________________
|x-32:88x+39-3|+3:21=47-4x