-
Adobe Flash Builder with the 4.6 version of Adobe's Flex SDK.
-
If you are using automatic builds,
- install Apache Ant 1.8.2 or later - About
- set the path to the FlashBuilderC.exe command-line compiler in file flexbuild.bat
These steps set up a Flash Builder workspace for this project and then save it into a zip so that the build process has fresh ingredients to fall back upon in the case of workspace corruption.
-
Download Esri's ArcGIS Viewer 3.0 for Flex source from GitHub
-
From the ArcGIS Viewer for Flex zip, extract its top-level folder arcgis-viewer-flex-flexviewer-3.0-src into your public-safety-cop folder; add two underscores to the front of its name so that git will ignore it; discard the zip
-
Download Esri's ArcGIS API 3.0 for Flex from Esri
-
From the ArcGIS API for Flex zip, extract the file ArcGIS_Flex\libs\agslib-3.0-2012-06-06.swc into the __arcgis-viewer-flex-flexviewer-3.0-src\libs folder; discard the zip
-
Start Flash Builder and specify the full path of the public-safety-cop folder as your workspace (the workspace needs to be one folder level above the project folder)
-
Import a Flash Builder project, and choose the __arcgis-viewer-flex-flexviewer-3.0-src folder as your project folder; cancel the build if one starts automatically. It's OK if you get the warning that the project will be upgraded because it was created with a previous version of Flash Builder.
-
Exit Flash Builder and delete the __arcgis-viewer-flex-flexviewer-3.0-src\bin-debug and __arcgis-viewer-flex-flexviewer-3.0-src\bin-release folders if present
-
Zip the __arcgis-viewer-flex-flexviewer-3.0-src folder into __arcgis-viewer-flex-flexviewer-3.0-src.zip so that the top-level item in the zip is the __arcgis-viewer-flex-flexviewer-3.0-src folder
The Ant program uses the instructions in the file build.xml to unzip a fresh copy of the workspace, copy the widget and other sources into the workspace, build the widgets, and copy them into the __distrib distribution directory.
- At the Windows command line in the public-safety-cop folder, type "ant" to start the Ant build; your compiled widgets will be put into the folder public-safety-cop__distrib
The script does not delete the __arcgis-viewer-flex-flexviewer-3.0-src folder that it creates, so you can use Flash Builder and the public-safety-cop workspace for interactive development and testing.
-
Copy folder "libs" into the __arcgis-viewer-flex-flexviewer-3.0-src folder; confirm folder replace for all items (nothing is actually replaced)
-
Copy the contents of folder "config" into the __arcgis-viewer-flex-flexviewer-3.0-src\src folder; confirm replacement of config.xml
-
Copy the contents of folder "widgetConfigsOnly" into the __arcgis-viewer-flex-flexviewer-3.0-src\src\widgets folder; confirm folder replace for all items (nothing is actually replaced)
-
Copy folders "assets", "com", org", "popups", and "widgets" into the __arcgis-viewer-flex-flexviewer-3.0-src\src folder; confirm folder replace for all items (nothing is actually replaced)
-
Start Flash Builder with the public-safety-cop workspace
-
Right-click on the __arcgis-viewer-flex-flexviewer-3.0-src project name in the Package Explorer window and select Properties
-
Go to the Flex Modules section
-
Add the module sources BombThreatWidget.mxml, CIWidget.mxml,ClosestFacilityWidget.mxml, EMHeaderControllerWidget.mxml, EMSplashWidget.mxml, ERGChemicalWidget.mxml, LivelayerByExceptionWidget.mxml, NationalGridWidget.mxml, PDCWidget.mxml, ReportByExceptionWidget.mxml, and SwipeWidget.mxml to the build list for the project
You can now use Flash Builder and the public-safety-cop workspace for interactive development and testing.