简体   繁体   English

在Delphi EXE文件中显示Scratch Project(.SB)文件

[英]Displaying a Scratch Project (.SB) file within a Delphi EXE FIle

I would like to Display a Scratch Project (.SB) file within my Delphi EXE file. 我想在我的Delphi EXE文件中显示一个Scratch Project (.SB)文件。 I would like to know if it is possible to display and build the Scratch Project into your Delphi Project. 我想知道是否可以显示Scratch项目并将其构建到您的Delphi项目中。

I wish to make a small game in Scratch and then use the game within my Delphi Application without the need of the Scratch IDE. 我希望在Scratch中制作一个小游戏,然后在不需要Scratch IDE的情况下在我的Delphi应用程序中使用该游戏。 Perhaps a 3rd party delphi tool or component or something that can help me achieve this would also be nice. 也许第3方的delphi工具或组件或可以帮助我实现这一目标的东西也很好。

Is this possible? 这可能吗? How can this be done? 如何才能做到这一点?

It's possible, like everything, but it's not been done AFAIK, which means it's going to be hard work. 可能,像所有事物一样,但是还没有完成AFAIK,这意味着这将是艰苦的工作。

You have a few choices: 您有几种选择:

  • Scratch is normally embedded within web sites as a Flash object. Scratch通常作为Flash对象嵌入到网站中。 If you can embed Flash media, that is a solution. 如果您可以嵌入Flash媒体,那是一个解决方案。
  • Some Scratch-inspired systems like BYOB export to exe. 某些受Scratch启发的系统,例如BYOB会导出到exe。 You could look into how they do that to use your project (Scratch and BYOB 您可以研究他们如何使用该项目(Scratch和BYOB
    are compatible enough to load your project and export it after 具有足够的兼容性以加载您的项目并在以后导出
    minor changes) 小改动)
  • If you don't like these, then write your own Scratch interpreter for Delphi. 如果您不喜欢这些,请为Delphi编写自己的Scratch解释器。 Scratch sprites are objects, their behaviour is straightforward enough, the Scratch projects are easily parsed (it's XML), now - off you go! Scratch精灵是对象,它们的行为非常简单,Scratch项目很容易解析(它是XML),现在-您就可以使用!

I am assuming that you want to port a scratch program to .EXE. 我假设您想将临时程序移植到.EXE。 If this is the case, then you can install BYOB . 如果是这种情况,则可以安装BYOB
After doing this, you can convert your scratch project to a BYOB project and load it into BYOB. 完成此操作后,您可以将草稿项目转换为BYOB项目,并将其加载到BYOB中。
Then, go to Share->Compile this project, and it will generate a .EXE for you. 然后,转到“共享”->“编译此项目”,它将为您生成一个.EXE。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM