How do I prevent duplicate doc icons when using a manually created .app file for a Unix executable on macOS? I installed Pidgin via Homebrew, and I created a .app file for it, so I could launch it like a standard application, rather than via pidgin from Terminal.

I put the code below into Script Editor and saved it as an Application, and that was about it.

to run
    do shell script "/usr/local/Cellar/pidgin/2.11.0/bin/pidgin"
end run


It works fine, although when I run it, there are two doc icons. There's the original one that normally shows when running it via Terminal, with the default "exec" icon, then there's the icon from the .app file I made, with the custom icon I added. Is there any way to make it so that there is only one dock icon?

It should also be noted that clicking the icon that comes from the custom .app I made does not direct focus to Pidgin's windows, but the original icon works fine, and I would like to retain that function.
No, the launched application will always have a separate Dock Tile. This is because the AppleScript app is just a launcher, not the launched application itself.