Hi all,
I discovered a new way to run Scratch projects from an executable file. You can run the executable file everywhere, also on computers without Scratch installed. Your project will also open in Presentation Mode immediatly.
I did not create another tool for this - I used a (hidden) built-in Windows application. That means you'll have to do some settings yourselves, but I'll try to explain as good as possible.
It should work for every windows version newer then Windows 95 - because of the long filenames...
How-to
Info: IExpress is actually a program to create Windows Installers. We won't be creating an installer, we just want to run the Scratch Program opening a project in presentation mode. The idea is the same though, you include some files in the 'installer', they are unpacked and a program is started. Our 'installer' will be unpacking a stripped version of the Scratch Program together with a project. We will hide all windows from the user, so when the .exe is clicked, Scratch will just open.
(1) On XP: Click start, then "Run..."
Type in "iexpress" and click "OK".
On Vista or 7: type in "iexpress", wait a moment and press enter. (There might be a run button available on your Vista/7 though.
You should see the old-fashioned "IExpress Wizard" window.
(2) Select "Create new Self Extraction Directive file."
and click "next".
(3) As "Package Purpose",
select "Extract files and run an installation command"
and click "next".
(4) As "Package title",
you can type anything you want - I used "Scratch Project".
This field doesn't really matter - normally this text is used in the title bar of all 'installer' windows but we will them so the user is not annoyed by Windows 95 style installation messages, instead the Scratch project should open.
Click "Next" again.
(5) Select "No prompt", click "next",
select "Do not display a license" and click "Next" again.
(6) Now we'll have to add all necessary files to the package,
do this by clicking "Add", browsing for a file, and Click open.
You can only open one file each time you click "Add".
First, all essential Scratch application files should be added.
Browse for the Scratch installation folder (usually "C:\Program Files\Scratch") and add the following files:
Scratch.exe
Scratch.image
Scratch.ini
ScratchPlugin.dll
Mpeg3Plugin.dll
UnicodePlugin.dll
CameraPlugin.dll
Click "Add" again, Now browse for your scratch project and click "Open".
In this example, it's called project.sb .
Now you added All the required files to the installer package, so click "Next" to continue.
(7) As "Install program", we are going to fill in the Scratch application.
Copy-paste
Scratch.exe "scratch.image" presentation "project.sb"
into "Install Program" - the first textbox .
Replace project.sb with the name of your project. (so if your project is named "racing game.sb", fill in
Scratch.exe "scratch.image" presentation "racing game.sb"
Leave "Post Install Command" (the second text field) as it is: "<none>" and Click "Next".
(8) In the "Show Window" step, you should select "hidden". That way the unpacking window will not be shown. Click "Next", again...
(9) In "Package name and options", click browse and save your final .exe file. I named it like my project - project.exe
Check both options:
- Hide File Extracting Progress Animation from user (We wan't the project to show up, no ugly 15-years-old animation )
- Store file using Long File Name inside package (Scratch uses long filenames - It won't work without this ancient option checked - I tried it out.)
And Click "Next" again
(10) Select "No Restart" we are not running a real installer so a restart is not required.
(11) The "Save Self Extraction Directive" allows you to store the settings you made. It is not necessary, so when you're finished, click "Next".
(12) Click next one last time to start creating the package. You'll see a DOS window, and a message when it's finished.
Now browse to your PROJECT.EXE (!) en watch it being a complete application
The only bad thing is you cannot hide the scripts at the end.
Joren
Last edited by JSO (2010-03-17 16:45:40)
Offline
Jens wrote:
Haha, very clever, JSO! will it run under Vista without admin rights? I'll update an image for you once the source code gets released...
I don't know about not-admin Vista Accounts (I kindly asked my parents to give me Admin permissions ) But it works fine with an admin account on Vista...
Offline
Nice job JSO! This should be very useful. I wonder if there is a Mac version of the iexpress program?
Offline
That's cool! only problem is,
JSO wrote:
The only bad thing is you cannot hide the scripts at the end
Offline
keroro645 wrote:
keroro645 wrote:
I dont understand #7
Can you help me with this.I want to try this out.
you just select the scratch.image file as the run application/program
Offline
terminator355 wrote:
keroro645 wrote:
keroro645 wrote:
I dont understand #7
Can you help me with this.I want to try this out.
you just select the scratch.image file as the run application/program
This is not true.
you have to fill in everything I listed in the first post.
Offline
Nice info
Offline
The EXE is a way to run Scratch project without having Scratch installed - this is just packing the most important Scratch program files with your project into self-extracting archive which calls extracted Scratch files to open your project.
Offline
Genius.
Too bad you can't hide the scripts at the end T_T
Offline
Hah - this is really cool.
Only trouble is you can't hide the Scratch application.
Do you know if I could use this in normal Java, just by importing Java.exe and stuff? I just don't want to mess up.
Thanks.
-Xmadole
Offline
Works for me! (ran on XP)
Last edited by cool_nt3 (2009-08-04 10:36:25)
Offline