Flex Release build not including all files and folders in the exported release - apache-flex

I'm trying to export a release build of a project that includes folders for assets, VO, controllers, models, and view. When I export a release build, the release build is not including all the files and folders that are in the project root in flex builder. It only includes the main flex application files as well as the assets and controllers folder. Is there a way to resolve this?

I assume the controlles, VOs etc are used (referenced) in your project. In this case they will be compiled anyway. Everything that is refernced in your code will be compiled automatically.
You only need to explicitly include some folders if you have some assets in them that are loaded on runtime. In this case you can do it in the project settings (Right click on your project > Properites > Flex Build compiling > Package contents)

I was able to resolve this by reinstalling my install of Flash Builder and building a new project to migrate my original project in question into.

Related

Should bower_components be included into the project?

I'm working on an ASP.NET MVC 5 project that was initially using Nuget for static content like Bootstrap, jQuery etc. I have now switched to bower as it is the way to go and is also integrated with visual studio.
I noticed that when installing bower packages, they are not automatically included into the project. So I have left them out for now but is this a good idea? Should bower packages be included or not? It doesn't make any difference to access because in my BundleConfig.cs file I'm still able to link these files to aliases as before.
bower will download the entire package using Git.
Your package must be publically available at a Git endpoint (e.g., GitHub). Remember to push your Git tags!
This means that bower will actually download the entire repository/release for you to use in your ASP project. I've tested this with bootstrap and jQuery. These repositories can contain many many files so including them into the .csproj file will clutter your project file and may not be ideal.
This can be compared to using nuget packages where we are only referencing external packages in the packages.config file but we do not include the dll and other assemblies into the project. This leads me to think that bower_components should indeed not be included in the project; this makes no difference to usage as you can still reference the packages and use the files.

Where do I put my skin files for a desktop libgdx project

I'm using libgdx for a desktop game/prototype and I want to start getting into UI design.
I followed the answer here: Default Skin LibGDX? to download the necessary skin files but I'm not sure where in my project to put the ui directory with these files. I have tried to put it right in the project directory along side libs and src, so there's libs, src, ui, Referenced Libraries, and JRE System Library but when I reference the Skin with new Skin("ui/uiskin.json") it is throwing a filenotfound exception. Should this be down in my com. package in the project viewer in Eclipse?
I understand for an Android app you use the asset folder, but I don't have one in my project since it's a desktop app, even if I were to just add it.. I still don't know at which level unfortunately. This is probably really simple.
Thanks in advance.
The skin files are being looked up as "internal" files. On Android, this will look through the Android asset directory and CLASSPATH, but with the Desktop backend, only CLASSPATH will be searched.
To be consistent with the way things generally work in Libgdx, create a directory called assets next to the src and libs directories in your desktop project. Then put your ui directory inside assets. This isn't strictly necessary (see below) but will make your project a bit more compatible with other Libgdx code and projects. With an Android project the desktop assets directory is normally linked to the Android assets directory, but without an Android project you should create a regular directory.
If you used the Libgdx Libgdx "setup tool" the desktop project's assets directory should already be on the CLASSPATH. If not, you will also need to add this assets directory to your CLASSPATH: Right click on the project -> Properties -> Java Build Path -> Source tab -> Add Folder ... -> Select the assets directory.
To be clear, if you don't want to mirror the Libgdx conventions above, you just need to make sure the directory containing your skin files is on the CLASSPATH, then they will be found as "internal" Libgdx files (for example, you could add the ui directory directly to the CLASSPATH, and then look the files up without the explicit ui/ prefix).

Plugin is not recognized in QML Desktop Appication Deployment

I have wrote a Qt Quick Desktop application in c++ qnd Qt Creator(QML) on Windows7. Now I have to deploy it.
I'm using Qt Quick Desktop Components plugin in my application, I've installed it according to these instructions, and I'm using it with:"import Qt.labs.components", as written there.
I tried adding to the .pro file:
QML_IMPORT_PATH = C:\QtSDK\Desktop\Qt\4.7.4\mingw\imports\Qt\labs\components
but I saw it's working well without it, and I removed it.
I've read a guide how to deploy such an application here, and followed it; I have now a deployment folder, with: the .exe file, the needed dll's, and a folder hierarchy like:Qt/labs/components.
in components I put the styleplugin.dll(for desktop components), and a qmldir file, with the content: plugin styleplugin, excactly like in the doc.
but when I'm runnig my application.exe from the deployment folder in another computer, I'm getting a white, empty window, means: It didn't find the .dll file.
Should you explain me please what's wrong?
I know two reasons, when app can not load plugin dll:
Some of dependecies of the plugin dll are missing or can not be found and that is why it can not be loaded. Qt Creator or Visual Studio environment can be different than the system one. For example, your IDE can modify PATH environment variable. Check plugin's dependencies availability with Microsoft Dependency Walker tool in the same environment where you launch your app.
App can not find plugin in standard directories. To check this you should specify plugin import directory explicitly:
QDeclarativeView *rootView = new QDeclarativeView()
rootView->engine()->addImportPath(QLatin1String("path/to/your/imports"));

git + Flash Builder workflow: how do I set it up so git works smoothly?

I'm using git to track a project I'm developing in Flash Builder, and I'm wondering the best way to go about having it track it, especially regarding Flash Builder generated files, Compiler generated files, and source files that aren't necessarily flex files.
I had it set up to ignore all of the flash builder .project & debugging directories via .gitignore:
.actionScriptProperties
.flexProperties
.metadata
.project
.settings
bin-debug
and also treating any swf/swc files as binaries via .gitattributes
*.swf -crlf -diff -merge
*.swc -crlf -diff -merge
One issue with this setup is checking out this project and using
it in Flash Builder from scratch:
Flash Builder doesn't like it when
you have a project folder without
the .project files. Only way to
import the source into Flash Builder is to:
Create a new Flex Application
Smother the template files it
created (specifially APP_NAME.mxml)
with a git clone.
Where do I put libraries? From a git perspective, I'd like to have them in the lib folder of the repo so when someone clones the repo, everything just works, but from a local file system perspective I'd like to store all my libraries in a single location and use Flash Builder to reference them, as I may update the library or download a later version. Maybe I should put the libraries in their own repo and load them as a git module? This way I don't need to manually remember to update my Y library files in all X projects that are using them, edit: they will simply update when I update each projects' submodules.
And what about external swfs/flex modules? I've was sticking external swf files in the bin-debug folder for now so the SWFLoader class can find them, but because I'm .gitignoring the bin-debug folder, they don't come with the repo when it's cloned.
One final issue is where to keep the files for the server. Do I have them in a separate repo? I'm using php VOs' with AMFPHP so it's good to be able to edit the php files alongside my actionscript files in Flash Builder... but they don't belong in the project src folder.
The current solution I'm using is:
Creating a 'server' folder in the project root
Pointing an apache virtualhost at it
Setting the run/debug settings to http://APP_NAME.localhost
Then using the server folder as a replacement for bin-debug when the files get exported
The problem with this is I've got a big mess of compiler generated files, and non-AS source files in my server folder. It just doesn't seem like an elegant solution.
How do you set up git to work with flash builder smoothly? Could all this be resolved with multiple git repos/Flash Builder projects, or an ANT script or something?
Thanks.
I've found a good solution which avoids all of the horror of having untracked files and keeping a massive .ignore list:
CLEAN your projects before you git commit.
Simple as that.
Whether it be by Flash Builder or by ant, you should have the ability to clean anyway, so if you simply clean before you commit, the problem of generated files is solved. Duh.
In fact you could probably set it up as a git hook or something.
Typically for eclipse projects with any SCM, I initially check in everything including .projects, etc., but maybe except bin-debug in your case. Then just make sure that anybody who checks out the project never checks back in those .xxx files. For instance, when I use perforce, I first check out the .xxx files to a changelist that I never check in. Then check out the rest to a separate changelist.
Another tip is to use user defined library variables when working with build paths, etc.

adobe flex: 2 projects with same class, can i share that class between the two projects?

i have several flash projects and i have common classes. is there a way to share these classes between the project so i won't need to copy it to all the project when ever i modify something?
In Flex Builder, right click on the project and choose properties. In the Flex Build Path section choose Add Folder... and pick the project you want to reference then the /src folder (so ${DOCUMENTS}//src). This will allow one project to use the classes in another project. However be careful as this will slow down compile times. Probably a better idea to build a library where you have dependencies.
in adobe flex/flash builder when i add a new folder, i can click on advanced and then i can choose to which folder, this folder will be linked. by doing so i can share directories between several projects.

Resources