K-Sketch Animation Sketching System
2
stars
0
forks
source link
Getting Started with KSketch2 Development
Software You Will Need
- Install the GitHub client for Windows or Mac.
- Install Adobe Flash Builder Premium 4.7 (referred to below as "FB").
- Install the Adobe AIR SDK 4 (Instructions adapted from http://forum.starling-framework.org/topic/fb47-issues)
- How to get this SDK
- Download it from http://helpx.adobe.com/air/kb/archived-air-sdk-version.html
- Get both versions of the SDK
- Wtihout Compiler: "Adobe AIR 4 SDK downloads" (Shold be "AdobeAIRSDK")
- With Compiler: "Adobe AIR 4 SDK and compiler downloads" (Should be "AIRSDK_Compiler")
- Or get it from one of the ksketch2 team members
- Overlay the SDK Without Compiler on FB's AIR 4.6 Directory
- On Windows:
- Navigate to C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.7\sdks
- Unzip the contents of AdobeAIRSDK to a temporary folder "AIR4"
- Make a copy of the directory 4.6.0 and name it 4.6.0_AIR4
- Overlay AIR4 on Flex 4.6.0 by dragging the contents of the AIR4 directory into the 4.6.0 directory.
- Make sure you select “Copy and Replace” when Windows asks and click the box at the bottom to apply all.
- On Mac:
- Navigate to /Applications/Adobe Flash Builder 4.7/sdks
- Unpack the contents of AdobeAIRSDK to a temporary folder AIR4
- Create the "AIR4" directory and copy the SDK file (AdobeAIRSDK.tbz2) into that folder
- Navigate to /Applications/Adobe Flash Builder 4.7/sdks/AIR4 in a terminal window
- "tar jxvf AdobeAIRSDK.tbz2"
- If you have trouble overwriting files due to file permissions, try this command:
- "sudo tar jxvf AdobeAIRSDK.tbz2"
- Delete the orinial archive file (AdobeAIRSDK.tbz2).
- Make a copy of the directory 4.6.0 and name it 4.6.0_AIR4
- Overlay AIR4 on Flex 4.6.0.
- In the terminal, navigate to /Applications/Adobe Flash Builder 4.7/sdks
- "ditto AIR4 4.6.0_AIR4"
- Configure Flash Builder to use the AIR 4 SDK by default
- Close Flash Builder (if it was open), and Open it again
- Go to (menu) Flash Builder->Preferences->Flash Builder->Installed Flex SDKs->Add…
- Navigate to the 4.6.0_AIR4 directory created earlier click OK.
- Name the SDK "Flex 4.6.0 (AIR 4)" and click OK.
- Click the check box in the Installed SDKs dialogue box to make it the default SDK in Flash Builder.
- Click OK
- Update the AIR SDK used by FlashBuilder while debugging
- Navigate to FlashBuilder's compiler folder
- On Windows: C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.7\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722
- On Mac: /Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722
- Rename the "AIRSDK" folder to "AIRSDK-original"
- Unpack the contents of the SDK With Compiler (AIRSDK_Compiler) to a folder called "AIRSDK"
- Use unpacking instructions similar to those found above for "Overlay the SDK Without Compiler on the AIR 4 Directory"
Building and Running
- Clone the repository "richardcd73/ksketch2"
- Launch FB and go to File->Switch Workspace->Other
- Choose the cloned ksketch2 folder
- Import projects into FlashBuilder
- Right-click on Package Explorer->Import->General->Existing Projects into Workspace (Next)
- Choose "Select root directory" and browse to cloned ksketch2 folder (Finish)
- In menu select Project->Clean (This makes a clean build of all projects)
- Window->Show View->Problems
- "Cannot create HTML wrapper. Right-click here to recreate folder html-template"
- This is useful for debugging, but we aren't saving any of it, so we haven't checked into repository
- Right-click -> Generate HTML templates
- "unable to open '...ksketch2/KSKApp_Web/libs'
- GitHub doesn't sync empty folders, but Flash Builder needs these empty folders
- Test your Installation
- In Package Explorer select KSKApp_Web and click "Debug"
- You may need to install the debug version of the Flash Player (11.6 or higher)
- In Package Explorer select KSKApp_AIR and click "Debug"
- The "Debugging Configurations" window should appear
- Recommended settings
- Launch Method: On AIR Simulator
- Target Platform: Google Android
- Device: Android: Samsung Galaxy Tab 10.1
- Target Platform: Apple iOS
- Launch Method: On Device
- Target Platform: Google Android
- Launch Method: On Device
- Plug in device before running debugger
- May need to let debugger install Adobe Air
- Target Platform: Apple iOS
- Launch Method: On Device
- Packaging method: Fast
- Choose debugging method: Debug via USB
Overview of project structure
Packages and special objects
- Computation and storage packages in "sg.edu.smu.ksketch2"
- model
- objects: object representations
- data_structures: low level structures used by objects
- events: things that extend flash.events.Event
- operators: *** objects that create operations
- operations: objects that can go on the undo or redo stack
- utils (those involving computation and storgage)
- KSketch2: facade class for manipuating a model
- Display packages in "sg.edu.smu.ksketch2"
- canvas: main canvas component
- controls: every top-level interface control that is not the main canvas
- components: all visible controls
- popup: all pop-up menus
- timeBar: the time control
- transformWidget: the object manipultor and associated context menu
- imageInput: view for the mobile camera
- interactioncontrol: *** refreshes app in response to events and updates from child components and model (desktop and mobile)
- interactors: handlers for gesture input events
- draw: handlers for draw gestures
- transitions: handlers for trananslate, rotate, scale, etc.
- widgetstates: Different appearances for widgets
- imageEditing: image processing view
- view: graphic representations of model objects and data
- objects: graphic representations of KObject subclasses
- utils: (those involving display)
- Mobile packages (KSketch_Portable top-level)
- views: top-level interface classes for mobile
- canvas: main editing view
- components: helper classes for canvas
- popup:
- timeBar
- transformWidget
- interactioncontrol: simple IInteractionControl that handles only refreshes and undo/redo
- interactors: handlers for gesture input events (mobile only)
- widget: states for the object manipulator
- document: choose a document view (also handles i/o)
- previewer: simple ksketch player
- scrollerColumn: list of available documents
- imageEditing:
- utils
Projects
Rules to observe
- Don't sync ".metadata", as it contains personal project/workspace preferences