nodegui / packer

Package and deploy apps built with NodeGui to all platforms
206 stars 15 forks source link

How to run the build artifacts? #105

Open tom-sherman opened 4 years ago

tom-sherman commented 4 years ago

After running packer on windows, I get the follwoing directory structure:

.
├── config.json
└── win32
    ├── NvmGui
    │   ├── platforms
    │   ├── qode.json
    │   └── styles
    └── build
        └── NvmGui
            ├── D3Dcompiler_47.dll
            ├── Qt5Core.dll
            ├── Qt5Gui.dll
            ├── Qt5Widgets.dll
            ├── dist
            │   ├── 08ef36629f2fe40bdcbe135ae303d949.jpg
            │   ├── index.js
            │   └── nodegui_core-1adbd57cebe81664d2e1405d9c9f704f.node
            ├── imageformats
            │   ├── qgif.dll
            │   ├── qico.dll
            │   └── qjpeg.dll
            ├── libEGL.dll
            ├── libGLESV2.dll
            ├── platforms
            │   └── qwindows.dll
            ├── qode.exe
            ├── qode.json
            └── styles
                └── qwindowsvistastyle.dll

How do I run the application? I tried running qode.exe which did nothing, I also tried running qode.exe and passing the path of the built index.js file as an argument, this also did nothing.

Everything works fine in dev mode.

I'm new to QT and native development in general so my next question is how should I go about creating a windows installer, but I'm sure I can figure that out myself when I can run the application!

thcheung commented 4 years ago

I think I am having the same issue. I followed the commands in this repo and tried running build/app/qode.exe by doubling clicking it. However, there is nothing pop up on the screen. (I am using Windows 10, the apps did work during development)

sunmasters commented 3 years ago

I also had same problem. This is the main issue with nodegui. I can't run on my client machine. Can't we run without visual studio?

danielo515 commented 3 years ago

Hey, I had the same surprise when I setup a pipeline for the windows build. How are we supposed to use this? There is no info in the docs, and the docs doesn't mention that the windows build is going to be impossible to use.

liudonghua123 commented 2 years ago

I have the same problems.

liudonghua123 commented 2 years ago

Maybe it is related to https://github.com/nodegui/nodegui/issues/907.

liudonghua123 commented 2 years ago

I have found my problems. I installed anaconda which included qt already, but the version is 5.9.7.0, when I run npx nodegui-packer --pack ./dist, the actual command D:\code\node\nodegui-starter\node_modules\@nodegui\nodegui\miniqt\5.14.1\msvc2017_64\bin\windeployqt.exe D:\code\node\nodegui-starter\dist\nodegui_core.node --verbose=2 --release --no-translations --compiler-runtime --dir=. will be executed which will use the qt bundled in anaconda instead of @nodegui\nodegui.

If I firstly executed set PATH=D:\code\node\nodegui-starter\node_modules\@nodegui\nodegui\miniqt\5.14.1\msvc2017_64\bin;%PATH% then ran npx nodegui-packer --pack ./dist, it will be ok.

The related code is in

https://github.com/nodegui/packer/blob/4402228164108a2401e302f4d79a28ab3112fbd0/src/win32/index.ts?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L41-L54

See the following logs for more details.

cmd logs ```shell D:\code\node\nodegui-starter\windeployqt>D:\code\node\nodegui-starter\node_modules\@nodegui\nodegui\miniqt\5.14.1\msvc2017_64\bin\windeployqt.exe --help Usage: D:\code\node\nodegui-starter\node_modules\@nodegui\nodegui\miniqt\5.14.1\msvc2017_64\bin\windeployqt.exe [options] [files] Qt Deploy Tool 5.14.1 The simplest way to use windeployqt is to add the bin directory of your Qt installation (e.g. ) to the PATH variable and then run: windeployqt If ICU, ANGLE, etc. are not in the bin directory, they need to be in the PATH variable. If your application uses Qt Quick, run: windeployqt --qmldir Options: -?, -h, --help Displays help on commandline options. --help-all Displays help including Qt specific options. -v, --version Displays version information. --dir Use directory instead of binary directory. --libdir Copy libraries to path. --plugindir Copy plugins to path. --debug Assume debug binaries. --release Assume release binaries. --pdb Deploy .pdb files (MSVC). --force Force updating files. --dry-run Simulation mode. Behave normally, but do not copy/update any files. --no-patchqt Do not patch the Qt5Core library. --no-plugins Skip plugin deployment. --no-libraries Skip library deployment. --qmldir Scan for QML-imports starting from directory. --qmlimport Add the given path to the QML module search locations. --no-quick-import Skip deployment of Qt Quick imports. --no-translations Skip deployment of translations. --no-system-d3d-compiler Skip deployment of the system D3D compiler. --compiler-runtime Deploy compiler runtime (Desktop only). --no-virtualkeyboard Disable deployment of the Virtual Keyboard. --no-compiler-runtime Do not deploy compiler runtime (Desktop only). --webkit2 Deployment of WebKit2 (web process). --no-webkit2 Skip deployment of WebKit2. --json Print to stdout in JSON format. --angle Force deployment of ANGLE. --no-angle Disable deployment of ANGLE. --no-opengl-sw Do not deploy the software rasterizer library. --list
thantez commented 2 years ago

I have found my problems. I installed anaconda which included qt already, but the version is 5.9.7.0, when I run npx nodegui-packer --pack ./dist, the actual command D:\code\node\nodegui-starter\node_modules\@nodegui\nodegui\miniqt\5.14.1\msvc2017_64\bin\windeployqt.exe D:\code\node\nodegui-starter\dist\nodegui_core.node --verbose=2 --release --no-translations --compiler-runtime --dir=. will be executed which will use the qt bundled in anaconda instead of @nodegui\nodegui.

If I firstly executed set PATH=D:\code\node\nodegui-starter\node_modules\@nodegui\nodegui\miniqt\5.14.1\msvc2017_64\bin;%PATH% then ran npx nodegui-packer --pack ./dist, it will be ok.

The related code is in

https://github.com/nodegui/packer/blob/4402228164108a2401e302f4d79a28ab3112fbd0/src/win32/index.ts?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L41-L54

See the following logs for more details. cmd logs

This solution doesn't work on Linux, although the PATH was wrong in this Environment too. What should we do?

xandyxor commented 2 years ago

This solution doesn't work on Windows