NW.js icons (generally, and in Windows 10) - nw.js

Has anyone succeeded in replacing default NW.js logos -- either with the "icon": "string with path to icon" in the manifest OR with Resource Hacker?
After producing standalone .exe files (with Enigma Virtualbox)which work fine, Resource Hacker seems to work, but the new .exe file produced will no longer run in Windows 10 -- yielding a "This program will not run on your PC..." error message.

Related

What's different between open App.app file and App.app/contents/MacOS/Electron on MacOS?

I have an electron application.It is an updater with download another application and toolchain.I can't open it with open Updater.app.However, I can use Updater.app/contents/MacOS/Electron to open it.
Here is the log:
Non-fatal error enumerating at <private>, continuing: Error Domain=NSCocoaErrorDomain Code=260 "未能打开文件“PlugIns”,因为它不存在。"
UserInfo={
NSURL=PlugIns/ -- file:///private/var/folders/xn/08sc_nts0n11yyw_3ddlngdh0000gn/T/AppTranslocation/A0F3B185-B4AB-4CC8-A3C5-86DAA22043D5/d/Updater.app/Contents/,
NSFilePath=/private/var/folders/xn/08sc_nts0n11yyw_3ddlngdh0000gn/T/AppTranslocation/A0F3B185-B4AB-4CC8-A3C5-86DAA22043D5/d/Updater.app/Contents/PlugIns,
NSUnderlyingError=0x7fd1d2d13fe0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}
}
I would like to know the difference between Updater.app and Updater.app/contents/MacOS/Electron.
Updater.app is a macOS App Bundle. App Bundles are Apple's way of packaging a program - each one is basically just a folder containing an executable program and all the configuration files, helper executables, images, shipped libraries, and other resources the program needs to run.
In your case, Updater.app/Contents/MacOS/Electron is probably the main executable of the app - <App>/Contents/MacOS/ is usually the location of an App Bundle's main executable.
For further reading, look over this answer which further explains the general concept of a macOS App Bundle.

Distracting Exception output in QtCreator when debugging Windows application

I am using QtCreator 4.1rc1 under Windows with the msvc tool chain. The debugger is cdb from the Windows 8.1 SDK. I had the same issue with older versions of QtCreator.
When I debug my application, then there are many messages to the output (and issues) pane in the form
Exception at 0x773596c2, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in WinSCard!SCardTransmit
I understand, that this is to be expected under Windows and those exceptions are actually not a problem. But they pollute the output and issues pane and basically render them useless.
So I tried to get rid of the messages. But failed after hours trying. What I tried is the following:
Use the check box 'Ignore first chance access violation' under Tools->Options->Debugger->CDB
Specifying command line arguments to cdb.exe: -xi
Create a script file for cdb.exe to be used at startup to avoid the warnings. The script contained the commands 'SXI 8010000a; SXI 0000071a; SXI e06d7363'. I tried placing the script in several directories and also specifying it with the command line options -cf or -cfr.
When I run cdb.exe from a command line using the startup script, it works! No exceptions are printed to the console. But when I start it from QtCreator, they are there again.
I assume, that QtCreator is using their own startup scripts and those overwrite the ones I specified.
Has anyone succeeded in hiding those exception outputs under QtCreator with cdb?

Tesseract "Failed loading language..." on windows cmd

Windows 7, Tesseract 3.02
All I'm trying to do is run "tesseract img.jpg img" from cmd.exe.
I'm running it from my C:\...\Tesseract-OCR directory.
But I get the error:
Error opening data file
C:\...\Tesseract-OCR\tessdata/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to
the parent directory of your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.
How can I fix this?
This problem has been brought up many times it seems (around the web), but no answers I've come across have done me any good.
I've tried doing "set TESSDATA_PREFIX=C:\...\Tesseract-OCR" but nothing changes.
Does it have to do with the reversal of the backslashes|forward slashes in the path?
Reinstalled.... works fine now :B
Correct Output:
Tesseract Open Source OCR Engine v3.02 with Leptonica

Semicolon in windows folder name prevents application from loading its dlls

My application (C++) loads its dll by linking against the stub library, the dll is then expected to reside in the same directory as the executable.
However I've had a report from a user who received the error message "System Error - The program can't start because xyz.dll is missing from your computer".
It turns out the reason is that he had my application installed in a path that contains a semicolon (which is supposed to be a valid character in ntfs file names)
I went on to try with a couple of other applications I have installed on my System and some (audacity, git, python, vlc) exhibit the same behaviour (append semicolon to folder name -> dlls can't be loaded) but most don't.
So now I'm wondering: Is this an error on my part? If so: what am I doing wrong? What would I have to do for the dll to be discovered even if its in a path with a semicolon?

Qt 5.3.1: macdeployqt tries to include everything on my hard drive; how to fix?

I'm running Qt 5.3.1 on Mac OS X 10.8 and 10.9 I'm trying to use the macdeployqt tool to bundle libraries and plugins with my executable, but it's apparently trying to include everything on my hard drive.
I invoke it with:
/Applications/Qt/5.3.1/5.3/clang_64/bin/macdeployqt /Users/adamwilt/Desktop/temp/DesktopPixie.app -verbose=2
-qmldir=/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/DesktopPixie
and get lots of normal, expected log messages like:
Log: copy: "/Applications/Qt/5.3.1/5.3/clang_64/qml/QtQuick/Controls/Styles/Base/images" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/QtQuick/Controls/Styles/Base/images"
...and all runs fine until I start getting messages like:
Log: copy: "" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums"
ERROR: file copy failed from "/do-gst"
ERROR: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/do-gst"
ERROR: file copy failed from "/rescuepro.properties"
ERROR: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/rescuepro.properties"
ERROR: file copy failed from "/rescuepro34act.lic"
and then the fun begins:
Log: copy: "/Applications" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications"
Log: copied: "/Applications/License.rtf"
Log: to "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications/License.rtf"
Log: copy: "/Applications/0xED-1.0.7.app" "/Users/adamwilt/Desktop/temp/DesktopPixie.app/Contents/Resources/qml/MessageBoxUI/Enums/Applications/0xED-1.0.7.app"
It appears it's trying to copy everything (that is, "") into the app, but I ^C out of it while I still have disk space left!
It didn't do this at first; then it did so for a week; then it stopped; now it's back. This is a distributed development project; I'm doing the QML stuff and folks elsewhere are doing the C++. It's possible the other folks are changing a configuration somewhere that's causing this to occur, but I'm the only one doing Mac deployments, so I'm the only one who sees this.
Is there a config file of some sort for macdeployqt where this might be getting triggered? Or is it more likely a problem related to the C++ object MessageBoxUI, which defines several Q_ENUMs (apparently correctly, as it compiles without warnings or errors, and appears to run properly), since that's the target directory when it starts going mad?
Sussed it (well enough that I can go on):
The Qt app I'm trying to deploy lives in ~/Desktop/temp. If I set my current directory to ~/Desktop or ~/Desktop/temp before I run macdeployqt, it runs as expected.
If I run it from from my home directory ~, or ~/Documents, macdeployqt tries to pull in everything it finds in /Applications, /opt, and/or other directories unassociated with the app.
Setting cwd to most other paths, including ~/Downloads, /Applications, subdirectories of ~/Documents, etc. also seems to work; it's only running macdeployqt from ~ and ~/Documents that causes the problem.
No proper explanation as to why this is happening, but just a warning in case someone else sees this sort of weird behavior: try changing to the apps's location before running macdeployqt.

Resources