Is there a way to dump the adt compile command line from Flash Builder 4.7 - air

Flash Builder 4.7 has very nice setting dialogues for AIR compilation.
Is there a way to dump/display the full command line Flash Builder using when it compiling ipa file?
The reason why I’m asking for this, is because, it is very frustrating when hand code adt compilation command line for a project with a good number of assets, as well as a couple of ANEs.
Thanks,

Flash Builder uses Java to trigger the adt.jar file to compile a project. You have to get the parameters of the Java executable process in order to find the command being executed.
You can do this on Windows through the ProcessExplorer tool. Just select the java.exe process and inspect its properties. There's a command-line text field in one of the properties tab.
It's a little more complicated on OS X. First, use the Activity Monitor to get the process ID of the java executable. Launch a new terminal window and type the following statement
ps -p PROCESS_ID | open -tf
Replace PROCESS_ID with the actual number from Activity Monitor. The result will be displayed in a new TextEdit window.
Note that there may be multiple instances of the Java executable. Just select the first one launched, i.e. the one with the lowest process ID among all the instances of java.

Related

Is there a way to export the predefined macros from a Keil build configuration?

Context:
I'm trying to automate some of the more mundane tasks in embedded development with Keil. The end result I'm aiming for is that clicking build in a Keil project will run a pre-build step that runs all the code through Uncrustify (a source code beautifier) to ensure it conforms to the company style-guide, and a post-build step which then runs the code through pc-lint (a static code analyser) to highlight any potentially unsafe code that it might find. I've written a PC utility that searches through the .uvproj file for the #define macros, the include paths and the file-paths all of which are needed for both tools and then modifies the pre and post-build user commands to call up my batch files which will manage both steps. The uncrustify part is working fine and the lint part is producing some sensible messages, but the signal-to-noise ratio isn't that great.
My problem:
Lint keeps on producing messages that seem to relate to macros that the Keil compiler is aware of, but that Lint isn't. I'm trying to find a way to plug that gap. I found a table of predefined macros documented on the Keil website, which seems like a good start, but rather than manually copying them into a static .lnt file, I'd like to find a way of grabbing the up-to-date values at the time the project gets built. This way, the "__ARMCC_VERSION" macro, for instance, would be updated whenever the developer updates his/her Keil compiler, rather than being stuck at a point in time whenever I manually copied it.
I'd love it if someone can answer my question directly, but I'd be equally pleased if someone has a viable suggestion for a more straightforward alternative approach I could try instead. Many thanks!
I am assuming you're using the Keil ARM Compiler.
From the Compiler User Guide:
To list macros that are defined on the command line, predefined by the compiler, and found in header and source files, use --list_macros with a non-empty source file.
To list only macros predefined by the compiler and specified on the command line, use --list_macros with an empty source file.
EDIT:
It looks like your SDK also adds a few macros.
From the µVision User's Guide:
The following control strings are added, depending on the use of MDK:
__UVISION_VERSION:
Major and minor version of µVision. For example: -D__UVISION_VERSION="520".
RTE:
Set when RTE is in use. For example: -D_RTE_.
__RTX:
Set when RTX Kernel has been selected in Options for Target - Target - Operation System. Not set when using RTE. For example: -D__RTX.
__MICORLIB:
Set when Use MicroLIB has been enabled in Options for Target - Target. For example: -D__MICROLIB.
__EVAL:
µVision runs in evaluation mode. License MDK-Lite. For example: -D__EVAL.
device header name:
Device header name.

How to embed jEdit in a JTabbedPane (or JInternalFrame)

jEdit is great, and I would like to include it in JTabbedPane.
From the API it seems to be possible but I have been unable to achieve this.
By any chance do you have a simple example that works ?
Do you mean just the text area?
Well, you can build the text area as library JAR for you to use with the ant target build-textArea.
But be aware that the standalone textarea is also under GPL like whole rest of jEdit, so if you plan to release your work, you have to release it under GPL too. If it is just for your private use, you can use it like you want of course.
The package also has StandaloneTextArea which demonstrate how to use the text area outside jEdit. You can just run the built JAR, it is an executable JAR that runs this example StandaloneTextArea.

VB.Net Autoupdater that overwrites current open program?

I have a program written in VB.Net and i want the program to auto-update. I've tried a few methods but without success. How do i make a second .exe file that will launch with the program itself on start to check if there is a new version and if there is download and overwrite current program, else just load the program as usual?
The .NET framework offers this functionality built-in through the ClickOnce installer. It allows you to update the executable on the server and when the program is next run, it will compare version numbers and download and update the local executable.
You write that you want an additional program that will check whether there is an update available, this will prove to be more difficult to maintain, as you will have to pass the current version number to the updater program to check if it needs to be updated (and what if you need to update the updater program?).

Running arbitrary code at runtime

I know this is an odd question, but I'm wondering if this is possible. Is there any method by which code (which would be typed by a user) could be run during runtime? For example, suppose I would allow the user to type in some Core Graphics drawing code. I would want this code to be run in a drawRect method of my preview pane.
So what I would have to do would be to convert this group of strings into actual runtime code.
Is this even possible, or am I just wasting my time?
I see a few solutions:
Create a language of your own, and parse it in-application
If on mac, you could theoretically, create a function stub from what they enter in, and use GCC shipped with the application to compile the code at runtime into a dylib, and then use dylib functions to run the function you created.
On a Mac, you can have your app send text to the compiler (several come with Xcode), have the code compiled, and run the compiled result as a slave app (controlled via a socket, for instance, and copying the preview pane image pixels back via a pipe). If needed you could convert the source code text using some sort of preprocessor and wrap it in your own run-time shell.
Alternatively you could write or port a C language interpreter (there are several open source interpreters for various subsets of C), and plug Core Graphics library calls into the C interpreter's parser and run-time engine.
I do not know of a full interpreter for Objective C.

Creating File Associations in VB.NET?

How would one go about associating a file type with his application? I know how to read the command line arguments but I am not sure how I can "register" the file extension with Windows. Furthermore, my application is a stand-alone executable, so how would I keep Windows up-to-date on the location of my program?
I did a fair amount of searching and all I could find were old articles that didn't explain everything. How can I create file associations to a stand-alone executable in VB.NET?
Everything is handled by the registry. If you want to make your program self-register it's current location when run see this example.
http://www.codeproject.com/KB/dotnet/System_File_Association.aspx