I have html5 application built for desktop with Electron. I currently try to integrate Greenworks SDK for Steamworks SDK to support achievements in it.
I tried both electron-rebuild and node-gyp ways to integrate Greenworks resulted in the same error - application crashes on startup with a problem in module resolving - "greenworks-linux32.node cannot be found”.
I tried to download this file separately and put it in greenworks/lib. But the problem persists. I also tried to put whole greenworks folder in the same folder with script that calls Greenworks API.
I use the following build:
Greenworks: [v0.10.0 x64]
Steamworks SDK: [v1.40]
Electron: [v1.6.15]
Folder structure is as follows:
app/
steam_appid.txt
node_modules/
greenworks/
greenworks.js
lib/
greenworks-linux32.node
greenworks-linux64.node
greenworks-osx64.node
greenworks-win32.node
greenworks-win64.node
libsdkencryptedappticket.dylib
libsdkencryptedappticket.so
libsdkencryptedappticket64.so
libsteam_api.dylib
libsteam_api.so
libsteam_api64.so
sdkencryptedappticket.dll
sdkencryptedappticket.lib
sdkencryptedappticket64.dll
sdkencryptedappticket64.lib
steam_api.dll
steam_api.lib
steam_api64.dll
steam_api64.lib
public/
index.html
electron/
Please share any thoughts on what could it be. I have an idea that the problem caused. The problem appears only when I'm calling Greenworks API.
I used this guide to proceed: https://github.com/greenheartgames/greenworks/blob/master/docs/build-instructions-electron.md
Related
So I'm trying to make a working React app into a Twitch Extension (I don't need any twitch integration).
The only thing to make it work with Twitch's iframes is add a tag in the html file
<script src="https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js"></script>
And another call of javascript code on startup that uses stuff from that twitch-ext.min.js file
window.Twitch.ext.onAuthorized(function(auth) {
console.log('The JWT that will be passed to the EBS is', auth.token);
console.log('The channel ID is', auth.channelId);
});
What im currently doing is running npm build then manually editing the generated index.html and main.xxxxx.js to include those lines of code in the optimized minified files. This obviously seems a bit inefficient and I feel like there must be a way to tell node that during build it should include these lines. So is what I'm asking possible?
So I got an answer from someone who knew about Node. What you do is edit the index.html and index.js file that your react app should have.
The npm run build actually uses those 2 files to generate the minified built files so I just added
<script src="https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js"></script>
to index.htmla
and my
window.Twitch.ext.onAuthorized()
call in the index.js file and it all worked.
You can find index.html in the public folder of your react project if you used npx create-react-app. And index.js is in the src folder.
After building a Cordova plugin with plugman, installing it in meteor 2.3.2 and running meteor run android-build, I get the following error from within the plugin:
Unable to resolve some modules:
"cordova/exec" in ~/MeteorApp/MyPlugin/www/MyPlugin.js (web.browser)
The error line is from line 2 in the generate MyPlugin.js
// ~/MeteorApp/MyPlugin/www/MyPlugin.js
// I added this check for cordova myself
if (cordova && cordova.exec ) {
var exec = require('cordova/exec');
exports.coolMethod = function (arg0, success, error) {
exec(success, error, 'MyPlugin', 'coolMethod', [arg0]);
};
}
My meteor structure includes the plugin folder at the route of the app
I installed the package using meteor add cordova:my.plugin.id#file://path/to/plugin/project
Cordova version 10.0.8
I have the following plugin structure:
pluginDir/
src/
android/
MyPlugin.java
www/
MyPlugin.js
package.json
plugin.xml
I have tested the plugin inside a Cordova app and that works just fine.
I bet the issue here is how meteor exposes the internal Cordova object.
Solution
Meteor already wraps the cordova object so really instead of importing cordova/exec in the /www plugin definition I simply had to use cordova.exec('my logic goes here')
The above is scaffolded with plugman and the /www folder and files get generated automatically, as well as the above code.
The code above is valid within Cordova, but this logic fails within Meteor.
Extra comments
Only Android support was required for this plugin and the cordova.exec() logic was moved into a Meteor api method.
Because of this Android-only requirement the /www folder and references was removed.
The /www folder may be reintroduced in the future in order to define a nice fallback for web usage scenarios, but it's unlikely for our internal plugin.
I have installed TinyMCE (TinyMCE Dev Package 5.0.6) in my personal project. Everything is installed and
configured correctly, but there is no File Manager available in this package. To resolve this flaw I have tried to install
ResponsiveFileManager (RFM), but it just doesn't work. There is an error in a console when I click an icon of the RFM:
plugin.js:84 Uncaught TypeError: editor.windowManager.openUrl is not a function
at Object.openmanager [as onAction] (plugin.js:84)
at theme.js:21482
at theme.js:9575
at theme.js:21480
at theme.js:2457
at each (theme.js:267)
at run (theme.js:2456)
at theme.js:2969
at theme.js:56
at theme.js:10825
I guess that RFM is not properly prepared for this version of TinyMCE.
So I want to ask if there are any available file manager plugins for TinyMCE.
I need a file manager which is capable of:
- preview of uploaded photos,
- create new catalogs,
- upload files to server's catalogs (with Drag and Drop functionality as well).
Are you sure you're using 5.0.6? editor.windowManager.openUrl was a new API in that release, so if you're using an earlier version it might cause that exception.
I am attempting to setup a very basic Aurelia project in ASP.Net 5.0 RC1. I am getting the following JavaScript error after doing a basic initial setup. I am using TypeScript.
Unhandled promise rejection Error: XHR error (404 Not Found) loading http://localhost:5392/core-js.js
Error loading http://localhost:5392/core-js.js as "core-js" from http://localhost:5392/jspm_packages/npm/aurelia-loader#1.0.0-beta.1/aurelia-loader.js
at o (http://localhost:5392/jspm_packages/system.js:4:12694)
at XMLHttpRequest.s.onreadystatechange (http://localhost:5392/jspm_packages/system.js:4:13219)
(anonymous function) # es6.promise.js:138
The setup I did is as follows.
Create Empty ASP.Net 5.0 template.
Install Microsoft.AspNet.StaticFiles from nuget and set up app.UseFileServer.
From git bash run jspm init with the following settings.
Package.json file does not exist, create it? [yes]:
Would you like jspm to prefix the jspm package.json properties under jspm? [yes]:
Enter server baseURL (public folder path) [./]:./wwwroot
Enter jspm packages folder [wwwroot\jspm_packages]:
Enter config file path [wwwroot\config.js]:
Configuration file wwwroot\config.js doesn't exist, create it? [yes]:
Enter client baseURL (public folder URL) [/]:
Do you wish to use a transpiler? [yes]:
Which ES6 transpiler would you like to use, Babel, TypeScript or Traceur? [babel]:typescript
From git bash run jspm install aurelia-framework and jspm install aurelia-bootstrapper.
Add the index.html, app.html, and app.ts file from the aurelia docs.
Fire up IIS Express, load page, get error.
Is there a step I am missing in this setup?
It seems like this is a known issue. The fix is somewhat simple. If you add a core-js mapping at the top of the map section in config.js, it fixes it.
For example,
map: {
"core-js": "npm:core-js#1.2.6",
// other mappings
}
I have PhoneGap build app I am trying to build. In my config.xml I have:
<gap:plugin name="cordova-plugin-barcode-scanner2" source="npm" />
I use this for a bar code scanner in my app. When I build it the Android version builds just fine and works. When I build the iPhone version I receive this error:
Error - Plugin error (you probably need to remove plugin files from your app): Fetching plugin "cordova-plugin-barcode-scanner2" via npm Installing "cordova-plugin-barcodescanner" for ios Error during processing of action! Attempting to revert... Failed to install 'cordova-plugin-barcodescanner':Error: Uh oh! "/private/tmp/gimlet/320/1536482/project/cordova/plugins/cordova-plugin-barcodescanner/src/ios/CDVBarcodeScanner.mm" not found! at Object.module.exports.common.copyFile (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/platforms/common.js:38:40) at Object.module.exports.common.copyNewFile (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/platforms/common.js:69:16) at installHelper (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/platforms/ios.js:54:16) at Object.module.exports.source-file.install (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/platforms/ios.js:139:13) at installWrapper (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/platforms/platforms.js:77:32) at Object.ActionStack.process (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/util/action-stack.js:68:25) at handleInstall (/usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/install.js:576:20) at /usr/local/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/install.js:368:24 at _fulfilled (/usr/local/lib/node_modules/pgb-plugman/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/local/lib/node_modules/pgb-plugman/node_modules/q/q.js:816:30) Uh oh! "/private/tmp/gimlet/320/1536482/project/cordova/plugins/cordova-plugin-barcodescanner/src/ios/CDVBarcodeScanner.mm" not found!
On the PhoneGap frequentley asked quuestions page they refer to this error with this solution:
The most likely cause for this error is error is that you have
included plugin javascript files in your app package, such as
barcodescanner.js, GAPlugin.js, cdv-plugin-fb-connect.js, or any other
plugin files such as the childbrowser assets directory.
Previously we used pluginstall to install plugins, which would simply
overwrite files in your app. However we recently migrated to plugman,
which will not overwrite these files and instead fails. So make sure
you remove them!
But I searched my entire project and can not find barcodescanner.js
Any ideas?