Search code examples
actionscript-3flashversion-controlflashdevelop

What files to keep under version control in Flash/AS3 project?


I have this project called Foo with the following structure but what files should I exclude from version control? I build it with FlashDevelop.

├── bin                    <-- already in
│   └── Foo.swf            <--   .gitignore
├── css.xml
├── lib
│   └── as3corelib.swc
├── locales
│   ├── de_DE
│   │   └── ...
│   └── en_US
│       └── ...
├── obj                    <-- what
│   ├── FooConfig.old      <--   about
│   └── FooConfig.xml      <--     these?
├── src
│   ├── com
│   │   └── ...
│   └── printf.as
├── Foo.as3proj
└── Foo.report             <-- and this one?

I noticed that the files under obj/ and the report file is changed by every build. So I guess I could exclude them?

Foo.report (10146 lines)

<report>
  <scripts>
    <script name="/home/max/Projects/flash-compiler/apache-flex-sdk/frameworks/libs/framework.swc(mx.graphics:GradientStroke)" mod="1422002215000" size="3188" optimizedsize="1400">
      <def id="mx.graphics:GradientStroke" />
      <pre id="mx.graphics:GradientBase" />
      <pre id="mx.graphics:IStroke" />
      <dep id="flash.display:GraphicsGradientFill" />
      <dep id="flash.display:Graphics" />
      <dep id="flash.display:CapsStyle" />
      <dep id="AS3" />
      <dep id="flash.display:GraphicsStroke" />
      <dep id="flash.geom:Rectangle" />
      <dep id="mx.core:mx_internal" />
      <dep id="flash.geom:Point" />
      <dep id="flash.display:JointStyle" />
    </script>
    <!-- more scripts are following here -->
  </scripts>
  <external-defs>
    <ext id="flash.events:AsyncErrorEvent" />
    <ext id="RegExp" />
    <!-- more exts are following here -->
  </external-defs>
</report>

obj/FooConfig.old begins with ...

<?xml version="1.0" encoding="utf-8"?>
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
<!--Any modifications you make may be lost.-->
<flex-config>
  <target-player>11.2</target-player>
  <benchmark>false</benchmark>
  <static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
  <compiler>
    <define append="true">
      <name>CONFIG::debug</name>

obj/FooConfig.xml begins with ...

<?xml version="1.0" encoding="utf-8"?>
<!--This Adobe Flex compiler configuration file was generated by a tool.-->
<!--Any modifications you make may be lost.-->
<flex-config>
  <target-player>11.2</target-player>
  <benchmark>false</benchmark>
  <static-link-runtime-shared-libraries>true</static-link-runtime-shared-libraries>
  <compiler>
    <define append="true">
      <name>CONFIG::debug</name>

Solution

  • Put your .as, .swc, .xml, .as3proj and all other resources (images, sound, etc.) under source control. Anything under bin or obj folders can be ignored - those are generated by the compiler during a build.

    I don't know what the .report file is - I haven't had one in FlashDevelop. I assume it's a compiler report file for verbose builds but I'm not sure. If you haven't created it, it's not likely to be needed for source control.