Skip to content

Commit

Permalink
docs: Update README.md
Browse files Browse the repository at this point in the history
* Mention the Android application of Ruffle and link to its build
instructions
* Add missing folders in the sructure section
* Misc changes
  • Loading branch information
turicfr committed Apr 2, 2024
1 parent 501b42c commit e22ce5c
Showing 1 changed file with 37 additions and 17 deletions.
54 changes: 37 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ Ruffle is an Adobe Flash Player emulator written in the Rust programming languag
* [Project status](#project-status)
* [Using Ruffle](#using-ruffle)
* [Building from source](#building-from-source)
* [Prerequisites](#prerequisites)
* [Desktop](#desktop)
* [Ubuntu](#ubuntu)
* [Homebrew](#homebrew)
* [Linux prerequisites](#linux-prerequisites)
* [Build](#build)
* [macOS](#macos)
* [Arch Linux](#arch-linux)
* [Web or Extension](#web-or-extension)
* [Android](#android)
* [Scanner](#scanner)
* [Exporter](#exporter)
* [Structure](#structure)
Expand All @@ -38,22 +42,24 @@ Ruffle supports ActionScript 1, 2 and 3 pretty well, but it's still not finished

## Using Ruffle

The easiest way to try out Ruffle is to visit the [web demo page](https://ruffle.rs/demo/), then click the "Browse..." button to load an SWF file of your choice.
The easiest way to try out Ruffle is to visit the [web demo page](https://ruffle.rs/demo/), then click the "Select File" button to load an SWF file of your choice.

[Nightly builds](https://ruffle.rs/#releases) of Ruffle are available for desktop and web platforms including the browser extension.
[Nightly builds](https://ruffle.rs/downloads#nightly-releases) of Ruffle are available for desktop and web platforms.

For more detailed instructions, see our [wiki page](https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle).

## Building from source

[Follow the official guide](https://www.rust-lang.org/tools/install) to install Rust for your platform.
### Prerequisites

You must also have Java installed, and available on your PATH as `java`.
* Latest stable channel of [Rust](https://www.rust-lang.org/tools/install)
* Java, available on your PATH as `java` (required for building the library containing the builtin Flash classes for ActionScript 3)

### Desktop

If you are building for a Linux platform, the following are typical dependencies:
#### Ubuntu
#### Linux prerequisites

The following are typical dependencies for Linux:

* libasound2-dev
* libxcb-shape0-dev
Expand All @@ -68,6 +74,7 @@ If you are building for a Linux platform, the following are typical dependencies
* cmake
* g++

#### Build

Use the following command to build and run the desktop app:

Expand All @@ -79,44 +86,57 @@ To run a specific SWF file, pass the SWF path as an argument:

To build in debug mode, simply omit `--release` from the command.

## Homebrew
#### macOS

Ruffle Desktop can be built from our [Homebrew Tap](https://github.com/ruffle-rs/homebrew-ruffle/):
Ruffle desktop can be built from our [Homebrew Tap](https://github.com/ruffle-rs/homebrew-ruffle/):

`brew install --HEAD ruffle-rs/ruffle/ruffle`

_Note: because it is HEAD-only, you'll need to run `brew upgrade --fetch-HEAD ruffle` each time you want to update._

#### Arch Linux

Ruffle desktop can be built for Arch using the `PKGBUILD` file found on the root of this project or from the AUR repository. Use the `makepkg -si` command where the file is located to install the package.

### Web or Extension

Follow [the instructions in the web directory](web/README.md#building-from-source) for building
either the web or browser extension version of Ruffle.

This project is tested with BrowserStack.

### Android

Follow the [instructions](https://github.com/ruffle-rs/ruffle-android/blob/main/CONTRIBUTING.md#building-from-source) in the `ruffle-android` project for building the Android application of Ruffle.

### Scanner

If you have a collection of "real world" SWFs to test against, the scanner may be used to benchmark
ruffle's parsing capabilities. Provided with a folder and an output filename, it will attempt to read
all of the flash files and report on the success of such a task.
all of the Flash files and report on the success of such a task.

`cargo run --release --package=ruffle_scanner -- folder/with/swfs/ results.csv`

### Exporter

If you have a swf and would like to capture an image of it, you may use the exporter tool.
If you have an SWF file and would like to capture an image of it, you may use the exporter tool.
This currently requires hardware acceleration, but can be run headless (with no window).

- `cargo run --release --package=exporter -- path/to/file.swf`
- `cargo run --release --package=exporter -- path/to/file.swf path/to/screenshots --frames 5`

## Structure

- `core` contains the core emulator and common code
- `desktop` contains the desktop client (uses `wgpu-rs`)
- [`web`](web) contains the web client and browser extension (uses `wasm-bindgen`)
- `scanner` contains a utility to bulk parse swf files
- `exporter` contains a utility to generate PNG screenshots of a swf file
- `core`- core emulator and common code
- `swf` - SWF and ActionScript parser
- `desktop` - desktop client (uses `wgpu-rs`)
- `web` - web client and browser extension (uses `wasm-bindgen`)
- `render` - various rendering backends for both desktop and web
- `video` - video decoding backends
- `flv` - Flash Video decoder
- `wstr` - a Flash-compatible implementation of strings
- `scanner` - a utility to bulk parse SWF files
- `exporter` - a utility to generate PNG screenshots of a SWF file

## Sponsors

Expand Down

0 comments on commit e22ce5c

Please sign in to comment.