ingo
ingo

Reputation: 521

How can I add files to rebol3 startup (in the compiled executable)?

In os/host-main.c there's this line

 n = RL_Start((REBYTE *)(&Reb_Init_Code[0]), REB_INIT_SIZE, 0); // TRUE on halt

in include/host-init.h I found

const unsigned char Reb_Init_Code[REB_INIT_SIZE] = {
    "\x78\x9C\xD5\x1A\x59\x73\xDB\xC6\xB9\xCF\xFB\x2B\x56\xF0\x74\x2C"
... }

and then, there's tools/make-host-init.r which creates include/host-init.h and boot/host-init.r

I have added a file to the files list in make-host-init.r which just sets a word to a string, and prints the string. Then I have

make clean
make

but in the newly created r3 executable this seems not to be present (though I've seen that the files have been altered).

Is there anything else I need to do?

Upvotes: 0

Views: 66

Answers (1)

kealist
kealist

Reputation: 1679

Two things:

If you are modifying the Rebol code, you need to run make prep as well because that runs all the Rebol scripts.

If you are adding a file, you probably need to add it to os/tools/file-base.r (and since it is a rebol file, run make prep afterwards.

You probably also want to remake the make file for you machine (make make OS_ID=X.X.X)

Upvotes: 1

Related Questions