Discuss Scratch

coolgamerkid9
Scratcher
53 posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

Howdy! It's coolgamerkid9 back again from their long-awaited discussion break!

Today (or 2 years ago now) i've finally cracked the code of how to convert scratch projects from every Scratch version to working Windows executables!

First, let's start with converting Scratch 1.4 projects.

1: You'll need to make sure you have your Scratch project ready, then you will need to go to the BYOB (Snap's version of Scratch 1.4)'s site and download the Windows installer located at the top of the page just below the “Current released version” title. If you don't want to install BYOB, you can click the “files only” link. This will download BYOB just to your downloads folder for portable use.

(Unfortunately, I couldn't get BYOB nor Scratch 1.4 to work with Windows Sandbox, so no preview photos I'm afraid…)

2: Open the BYOB.exe file and open your Scratch project inside it. WARNING: Editing then saving the project in BYOB will irreversibly convert your project into a BYOB project (.ypr). You may want to click “Save as…” when saving your project in BYOB.

After you've loaded and saved your project as a .ypr file then click Share then click “Compile…” then locate where you want to save your app. After you click Save, locate your newly created app and open it to see if it works.

Converting .sb2 projects:

1: Make sure you have your .sb2 file you want to convert. then you're going to want to download a Shockwave Flash Player archive. (download to the most recent version as of the Web Archive.) After you have downloaded the Shockwave Flash Player archive, you're going to want to unzip it's contents. IMPORTANT: To get the Flash Projector working, go to the unzipped folder, then 32_0_r0_XXX (the Xs are version numbers and every version number may vary. The download link is assured to work.) then only click “flashplayer32_0r0_XXX_win_sa” AND NOTHING ELSE!!

2: Okay. Now, you should see something like this:


If everything turned out to plan and you see this screen, then nice! We've just opened the Flash Projector.

Now we're getting into the REAL stuff. Now we need to download the junebeetle converter. Their converter is no-longer around but they have a download link! After you've downloaded the converter, unzip it's contents. Then, drag the “Converter.swf” file into the Flash Projector we just opened. It should now look like this:


After the converter has opened, open your .sb2 file by clicking “Open Scratch File”.

The options in a nutshell:
Full Screen: Starts your project in full screen.
Show Green Flag Bar: Shows the green flag, stop and full screen buttons above the project
Start in Turbo Mode: Starts the project in Turbo mode (You can't turn off Turbo mode unless you have the Show Green Flag Bar option switched on)
Automatically Start: This is required for many projects. Without this turned on, the green flag will appear in the middle of the screen like a normal project that's just been loaded.
Show as Editor: Loads your project in the Scratch 2.0 Offline Editor (not to be mistaken for the Adobe AIR version)
Hide Mouse Cursor: Hides your Windows mouse cursor while the project runs. (This is useful for animations or games that use a custom cursor.)
Width/Height: Change the project size. (Not recommended)

After you have selected all the features you want, click “Convert to SWF”. then select where you want to save your project. Make sure you add an “.swf” at the end of the file name for example: “My Awesome Game.swf”. (You can't add that later!) otherwise the file won't load for the next part.

After you've saved your .swf file, then your going to download (oh boy another download) an SWF to EXE application. For devices running Windows XP to Windows 8, I recommend Bullrushsoft's SWF to EXE converter.. It's the most simplest converter with many customizable options and doesn't require any high-privileges. For devices running Windows 10/11, I recommend Flash Builder. Even though it's quite bare-bones, it's probably the only SWF to EXE converter that still works with Windows 10/11.

UPDATE: Gah! Flash Builder no-longer works due to Flash Player restrictions in Windows 10 and 11! Sorry guys! (I'm still figuring out an alternative…)

Alright and finally…

Converting a .sb3 file.

Amazingly, there are 2 different ways of converting a .sb3 to an executable, using either TurboWarp or NW.js with HTMLifier! And huzzah, none of them require downloading more apps. (ok maybe one)

—TurboWarp—

a: Make sure you have your Scratch 3 project saved or downloaded.

1: Go to the TurboWarp Packager page. It should look like this:


The cool part about TurboWarp Packager is that you can import a Scratch Project ID as well as a .sb3 file!

2: After you have loaded your project, you can change your own settings stated in this picture:


it wouldn't fit lol click to enlarge

Need help? Click the (?)s! It provides you with lots of information about the packager.

3: After you have changed some settings scroll down to where it says “Environment” then change the Plain HTML selection to the Electron Windows application selection, then click Package to start the conversion!

Tips about this conversion:
The Tab Icon will become the app icon as well as the Page Title will also become the App title.



And that's that! You now have a Scratch 3 project as an executable! BUT… we can go an extra mile…

—HTMLifier & NW.js—

There's also a tutorial like this one here, but the topic was closed quite a while ago.

1: Go to the HTMLifier page. It should look quite similar to the TurboWarp Packager page, except it has a few more custom options from E羊icques mods like loading unofficial extensions that won't work anywhere else (Also provided on TurboWarp Packager).

2: After you've changed some settings, scroll to where it says “HTMLify”, IMPORTANT: Do not click “Create a .zip file”! and then click “HTMLify” to start converting your project into an HTML. After the conversion has finished, we can proceed to the next step.

3: Go to the NW.js page and where it says "Download Stable for Windows (x64), click “NORMAL”. It should start downloading. After the download has finished, unzip the contents. WARNING: Do not modify the files in the folder! Moving any type of file in the nw.js folder will cause the app to no-longer work! After that, you're going to want to open Notepad and copy and paste this:

{
“name”: “Your app or game name”,
“main”: “project.html”,
“icons”: { “16”: “icon.png”}
}

Didn't work?

You can replace the “Your app or game name” text but DON'T change anything else!
Don't want an icon? Remove the “icon” line with the comma next to the “project.html” text.

After that save the file as “package.json” and save it in the nw.js folder you just unzipped. IMPORTANT: Make sure you click the file type drop-down menu while your saving the file and change it from .txt to All files. After that drag the HTML file and an icon inside your nw.js folder. (Skip the icon part if you don't want an icon).

3b: Test the application “nw.exe” out to see if it works. If your project loaded successfully, you can proceed!

4: Compiling the app. We going to use a portable app called "MakeSFX“ for this part. IMPORTANT: Please read ”#1" at the bottom of the message. After you have downloaded the portable app, click it to open it.



First, you're going to want to look for the source folder. Click the first “Browse” button then look for the nw.js folder with the HTML, the icon, the .json file and the “nw.exe” app itself. After you have found the folder, click OK. then in the “Target SFX file” box click Browse again and save your app anywhere BUT the nw.js folder! Now about the “Target SFX file icon”, you're going to need to convert the .png into an .ico file. IMPORTANT: Do not delete the .png file after conversion. After the image has been converted, browse for the new icon file on your computer. Onward to Extraction mode, click “Extract files into specified folder and launch executable file and browse for the ”nw.exe“ file again. For the working directory, click ”Extraction folder, where executable file is located“. For how to delete extracted files, click ”Delete extracted files immediately when SFX has finished executing“ (You can select that option if you want to save storage space but you can choose any). Set the Extraction folder to ”Temporary folder“. For Advanced options, you can select what you want but DON'T enable ”Self destructing mode“! For the UAC (User Account Control) auto-elevation, you can also pick what you want, but it's best to go for ”Run SFX file with the highest available permission“. And finally, for the Overwrite mode during extraction, select ”Automatically skip extracting of all existing files". Now you can make the SFX!

After the SFX has been made, navigate to your recently made application and test it out! If the app opens, then you have successfully converted an .sb3 to an executable!


Important notices:
#1: I've seen many SFXs made by the MakeSFX app have a bunch of random viruses since AVG has been constantly moving them to quarantine. Seems like I have some more research to do. Using Microsoft's Legacy IExpress might solve some problems, but is quite tricky for some. But for now, you can still use the more secure TurboWarp Packager.

#2 (removed): Adobe Flash Player. (Pun from the comments as quoted from @applejuiceproduc :

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
, Just playing along, that's all. nothing bad for kids here!)


And that's it! That's how you convert .sb, .sb2 and .sb3 files into Windows executables!

Don't forget to follow if you found this helpful, and this is coolgamerkid9 signing off. Buh BAIIIIIIIIIIIIIIIIIIIIIIIII!

Last edited by coolgamerkid9 (July 20, 2023 01:46:36)

PPPDUD
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

Why does this require a parent??
WojtekGame
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

PPPDUD wrote:

Why does this require a parent??
same
BreadcatGames
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
applejuiceproduc
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
CST1229
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

I don't see any reason not to use the TurboWarp Packager instead of the HTMLifier (it even recommends using the TW Packager!).
coolgamerkid9
Scratcher
53 posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

PPPDUD wrote:

Why does this require a parent??
Because it requires making .json files which modify or could break the nw.js app but since nearly everyone knows how to make the “package.json” file, I may have been a bit paranoid on that part, oops!
coolgamerkid9
Scratcher
53 posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
Huh? Where?
applejuiceproduc
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

coolgamerkid9 wrote:

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
Huh? Where?
a***e f***h
coolgamerkid9
Scratcher
53 posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

applejuiceproduc wrote:

coolgamerkid9 wrote:

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
Huh? Where?
a***e f***h

OH! This thing! I'll call it “The App With The Fancy Looking Letter” then. *upside down smiley face*
applejuiceproduc
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

coolgamerkid9 wrote:

applejuiceproduc wrote:

coolgamerkid9 wrote:

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
Huh? Where?
a***e f***h

OH! This thing! I'll call it “The App With The Fancy Looking Letter” then. *upside down smiley face*
WHY DIDN'T YOU BLUR OUT THE APP NAME IN THE PIRCTURE?!?!?

THIS IS NOT AN 18+ WEBSITE

DifferentDance8
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because [redacted] very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
I agree! I'm aware I have the app on my system, but for the primary and exclusive purpose of Scratch 2.0
coolgamerkid9
Scratcher
53 posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

applejuiceproduc wrote:

coolgamerkid9 wrote:

applejuiceproduc wrote:

coolgamerkid9 wrote:

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
Huh? Where?
a***e f***h

OH! This thing! I'll call it “The App With The Fancy Looking Letter” then. *upside down smiley face*
WHY DIDN'T YOU BLUR OUT THE APP NAME IN THE PIRCTURE?!?!?

THIS IS NOT AN 18+ WEBSITE

OH NO I FORGOR

Last edited by coolgamerkid9 (April 12, 2023 15:54:32)

windows-11-pro
Scratcher
100+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

coolgamerkid9 wrote:

(#13)

applejuiceproduc wrote:

coolgamerkid9 wrote:

applejuiceproduc wrote:

coolgamerkid9 wrote:

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
Huh? Where?
a***e f***h

OH! This thing! I'll call it “The App With The Fancy Looking Letter” then. *upside down smiley face*
WHY DIDN'T YOU BLUR OUT THE APP NAME IN THE PIRCTURE?!?!?

THIS IS NOT AN 18+ WEBSITE

OH NO I FORGOR
chill guys
applejuiceproduc
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

windows-11-pro wrote:

coolgamerkid9 wrote:

(#13)

applejuiceproduc wrote:

coolgamerkid9 wrote:

applejuiceproduc wrote:

coolgamerkid9 wrote:

applejuiceproduc wrote:

BreadcatGames wrote:

PPPDUD wrote:

Why does this require a parent??
because adobe flash very scary
Moderators, please ban this post. It has a two word long curse word. Young children cannot be exposed to this. /j
Huh? Where?
a***e f***h

OH! This thing! I'll call it “The App With The Fancy Looking Letter” then. *upside down smiley face*
WHY DIDN'T YOU BLUR OUT THE APP NAME IN THE PIRCTURE?!?!?

THIS IS NOT AN 18+ WEBSITE

OH NO I FORGOR
chill guys
NO THIS IS A VERY IMPORTANT CHAIN OF MESSAGES, WITHOUT THIS KIDS AS YOUNG AS 8 YEARS OLD MAYBE BE EXPOSED TO CURSE WORDS
INSERT-USER_NAME
Scratcher
1000+ posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

coolgamerkid9
Scratcher
53 posts

Converting .sb, .sb2 and .sb3 into Windows executables. (How-to)

CST1229 wrote:

I don't see any reason not to use the TurboWarp Packager instead of the HTMLifier (it even recommends using the TW Packager!).

Yes, the TurboWarp Packager is recommended and does have easier ways to convert projects to executable files without having the risk of getting a virus! But for some reason I never got the TurboWarp Packager Extras app to work… Or… I could be just doing something wrong. LOL

Powered by DjangoBB