OpenLaszlo Desktop Applications
Techniques to run OpenLaszlo applications on the desktop
- Antun Karlovac - blog post on writing an OpenLaszlo AIR application
you will need zinc 3.0 download demo from their website
make a swf movie with flash ide (i used version 8) in the first frame of the movie place the action : import mdm.*;
i made the movie 5 frames long
in frame 5 i load the swf i m gonna compile with laszlo with : loadMovie("app.lzx.lzr=swf8.swf",4) stop();
publish the flash movie.
here comes the code for the lzx file you have to name your lzx file app.lzx
<handler name="onclick"> var uebergabe = "das klappt super"; var currentPath = mdm.FileSystem.getCurrentDir(); Debug.write("path"+currentPath); var weg = currentPath + "sparkassenprogramm_daten.txt"; mdm.FileSystem.saveFile(weg, uebergabe);
compile your openlaszlo file
put the file app.lzx.lzr=swf8.swf and the swf file you generated with the flash ide in the same directory on your hard drive.
fire up zinc select the swf file your generated with flash built the application
press the button in the folder where you put the swf files the app has generated a new text file.
i tested this on lazlo 4.0.12 i m on a mac 10.5.1
i hope i ve presented everything correctly.
OpenLaszlo MS Windows Apps With FREE p2gChinchilla™ Server
p2gChinchilla™ by veteran programmer Volker "Bill" Schuelbe is a tiny (3.5 MB) HTTP server for the Microsoft Windows OS. It requires no installation and does not mess with the Windows registry or other system settings (unless you want it to). p2gChinchilla™ hosts an ActiveX Internet Explorer in a customizable window under the server's control, or it can be synchronized to start a HTA application (or the default web browser) together with the server. In combination with OL apps (any runtime) this little server can quite convincingly "fake" a "real" looking Windows application.
From a user perspective, he or she starts a "real" executable, which opens an appropriately titled window. The server binary (and all shortcuts to it) can have your application icon, and the binary can be named anything you like. By utilizing a small (but extensible) built-in OpenLaszlo AJAX library, you can make p2gChinchilla™ open Windows common dialogs and message boxes. The p2gChinchilla™ Perl 5.10 interpreter affords you to create CGI scripts that make your OL application as powerful as any "real" Windows program.
The small "OpenLaszlo Stand-Alone App Tutorial" on the p2gChinchilla™ web page demonstrates the technique. With an existing OL app, p2gChinchilla™ can be configured in minutes - learning curve negligible.