mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-16 13:32:44 +00:00
a09d6a565c46d660165ba8c98f2576f51a83abdf
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
21aa07b9cc |
build: add build_win.bat, a Windows build script for deps, slicer and toolchain setup (#15436)
* build: add build_win.bat, a Windows build script for deps, slicer and toolchain setup build_release_vs.bat takes no options: what it builds is decided by editing it. This adds build_win.bat alongside it, with short and long options, a grouped help message, a dry-run mode that prints every command instead of running it, and one option per thing a developer actually varies - the configuration, the architecture, the compiler, the generator, the Visual Studio release, how much gets rebuilt, and where the dependency tree lives. It works from any directory, needs no developer command prompt in either generator mode, and keeps CMake ahead of Strawberry Perl on PATH so a build does not depend on how the user ordered their environment. scripts/test_build_win.ps1 covers it with table-driven cases that run the script under --dry-run and assert on the commands it prints, so nothing is configured or built. The Windows build jobs wait on that suite. Based on the script from OrcaSlicer#11097. Co-authored-by: Ocraftyone <24759591+Ocraftyone@users.noreply.github.com> * build: report what build_win.bat produced and what to do next Every successful run now ends with a block naming what it built and the commands to carry on with. Those commands repeat the flags that reproduce the run, so a rebuild after a clang-cl Ninja build is not silently an MSVC one. A failure gets a framed block naming the command that failed and a retry scoped to the stage that failed, so a slicer error does not suggest discarding an untouched dependency tree. Installing is now opt-in behind -i. The install tree is a second full copy of the build that exists mainly so the release can be zipped from it, while the build tree is already runnable, with the DLLs beside the binary and resources symlinked rather than copied. Configuring against a dependency tree that was never built now names it instead of failing several hundred lines into CMake's package resolution. scripts/test_build_win.ps1 covers all of it, and gains -Name so one case can be run without the full pass. * build: let the test options stand alone, and say which build things apply to --run-tests named two things to do and then did neither without -s, so `build_win.bat -lx --run-tests` answered "Nothing to do". Both test options now imply the slicer build they cannot happen without, unless another action was already named, so -d --tests is still a dependency build. --install-vs has turned on --install-deps the same way all along. That makes them actions, so they move to the group that says so. -i goes the other way, to the step toggles beside --no-configure and --no-gettext, since it does not stand alone and adds a step rather than describing what kind of build to make. An example shows the tests run with toolchain flags, because flags pick which build gets tested and a bare --run-tests would build and test a default tree the developer never asked for. Two help lines named defaults that were not the defaults. --build-dir said "instead of build/" and --deps-dir said "instead of deps/", but trees are named for the configuration, compiler and architecture, so build/ is only the default for a release x64 MSVC build, and deps/ is the source directory rather than a tree anything is built in. The hint for a missing dependency tree now carries the flags that reproduce the run. It said "Build them with -d", which after a clang build points at the MSVC tree, so following it left you no better off. Every other suggestion the script makes already repeats them. -k counted on the developer to read taskkill invocations as progress. It now names each image and how many processes it is about to stop, which is what explains the pause, and skips the ones that are not running instead of printing taskkill's "not found" as though something had gone wrong. No image can stop the rest. The environment example set SLIC3R_ASAN, which -a already does, teaching the long way round to a flag the script owns. It now sets options that have no flag. The note under it said "Use these for a value containing spaces. Ampersands are not supported", which named neither what "these" were an alternative to nor where ampersands were a problem. The test harness gains a NotExists field, because output cannot show what a run did not create, and two cases needed to prove exactly that. --------- Co-authored-by: Ocraftyone <24759591+Ocraftyone@users.noreply.github.com> Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> |
||
|
|
5ed56eb876 |
Cache system presets to eliminate startup and wizard load times (#14217)
* Add caching system for presets * Removing user\bundle serialization and keeping it only for system presets * Integrate caching into WebGuideDialog which speeds up time of SetupWizzard and PrinterSelection dialog * Add CI\CD step to prepare cache file in ahead of time so user does not need to wait * Add partial cache generation when only one of the vendros is changed to speed up recalculation time * Handle corrupted files * Add cache to GuideDialog as previos version didn't work as expected * Add inspecting tool and fix CI cache generation * Generate cache per vendor * Simplify code by mergin it in PresetBundle * Simplify code a bit more * Add cereal serialize() to VendorProfile, PrinterModel, Preset, and Semver * Remove CachedPrinterModel/VendorProfile/Preset mirror structs from VendorCache * Fix use-after-free in CallAfter lambda; replace raw thread pointer with unique_ptr * Use get_vendor_cache_key() to match cache keys written by the app * Remove BOM added by VSC * Skip invalid vendors * Remove leftover cache file * Fix build for windows arm64 * Revert json cache back * Update check for stale cache * Serealize all value fields for Preset class to minimize regression later * Minimize field duplication by moving Cache thing into PresetBundle * Add tests for Cache system * Add a bit more tests * Merge branch 'main' into feature/cache_profiles_and_optimize_loading_speed * Rvert from per-verndor to single cache file Replace N per-vendor .cache files with a single system_presets.cache that holds all vendors and presets in one serialized blob. Cache load is now all-or-nothing: on hit all vendors are applied from the bundle (sub-second); on miss all vendors are parsed from JSON and a fresh bundle is written to the user cache dir. Invalidation is driven by bundle_key - a sorted concatenation of all vendor JSON version strings. Any vendor update invalidates the whole cache and triggers re-parse on next launch. Guide wizard (WebGuideDialog) loads the bundled cache into a plain PresetBundle instead of a separate VendorGuideData struct, removing the duplicate data model. generate_system_cache simplified from a per-vendor loop to a single save_system_presets_cache() call producing one output file. * Transfer all Preset fields from cache via move assignmet apply_vendor_preset_group was copying fields manually and missed bundle_id, user_id, base_id, sync_info, updated_time, key_values, ini_str. Replace field-by-field copy with move assignment of the fully-deserialized Preset, then restore the vendor pointer which is excluded from serialization. * Ignore cache for future * Remove not used files * Ship one preset cache per vendor in place of the profile JSONs Each vendor's system presets serialize into a single <vendor>.opc built at package time, and a shipped build carries that file alone — the profile JSON and its sub-file tree are pruned. The vendor loader, the setup wizard's profile list and the resource installer all read a vendor through its cache, falling back to parsing whenever one is absent, stale or unreadable, so the cache stays an optimization and never a source of truth. Caches hold presets in source form and resolve inheritance at load, through the same code the JSON path uses. * Make the preset cache self-describing and load each vendor from the system folder alone The cached DynamicPrintConfig is keyed by name, through a per-file dictionary of the distinct opt_keys, the type each was written as, and the distinct enum value names, instead of by serialization_key_ordinal — a position assigned by declaration order at static init, where inserting one option shifts every later ordinal and the lookup then succeeds on the wrong option. Because a name-keyed payload drops the options this build cannot place rather than being rejected wholesale, the schema fingerprint goes, and with it the two fallbacks that existed only because an installed cache died on every app upgrade: the second lookup tier into resources/profiles and the parse fallback to the same place. A vendor is loaded from <data_dir>/system/ and nowhere else, as on main — which is what makes the app write its .opc files there again. * Simplify the preset cache internals after review * Use the shared temp-dir helper in the preset bundle loading test * Bound stamp string reads in the preset cache * Speed up the setup wizard with a profile-data cache The wizard's per-vendor fast path threw on vendors present only in resources, falling back to a ~29 s raw JSON scan on every open. Each vendor now loads from the directory it was found in, and the derived model/machine/filament/process catalog is cached whole in <data_dir>/cache/wizard_profile_data.json, stamped by each vendor's name and version - a fresh cache makes an open one file read, with no bundle built and no presets installed (~0.2 s vs ~2 s). * Remove debug SVG dump from a geometry test * Move the per-vendor cache file format into PresetCacheFormat * Move the vendor install helpers from PresetBundle into Utils * rename * fix flatpak * change cache version to 1 --------- Co-authored-by: SoftFever <softfeverever@gmail.com> |
||
|
|
3a81a8f358 |
Adds resonance avoidance ported from qidi slicer (#9403)
* Update tab.cpp for resonance avoidance * update files for resonance avoidance updated gcode.cpp, gcode.hpp, preset.cpp, printconfig.cpp, printconfig.hpp to add resonance avoidance. Based on qidi slicer changes. * Update README.md * Update README.md * Update Tab.cpp * Update Preset.cpp Updating code comments * Update PrintConfig.cpp * Update PrintConfig.hpp * Update .gitattributes * Remove carriage return * Update doc * Move resonance avoidance settings to printer settings * Disable resonance avoidance by default * Update options --------- Co-authored-by: Paul Mourer <paul.mourer@gmail.com> Co-authored-by: Noisyfox <timemanager.rick@gmail.com> |
||
|
|
e23e71bec5 | restore tools to git from lfs | ||
|
|
2efba59b0d | add win tools |