Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
222 views
in Technique[技术] by (71.8m points)

javascript - 如何从Electron(javascript)应用程序生成C文件? [关闭](how to generate C file from Electron (javascript) app? [closed])

Thanks everybody who would help me, I'm looking to generate a .C file after i submit a button in my ELECTRON application.

(谢谢大家的帮助,我希望在ELECTRON应用程序中提交按钮后生成.C文件。)

This C file will contains some structs with same values that i have in an array of objects in typescript application.

(这个C文件将包含一些结构,这些结构具有与打字稿应用程序中的对象数组相同的值。)

Right now I'm creating a string, an href on template and then clicked inside a function, like described here: How to create a file in memory for user to download, but not through server?

(现在,我正在创建一个字符串,在模板上创建一个href,然后在一个函数内单击,如此处所述: 如何在内存中创建文件供用户下载,而不是通过服务器下载?)

.

(。)

But I'd prefere to have a service (or a script or whatever, I accept suggestion) that works like a WRAPPER, accepting an incoming JSON / XML file from my angular application and then generate (as output ) the .C file.

(但是我更希望有一个像WRAPPER一样工作的服务(或者脚本,或者我接受建议的任何东西),从我的角度应用程序接受传入的JSON / XML文件,然后生成(作为输出).C文件。)

Wich do you think is the best way to do that?

(您认为这是最好的方法吗?)

I was thinking to create a kind of model with some TAGS and then replace them or generate the C code based on this tags.

(我当时正在考虑用一些标签创建一种模型,然后替换它们或基于此标签生成C代码。)

Moreover, the "wrapper" should be in the computer of the user, because I'm doing it in an Electron standalone application.

(而且,“包装器”应该在用户的计算机中,因为我是在Electron独立应用程序中进行的。)

Thanks a lot for your help, if some admins will close my answer I just woul like to know WHY, It seems a really clear question.

(非常感谢您的帮助,如果某些管理员会结束我的回答,我只是想知道为什么,这似乎是一个很明确的问题。)

  ask by Fedro Zen translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...