Page 1 of 1
How to copy an included file ? need help
Posted: Wed Aug 27, 2003 6:26 pm
by TeddyLM
I want to write a small Installer.
I used Includebinary to have one big file (included an executable and a few datafiles) but i don't know how to copy them back on my Harddrive.
The CopyFile-command only work with extern Files.
Does somebody have an idea ?
Posted: Wed Aug 27, 2003 7:59 pm
by plouf
create an empty file and use CopyMemory()
add a label before includebinary command
and ?label will give the pointer to this address

Posted: Thu Aug 28, 2003 12:45 am
by freak
Simple old snippet...
Code: Select all
If CreateFile(0, "SomeNewFile.file")
WriteData(?File_Start, ?File_End - ?File_Start) ; ?File_End - ?File_Start = FileSize
CloseFile(0)
Endif
; ---------------------------------------
DataSection
File_Start:
IncludeBinary "Whatever.file"
File_End:
EndDataSection
Timo
Posted: Thu Aug 28, 2003 3:52 am
by TronDoc
freak wrote:Simple old snippet...
Code: Select all
WriteData(?FileStart, ?File_End - ?File_Start) ; ?File_End - ?File_Start = FileSize
Timo
typo in that line ?FileStart, should be ?File_Start,
then it works great! Joe
Posted: Thu Aug 28, 2003 11:37 am
by TeddyLM
Thanx a lot
works fine