How to change Uninstaller icon in NSIS? - nsis

I have a file compiled with NSIS.
Since MUI_ICON is used, after executing the installer file, the desired icon is displayed in the progress stage,
If you use MUI_UNICON, the desired icon is displayed in Add/Remove Programs.
However, an executable file and Uninstall.exe were created using the Installer, but
This Uninstall.exe shows the default icon for NSIS, not the one I intended.
Default icon: modern-uninstall-colorful.ico
How can I change this default icon at build time?

MUI_UNICON is correct and will change the uninstaller .exe icon.
If you see the wrong icon in Explorer then that is because it is caching the old icon. Rename your .exe and it should show the new icon. You can verify the icon by looking at the resources with Resource Hacker...

Related

What do I do to make Sublime text stop ignoring filenames that start with a dot

I am using Sublime Text editor and I need to change the settings for Sublime 3 to open files that start with a dot like .gitignore. Please let me know where in the settings I need to make the change. I am using Windows OS fyi.
This isn't a Sublime-specific option, but an operating system one, as the OS determines what is displayed in file dialogs as well as the file system explorer. To set the option on Windows, first open Windows Explorer and navigate to the folder containing the dotfile you want to view. Then, in the View tab, click the Options button on the far right, then select Change folder and search options.
You can also find Options under the File menu.
The Options window will now pop up. Select the View tab, then select the option Show hidden files, folders, and drives. Next, click on the Apply to Folders button at the top.
Similar options are also available on macOS and Linux.

How to set icon(or .ico file) on executable file in linux system?

I've been trying to set icon on executable file(.exe) in linux and macOS.
what I learn is there are 3 places icon sets: on taskbar, window bar, and executable file thumbnail.
I have set on taskbar and window bar, but not on exe file.
(By the way, I've already done on 3 of them in windows using visual studio.)
and I might not know exact term of it, so I will show the example below:
enter image description here
I guess .rc file should be in makefile.
If so, I could solve it also in macOS.
If not, I want to know how to set in linux and macOS too.
Please let me know how to use it and set it. Thanks in advance.
p.s. I set icons on window bar and taskbar using GLFWimage and working on openGL3 & c++.
glfwSetWindowIcon(window, 1, &icon);
I guess .rc file should be in makefile.
While there is a "standardized" way for storing icons in Windows .exe files, there is no such method for "ELF" files (the most common executable file format under Linux).
on taskbar and window bar
The icon used by the window manager (e.g. for the task bar) is typically stored as "X11 window property". A "X11 window property" is some data assigned to a window by a program.
The program must provide the icon image as array and call the function XChangeProperty() (this is what the function glfwSetWindowIcon() indirectly does).
It is not necessary that the icon is stored in a special way (comparable to the .rc file in Windows); the program can simply store the icon in some const array or even calculate the icon image data before calling XChangeProperty().
... but not on exe file.
As I already have written, there is no "standardized" way to store icons in executable files for Linux.
Some file managers "know" certain programs and display the corresponding icons: They know that "xterm" is a terminal program, so they display the terminal icon. However, this icon is not stored inside the executable file but in the file manager: If you rename any executable file to "xterm", the terminal icon will be displayed.
There is an extension named "elfres" (it was named "elficon" some years ago) that allows adding icons to ELF executable files. The web site of that extension is found here. On the linked web site you also find a screen shot with an example - so you can check if I understood you correctly and this is what you are talking about.
Unfortunately, this is a non-standard extension. For this reason a "standard" Linux installation will not check if an executable file contains an icon and therefore not show the icon.
If you use the "elfres" method, you must install a special plug-in; otherwise the icons of executable files are not shown.

Same executable with different icons

I want to open a pdf-viewer (okular) with different icons from the gnome-console.
Basically I want to differentiate between pdfs I am reading. Some would have the default okular icon, but I would like to have a different/special icon for the pdf generated by the LaTeX document I am editing.
Thinking about how to do this, I realized that I am not sure how gnome knows what icon to use when I execute /usr/bin/okular from the console. How is that bin related with an icon, no .desktop file involved right?
Applications set their icon at launch, to a compiled-in value. Most do it using the API of their graphics toolkit (Gtk provides various forms of the gtk_window_set_icon API call), but it has its roots in an X Windows window-manager property that's as old as dirt — which is why, for example, okular still has an application icon in Gnome Shell even though it's a KDE application.
You can see a grayscale representation of the icon(s) an application is exporting if you type xprop in a terminal, then click the application's window. (You need to have the correct utilities package installed, it's called xorg-x11-utils in Fedora.)
The application icon doesn't depend on Gnome or on the .desktop file under any circumstances.
(In fact, you could create your own $HOME/.local/share/applications/okular.desktop file that represented the application with a different icon, and launch it by clicking that icon, but it would be ignored in favor of the one that's compiled in to the application once it started. I have some custom launchers in my Favorites panel for different VNC sessions, using a different icon for each, but they all show up as TigerVNC with the standard icon when launched.)
AFAIK the only way to do what you want would be to compile your own separate version of okular with the icon changed to something else. That's just not the way application icons were meant to be used, sorry.

Unreal development kit export textures

I am not familiar wit UDK tool, bot I have complete source code (Binaries directory, Development directory, Engine directory and UDKGame directory) from one game and I want to export all textures from this project. How is it possible?
In the UDKGame directory of the game should be a directory called Content. Copy all files in that directory to the directory of the same name of an installed version of UDK e.g. C:\UDK\UDK-2013-07\UDKGame\Content.
Start the UDK editor, the easiest way is to use the shortcut in the start menu called "UDK Editor". Open the Content Browser. If it is not already open, click on the black t symbol in the menu bar of the editor. The window of the content browser might be reduced to a little bar.
In the lower left of the Content Browser window, under "Packages", search for the name of the *.upk files you copied to the Content directory earlier. They are like zip files containing the textures among the assets of the game. But only the UDK Editor can view and interact with them.
When you are inspecting a upk/package look for icons with Texture2D written on them, these are textures. Right click on a Texture2d, choose "Export to File...".
If a package appears to be empty right click it and choose "fully load", the UDK Editor might not have it loaded yet.

Is it possible to change the uninstall icon in Inno Setup?

From what i've read it looks like that is no parameter that allows you to change the uninstall icon:
[Setup]: UninstallIconFile
Description:
Obsolete in 5.0.0. As Setup and Uninstall have been merged into a single executable, setting a custom icon for Uninstall is no longer possible.
So, is there another way to change this icon?
I'm asking because if, for example you have only your launch exe, an readme and the uninstall, users may accidentally click on the uninstall instead of lauch, which is a little bit annoying.
Thanks.
To change the uninstall executable icon, you have to change the installer executable icon, as it is the same exe, using the SetupIconFile setup section directive.
For example:
SetupIconFile=MyProgSetup.ico
You can also change the Icon that is displayed on the control panel, setting the UninstallDisplayIcon setup section directive
For example:
UninstallDisplayIcon={app}\MyProg.exe,4
;or
UninstallDisplayIcon={app}\Uninstaller.ico
Your Uninstall Icon would only be the same as your application icon if you set the IconFilename setting to the same icon as the application or have the SetupIconFile setting set to the same as your application.
By default, the Uninstall Icon is the same as the Setup icon. If you really want to make sure the user isn't confused, you can set the IconFilename parameter in the [Icons] section to your uninstall icon. Something like:
Name: "{group}\Uninstall My Program"; Filename: "{uninstallexe}"; IconFilename: "{app}\uninstall.ico"
You would need to include the uninstall.ico in your [Files] section as well.
The "setup.exe" file icon can be set by SetupIconFile
The control panel icon can be set by UninstallDiaplayIcon
In script file, I added these lines to the [Setup] section:
[Setup]
.
.
.
; Icons for setup.exe and control panel
UninstallDisplayIcon={app}\Icon.ico
SetupIconFile="Icon.ico"
Note that:
UninstallDisplayIcon is given {app} path
SetupIconFile uses absolute path, because the setup program to be created by Inno (by compiling) is yet to have {app} before my program is installed.
jachguate's answer has given me the best clue to figure out my case. This solution is tested on a few Windows 10 computers.
In Win10 This works for me when you need to have the same icon as the application icon:
UninstallDisplayIcon={app}\youApp.exe
Set the uninstaller icon as SetupIconFile, then change the resource icon in the compiled .exe. (There are many programs to do that like the ResHacker)
If you see the compiled .exe still with the uninstaller icon, just move that .exe to another folder and you will notice.

Resources