Convert sb3 to html

Porting Scratch Projects

The Scratch project format (.sb, .sb2, or .sb3) can only be read by the Scratch editor. Compiling a scratch project can convert it to another format that can be opened without Scratch. Compiling was a popular suggestion for Scratch 2.0. [1] However, it was not added in the normal online or offline editors and it was eventually rejected. [2] To get around this, many Scratchers have made ways to turn Scratch Projects into more widely known formats such as a Windows executables, Android Apps, and Mac applications.

Porting is useful for those who want to distribute the project to various computers offline, especially if it is a game or is not allowed to be shared on the Scratch Website.

This tutorial will cover how to turn a Scratch project into various executable file formats for Windows, Mac, and Linux.

Note: To convert SB or SB2 to SB3, open the file in Scratch 3 and save it. SB can be converted to SB2 with the Scratch 2.0 Offline Editor.

Contents

SB3 to HTML

.sb3 projects can be ported to .html. In order to port .sb3 projects to .html, use Scratch user Sheep_maker’s Project HTMLifier or TurboWarp Packager.

Instructions for TurboWarp Packager

  1. Open the TurboWarp Packager website.
  2. Load the project.
  3. * If the project is on the Scratch website copy the link to the project and paste it where is says «Scratch Project ID or URL».
  4. * If the project is not on the Scratch website, and you have the .sb, .sb2, or .sb3 file select «File» then click «Choose File» to choose your file.
  5. If you wish to change the optional settings, such as the runtime options, player options, or input options, etc. you may.
  6. Under environment, select «Plain HTML»
  7. Click «Package». A .html file containing the project will be automatically downloaded.
Читайте также:  Python selenium диалоговое окно

Instructions for HTMLifier

Note: It’s recommended by HTMLifier itself to use TurboWarp Packager, as it offers better performance.
  1. Open the HTMLifier website.
  2. Load the project
  3. * If the project is on the Scratch website copy the project ID (the last set of numbers in the link. For example, if the link is projects:123456 the ID is 123456) and paste it where is says «a project ID on Scratch. Project ID:».
  4. * If the project is not on the Scratch website, and you have the .sb, .sb2, or .sb3 file select » selecting a file on your computer:» then click «Choose File» to choose your file.
  5. * If the project file is hosted on an external website, select «a project file hosted online. URL to the file:» and provide a link to that project file.
  6. If you wish to change the optional settings, you may.
  7. Click HTMLify

SB3 to .app or .exe

A Scratch 3.0 project can be converted to a .app (macOS application) or .exe (Windows executable) using a third-party tool called Forkphorus and Node.JS. A simpler method using TurboWarp Packager can also be used.

Simple Method

Warning: This method produces unsigned .exe and .app files, which may trigger Windows SmartScreen or macOS Gatekeeper warnings. Instructions to bypass these warnings can be found on the TurboWarp Packager site.
  1. Open the TurboWarp Packager website.
  2. Load the project.
  3. * If the project is on the Scratch website copy the link to the project and paste it where is says «Scratch Project ID or URL».
  4. * If the project is not on the Scratch website, and you have the .sb, .sb2, or .sb3 file select «File» then click «Choose File» to choose your file.
  5. If you wish to change the optional settings, such as the runtime options, player options, or input options, etc., you may.
  6. Under environment, select «Electron Windows application (32-bit or 64-bit)» for Windows or «WKWebView macOS application». If packaging for macOS and your project uses the video sensing extension or the loudness block click «NW.js macOS application» under «Other environments»
  7. Type in a package name. It must be unique (if possible) and must only contain lowercase letters, hyphens, and underscores.
  8. Click «Package». A .zip file containing the project will be automatically downloaded.
Читайте также:  Упорядоченное множество python 3

Windows-specific steps

These steps are required to produce a working app icon and create an installer program

  1. Download TurboWarp Packager Extras here.
  2. Launch the application.
  3. Click the gray box that says «Select or drop .zip file generated by packager».
  4. In the prompt that appears, click the zip file containing the .exe
  5. To fix the icon, select «Fix icon of .exe». To generate an installer program select «Create installer»
  6. Click continue

Complicated method

This page or section is in question as to whether it is useful or not. You can discuss whether you think it should be deleted or not on its talk page. (February 2022)
Reason: Overly complicated, and simpler solution can be found above
Warning: This method produces unsigned .exe and .app files, which may trigger Windows SmartScreen or macOS Gatekeeper warnings.
Note: These steps involve using the command line. If you are not comfortable working with the command line, an alternative is to use the sb3 to html steps below.
  1. Find the project id number. The id number is the number at the end of the url. For example, if the url is «https://scratch.mit.edu/projects/10128407/», the id number is 10128407.
  2. Go to Forkphorus and paste in the url or id number.
  3. Scroll down to where it says «Package this Project» and click Package. This should open a new tab with the Scratch project running in it. Copy the url of this tab, it is needed it later.
  4. Install node.js on the programmer’s computer. Go to nodejs.org and download the recommended version. Run the installer and follow the on screen steps.
  5. Open the command line. On Windows, type «Command Prompt» in the search bar in the bottom left and open. On macOS, do Cmd+Space to bring up Spotlight and type in «Terminal» and open.
  6. To make sure Node.js is installed properly, type «node -v»(no quotation marks) and hit enter. If it shows something like this: v##.##.##, then it worked!
  7. Install Nativefier. To do this, in the command line, type, «npm install -g nativefier»(no quotation marks) (capitalization matters) and hit enter. Wait while it installs.
  8. Make sure to have the forkphorus url from earlier ready, because it will be used in the next step.
  9. Last step, type this: nativefier —name «Project Name» «TheForkphorusURLHere» Downloads
  10. TheForkphorusURLHere should be replaced with the url in step 3, and this time it needs the quotation marks. It should look something like this: nativefier —name «Griffpatch’s Paper Minecraft» «https://forkphorus.github.io/app.html?id=10128407» Downloads
  11. Wait while the .exe or .app is being made. When it is done, it will say, «App Built to Downloads. » The Downloads folder is where the folder containing .exe file or .app will be. It can be moved from there if desired.
  12. If this is done on Mac, just run the new .app. If this is done on Windows, the .exe file is in the folder and should not be taken out. A shortcut should be made instead.
Читайте также:  Обозначение словаря в python

SB3 to SB2

Scratch user -Rex- made a .sb3 to .sb2 converter here. Run sb3tosb2.py (requires Python) to run the converter.

SB2 to SWF

Note: Since Adobe Flash Player is not supported, users should convert it to SB3, then HTML.

A user can download an SB2 to SWF converter or use an online converter at this site.

SB2 (Scratch 2.0) to .app or .exe

Note: This will convert into .app on MacOS and .exe on Windows
  1. Download a 2.0 project from the Scratch Website or the 2.0 Offline Editor.
  2. Go to this site and convert the sb2 file into .swf.
  3. Go into this Adobe Flash Player site and scroll down until the user gets to the Flash Player archives section.
  4. Download version 10.3.183.90 or earlier.
  5. Open zip, as it should download as a zip. The resulting folder should be called something like fp_10.3.183.90_archive. (Exact name will vary depending on which version was downloaded. This also applies to step 7 and 8.)
  6. Open folder.
  7. Open folder named something like 10_3_r183_90.
    Note: Do not open the folder named 10_3_r183_90debug

    .

Warning: Not following the next step properly may result in the built-in flash player to stop working.

If you are on MacOS, open the zipped file called something like flashplayer_10_3r183_90_mac_sa.app.zip. If they’re on Windows, open the file called something like flashplayer_10_3r183_90_win.exe.

  1. The previous step should give a standalone Flash Player App
  2. Open the app.
  3. Open the .swf file by going File>Open File> YourScratchProject.swf
  4. Now in the File menu, go down to Create Projector and click. It will now generate the .app file or the .exe file.
  5. The standalone Scratch program has now been made.

SB2 (Scratch 2.0) to SB (Scratch 1.4)

It is possible to convert an SB2 file from Scratch 2 to a Scratch 1.4 SB file using blob8108’s Retro Converter. Then, if desired, other tools can be used to port it to various formats.

Note: The converter can only convert 1.4 blocks. It cannot convert 2.0 onwards. This means converted projects cannot use clones, cloud, custom blocks, or other features introduced in Scratch 2.0 or later.
  1. Download the 2.0 project from the Scratch Website or the 2.0 Offline Editor.
  2. Go to the Retro Converter and follow the instructions there to convert to SB.
  3. Once converted, a pop-up should appear and the user will be able to download a 1.4 version (SB) of the 2.0 (SB2) Scratch project.

SB to EXE/APP

This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective. For information on the feature that replaced this one, see section.
Note: This converts to an EXE on Windows, and an APP on MacOS.
Note: This only works for Scratch 1.4 and earlier.
  1. Install BYOBhere.
  2. Open the SB file.
  3. Click «Compile this project» under the Share menu.

SB to JAR (Java executable)

Note: This only works for Scratch 1.4 and earlier.

This method works on all operating systems with a Java runtime installed, including Mac, Windows, and Linux. If you don’t have a Java runtime, one can be installed here.

inline

  1. Download ScratchToJAR[3]
  2. Unpack/extract the .zip file
  3. In the ToJAR folder, double click on the program folder, then on the dist folder and then double click on the ToJAR.jar file.
  4. This will launch the ToJAR application which looks like this:
  5. Click the first select button and choose the input (SB) file.
  6. Choose an output name, and be sure to append the .jar file extension, for example Example.jar
  7. Choose the output location, being sure to put the name of the JAR file at the end. For example, C:\Users\Username\Documents\Example.jar
  8. Click «Compile»

SB to APP via Java

Note: This only works on Mac OS X.
  1. Follow the steps above to make a JAR file.
  2. Find and launch the Jarbundler application, which should look like this:

Jarb.png

  1. From the tabs at the top, the first tab says build information. It is also possible to set a custom icon in this tab if desired. The icon must be in .icns format (use Icon Composer (comes with Mac) to convert a PNG file into .icns format). If no icon is provided, the icon shown will be used).
  2. Select the JAR file that was created in to JAR as the Main Class.
  3. Click the button at the bottom that says Create Application.
  4. Choose an output folder to save the chosen project in

References

  1. ↑https://web.archive.org/web/20120101192818/http://suggest.scratch.mit.edu/forums/60449-suggestions/suggestions/1240331-built-in-scratch2exe
  2. ↑ Paddle2See. (05/11/2018). «Porting a Scratch project to an EXE doesn’t really align with our goals for Scratch.» post:3303002
  3. ↑ToJAR Forum topic

Источник

Оцените статью