I parsed source code of two programs using parser and compare ASTs. now I have original file and a file containing changes between two programs.
What should I do to write patch file without using patch command on UNIX ? what formats should I use to write my patch file? Is there tool that take my files and create patch file?
Thanks for any helps.
Write the output of a diff between your two files to a patch file and you're golden. You'll need patch or a compatible tool to apply it but it is the most common way to create a patch file.
Related
I want to translate a program; but its language files (.qm) are in a .rcc file.
The program is not mine, so I haven't got any .qrc file.
Before asking this question, I have searched this site about this issue; but I don't attain anything.
Is there any way to extract/decompile it?
You can take my tool RccExtended - it based on the official Qt resource compiler with additional function to decompile binary resources.
Usage example:
cd \Path\To\MyQtResources\
rcc --reverse
Decompiler will unpack all .rcc files in the current directory, generate .qrc files and make.bat file to compile resources back to the binary format.
There isn't a supported way to decompile it as far as I'm aware, but it's a binary file format that can be read and handled. There's a nodejs example of how to read the file and extract PNGs on github: https://github.com/gcochard/png-extractor. It may be possible to extend that method out for the .qm files.
However there's other issues with attempting to add more translations to a Qt application without having the code, depending on the language you're attempting to add, how the developer has exposed the other languages etc.
How to format all file in Springs Tools suite? like ctrl+Shift+f, but all files in our project.
Is STS have setting? like before compile, all files will be formatted.
Thanks.
You can select multiple files and execute "format" on them (don't need to open them). In addition to that you can enable the cleanup actions so that every file gets formatted on every save action.
Is it possible to convert a pentaho job to jar file? if it so please tel me how? i tried to convert a job to jar but failed due to the class problems.
In JAR, we aggregate many Java class files. But in PDI Jobs, the files are in XML files. Pentaho uses its DI Engine to read these XML files. Hence we cannot create JAR files out of an XML file.
You can run an ETL job from java code, using kettle's api. You can't convert a job into a jar.
If you launch a job or a transformation in batch mode, you have to use the scripts kitchen or pan (with sh or bat extension dopending on the OS). Actually those scripts run a java program inside, using the parameters that you pass to it. One of the parameters has to be the path of the file .Kjb (extension of a job), which is a regular xml file. So the xml files are necessary, but you can launch directly the java command (the one inside of the sh/bat script) passing the required paramenters to it. To see which parameters it needs you will have to do a reverse engineering work on the kitchen/pan script, which are really simple and short inside.
I have some files whose extension is qzip, for example a.qzip.
It seems that those files are compressed with a library of qt.
Could anyone tell me what it is?
Thankyou very much.
According to this FAQ page:
Qt uses the zlib library to provide compression. This means that you can compress and decompress your bytearrays of data using Qt. [...]
Note that this does not produce file archives that can be opened by other applications, to do that you will need to write it yourself using Qt’s custom file handling system or use a 3rd party library.
Which if someone (lazily) created a file using qCompress() you would need to write your own code to read the file as a QByteArray then use the corresponding qUncompress() method to read it. There is no official qzip format related to Qt that I know, so you should probably go and slap the developer who made these files if it works out!
In general, if you want to compress data that will be reusable, use a common file format.
This was the only reference I have found on the entire www over qzip.
quicklz
How would I go about having a CMake buildsystem, which scans for source files now using AUX_SOURCE_DIRECTORY, scan for header files too in the same directory, preferably using a similar command?
I didn't find an easy way to do this in the documentation yet, so I now have a crappy bash script to post-process my (CodeBlocks) project file...
You can use the file(GLOB ... ) command. For example:
set(dir my_search_dir)
file (GLOB headers "${dir}/*.h")
message("My headers: " ${headers})
This command can also recurse, and list your files relative to a given path. See the "file" command entry in the cmake doc.
The documentation to AUX_SOURCE_DIRECTORY suggests that it was not intended to be used that way, so I'd rather doubt that what you're asking is possible. If you want an authoritative answer, you can reach the CMake developers at cmake#cmake.org (they're actually very nice to deal with).
I'd recommend strongly against using wildcards to specify what is included in the build. The build files should specify the exact contents of the libraries, and not depend on what happens to exist in the directory. It may be cumbersome at first (if you're used to wildcards, or IDE's which works the same way), but when you get used to it, you don't want to have it any other way.