Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Revision of Build Instructions #23

Closed
ghost opened this issue May 5, 2023 · 0 comments · Fixed by #33
Closed

[DOC] Revision of Build Instructions #23

ghost opened this issue May 5, 2023 · 0 comments · Fixed by #33

Comments

@ghost
Copy link

ghost commented May 5, 2023

(draft, please do not edit for now)

Prerequisites

  • Node 8: Use Node.js version 8 (10 generates lots of warnings, and 12+ fails due to node-gyp). Recommend using the Node version manager.
  • Python 2.7 (Python 3 does not work). Recommend using Python version manager pyenv-win to download and change versions. Make sure to close all command shells (including VSCode) after doing this, to get the latest environment variables. Check with python --version.
    • NOTE: If you are running Windows 10 1905 or newer, you might need to disable the built-in Python launcher via
      • Start > "Manage App Execution Aliases" and turning off the "App Installer" aliases for Python"
  • Visual Studio 2019 with Desktop Development wit C++ extensions - node-gyp (the Node to C++ binding environment) requires it.
    • See this page for a simple to install package that may work
    • manually Install VS2019 with C++ extensions, if the above does not work
# if your VCINSTALLDIR points to VS2022, clear it
set VCINSTALLDIR=

Building

git clone --recurse-submodules --remote-submodules https://github.com/cmidgley/Deepnest
cd Deepnest
npm config set msvs_version 2019
npm install
npm run w:build
npm run w:start

Rebuild

  • If you change the electron-related files (web files, javascript), a build with
    • npm run w:build is all that is needed.
  • If you change the the Minkowski files (the .cc or .h files), where the NFP (Non-Fit Polygon) logic and background threading is handled, you must rebuild using node-gyp to recompile the files using:
    • npm run w:fullbuild

Running

Unless you want to create a distribution build (a separate set of
executable files that can be run without dependency on the build environment), you can run Deepnest with:

  • npm run w:start

Clean builds

Two clean options:

  • For regular clean of build artifacts, use npm run w:clean and then npm run w:build.
  • To remove everything, including node_modules use npm run w:fullclean, then build again.

Create a distribution build

To build a distribution set of files, run:

  • npm run w:dist

The resulting files will be located in .\deepnest-win32-x64. All files need to be distributed,
meaning a ZIP file or writing a simple installer would be needed to avoid handling a larger number
of files.

Browser dev tools

If the environment variable "deepnest_debug" has a value of "1", Deepnest will open the browser
dev tools (debugger/inspector).

ghost pushed a commit that referenced this issue May 6, 2023
@ghost ghost mentioned this issue May 6, 2023
@ghost ghost closed this as completed in #33 May 6, 2023
ghost pushed a commit that referenced this issue Sep 10, 2023
This issue was closed.
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 a pull request may close this issue.

0 participants