Comments (3)
@alistairkeys Thanks for this detailed information! Excuse my delay I've been bogged in work recently. I agree 100% using WIndows registry for finding chrome. I'll be making these changes with the next release. We're also adding a similar functionality for Mac. Leaving this open until the changes are made, I'll ping you here directly as soon as it's live!
from neel.
I tried Neel 0.3.1 but it still complains when Chrome isn't found on the drive. The following monkey-patch in neel.nim (findChromeWindows proc) seems to fix it:
when defined(Windows):
import std/registry
proc findChromeWindows*: string =
const defaultPath = r"\Program Files (x86)\Google\Chrome\Application\chrome.exe"
const backupPath = r"\Program Files\Google\Chrome\Application\chrome.exe"
if fileExists(absolutePath(defaultPath)):
result = defaultPath
elif fileExists(absolutePath(backupPath)): #was originally an if 4/5/21 (testing)
result = backupPath
else: # include registry search in future versions to account for any location
when defined(Windows):
result = getUnicodeValue(
path = r"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe",
key = "", handle = HKEY_LOCAL_MACHINE)
discard
if result.len == 0:
raise newException(CustomError, "could not find Chrome in Program Files (x86) directory")
I've not tried this change on other OS's, just Windows. I wrapped the logic in 'when defined(Windows)' sections as I assume it's not applicable/would probably break other OS's.
Feel free to make use of these changes. I'm too lazy to PR it. :)
from neel.
@alistairkeys
Thanks for the contribution! I included it in Neel and made a quick release, you can download 0.3.2 now which integrates your changes. Happy coding <3
from neel.
Related Issues (20)
- 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
- CrossBrowdy And GraBulma Support? HOT 1
- 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
- Cross-compilation from Linux to Windows HOT 4
- Curiosity 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
- Contributing to the project HOT 7
- filePicker example does not compile HOT 4
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.