Adding embedded resources to a Visual Studio project
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- lua
- Domain
- build-system
Research direction
Start with the premake script using the files, filter, and buildaction settings for the VS2019 solution. Compare the generated project with the manually added image that produces .rc and resource.h files. Done means the generated project embeds the image so it can be retrieved from the executable at runtime.
Written by the indexing model from the issue text.
Description
What are you trying to do?
Add an embedded resource to a VS2019 solution by using a premake script, so it can then be retrieved at runtime from the executable.
What have you tried so far?
files { "files:%{prj.location}/resource/splashscreen.png" }
filter "files:%{prj.location}/resource/splashscreen.png"
buildaction "Embed" -- Also tried "Resource"
filter {}
This adds the .png file to the solution explorer as a resource and seems to somehow build it, but no .rc and resource.h files are generated. When switching to 'Resource View' in VS and manually adding the image as a resource, it is taken and .rc and resource.h files are generated and everything works. How can this be achieved using premake?
What version of Premake are you using?
premake5 (Premake Build Script Generator) 5.0.0-alpha16
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 654
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from premake/premake-core
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
premake/premake-core#2753 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
premake/premake-core#2741 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
premake/premake-core#2798 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 70/100
premake/premake-core#2788 · 3 comments ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
premake/premake-core#2786 · 10 comments ·
All issues in premake/premake-core
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100