You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-7Lines changed: 47 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,49 @@ If you're interested in contributing to Scratch, please take a look at the issue
6
6
It's been said that the Scratch Team spends about one hour of design discussion for every pixel in Scratch, but some think that estimate is a little low. While we welcome suggestions for new features in our <ahref="http://scratch.mit.edu/discuss/1/">suggestions forum</a> (especially ones that come with mockups), we are unlikely to accept PRs with new features that we haven't deeply thought through. Why? Because we have a strong belief in the value of keeping things simple for new users. To learn more about our design philosophy, see this <ahref="http://scratch.mit.edu/discuss/post/1576/">forum post<a>, or <ahref="http://web.media.mit.edu/~jmaloney/papers/ScratchLangAndEnvironment.pdf">this paper</a>.
7
7
8
8
### Building
9
-
To build the Scratch 2.0 SWF you will need [Ant](http://ant.apache.org/), the [Flex SDK](http://flex.apache.org/) version 4.10+, and [playerglobal.swc files](http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html#playerglobal) for Flash Player versions 10.2 and 11.4 added to the Flex SDK. Scratch is used in a multitude of settings and some users have older versions of Flash which we try to support (as far back as 10.2).
10
9
11
-
After downloading ``playerglobal11_4.swc`` and ``playerglobal10_2.swc``, move them to ``<path to flex>/frameworks/libs/player/<version>/playerglobal.swc``. E.g., ``playerglobal11_4.swc`` should be located at ``<path to flex>/frameworks/libs/player/11.4/playerglobal.swc``.
10
+
The Scratch 2.0 build process now uses [Gradle](http://gradle.org/)to simplify the process of acquiring dependencies: the necessary Flex SDKs will automatically be downloaded and cached for you. The [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html) is included in this repository, but you will need a Java Runtime Environment or Java Development Kit in order to run Gradle; you can download either from Oracle's [Java download page](http://www.oracle.com/technetwork/java/javase/downloads/index.html). That page also contains guidance on whether to download the JRE or JDK.
12
11
13
-
The ``build.properties`` file sets the default location for the Flex SDK. Create a ``local.properties`` file to set the location on your filesystem. Your ``local.properties`` file may look something like this:
14
-
```
15
-
FLEX_HOME=/home/joe/downloads/flex_sdk_4.11
12
+
There are two versions of the Scratch 2.0 editor that can be built from this repository. See the following table to determine the appropriate command for each version. When building on Windows, replace `./gradlew` with `.\gradlew`.
13
+
14
+
Required Flash version | Features | Command
15
+
--- | --- | ---
16
+
11.6 or above | 3D-accelerated rendering | `./gradlew build -Ptarget=11.6`
17
+
10.2 - 11.5 | Compatibility with older Flash (Linux, older OS X, etc.) | `./gradlew build -Ptarget=10.2`
18
+
19
+
A successful build should look something like this (SDK download information omitted):
20
+
21
+
```sh
22
+
$ ./gradlew build -Ptarget=11.6
23
+
Defining custom 'build' task when using the standard Gradle lifecycle plugins has been deprecated and is scheduled to be removed in Gradle 3.0
24
+
Target is: 11.6
25
+
Commit ID for scratch-flash is: e6df4f4
26
+
:copyresources
27
+
:compileFlex
28
+
WARNING: The -library-path option is being used internally by GradleFx. Alternative: specify the library as a 'merged' Gradle dependendency
29
+
:copytestresources
30
+
:test
31
+
Skipping tests since no tests exist
32
+
:build
33
+
34
+
BUILD SUCCESSFUL
35
+
36
+
Total time: 13.293 secs
16
37
```
17
-
Now you can run Ant ('ant' from the commandline) to build the SWF.
18
38
19
-
If the source is building but the resulting .swf is producing runtime errors, your first course of action should be to download version 4.11 of the Flex SDK and try targeting that. The Apache foundation maintains an [installer](http://flex.apache.org/installer.html) that lets you select a variety of versions.
39
+
Upon completion, you should find your new SWF in the `build` subdirectory.
40
+
41
+
```sh
42
+
$ ls -R build
43
+
build:
44
+
10.2 11.6
45
+
46
+
build/10.2:
47
+
ScratchFor10.2.swf
48
+
49
+
build/11.6:
50
+
Scratch.swf
51
+
```
20
52
21
53
Please note that the Scratch trademarks (including the Scratch name, logo, Scratch Cat, and Gobo) are property of MIT. For use of these Marks, please see the [Scratch Trademark Policy](http://wiki.scratch.mit.edu/wiki/Scratch_1.4_Source_Code#Scratch_Trademark_Policy).
22
54
@@ -26,3 +58,11 @@ Here are a few integrated development environments available with Flash debuggin
It may be difficult to configure your IDE to use Gradle's cached version of the Flex SDK. To debug the Scratch 2.0 SWF with your own copy of the SDK you will need the [Flex SDK](http://flex.apache.org/) version 4.10+, and [playerglobal.swc files](http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html#playerglobal) for Flash Player versions 10.2 and 11.4 added to the Flex SDK.
63
+
64
+
After downloading ``playerglobal11_4.swc`` and ``playerglobal10_2.swc``, move them to ``<path to flex>/frameworks/libs/player/<version>/playerglobal.swc``. E.g., ``playerglobal11_4.swc`` should be located at ``<path to flex>/frameworks/libs/player/11.4/playerglobal.swc``.
65
+
66
+
Consult your IDE's documentation to configure it for your newly-constructed copy of the Flex SDK.
67
+
68
+
If the source is building but the resulting .swf is producing runtime errors, your first course of action should be to download version 4.11 of the Flex SDK and try targeting that. The Apache foundation maintains an [installer](http://flex.apache.org/installer.html) that lets you select a variety of versions.
0 commit comments