如何从nwjs为linux生成应用程序输出?

时间:2017-07-19 10:20:40

标签: linux nwjs

您好我是nwjs的新手我使用nwjs创建了一个小应用程序并使用以下命令为linux创建构建

nwbuild -v latest -p linux32 ./

现在这给了我以下文件。 files generated

我想用这个图标打开我的应用程序我在一个名为 .desktop 文件的文件中写了以下代码行

[Desktop Entry]
Version=1.0
Type=Application
Name=sample
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sample/sample %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;

[Desktop Action Window]
Name=New Window
Exec=/opt/sample/sample -n
OnlyShowIn=Unity;

[Desktop Action Document]
Name=New File
Exec=/opt/sample/sample --command new_file
OnlyShowIn=Unity;

但是我的申请没有公开。如何实现这一目标。有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:0)

这个桌面文件应该是enougth:

[Desktop Entry]
Version=1.0
Type=Application
Name=sample
Exec=Path to your exec file
Terminal=false

您的exec文件路径更改您的exec文件的路径(可能需要chmod + x才能执行)

相关问题