Skip to content

Windows batch script enhancements#88

Merged
aothms merged 3 commits into
IfcOpenShell:masterfrom
Tridify:win_build_script_bat
Jun 17, 2016
Merged

Windows batch script enhancements#88
aothms merged 3 commits into
IfcOpenShell:masterfrom
Tridify:win_build_script_bat

Conversation

@Stinkfist0

Copy link
Copy Markdown
Contributor

Make possible to invoke run-cmake.bat, build-ifcopenshell.bat, and install-ifcopenshell.cmd directly from File Explorer or command prompt without VS env vars set, if BuildDepsCache file exists, by utilizing CMake's --build functionality.

…t), install-ifcopenshell.cmd (now bat) directly from File Explorer or command prompt without VS env vars set, if BuildDepsCache file exists, by utilizing CMake's --build functionality. Do not delete CMakeCache.txt always now in order to keep the build options consistent.
@Stinkfist0 Stinkfist0 closed this Jun 10, 2016
@Stinkfist0 Stinkfist0 deleted the win_build_script_bat branch June 10, 2016 13:52
@Stinkfist0 Stinkfist0 restored the win_build_script_bat branch June 10, 2016 14:15
@Stinkfist0

Copy link
Copy Markdown
Contributor Author

Oops, accidentally deleted this branch.

@Stinkfist0 Stinkfist0 reopened this Jun 10, 2016
@aothms

aothms commented Jun 12, 2016

Copy link
Copy Markdown
Member

I like these changes, this will simplify things quite a bit. Thanks!

  1. I would recommend not to read cached variables from both files, as I am bit worried that variables would be mixed between the two architectures if they are absent in x64, how about using a loop sorted on atime/mtime, e.g:
@echo off

for /f "tokens=*" %%f in ('dir BuildDepsCache-*.txt /o:-n /t:a /b') do (
    echo %%f
    goto :break_loop
)

:break_loop
  1. Just out of curiosity, is this a typo or does this trailing dot have some significance: if exist BuildDepsCache-x64.txt.

  2. Maybe it is an idea to show an error message if %GEN_SHORTHAND% is not defined. This is what would happen when a user runs the script by clicking in their explorer without invoking it from the cli first, am I right?

@Stinkfist0

Copy link
Copy Markdown
Contributor Author

Yeah, I'll do these enhancements. Regarding the trailing dot, it is intentional (it is "best practice" of some sort, even if /? uses it in the example, can't recall the actual reason though...) and actually the line that misses it has a typo.

@Stinkfist0

Copy link
Copy Markdown
Contributor Author

The fixes/enhancements are in.

@aothms

aothms commented Jun 17, 2016

Copy link
Copy Markdown
Member

Great, thanks again Ali!

@aothms aothms merged commit 3c418e8 into IfcOpenShell:master Jun 17, 2016
@Stinkfist0 Stinkfist0 deleted the win_build_script_bat branch October 17, 2016 14:31
This was referenced Jan 1, 2023
Moult added a commit that referenced this pull request Jun 9, 2026
Replaces the standalone wgpu-only clear-color spike in main_web.cpp
with a real WebViewportHost implementation: surface creation via the
emdawnwebgpu canvas-selector source, framebufferSize through
emscripten_get_element_css_size + dpr, requestFrame as a deferred
flag the RAF main_loop consumes, quit through emscripten_force_exit.

main_web.cpp now does the same lifecycle the desktop initWgpu shell
does: core_.initWgpu(web_limits=true) → buildPipelines → buildHiz/
Edge/Pick. The render loop runs core_.render() once per RAF tick when
the host has flagged a frame pending, with a surface reconfigure on
size changes.

Builds clean under emcc 6.0 + emdawnwebgpu (1.4 MB wasm, 278 KB JS
glue). Renders an empty scene with the configured background — the
plumbing is end-to-end through the same ViewportCore code path the
desktop build uses. No sidecar load yet: that lands with the
emscripten_fetch streaming backend (#88).
Moult added a commit that referenced this pull request Jun 9, 2026
1) Async-wait spin loops in initWgpu / probeAndCreatePool / pick /
   screenshot finalize all called wgpuInstanceProcessEvents in a tight
   while. wgpu-native drives queued callbacks from there; Dawn-web
   queues the callback for an event-loop tick that never happens
   because wasm doesn't yield back to JS. Page hung at the first
   await (RequestAdapter) and Firefox flagged the tab as slow.

   New `waitTickInstance` helper calls emscripten_sleep(0) on
   Emscripten (Asyncify unwinds wasm, JS resolves WebGPU promises,
   resume) before wgpuInstanceProcessEvents drains completions into
   our callback. Desktop path is unchanged. All five
   `while (!done) ProcessEvents` sites switch to the helper.

2) streaming_thread_.start() inside initWgpu spawns a std::thread.
   On Emscripten that needs -pthread + COOP/COEP headers from the
   hosting page. None of that is wired yet, so the start is gated
   `#if !defined(__EMSCRIPTEN__)`. The sync chunk-load fallback
   already inside driveStreamingLoads carries the load until #88
   replaces it with emscripten_fetch.

3) wgpuSurfacePresent at the end of render() aborted with
   "wgpuSurfacePresent is unsupported (use requestAnimationFrame via
   html5.h instead)" — Dawn-web composites the canvas at the end of
   the RAF tick automatically. Call skipped on Emscripten;
   WebViewportHost::requestFrame is the RAF-tick driver.

Page now loads, brings up wgpu, configures the surface, and renders
one frame with the configured background. The frame log in the
status overlay shows the first-frame startup spike (~1000 fps from
a 1 ms tick); subsequent frames are paint-on-demand, which on the
empty scene means no frames at all — consistent with the desktop
event-driven model.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants