【问题标题】:How can I add files to rebol3 startup (in the compiled executable)?如何将文件添加到 rebol3 启动(在已编译的可执行文件中)?
【发布时间】:2014-05-30 15:09:19
【问题描述】:

os/host-main.c 有这一行

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

include/host-init.h 我找到了

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"
... }

然后,有 tools/make-host-init.r 来创建 include/host-init.hboot/host-init.r

我在 ma​​ke-host-init.r 的文件列表中添加了一个文件,它只是将一个单词设置为一个字符串,然后打印该字符串。然后我有

make clean
make

但在新创建的 r3 可执行文件中,这似乎不存在(尽管我已经看到文件已被更改)。

我还有什么需要做的吗?

【问题讨论】:

    标签: rebol rebol3


    【解决方案1】:

    两件事:

    如果您要修改 Rebol 代码,您还需要运行 make prep,因为它会运行所有 Rebol 脚本。

    如果你要添加一个文件,你可能需要把它添加到os/tools/file-base.r(因为它是一个rebol文件,之后运行make prep

    您可能还想为您的机器重新制作 make 文件 (make make OS_ID=X.X.X)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-01-26
      • 1970-01-01
      • 1970-01-01
      • 2011-05-01
      相关资源
      最近更新 更多