x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Icon defaulting to UE4 icon

In UE4, I set the "Game Icon" to my custom icon in Project Settings, and if I build from UE4 my application correctly receives this icon. However, when I build using windows command line tools (UnrealBuildTool.exe, RunUAT.bat BuildCookRun), it defaulst to the UE4 icon. The icon "WindowsNoEditor/[project_name].exe" is correctly my custom icon, but "WindowsNoEditor/[project_name]/Binaries/Win64/[project_name]-Win64-Shipping.exe" is the UE4 icon, which is what is used for the task bar and the window icon. There are a lot of answer hub topics on this, but none that address this issue in particular. Does anyone know a fix? Is anyone successfully setting an icon when using command line build tools?

edit I posted a solution down below, but its not marked as the answer because its a hack. But if you have a need to fix this issue, and don't want to go looking in UE4 code for the problem, its a quick fix.

alt text

Product Version: UE 4.18
Tags:
untitled.png (41.0 kB)
untitled.png (41.4 kB)
more ▼

asked Nov 29 '18 at 07:43 PM in Packaging & Deployment

avatar image

Nantuk
16 1 5 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hey Nantuk, have you tried the fix at the bottom of this answer hub post? It appears the Icon needs to be a .ico file and a Power of 2 resolution. https://answers.unrealengine.com/questions/18221/packed-game.html

more ▼

answered Nov 29 '18 at 10:49 PM

avatar image

Alesssafur
306 21 30 42

avatar image Nantuk Nov 29 '18 at 11:14 PM

I have tried that method. To reiterate, the issue appears to be that somewhere in the command line build tools (vs the in-editor build tools), it misses the "Binaries/Win64/[project_name]-Win64-Shipping.exe" and doesn't assign it my custom icon, though it assigns it fine for "[project_name].exe".

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I ended up solving this by using Resource Hacker, a tool that can change icons of executables. It can be invoked via command line, which I do in my build automation process. I won't mark this as answer because its more of a hack.

Here is the command line call I make:

 ResourceHacker.exe -script "pathToMyScript\rh_update_icon.txt"

Here is the script I use to get the job done:

 //This script replaces all resources
   [FILENAMES]
   Exe=    "pathToProblemExe\problemExe.exe"
   SaveAs= "pathToProblemExe\problemExe.exe"
   Log=   "pathToMyLogFolder\rh_update_log.txt"
   [COMMANDS]
   -addoverwrite "PathToProject\Build\Windows\Application.ico" ICONGROUP,123,1033  //adding all the new resources


more ▼

answered Dec 05 '18 at 07:03 PM

avatar image

Nantuk
16 1 5 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question