I’m aware this has been the case since Windows 3.x, you always need an external program to ensure the executable is created with the icon you want. Why?

Please no mentions of Linux and other OSs, I know it’s trivial to do so for them.

  • YaBoyMax@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    The PE format used by Windows stores icons in the binary itself, so modifying them is extremely nontrivial. Compare that to Linux environments, where the icon is typically specified within a .desktop file which is literally just a text file and points to an executable and a separate image file somewhere else on the disk.

    As the other commmenter mentioned though, you can do something similar to this on Windows by just adding a shortcut as a level of indirection to the actual program in much the same way as a .desktop file.

    • I Cast Fist@programming.devOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      I don’t want a shortcut, I want the binary with a different icon. Programs compiled “from scratch” don’t have an icon and a shortcut is useless when a separate person downloads the binary in “the wrong folder”.

      • FishInABarrel@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Programs compiled “from scratch” don’t have an icon…

        As someone that wrote Windows applications for a living, that’s wrong. You just have to add a resource file and your icon.