简体   繁体   English

Inno Setup + Node webkit app exe没有在任务栏中显示应用程序图标

[英]Inno Setup + Node webkit app exe is not showing app icon in taskbar

I have created myapp.exe (the version of app that runs directly on double clicking) by binary copying myapp's code into nw.exe. 我通过将myapp的代码二进制复制到nw.exe中创建了myapp.exe(双击时直接运行的应用程序版本)。 This myapp.exe runs with proper app icon in task bar. 此myapp.exe在任务栏中以适当的应用程序图标运行。

However, when created installer through Inno Setup and then run the installed copy, it runs with default node webkits icon in taskbar. 但是,当通过Inno Setup创建安装程序然后运行已安装的副本时,它将使用任务栏中的默认节点webkits图标运行。

Here is my script of Inno Setup: 这是我的Inno Setup脚本:

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce

[Files]
Source: "src\myapp.exe"; DestDir: "{app}"
Source: "src\myapp_nw_app2.exe"; DestDir: "{app}"
Source: "supportive_app.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "supportive_app.bin"; DestDir: "{app}"; Flags: ignoreversion
Source: "supportive_app\Redist\*"; DestDir: "{app}"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "src\Autorun.inf"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\credits.html"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\d3dcompiler_47.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\ffmpegsumo.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\icudtl.dat"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\nw.pak"; DestDir: "{app}"; Flags: ignoreversion
Source: "src\pdf.dll"; DestDir: "{app}"; Flags: ignoreversion

[Setup]
AlwaysShowComponentsList=False
AppName=MyApp
AppVersion=0.0.1
AppCopyright=MyApp Inc.
PrivilegesRequired=none
AppId={{123456-29F0-43E1-9785-D71234554DDF9}
TimeStampsInUTC=True
DefaultDirName=C:\MyFolder\MyApp
UsePreviousAppDir=False
DisableDirPage=yes
AllowUNCPath=False
ShowLanguageDialog=no
AppPublisher=MyApp Inc.
AppPublisherURL=http://www.myapp.com
MinVersion=0,5.01sp3
CreateUninstallRegKey=yes
SetupIconFile=C:\MyAppInstaller\src\app_icon.ico

[Run]
Filename: "{app}\supportive_app.exe"; Flags: nowait
Filename: "{app}\myapp.exe"; Flags: nowait postinstall

[Icons]
Name: "{group}\MyApp"; Filename: "{app}\MyApp.exe"; WorkingDir: "{app}";

Can anybody tell what am I missing here? 谁能说出我在这里失踪了什么?

I observed that the MyApp.exe which I created by binary merging my code with nw.exe, was having nw icon for file in explorer. 我发现我通过二进制文件将我的代码与nw.exe合并而创建的MyApp.exe在资源管理器中具有nw图标。

Through Resource Hacker (recommended by nw community itself), I changed that Icon to desired customized icon. 通过Resource Hacker (由nw社区本身推荐),我将该Icon更改为所需的自定义图标。 Then I created the installer through Inno Setup and it started showing the same customized icon in taskbar when I run the installed copy of MyApp.exe. 然后我通过Inno Setup创建了安装程序,当我运行已安装的MyApp.exe副本时,它开始在任务栏中显示相同的自定义图标。

Not sure if this is standard way for this problem. 不确定这是否是此问题的标准方法。 I would appreciate if someone can guide me on this. 如果有人可以指导我,我将不胜感激。

Thanks! 谢谢!

Yes, you're meant to change NW.EXE's icon with a program like Resource Hacker and the compile your program for the change to take effect. 是的,您打算使用像Resource Hacker这样的程序更改NW.EXE的图标,并编译您的程序以使更改生效。 Inno setup then just zips all your stuff so it shouldn't have any effect on your executables' icon. Inno setup然后只是拉开你所有的东西,所以它不会对你的可执行文件的图标产生任何影响。

For future visitors; 对于未来的访客;

The app icon and the icon on the taskbar are different. 应用程序图标和任务栏上的图标不同。 As stated previously in nwjs community and answers, you can use tool like resource hacker to change the .ico of the executable. 如前面在nwjs社区和答案中所述,您可以使用资源黑客等工具来更改可执行文件的.ico But the icon that shows on the taskbar is actually picked up by package.json which should just be a standard png. 但是,任务栏上显示的图标实际上是由package.json ,它应该只是一个标准的png。

"window": {
  "icon": "images/my-icon.png"
}

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

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