0

I am having a lot of trouble while syncing my Flash Builder Actionscript project with Subversion. I have read that the output folders bin, bin-debug and html-template should not be checked in to the repository. The project bin folder contains a lot of XML files and assets that other project members needs to access. The problem is that Flash builder ignores it.

Is there a way of setting up Flash Builder to override the ignored bin folder? If not, what other approach should I consider? Different folder structures?

  • /src (commited)
  • /bin (ignored)
  • /swc (commited)

I would really like to override the default "DO NOT COMMIT YOUR DEPLOY FOLDER" setting. Bounty it is.

Mattias
  • 3,907
  • 4
  • 28
  • 50

5 Answers5

2

Yes those folders should not be committed. A common approach is to add another folder to keep all your runtime assets in which you would commit. Then just add that folder to the source path and by default Flash Builder enables "Copy non-embedded files to output folder" in the compiler options section of the project properties so those assets all get automatically copied to the bin folder for your build.

dchang
  • 2,007
  • 14
  • 14
  • That solution works for the developers in the team who have access to all files in the project (including SWF-files) but what about the people changing the assets? They need to see their changes in a working build. How could they work on the files in the correct environment without moving files in and out of a build (RELEASE) folder? – Mattias Nov 19 '10 at 13:39
  • @Mattias -- Usually you would have an `ant` task or something similar that would repackage the build with the new assets. – Jeremy Nov 19 '10 at 20:29
  • I want to commit the output folder (bin-debug) ... even if it is frowned upon! – Mattias Mar 24 '11 at 12:54
  • @jeremy Do you have any Ant examples or even team workflow best practices? – Mattias Sep 18 '11 at 06:24
1

So here are a couple of ways I've found to get around this limitation.


First option ... different svn client

Not optimal but you could use an external SVN client (like TortoiseSVN) instead of the eclipse SVN client. Not the ideal solution but since Tortoise and the eclipse SVN clients use the same SVN config files you can use the built in client to check in your src folder and only use Tortoise to check in the output folder.


A Second option... eclipse external program xcopy

Create another folder say bin-checkin in your project then create an external tool configuration in eclipse to copy the data over.... (Run -> External Tools menu)

Location:

C:\windows\system32\xcopy.exe

Working Directory:

 ${workspace_loc:/temp/bin-debug}

Arguments:

*.* ${workspace_loc:/temp/bin-checkin} /e /y

You can then just run the external program from the menu to copy the data over because this folder is not the output folder SVN will let you check it in.


Third option.... eclipse project Builder xcopy

(and this is the best because it's automatic)

do the same as the second option above but set it up as a builder instead of an external program This option is under builders in the project properties.

Here you use the same settings as above (using xcopy) you set it up on the main tab on the "Edit launch configuration properties" window, when you create a new Builder.

Once you've set that up you then switch to the Build Options tab in this same dialog and check the options you want such as "During manual builds" or "During auto builds", "After a clean" it depends on your preference. If you choose "During auto builds" make sure you click the "Specify Resources..." button and select your bin-debug folder. (this is the folder that will be monitored to detect when the auto build needs to be triggered)

Note: I've had best success setting the After a Clean, During manual, and During auto.

Justin Ohms
  • 3,334
  • 31
  • 45
  • Oh if you are committed (pun intended) to checking in the bin-debug folder, you can always change your output folder to something else and then copy from there into the bin-debug folder. As long as the folder isn't the configured output folder the SVN plugin should let you check it in. – Justin Ohms Mar 25 '11 at 03:14
  • Thanks for your really well written answers. However I still want the output folder to be committed. Otherwise I will have a lot of copying every time another team member updates a file. We work in very tight teams and are dependent on quick updates so I don´t want a "release folder". Also, i use Mac OSX. Thanks again. – Mattias Mar 25 '11 at 07:57
  • I'm not sure what the xcopy equivalent on a mac is I'll look when I'm on my mac next time. Unfortunately it sounds like you will probably have to resort to the first option and use an SVN client outside of eclipse. Both of the SVN clients for eclipse that I have used will not let you check in the actual project output folder. – Justin Ohms Mar 25 '11 at 15:21
1

I found this information here - http://blogs.adobe.com/jasonsj/2010/03/installing_subclipse_in_flash_builder_4.html. I hope it helps.

By Will - 5:04 AM on October 13, 2010 Reply

This is all good and well, but Flash Builder constantly recreates the bin-debug folder for AS/Flex projects destroying the .svn folder inside. This makes the bin-debug folder impossible to version. Does Adobe have any plans on fixing this? It’s extremely frustrating.

By Jason San Jose - 5:15 AM on October 13, 2010 Reply

This is intentional. bin-debug should only contain derived files (compiled or otherwise copied from elsewhere) and is not intended to be versioned. You can right click on bin-debug, open properties, and uncheck the Derived property. This should allow Subclipse to pick it up for version control, but this is not typically recommended. Server projects are a different story if you have server-specific resources in your bin-debug folder.

For what it's worth, I agree with not versioning those folders - it's unnecessary. I understand that, in your case, what's done is done. However, upon starting a new project, it might be worthwhile to set up a "lib" folder to place your assets and XML files into, and have everybody follow that convention. Good luck.

Community
  • 1
  • 1
  • I unchecked the Derived property for the bin-debug folder. It seems to work. Have not tested it fully yet but I will return and accept your answer if it works. Thanks – Mattias Mar 28 '11 at 07:47
  • But ... Every time FB builds the Main file the derrived flag is checked again. – Mattias Mar 28 '11 at 08:35
  • I'm not in front of my computer right now, which has Flash Builder. I had to reinstall my demo, so I lost Subclipse, but I'll see if I can find a solution for you. I am guessing that whatever FB touches, though, will end up with a derived tag - that means any build folder. I might be wrong though. –  Mar 28 '11 at 20:46
  • @Mattias I tried a build with an Actionscript 3 project with the Derived tag turned off for my bin-debug folder, and it didn't revert like yours did...I didn't have the chance to install Subclipse, though, so I don't know if there are any settings specific to that plugin that could be causing your problems. Question - if you uncheck "derived", save your project, close FB, and reopen, does it revert to previous state or is "derived" still unchecked? –  Mar 30 '11 at 20:18
  • @lunchmeat317 If I close and then open again, the derived flag is checked. – Mattias Mar 30 '11 at 21:44
  • @Mattias Try checking your launch configurations for your project. Again, I'm not in front of FB right now, but that's the first place I would look. I don't think this is a permissions issue since you're able to read, write, and execute that folder. Another thing - try checking the properties of the items within the bin-debug folder. I don't remember if they also have a derived property, but it may be worth checking into for the items you're pulling from your repo. I'm slowly running out of ideas, though... –  Mar 30 '11 at 23:03
  • @lunchmeat317 The derived flag resets once the main application rebuilds. Bummer. Thanks for the effort though. – Mattias Mar 31 '11 at 06:41
  • @Mattias Yeah, sorry I couldn't help more. My final suggestion would be to remove your local files from SVN versioning, delete them all, and then pull a new copy from the repo....I've heard that can help with some SVN issues, but I'm really grasping at straws here. –  Apr 01 '11 at 06:43
0

Why not externalize those assets in to a separate root folder (of your project) ? Checking in bin-debug folder is a hassle , but if you keep a separate folder and use ant build to package it in to .war, then I do not see any issue.(with checking in this folder) (In fact that what we do, since sometimes we want to deploy our applications as portlets)

uncaught_exceptions
  • 21,712
  • 4
  • 41
  • 48
  • The problem is that when the copywriters edit the copy in the application, I want them to be able to test their changes directly in the application build path. Maybe this could be done with Applescript or something. I don´t know. – Mattias Jan 20 '11 at 07:46
  • I want to commit the output folder (bin-debug) ... even if it is frowned upon! – Mattias Mar 24 '11 at 12:53
0

Use svn:ignore on the directory. See this SO question How do I ignore a directory with SVN? Note that if those directories are already checked in, you first have to remove them from the repository.

Community
  • 1
  • 1
Scott
  • 16,711
  • 14
  • 75
  • 120