Can we create standalone exe files from sikuli? - sikuli

Sikuli involves both Java and Python.
You can find Sikuli here: http://www.sikuli.org/
Question:
Can we create an exe file from sikuli?
Having a folder that includes screen captured pieces, along with the exe file is not a problem.
Even a simple double click program on something on screen would do as a sample program and sikuli doesn't support actual code standalone, it creates files of course (including one in python)
My worktime has ended so I will be afk, so give me some time till I will reach home to reply on any questions that might arise.

You can create an executable using either, Java or Python. In case of Java, you can create an executable jar and in case of Python you can use py2exe utility.

Related

generating synthesis scripts in Vivado

I have successfully used the Vivado GUI to synthesize a design and program an FPGA. I have located the .bit stream so I don't have to go through the GUI again if I want to program the FPGA again with the same design.
There is a .tcl file as well, but it is the Report generation script generated by Vivado. What I'm looking for is the .tcl synthesis script. Where will I find it, or do I have to do something else to generate this synthesis script?
I assume you are asking about the script to regenerate the bitstream.
It should be inside
project/project_name.srcs/sources_1/bd/block_design_name/hw_handoff/block_design_name_bd.tcl
This is assuming you are using a project-based flow. There is also a non-project based flow.
More information:
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_1/ug892-vivado-design-flows-overview.pdf

adding files to all platforms of a cocos2d-x project

This is a very basic question, but I have not been able to find the answer anywhere.
I just got Cocos 2Dx 3.3, made a new project and built the HelloWorld scene that was generated.
It generated projects for all platforms, but I am currently compiling and running the Mac project using XCode.
I can easily add new files using XCode, but of course it only adds it to my XCode Project. I would have expected a way to automatically modify all projects at once to add files or change compiler settings. I saw that there is a CMake file, probably used for command line compilation, but I cannot find a way to use that to regenerate the projects for all platforms.
Is it possible to automatically add a file to all platforms? Maybe it is possible to modify the template directory os Cocos and use the cocos new command line to recreate the project from scratch?
Or is it better to do all that manually?
Such an automation would imply parsing of a project file, finding list of relevant files and then changing all the dozen of project files. Which is hell of the work.
Even if it was implemented, how would this implementation decide which project file is a main one? (to get filelist from) And if your projects all have different lists of files? This would need merging etc. etc.
For now cocos new only copies files from one place to another. Frankly, Cocos2d-x have much more serious problems to solve, so I don't think this feature will ever be implemented.
However, you could customize project files/folders to your needs to make process of adding files more or less convenient and sometimes even automatic. Here are some clues:
It is easy to change Android and Linux Makefiles so they will pick up all the source files from a specified folder. Just use wildcards. Resource files are picked up by default.
For Visual Studio solutions (Win32, Win8, WinPhone) you could enable "Show all files" to see all files that either added or not. Unfortunately you can only see files down in the folder tree relative to project folder. To see Classes folder, make a symlink (link /j) of a Classes folder near .vcxproj file. You'd better don't copy/move project folder after it. And don't forget to add this linked folder to ignore list of your versioning system, or you will end up with duplicated files. Resource files are picked up by default for Windows projects.
I am not aware of any solution for XCode project, so you basically stuck with manual source file addition. Which is most annoying among all platforms. However it can pick up resource folders with all files.
Anyway, I would be glad if someone would proof me wrong and would write some kind of script to solve this problem (and also to change project name, company id, automatic versioning, etc.). I believe it could be done more or less reliably with, let's say Python and some regex magic. At least until project file formats will change.

cocs2dx faild to generate binary- blackberry Momentics ide

I am having source code which is having classes and resources folder. I tried to create one blackberry project and import those files inside same project. I have linked cocos2dx with proper steps. What I am not clear with is how you will run a source code which has only classes and resources in blackberry momwntics IDE. If anyone has any kind of idea or hint or clue or direction then please respond. Thanks ...
I also faced the same issues when trying to get cocos2d-x for blackberry running in the Momentics IDE. The code sample provided is not very well organised and clearly does not follow the file hierarchy or structure of conventional Momentics IDE bb10 projects. I personally find this to be quite confusing - especially to programmers with little experience programming in C++, linkers etc.
That being said, I there are a series of steps you can follow to get cocos2d-x for blackberry running .
Download the Cocos2d-x project from http://www.cocos2d-x.org/ . This folder contains the cocos2d main libraries , sample code, and platform specific libraries for different platforms (web, desktop, iphone, android, blackberry).
The next task is to import the cocos2d libraries required for blackberry
development into the Momentics IDE and successfully build the first project.
A quick search of the Cocos2dx source directory reveals a list of proj.blackberry files which indicate blackberry related projects that could be imported. I found that importing the following proj.blackberry files into my workspace were sufficient to help me build the sample project included .
/cocos2d-x-2.1.4/cocos2dx/blackberry/proj.blackberry
/cocos2d-x-2.1.4/CocosDenshion/blackberry/proj.blackberry
/cocos2d-x-2.1.4/extensions/blackberry/proj.blackberry
Note that the main reasons for importing the projects above it to make them
available as referenced projects to your libraries. This pretty much should
handle errors of missing files or paths etc.
/cocos2d-x-2.1.4/template/blackberry/proj.blackberry
(This is the sample project which we will run and compile – BBTemplateProject)
To import each of the above
File > Import > Existing Project into Workspace > Cocos2dx source directory above
At this point you should have the BBTemplateProject imported. Now try to build it..
I have written a more detailed post about this here
http://www.denvycom.com/blog/setting-up-cocos2d-for-blackberry-10-development/ . This post also includes a quick fix to handle a decode.h error you might encounter while trying to build your project.
P.S >
I found that the bar-descriptor.xml file lets the compiler know where the relevant included files/classes reside (including the strange Resources folder) . This is why the unconventional heirachy structure works. There are still a few issues Im having working with cocos2d-x for blackberry (such as getting the QtSql libraries integrated and working in a cocs2d-x for Blackberry project) and I'll post solutions as soon as I find any.

How to generate SWF from FLA using command line on Ubuntu Server?

I have a situation where I need to generate SWF from the FLA that user uploads on to the server. We use python and bash scripts, and work on Ubuntu Server 10.04 (64bit), any help on how to generate the SWF would be a great help.
Thanks.
Flash needs Flash IDE for compilation.
You probably can compile code using flex AS3 compiler on linux, but if there are graphical elements in Flash, you cannot compile them.
However, we had a similar situation, which we fixed by installing Flash in a MAC OS X Snow Leopard(10.6) and then wrote some php, some shell script, some applescript and made a command line compilation mechanism for AS3.
Mac OS X is a unix based os, so the command line is similar to any other unix. it comes with built in php, so you don't have to install anything.
Basically using script we dynamically generate something called .jsfl file. the jsfl contains the details of the .fla that needs to be compiled. these jsfl files can be executed by Flash IDE. so we invoke the flash IDE and pass on the generated .jsfl file. (http://gskinner.com/blog/archives/2004/08/jsfl_fla_batch.html)
This gskinner process works in windows also, but using mac we can make it command line. so that users can just ssh to the mac and execute the command to build the file.
FLA file format has changed significantly in the latest version of Flash. New FLAs are archives containing source files and assets, so you might be able to write a script unpacking a FLA and assembling an SWF from it. Prior versions of FLA contained proprietary format, not documented and there were no tools to process it in an automatic fashion, not on Linux for certain.
Depending on ActionScript version and your requirement to resource handling (by resources I mean images, fonts, sound tracks, videos etc) there are several options available:
Flex SDK, the material found in the blog post #ntidote refers to is somewhat dated, but it's OK / should work. You would need to consult MXMLC usage documentation to find out all available options (and some new required ones, not covered in the blog post). This is what you can do, if your goal is to compile AS3. This does not include video transcoding and you might find it challenging to embed vector graphics. MXMLC is, however, capable of compiling a large subset of SVG. It can also compile FXG - a new interchange graphic format that can describe vector shapes and text.
ActionScript 2 can also be compiled, but Flex doesn't offer a compiler for that. There is a very good, in fact a much better than the one written by Adobe, compiler for AS2: http://tech.motion-twin.com/mtasc.html .
There are other tools that are capable of generating SWFs - all depends on what exactly you need to do. Here's a good collection of different utilities: http://www.swftools.org/
Haxe is a whole other programming language that can compile to SWF. It also has its own linkers and ways of managing resources. http://haxe.org/
There is this project, which allows you to compile complex vector graphics and even animations from XML descriptions: http://code.google.com/p/hxswfml/

Using stl in an Android adb shell native program

I'm trying to port a C++ utility program that I want to be run from the Android ADB shell.
For that, I'm using the Android NDK's make-standalone-toolchain.sh script, and compiling my program with it.
Unfortunately, when I try to run it, I get this error:
reloc_library[1315]: 16304 cannot locate '_ZNKSs5c_strEv'...
CANNOT LINK EXECUTABLE
After some research, I saw that this means that the c_str function doesn't exist in libstdc++.so in the NDK. I also couldn't find the symbol in stlport.so either, and actually only found it in the ./sources/cxx-stl/gnu-libstdc++/libs/ version of the C++ libraries. These libraries are not included in the standalone toolchain I made, and I also couldn't find them on the device (the device is running Honeycomb).
The text in the NDK clearly states that there's support for the entire STL when I use stlport. Is this something that is only true in Ice Cream Sandwich? The libstlport.so or in libsupc++.so on the device and in the NDK didn't have any signature like the one that wasn't found.
So my question has two parts:
Is there something I'm missing in the build process/Android setup? Can I set up things differently so that the program will compile without needing the gnu-libstc++, or at least fail with a compilation/link error instead of failing to load on the device?
If linking with gnu-libstc++ is the only way, how can I do that? I think I can manage statically link to it but I'd rather not.
How can I add the gnu-libstdc++ version to my
If someone else is looking for a solution, I ended up adding a dependency using the -l switch on libgnustl_shared.so. You can find it inside the NDK at
sources/cxx-stl/gnu-libstdc++/libs/&ltarchitecture&gt/
I then pushed this .so together with the program to the device, and made a script that adds the current directory to LD_LIBRARY_PATH. It seems similar to what the NDK does when you use the make scripts to create a program that depends on gnustl.