Sharp2SWF is a modification of Junebeetle's Scratch 2 To SWF Converter. The modification makes the converter convert Sharp projects to SWF instead of Scratch projects. This repository also includes a copy of Junebeetle's "Create Projector" Workaround so you can easily create EXEs from your SWF file.
Type: Slightly Modified, Included
The Converter part has been modified to use Gradle for building. The Loader part has been modified to use .sharp files instead of .sb2 files.
The original build script is not included or used, as it only works on macOS because it is written in AppleScript. The included build script with this is Build.ps1, which is a Windows PowerShell script. This PowerShell script only works on Windows, although with some small tweaks you can probably easily get it working on macOS or Linux.
Type: Slightly Modified, Included
The Projector part has been modified to use Gradle for building.
A slight modification has been made to Button.as.
The modification was removing the private var name
line, as this was causing a build failure.
The original build script is not included or used. Build.ps1 is also used for building this.
Type: Slightly Modified by script, Downloaded by script
Sharp is a Scratch Mod created by Mrcomputer1 and algmwc5.
Scratch is created by the Scratch Team. See its website here.
Type: Unmodified, Downloaded by script
Adopt OpenJDK is automatically downloaded by the script as it is required by Gradle.
Type: Unmodified, Downloaded by script
Git for Windows Portable is automatically downloaded by the script as it is used to download the Sharp source code.
Type: Unmodified, Downloaded by script
Python 3 is automatically downloaded by the script as it is required by the script to run a Python script.
Type: Unmodified, Downloaded by script
Flash Player Projector is optionally downloaded when running the script. This file is required to build EXEs of the Converter and Projector files. And it is required to use Projector.
Type: Unmodified, Copied from Sharp
Gradle is used to build Sharp, the converter and the projector. It copies the Gradle Wrapper from Sharp to the Converter and Projector.
- Download the latest release's "Source Code" option from here.
- Extract the zip.
- Open the folder that contains Build.ps1.
- Press File -> Open Windows PowerShell in File Explorer.
- Type in
Set-ExecutionPolicy -Scope Process Bypass -Force
or there is a chance PowerShell will say that you cannot run custom/unknown scripts. - Type in
.\Build.ps1
- If prompted to get Flash Player Projector, choose option 1 (1 and enter)
- Follow the steps below
- Once in .\Build.ps1's main menu, choose option 1.
- Wait for it to say Complete. If you see any BUILD FAILURE or red error text, then there might be a bug.
- Once in .\Build.ps1's main menu, choose option 2.
- Wait for it to say Complete. If you see any BUILD FAILURE or red error text, then there might be a bug.
- Once in .\Build.ps1's main menu, choose option 3.
- Wait for it to say Complete. If you see any BUILD FAILURE or red error text, then there might be a bug.
- Open the Converter.exe.
- Select your Sharp project.
- Choose your options.
- Select the convert button.
- Enter a name for your SWF file.
- Open the Projector.exe.
- Select the Load Flash Player EXE button and select the flashplayer_32_sa.exe file the build script downloaded for you.
- Select the Load SWF File button and select your SWF file you made with Converter.exe
- Select Create Projector and choose a name for your EXE.
This is probably a bug, please report it.
Type Set-ExecutionPolicy -Scope Process Bypass -Force
into PowerShell before using .\Build.ps1
to override this.
Set-ExecutionPolicy
is the PowerShell command to change the execution policy, which is what is restricting running the script as it is unknown.
-Scope Process
makes it only change for this PowerShell session and revert when you close the PowerShell window.
Bypass
is the execution policy, which allows the script to run.
-Force
skips the "Press Y to confirm" screen.
You did not have the Flash Player Projector in the same folder as .\Build.ps1
, with the name flashplayer_32_sa.exe
.
Re-run the script and use option 1.