首先,我创建了一个嵌入式虚拟文件系统,如下所述。
生成如下AS代码:
package C_Run {}
package com.adobe.flascc.vfs {
import com.adobe.flascc.vfs.*;
import com.adobe.flascc.BinaryData
public class myvfs extends InMemoryBackingStore {
public function myvfs() {
addDirectory("/data")
addFile("/data/localization.en.afgpack", new C_Run.ALC_FS_6D79766673202F646174612F6C6F63616C697A6174696F6E2E656E2E6166677061636B)
addFile("/data/dataAudio.afgpack", new C_Run.ALC_FS_6D79766673202F646174612F64617461417564696F2E6166677061636B)
addFile("/data/data.afgpack", new C_Run.ALC_FS_6D79766673202F646174612F646174612E6166677061636B)
}
}
}
编译成myvfs.abc
。然后我试图用这个VFS创建自定义控制台。我在Console.as
中导入了myvfs
:
import com.adobe.flascc.vfs.myvfs;
并创建了vfs对象:
var my_vfs_embedded:InMemoryBackingStore = new myvfs();
所以,问题是编译Console.abc
有时会失败,错误"Call to a possibly undefined method myvfs
",有时会成功构建相同的代码。这怎么可能呢?
Console.abc
是通过以下命令构建的:
cd ./../../Engine/library/baselib/sources/flash &&
java -jar $(FLASCC_FOR_EXT)/usr/lib/asc2.jar -merge -md -AS3 -strict -optimize
-import $(FLASCC_FOR_EXT)/usr/lib/builtin.abc
-import $(FLASCC_FOR_EXT)/usr/lib/playerglobal.abc
-import $(GLS3D_ABS)/install/usr/lib/libGL.abc
-import $(FLASCC_FOR_EXT)/usr/lib/ISpecialFile.abc
-import $(FLASCC_FOR_EXT)/usr/lib/IBackingStore.abc
-import $(FLASCC_FOR_EXT)/usr/lib/IVFS.abc
-import $(FLASCC_FOR_EXT)/usr/lib/InMemoryBackingStore.abc
-import $(FLASCC_FOR_EXT)/usr/lib/AlcVFSZip.abc
-import $(FLASCC_FOR_EXT)/usr/lib/CModule.abc
-import $(FLASCC_FOR_EXT)/usr/lib/C_Run.abc
-import $(FLASCC_FOR_EXT)/usr/lib/BinaryData.abc
-import $(FLASCC_FOR_EXT)/usr/lib/PlayerKernel.abc
-import $(BUILD_FULL_PATH)/myvfs.abc
Console.as -outdir $(BUILD_FULL_PATH) -out Console
myvfs。abc位于BUILD_FULL_PATH,暗示它可能与Console.as同时构建。如果构建顺序不能完全预测,则myvfs。abc二进制文件可能处于未确定状态。如已编译。例如,如果您构建myvfs,就可能发生这种情况。as和Console。作为不同的独立目标,在make (-j)中使用多线程选项
似乎我的VFS对编译器来说太大了。当我获取更少的数据时,一切都没问题。所以,我想这是一个错误的编译器。