I'm not referring to CVS or SVN! The thing I would like to do is:
I want to have a version number of the application ex. 0.0.120
I want to see this version number only in the About box or similar
This version number should change everityme I hit debug or release. ex. my version was 0.0.120, after I hit debug in the FlexBuilder, the versionNumber should change to 0.0.121, but If I press Release Build, then the version should change to 0.1.0
The first number changes only when I manually change it
Don't know how is this possible but if you have a tip, let me know. Thanks!
Have a look at this article http://www.igorcosta.org/?p=220. I use this method to keep tract of compilation date of my swfs.
Credits goes to Paul Sivtsov.
I think Flex Builder doesn't have this out of the box, but you can build ant script for that and build your application with it:
http://blog.nirav.name/2008/02/how-to-auto-increament-version-build-id.html
This is typically something you support with frameworks such as maven.
There is actually a maven plugin for flex here
mico's trick is nice though
Related
I'm using a plugin (sbt-scapegoat) which only works for Scala 2.11.
Can I have a conditional addSbtPlugin based on scalaVersion? Like:
if (scalaVersion.value.startsWith("2.11")) addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "0.94.6")
How can I do this in SBT?
Jianshi
tl;dr It's not possible given the description of the problem.
There are at least two build configurations involved in a sbt project - the real project (you want to bet your money on) and the meta build for the build of your project. Yes, I know it sounds a little weird, but it's a very powerful concept IMHO.
See sbt is recursive:
The project directory is another build inside your build, which knows how to build your build. To distinguish the builds, we sometimes use the term proper build to refer to your build, and meta-build to refer to the build in project. The projects inside the metabuild can do anything any other project can do. Your build definition is an sbt project.
sbt runs atop Scala and requires a strict version of it. No way to change it unless you fancy spending time on things you should really not be touching in the first place :)
What you can do is to apply the plugin in project/plugins.sbt and then, in the project, apply the settings of the plugin selectively, per scalaVersion of the project's build not the meta-build's itself.
It's not that complicated as the answer reads, but explaining simple concepts is usually not an easy task for me. Have fun with sbt! It's gonna pay you back very soon when used properly.
Updated answer for 2020: You can use .filter on addSbtPlugin.
For example, the following works:
val scalafixEnabled = System.getProperty("SCALAFIX", "").trim.nonEmpty
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.14").filter(_ => scalafixEnabled)
This might sound useless, but just for the sake of information (and for fun to be honest :) )
Is there a way to find in Flash Builder the amount of lines written in a Flex project?
There is a good answer here on how to do the same with IntelliJ and Java: How to count lines of Java code using IntelliJ IDEA?
where the 'Find In Project' feature is used. For IntelliJ this is:
Ctrl+Shift+F -> Text to find = '\n+' -> Find
The search must be set to find based on a regular expression. '\n+' indicates to look for lines that are not empty
So you can adopt this method to FlashBuilder / Eclipse - I am sure it will have a similar feature. Try Ctrl+H.
Alternatively, load your Flex project into IntelliJ.
I'm looking to build an iOS app using Monotouch that has a rather large sqlite db full of text. I need to provide fast searching over this text.
My best solution right now is the FTS module (preferably version 4). I have read that the default instance of sqlite on iOS does not support FTS. If this is true what is the recommended way to build a custom instance of sqlite with Monotouch? Or can this be done at all?
I found this site describing how to accomplish this with xcode, but it is not clear how I would accomplish with Monotouch.
http://longweekendmobile.com/2010/06/16/sqlite-full-text-search-for-iphone-ipadyour-own-sqlite-for-iphone-and-ipad/
Any help is much appreciated!
As I mentioned in my comment above I got this working and since Stack Overflow has really helped me out I wanted to contribute a little to give back to the community.
Disclaimer
This is coming from a .NET developer who is a N00B when it comes to iOS/MacOS/XCode/Monotouch.
Although I tested this out on the iPad simulator I have yet to test it out on an actual device.
End disclaimer
This is a quick how-to compile your own version of SQLite and include it in your Monotouch project with the goal of supporting Full text search.
Step 1:
Download the SQLite amalgamation file.
This includes all of SQLite in one file.
http://www.sqlite.org/download.html
Step 2: Compile the SQLite source in Xcode for iOS.
There is a good walkthrough on how to do this here:
http://pp.hillrippers.ch/blog/2009/08/08/Static+SQLite+Library+with+Unicode+Support+for+the+iPhone/
I followed steps 1-5, skipped #6 since we're not adding additional headers.
Instead of using the compile flags used in the walk through I used:
SQLITE_ENABLE_COLUMN_METADATA
SQLITE_ENABLE_FTS4
There may be others you want to add as well.
These compile flags are added in XCode, to the "Build" tab of the project under "Preprocessor Macros".
Once you've compiled this you should have "mylibrary.a".
Step 3: Include this file in your MonoDevelop project
Add mylibrary.a into MonoDevelop as any other file, right click it and make sure the build action is 'Nothing'.
In your project options select "iPhone Build". You need to add additional mtouch arguments. Add the following
-gcc_flags "-L${ProjectDir} -lmylibrary -force_load ${ProjectDir}/mylibrary.a"
Step 4: Build a c# wrapper
You could probably find a good wrapper to include at this point but I just quickly rolled my own.
For a good tutorial on writing an SQLite wrapper in C# check this page out:
http://www.switchonthecode.com/tutorials/csharp-tutorial-writing-a-dotnet-wrapper-for-sqlite
Because your library is a part of the project you don't need to reference the library by name but instead use the "__Internal" keyword. *NOTE THERE ARE TWO UNDERSCORES IN "__INTERNAL" * (Don't ask me how much time I wasted before I realized that)
Here's a sample of one of mine
[DllImport ("__Internal", EntryPoint="sqlite3_open")]
static extern int sqlite3_open_v2(string filename, out IntPtr db);
There's obviously a lot more to putting together a wrapper, but there's lots of info out there on how to do that. One gotcha is to properly marshal the strings you get returned from SQLite. (see http://blog.gebhardtcomputing.com/2007/11/marshal-utf8-strings-in-net.html for more info on Marshaling)
This was intended to be a quick walkthrough on getting a native library compiled in into MonoDevelop/monotouch, and I hope it helps someone.
You would have to do the same thing, build your own libsqlite3.a, and mangle all the public exports so it doesn't conflict with the libsqlite loaded by the system, and then you would need to modify whatever library you want to bind to sqlite to [DllImport ("__Internal")] instead of libsqlite.
I need to convert complete .air project to flex project which can run in flash player in browser. Anybody do it?
Look what's inside of .project file. I believe it is set here:
...
<natures>
<nature>com.adobe.flexbuilder.apollo.apollonature</nature>
<nature>com.adobe.flexbuilder.project.flexnature</nature>
<nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
</natures>
Apollo is codename for AIR. If you remove this nature, project may turn into Flex-based. Never did it myself though, so you have to experiment.
That depends on the air-project. I don't think you can get an air-project running as a flex app if it uses air-only features like directory/file selectors or the like ...
Thanks for all. I've built my project by simple copying the files one-by-one and correct the errors.
I was excited to find out that Adobe released the data visualization for free so I can use the fancy charts and all with my projects even though I don't have Flex Builder Professional. So I installed the new 3.4 sdk along with the data visualizations. Most all of my projects did fine except for one. This particular project uses localizations. Are there any new compiler arguments that I need to include? I current have -source-path=locale/{locale} -allow-source-path-overlap=true. I get the inconsistent linkage error below:
Inconsistant linkage in /Applications/Adobe Flex Builder 3/sdks/3.4.0/frameworks/locale/en_US/datavisualization_rb.swc$locale/en_US/core.properties - 'en_US$core_properties' is marked as extern, but 'en_USGBC$core_properties' is not.
Any help would be appreciated.
Try use -locale en_US