Autor Beitrag
godworx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 27



BeitragVerfasst: Mi 19.10.05 14:08 
Hi ho!
Folgendes:
In einem Programm verwende ich zwei Ressource Dateien. Eine mit Wavs und eine mit videos. gibt es eine möglichkeit, dass diese .res nicht mit in die exe compiliert werden, sondern einfach im verzeichnis liegen und daraus gelesen wird.
rochus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 416

Win XP Prof, Fedora Core 4, SuSE 7.0
D7 Ent, D2005 Pers
BeitragVerfasst: Mi 19.10.05 14:25 

_________________
Im Nachhinein ist man immer ein Schlauch!
"Dream as if you'll live forever, live as if you'll die today!" James Dean
godworx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 27



BeitragVerfasst: Mi 19.10.05 14:34 
danke, aber da steht leider nur wie man ressourcen erstellt bzw. benutzt nicht aber wie man verhindert, dass sie in die exe compiliert werden. das einzige was darauf hinweist ist:
Zitat:
Conclusion

Compiling resources into your application is easy. I used it in my SbookBuilder program to include all the html docs and images that together make up the user interface. I could have included these files as external files, but this way I am sure that they are always there when the program needs them.


aber das wars auch schon... :( und ich glaube das bezieht sich auf die einzelnen dateien in der ressource
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 19.10.05 14:40 
Wenn du keine Ressourcen willst, warum benutzt du denn welche? Leg die Dateien in das Verzeichnis und lad sie dann von der Festplatte ganz normal.
godworx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 27



BeitragVerfasst: Mi 19.10.05 14:46 
Nein nein. Ich will ja Ressourcen. Ich will nur einfach nicht dass die Ressourcen in die Exe compiliert werden. Wenn ich jetzt eine Video Ressource Datei habe, die 50MB groß ist, wird die Exe ja dann auch +50 MB größer.

Ich möchte einfach nur das die Resourcen Ressourcen bleiben und nicht in mit in die Exe kompiliert werden.

Das Problem ist:
Wenn ich die Exe ändere muss ich jedesmal 50mb neu hochladen etc.

;)
Amateur
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 777

(Win98, WinMe) WinXP Prof
D3 Prof, D6 Pers, D2k5 Pers., Turbo C++ Explorer
BeitragVerfasst: Mi 19.10.05 15:17 
ja genau das problem habe ich auch... gibt es keine möglichkeit die inhalte der ressourcen erst zur laufzeit auszulesen und zu verwenden ohne sie in die exe zu kompilieren z.b. mit einem filestream oder so? oder gibt es ein anderes dateiformat was sowas kann? denn es ist ja dumm wenn man was updaten will dass man die gesamte exe neu draufmachen muss... so tauscht man nur die ressourcen datei aus und fertig...
macht die sache erheblich einfacher und benutzerfreundlicher...
denn man lädt ja wenn man nen neuen skin installiert auch nicht das gesamte programm neu runter. da wird ja auch immer nur eine datei ersetzt und gut ist...

_________________
"Kein dummes Gerede. Kein Rumrätseln. Denkt an nichts anderes mehr, nur noch an das, was vor euch liegt. Das ist die wahre Herausforderung. Ihr müßt euch vor euch selbst schützen, Leute." (Rennes in "Cube")
Beiträge: >700
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: Mi 19.10.05 15:29 
du kannst auch dll-Dateien als ressourcen verwenden.
Musst mal bei Google oder hier danach suchen (zum Beispiel dieses Topic)

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
godworx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 27



BeitragVerfasst: Mi 19.10.05 16:13 
OK danke...
Das sieht nur recht komplex aus. Gibts noch alternative, vielleicht einfachere Möglichkeiten oder muss ich mich echt mit DLL erstellen, etc rumquälen? Hab nämlich noch nie damit gearbeitet ;)
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Mi 19.10.05 17:31 
user profile icongodworx hat folgendes geschrieben:
OK danke...
Das sieht nur recht komplex aus. Gibts noch alternative, vielleicht einfachere Möglichkeiten oder muss ich mich echt mit DLL erstellen, etc rumquälen? Hab nämlich noch nie damit gearbeitet ;)


eine Resourcen-DLL ist very simple.
Sie enthält keine Zeile Code.
das einzige was sie hat, ist
{%R Resource.res}

alles was du dann noch brauchst
findest du unter LoadLibrary(), FindResource(), LoadResource()

grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
godworx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 27



BeitragVerfasst: Mi 19.10.05 22:38 
AHhhhhhhh! OK...

Das Prinzip hab ich verstanden, ne DLL hab ich jetzt auch, geladen bekomm ich die auch, aber:

Wie krieg ich jetzt das Video geladen? Bisher hats so funktioniert:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var tr : TResourcestream;

tr := tresourcestream.create(Hinstance, 'INTRO', RT_RCDATA);
tr.savetofile('RES.AVI');
tr.destroy;


Der Tmediaplayer hat ja kein loadfromresource ?

Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mi 19.10.05 22:40 
Nimm anstatt HInstance das Handle der DLL.
godworx Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 27



BeitragVerfasst: Do 20.10.05 13:58 
Jo super! Danke hat geklappt!