rive-app / rive-app/rive-runtime

Make file changes requeired to compile on windows

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triage
Dominant language
C++
Stars
1.2k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

I kept hitting shader compile problems on Windows.
I ended up having to alter the Makefile at /renderer/src/shaders/Makefile to fix some file path problems on Windows.

Here's the section I changed:

$(OUT)/d3d/%.vert.h:` d3d/%.hlsl $(MINIFY_STAMP)
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -D VERTEX   -I "$(OUT)" $(FXC_DEBUG_FLAG) -T vs_5_0 -Fh "$@" "$<"

$(OUT)/d3d/%.frag.h: d3d/%.hlsl $(MINIFY_STAMP)
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -D FRAGMENT -I "$(OUT)" $(FXC_DEBUG_FLAG) -T ps_5_0 -Fh "$@" "$<"

$(OUT)/d3d/render_atlas_stroke.frag.h: d3d/render_atlas.hlsl $(MINIFY_STAMP)
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -D FRAGMENT -D ATLAS_FEATHERED_STROKE $(FXC_DEBUG_FLAG) -I "$(OUT)" -T ps_5_0 -Fh "$@" "$<"

$(OUT)/d3d/render_atlas_fill.frag.h: d3d/render_atlas.hlsl $(MINIFY_STAMP)
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -D FRAGMENT -D ATLAS_FEATHERED_FILL  $(FXC_DEBUG_FLAG) -I "$(OUT)" -T ps_5_0 -Fh "$@" "$<"

$(OUT)/d3d/root.sig.h: d3d/root.sig
	@mkdir -p "$(OUT)/d3d"
	fxc -nologo -I "$(OUT)" -T rootsig_1_1 -E ROOT_SIG -Fh "$@" "$<"

The setup_windows_dev.bat also points to the wrong make path, so after running the bat script, I then changed the path to the correct one using: set PATH=C:\msys64\usr\bin;%PATH%

Otherwise, I generally followed the instructions in #68

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with setup_windows_dev.bat and renderer/src/shaders/Makefile, then reproduce the shader compilation problems on Windows using the setup instructions from issue #68. Done means the Windows setup script finds the intended make path and the shader Makefile compiles the listed Direct3D shaders without manual edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.