Comments (4)
@CyuHat That's awesome, glad to hear everything is working as intended now! Remember, if you use -d:release
Neel will embed your assets inside of the executable itself so you don't have to have to worry about that. Debug builds are just for your testing!
from neel.
@CyuHat Thank you for the kind words and I'm glad I could help you on the journey of learning Nim! While I don't have any experience at all with cross-compiling from Linux to Windows, the issue seems that it may be from the procedure that finds chrome. To be a little more performant, it uses a 'when' statement (which is assessed at compiletime) to figure out which OS it's compiling to and uses that path. That may be the reason. I'm not exactly sure how Nim handles this internally when cross-compiling:
Another guess is that it could be a window's security issue when running the application?
Those would be my two guesses. Please let me know when you manage to figure this out
from neel.
@Niminem thank your for your fast and precise answer! I will check both hypotheses and come back to you if I find something. Meanwhile I have done some tests. I think that Neel manage to find the chrome browser in windows since it open a chrome window (text in french):
The screen is the same as if I haven't added the -d:release
flag to attach the assets folder (maybe it is related). Furthermore, adding the assets folder to a Linux executable (compiled without the -d:release
) solve the issue, but not for a Windows cross-compiled one. Is it maybe something relevant to check?
from neel.
Hi @Niminem
Good news, there is no problem with Neel. The error was on my side. After asking my brother to test my app on his linux machine, he realized that it was looking for the assets/index.html in a path from my computer. It is because I have written the full path instead of a relative path in the startApp()
macro:
# Copied from the filepicker.nim example - line 20
startApp(webDirPath = currentSourcePath.parentDir / "assets")
After replacing it with a relative path, it worked under Windows too:
startApp(webDirPath = "assets")
Then, all I need is the assets folder alongside the executable. I apologise for the false issue and thank you for your valuable time!
from neel.
Related Issues (20)
- CrossBrowdy And GraBulma Support? HOT 1
- Error: undeclared identifier: 'callProc'
- Calls to frontend are too slow/blocking HOT 9
- Suggestion : Use Axino widgets instead of HTML + CSS HOT 3
- Application doesn't start if not on the same drive letter as Chrome HOT 3
- Contributing to the project HOT 7
- filePicker example does not compile HOT 4
- Feature request: webview HOT 8
- Error: execution of an external program failed if callJs in thread. HOT 3
- any kind of error in callJs leads to JSON parse error, original error disappears HOT 2
- Adding: google-chrome-stable HOT 2
- CallJs in try/except Causes Segfault HOT 3
- Example crash HOT 2
- MIME type HOT 1
- Windows build does not works standalone HOT 1
- Cannot install neel. HOT 3
- [WebView] automatic conversion of specified parameters of a procedure to call it simply by string HOT 6
- [Question] Using Neel for a web application? HOT 2
- Curiosity HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neel.