I have read tons of articles and stackoverflow questions but I seem not get it to work.
I want to distribute some product information for a customer which will be send out on a CD or USB stick. Back in the days I did it with Flash. Because flash could compile into a EXE called Flash projector and could run my Flash content without installation.
Now I want to give HTML5 a spin. And I need a way to pack everything on a CD an make it run everywhere without installation.
I heard something that I could compile chromium and embed it in a c++ application. (http://code.google.com/p/chromiumembedded/)
I could use QT with QtWebkit. (http://developer.qt.nokia.com/doc/qt-4.8/qtwebkit.html)
I could compile Webkit and embed it in a c++ application... (http://www.webkit.org/)
The examples are to big and I do not have any C++ skills =(
Then there are projects like mozilla chromeless (http://mozillalabs.com/chromeless) (and berkelium (https://github.com/sirikata/berkelium)
With chromeless my JQuery Javascript did not work and Berkelium... I did not get to compile...
I have no budget for http://www.appcelerator.com/ or other paid/commercial options... (also Flash/Air and Silverlight are not an option). Because Content should also be deployed on the web server without the use of plugins ...
I do not need any access to the OS. What I want have my Jquery/Backbone app which consumes JSON files to run in a desktop client without installation.
So no browser adressbar just pickup the index.html and everything else is handled by the app...
Something like Fullscreen and Close would be nice...
Unfortunately I cannot rely on the installed browser of the "customers OS" because the target group is to large and I expect alot of old browsers.
Can anyone give me instruction how to compile "easily" an app which makes my web app stuff running on the desktop from CD without security warnings, etc?
Or are there any pre-compiled packeges that I could use?
Node-webkit combines the Chromium (Chrome) browser with Node.js. As I understand it, you don't need the extra APIs, but you don't need to use them, simply creating a really short json file and zipping up your project is enough, and you can even combine everything into a single executable. The project provides binaries, so no compiling needed.
https://github.com/rogerwang/node-webkit
I also tried Awesomium(it's c++ and 40mb+) PyWebKit(did work but my svg mousemove-listeners didn't) therefore ended up using cefpython and pyinstaller.
Here's what I just did to get a "one-click-windows-web-app-executable".exe.
downloaded cefpython , it comes with a compiled dll with chromium inside (20mb)
run "python cefsimple.py" to see if it's working (it should)
now download pyinstaller
unpack if to some folder
copy all the files of cefpython to you newly created pyinstaller-folder
copy from pyinstaller/utils MakeSpec.py and Build.py one folder down
run "MakeSpec.py cefsimple.py" to create a cefsimple.spec file for the built
If you try to run "Build.py cefsimple.spec" if will copy the files to a folder called dist
if you run the exe it won't work, because some dlls and an icon are missing
lets add the dlls by changing the spec-file (I put it later in the text)
is you build it again, it will copy the icon and everything else to the folder so that the exe will run (you'll see cefsimple.html in a real embedded chromium frame)
now you can play around either with the embedding or the pyhton-code to fix your http-links and you'll get a fine "one-click-windows-web-app-executable" :-) (see --onefile option in pyinstaller docs)
cefsimple.spec:
# -*- mode: python -*-
a = Analysis(['cefsimple.py'],
pathex=['c:\\pyinstaller-2.0'],
hiddenimports=[],
hookspath=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.binaries,
[('icudt.dll', 'icudt.dll', 'BINARY')],
[('avcodec-54.dll', 'avcodec-54.dll', 'BINARY')],
[('libEGL.dll', 'libEGL.dll', 'BINARY')],
[('avformat-54.dll', 'avformat-54.dll', 'BINARY')],
[('avutil-51.dll', 'avutil-51.dll', 'BINARY')],
[('d3dcompiler_43.dll', 'd3dcompiler_43.dll', 'BINARY')],
[('d3dx9_43.dll', 'd3dx9_43.dll', 'BINARY')],
[('libGLESv2.dll', 'libGLESv2.dll', 'BINARY')],
[('locales\\en-US.pak', 'locales\\en-US.pak', 'DATA')],
[('icon.ico', 'icon.ico', 'BINARY')],
a.zipfiles,
a.datas,
name=os.path.join('dist', 'cefsimple.exe'),
debug=False,
strip=None,
upx=True,
console=False, icon='icon.ico' )
app = BUNDLE(exe,
name=os.path.join('dist', 'cefsimple.exe.app'))
If it should run on any windows 2000+, no python, no system libraries, no additional dlls nor icons needed.
If you build it on Windows7 64 bit, it won't work on 32 bit systems
If you build it on WindowsXP 32bit it works everywhere. Even in Wine. But somehow I couldn't get the icon out of the exe for the titlebar. had to load it from external(code in cefwindow.py).
Ask me for details while it's still fresh!
EDIT:
to activate local json requests:
# BrowserSettings, see: http://code.google.com/p/cefpython/wiki/BrowserSettings
browserSettings = dict()
browserSettings["universal_access_from_file_urls_allowed"] = True
browserSettings["file_access_from_file_urls_allowed"] = True
For a good overview, check out this review article by Clint Berry. He covers TideSDK, AppJS, Node-webkit, Sencha Desktop and Brackets Shell, and lists pros and cons of each solution.
EDIT: After having read the review, I chose Node-webkit for my own project, and it works great! It does not require you to build the app according to any specific paradigm. I just took my standard AngularJS web app as it was, added the required manifest file, and built it for Windows and OSX.
as somebody mentioned in comments, you can use xulrunner
according to this: https://developer.mozilla.org/en/Getting_started_with_XULRunner
you just download xulrunner, unzip it in a folder,configure it and make it start in autorun.inf or something like that. no compilation needed (i presume you need to present it on windows, but other platforms should not be a problem as well).
i made an application for HTML5 games developers , if you want to run your html5 games or apps on windows like native applications, no need for hosting or manually running a local server in order to access html5 features.
WinApps Jx Builder is an application that allow you to pack your HTML5, java script ,CSS into one Executable application for windows that run Native-Like on Windows OS.
From now on you will run HTML5 websites,applications,games on your Desktope with only double click, and WinApps JX will take care of the rest.
But you Need To install Google chrome frame on your machine :
google chrome frame
- WinApps Jx -
You can embed browser control in your C (WinAPI) program using IWebBrowser2.
http://github.com/dns/WinAPI-Embed-Browser/releases
I've created a project on github to make several html app pack into single EXE file.
To access html files from EXE/DLL resource use: res://programname.exe/test.html as path.
You also can hide the window border & just showing the content of your HTML app, or even running on fullscreen. This is very useful if you want to make interactive CD.
Related
Is it possible to have a Python application with a GUI (such as TkInter or WxPython) with :
a Chrome browser as a widget using the main part of the GUI, displaying a certain .html page
be able to save files locally thanks to Javascript that is run in the embedded Chrome (that is normally impossible with any browser for security reasons)
If it's not possible in Python, I'm open to use another language (C++, etc.).
You mention that you're open to trying platforms other than Python. Have you seen Electron? It's a framework and runtime for building desktop applications in JavaScript with full access to the file system made by GitHub. It's based on Chromium, the same open source project that Chrome is based on.
http://electron.atom.io
http://electron.atom.io/docs/api/file-object/
Yes, it should be doable. In current versions of wxPython there is the wx.html2 module, which provides classes for embedding a fully featured browser in a wx window. It's not Chrome itself, but probably close enough. See https://wxpython.org/Phoenix/docs/html/wx.html2.WebView.html
For your task you can probably have the javascript trigger an action which is caught by event handlers in the application GUI code, which will then save the files or do whatever you need.
I wrote a program that plays a song using sonic pi. I have to transcribe the code to a web language (javascript). Since I'm new at javascript I thought it would be ideal to use QUORUM (http://quorumlanguage.com/) to transcribe it since there is easy access to MIDI libraries, etc. (that I absolutely need). I have a mac and tried to use netbeans, etc (all processes suggested on the quorum site) but they are not working. So, I figured I should be able to use the Quorum plugin that I downloaded on another IDE (a cloud IDE would probably be better). I keep failing and I honestly don't know really know what I'm doing. I'd prefer not to pay for an IDE. I tried orion's cloud ide "che" but it won't let me download the plugin via the internet or give me an option for uploading or running a native file.
Basically, I would like to find someway I can use quorum on my Mac.
Please help.
Doing all this for my graduate degree.
Thanks.
Em.
In order to use The Quorum Programming language, it MUST be in the Netbeans IDE. No exceptions.
The process of installing the plugin for Quorum Language Support is as follows:
MAKE SURE YOU HAVE THE LATEST VERSION OF THE JAVA DEVELOPMENT KIT!!! - This is VERY important as Quorum 3.0 uses the Latest Version of Java and Quorum compiles to Java Byte Code.
You MUST Have Netbeans 8.0 or greater (at most Netbeans 8.0.2). - This is also very important as Quorum 3.0 takes advantage of features in Netbeans 8.
Go to the plugins page. This can be done by clicking on "Tools" in the Menu Bar and then going to "Plugins"
Go to the Settings Tab and hit the button that says "Add"
In the Name Field, Type "Quorum"
In the URL Field, Type the following: http://quorumlanguage.com/updates/quorum/updates.xml
Now under "Available Plugins", Check the Box for Quorum
Click the Install Button
Restart Netbeans.
Now, upon completed load of the Netbeans IDE, The Quorum Module should ask you if you would like dictation of everything you do. If you do not want this, tell it that you do not. If you do, then go for it.
When you go to Create a new Project in Netbeans, you should see an option for Quorum. If you do see this,then you have successfully installed the Quorum Plugin to Netbeans.
I've been writing a full game engine on top of LibGDX for sometime now and had written almost every single game object in Javascript (I created a composite based game object system). For the JS interpretation, I used the Rhino engine which on my ubuntu system, works phenomenally well, however when I tried to run it on Android, I was not able to get it to compile at all and from what I HAD read, it's because Google didn't use a standard Java implementation that supported Rhino, but now I'm seeing the support with the SL4A project, however I was looking for a simple Rhino jar file that was compatible with Android but after looking through the downloads, all I found were APK files that did not appear to have the library and from what I have read, the APK is suppose to be a template project, but how can I use it with my existing code without a jar package? Maybe I'm totally missing the point?
It seems SL4A Rhino repository has all the necessary add-ons (among them rhino1_7R2-dex.jar) to get Rhino running on Android.
I'm looking for a flash script/library to capture video and audio from a webcam and then somehow get a saved flv to my encoding server. I'm not looking for something that will host the videos for me. I just need something simple to capture and then upload. I really want this to be open source and free.
I've done a fair amount of searching and it seems that most of what i can find is either a full blown service with hosting, or the red 5 suite. I've been trying for a day to get something going on with Red5, but honestly I haven't done any flash or java development in over 6 years and this seems way too complicated when all i really want is a flash object i can stick on a webpage.
I've search google and github and am really surprised by the lack of simple options. Am I missing something obvious? Thanks.
I ended up going with Red 5 server and red5recorder. It was tricky to get everything working properly, but here's an overview of what I did:
Check out red5 version 0.9.1 (I couldn't get the latest version working with red5recorder). ant prepare; ant clean dist.
Download the latest source for red5recorder.
Install Eclipse Ganymede Sr2 (3.4.2) Enterprise Edition (the latest version that works with both the red5 plugin and the flash builder plugin).
Install the red5 plugin according to http://wiki.red5.org/wiki/Red5Plugin
Install the Adobe Flash Builder 4 plugin into eclipse-install-dir/flash-builder and built it against the eclipse in eclipse-install-dir
Create a New Dynamic Web Project. I named it Red5Server. Select a New Target Runtime -> Infared | Red5 Server. Target the dist directory in the red5 checkout. so for me:
auto deploy dir: /Users/julia/code/red5-0.9.1.svn/dist/webapps/
start script: /Users/julia/code/red5-0.9.1.svn/dist/red5-debug.sh
stop script: /Users/julia/code/red5-0.9.1.svn/dist/red5-shutdown.sh
Import Flash Builder Project - red5recorder
Right click Red5Server | Run as.. | Run on Server. It should start up the server and show Directory listing for localhost:5080/Red5Server
In red5recorder's Recorder class, change server to be rtmp://127.0.0.1/Red5Server/
Right click on red5recorder.mxml and run it as an application. It should pop up a browser and the recorder should successfully connect to your webcam.
Now, red5recorder is really broken out of the box. It required quite a bit of tweaking to get it to do what it says it will, and once I was more comfortable, I ended up refactoring it altogether to do what I wanted.
There are "simple" demo publish and playback examples for Flash in our source tree. When I say simple I mean dead-simple, have you looked into these?
Broadcast / publish - http://red5.googlecode.com/svn/flash/trunk/simpleBroadcaster.fla
Playback - http://red5.googlecode.com/svn/flash/trunk/simpleSubscriber.fla
Flash examples: http://red5.googlecode.com/svn/flash/trunk/
I'm currently evaluating and reading the rtmp-nginx-module. It looks more stable and very well documented than the other peers I've tried:
RTMPLite: Works well with VideoIO.swf however it's not easily extensible.
Red5: Good luck getting it working correctly!
I am not sure if there's a way to load an IIS website into Eclipse. Similar to the way we can load in Visual Studio through File > Open Website
Thanks
Short answer: no.
Slightly longer answer: with an open source web application server such as Tomcat you can run it inside Eclipse. You can set breakpoints, check variable values at runtime, etc. However, Microsoft is about as far from open source as you can get; if you want to run IIS through a debugger, you're going to have to use Visual Studio or some similar MS-only tool, because that's how MS designs things.
Of course, as Kekoa pointed out, you can always load the individual files in Eclipse, but then you're just using it as a glorified text editor; to get the full power of all of it's "IDE" capabilities, you really need to use a non-MS (and non-proprietary in general) stack.