Is there an Unrar for Adobe AIR? - apache-flex

I'm working on a file system app and I need to be able to expand rar files. Is there a way I can do that?
UPDATE
Should have clarified. My target platform is mobile

You could utilize the NativeProcess class and run the UnRAR command line tool.
If you need a native unrar implementation then it could become it "little bit" more work. But you could try if Alchemy can help you in converting the UnRAR C++ source code into ActionScript.

Related

Play sound file on Qt+Mac

I need to play sounds under Qt with control of volume and panning. QSound doesn't do it, phonon may be too much for only this so I thought I'd try the native api.
eeermm, in Mac I have no idea, is there some simple interface to invoke on c++? (I've seen all this NSSound stuff but I am not familar with Objective C and I am not sure if it's possible to mix code (under QtCreator)) my idea would be to a module with simple native api calls to system features not found on Qt.
Thanks!
Qt AudioEngine in Qt5 will do this.
If you're using Qt4, making a single 'Objective-C++' file (extension .mm) which can be called from Qt, but makes NSFoo calls, is easy and works well. The header file should be plain C++, and everything will work together.

Convert Multiple SWF files to Single EXE

Hi I have an application in flash, I build in ActionScript 3.0 Flash IDE, my application loads some external swfs which mentioned via XML file. Its working fine at the moment. But I need to compile all these external SWFs and xml file into single exe file. How can I compile like this. or how can I code like this?
EDIT: 1
from here : http://page-flip.com/products/pdf-publisher/
You can see an example, the application is build in .net and it import pdf and publish it as flash projector or web based(swf). How is it compiling all the external SWF files.
If you have Flash CS4 you can make use of the mxmlc compiler which has some additional tricks up it's sleeve.
Using the embed tag like this will allow you to embed an entire swf "inside" your swf:
[Embed(source = '../assets/items/9.swf')] public static const ITEM_9:Class;
Then, to instantiate it you simply go:
var mySprite:Sprite = new ITEM_9() as Sprite;
Using this and some clever overloading of your current classes for external loading should allow you to get a single swf (xml files can be embedded in a similar fashion).
Then it's just a matter of using the Publish settings to make Flash spit out an .exe
On an unrelated note, please go back and accept some answers to your questions. It's not very nice not to.
You can try mdm Zinc.
Zinc is really powerful. It lets you package your Flash or Flex in different ways, with lots of native platform hooks.
you can build an AIR application. if you don`t want it to be cross platform, you can build an AIR application with a windows native installer.
Flash > File > Project settings > Windows Projector.
For MAC, choose a MAC projector.
If you are burning to a disc and you need both platforms to work...a good option is to use Toast (if you are on a MAC)...it will hide the files you don't need the user to see, and also hide windows files from MACs and vice versa.
There is an application for Windows called SWFKit, which allows you to package your SWF and external files into one exe file. I had the same problem as you, and this worked a treat for me. Unfortunately you do need to pay for it :( http://www.swfkit.com
Hope this helps,
Will
I would go about it with these steps
create a flex application
embed all of the SWF's and the XML into that application
create a release of the application you just created
open the SWF application with the stand-alone flash player and not with the browser
from the file menu select the option create projector
All of this will result a single EXE file that contains all of the SWF's and the XML file.
You can use a projector or make an windows only AIR project.
Use flajector and forget about your problems

Documentation of Qt in CHM format

Is it possible to find some information about Qt? I need chm file with all documentation of all classes (https://doc.qt.io/qt-5/classes.html). Does somebody knows where can I find it?
If you have installed Qt in your machine, use Qt Assistant. The help available are pretty much the same as that in the online.
Qt Assistant is just an application which requires no internet connection and useful for offline help..
You can use the script from this site: http://www.interclasse.com/scripts/chm.php in order to generate chm file from an online tutorial you find anywhere in the web. Like this one: http://doc.qt.nokia.com/nokia-qtsdk-1.0/index.html
I haven't tried it myself, but seems rather promising.
Good luck!
I've made a little script that will automatically build a CHM file out of the latest available documentation for QT. All credits to char101 for the main script that actually converts HTML docs into the CHM project, my part was only a little automation.
https://github.com/vzhd1701/qt-documentation-chm-autoupdated

How can I convert a JAR file to an EXE file?

I want to created a JAR file and I want to run it on a client machine.So, I have a couple of questions:
How can I convert the JAR file to an EXE file?
How can I encrypt the JAR file's contents? The jar file could be extracted with WinRAR and the classes could be decompiled with any Java decompiler.
How can I create an installer? My clients doesn't have any JVM and I don't want to ship JDK or JRE along, because they have big size.
See this link: Java to Exe. It also explains what valid reasons are to do this, and when you should not.
You can't really encrypt binaries as the machine has to understand them. That said, an optimized executable is very difficult to decompile, while plain class files are ease.
If you have an exe there are installers enough.
JSmooth is a application which will wrap your Jar in an exe
it also allows you to check if the correct version of JRE is available on the system you're deploying to
http://jsmooth.sourceforge.net/
As for 1): I guess you can not. There may be tools out there, but you cannot do that with standard tools shipped with JDK, as it would destroy platform independance. (See other answers providing links to such 3rd party tools)
As for 3): Use InnoSetup to create the installer. Include JRE within setup and let InnoSetup install it on the fly.
You can't prevent decompilation. The best you can do is make it harder or more time-consuming to do so. As an answer to your question though, I believe you can use gcj to compile Java into EXEs.
May be Excelsior JET will satisfy your needs.) IMHO very mature product.
1) I have recently tried the program jarToExe and like it.
Some features are:
free basic version or very cheap ($30) for 'enterprise'
ability to have windows task manager list your app's name instead of the default java.exe
extra obfuscation
runtime check that java is installed
2) You can make it harder to reverse engineer using proguard or other obfuscator
3) nsis is a very powerful, free scripting language to create windows installers. Good documentation on the site wiki and support on stack overflow as well.
Launch4j worked for me while some tools hadn't been working. It also have a good guide here.
Hope this help!
We use a 7zip SFX install launcher. This is an open source simple tool. It will package your jar, a version of jre so it's not mandatory for the installing systems to have jre installed and a self extracting version of 7zip. Here is a tutorial which explains how to bundle and GitHub link
The project is not maintained but works perfectly(tested until Java 1.8)
1) To create the exe, you can use Launch4j
2) As I have seen, you cannot encrypt the jar contents. I'm not sure though.
3) To create the installer you can use the exe you just created and use InnoSetup to create the files. You have to embed the jre inside the installer and also any other libraries and extra files that may need in the runtime. When embedding the jre, the setup gets large and if you want to avoid that, you can ask the clients to install java in the machines. That way, you wont need to ship with the jre.

dos command flex core

can i execute some dos like command from flex just like
attrib c:\a.txt -h.
function available in c exec(), in java Runtime.getRuntime().exec().
but in flex is there any available?
I think the closest you're going to come to achieving this is by using fscommand(), which has quite a few limitations.
Remember that Flex applications run in the Flash player (usually within a browser) and thus don't typically have access to shell commands of the host filesystem.
Two of the most requested features for
Adobe AIR have been the ability to
launch native executables from an AIR
application, and the ability to
integrate native libraries into an AIR
application. Unfortunately, neither
feature will be included in Adobe AIR
1.0.
But there is a workaround. It's a bit complicated, yet elegant, and should solve your problem. It relies on CommandProxy, a kit for proxying calls between applications and the operating system. You will find here a detailed article on how to implement this solution
If you want to run batch files using flex..then do the following
var file:File =new File(path to batch file)
//do not give the .bat extension only file name is reqiured.
file.openWithDefaultApplication();
// the batch file will open and run the dos commands you have written

Resources