Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Is it Possible to Convert Scratch to C++?
- minecraftprox101
-
500+ posts
Is it Possible to Convert Scratch to C++?
I have OS Project that I haven't started, and I want it to be able to run in a VM or muti-booted computer. I can't (obviously) muti-boot or run a OS made in scratch in a VM without compiling it first. Is there any compiler that lets me to Convert Scratch to C++?
(Sorry if this is the incorrect format, I'm new to the AT)
(Sorry if this is the incorrect format, I'm new to the AT)
- 9gr
-
1000+ posts
Is it Possible to Convert Scratch to C++?
this guy done it i think, or use forkphorus project packager to convert it to an application. as far as i know, there isnt a way (there might be one by a better dev like garbomuffin or jeffalo)
edit: see @maximouse 's post, it much better than mine
edit: see @maximouse 's post, it much better than mine
Last edited by 9gr (March 12, 2021 17:56:32)
- 9gr
-
1000+ posts
Is it Possible to Convert Scratch to C++?
HTMLifier to get a HTML file and configuring Chromium to run it at startup. Then you can get something like this.just going to add on to this, you can use the Instead of converting the project to C++ (which would probably cause it to behave differently), I recommend using turbowarp packager/htmlifier for speed
- Greg8128
-
500+ posts
Is it Possible to Convert Scratch to C++?
It's possible but not practical at all.
- ElsieBreeze
-
100+ posts
Is it Possible to Convert Scratch to C++?
Converting Scratch to C++ wouldn't make it any easier to run it within a VM / Multiboot it, in fact, it'd probably make it far harder to do.
Your best option would be to convert the project to HTML and create a lightweight Linux image that starts X11 and then the project within a browser (perhaps something minimalistic like https://surf.suckless.org/ )
This would give the illusion of the Scratch OS running as an actual OS, but you'd never be able to convert the Scratch OS to being an actual OS, not even if you converted it to C++.
Your best option would be to convert the project to HTML and create a lightweight Linux image that starts X11 and then the project within a browser (perhaps something minimalistic like https://surf.suckless.org/ )
This would give the illusion of the Scratch OS running as an actual OS, but you'd never be able to convert the Scratch OS to being an actual OS, not even if you converted it to C++.
- 9gr
-
1000+ posts
Is it Possible to Convert Scratch to C++?
at least reply to the people who posted in the thread its not nice bump
- game_pr0grammer
-
500+ posts
Is it Possible to Convert Scratch to C++?
then why not program it in c++ in the first place?
- minecraftprox101
-
500+ posts
Is it Possible to Convert Scratch to C++?
Yes. Do you want exactly C++?
- 9gr
-
1000+ posts
Is it Possible to Convert Scratch to C++?
1. Nobody will take a scratch project as an ISO file.Yes. Do you want exactly C++?
2. Cloud variables will not be accessible.
3. Nobody has made a Scratch to C++ compiler. You have to use an html file on boot.
I have OS Project that I haven't started, ore os
Last edited by 9gr (March 24, 2021 07:32:06)
- Raihan142857
-
1000+ posts
Is it Possible to Convert Scratch to C++?
yes, it is possible to convert scratch to c/c++, in theory. you can convert it to javascript using something like turbowarp/forkphorus or leopard, and then you have to convert the js to c; there are four main ways to do this:
- Use something like QuickJS, ts2c, or NectarJS to convert the Javascript directly to C
- Convert the Javascript to WASM using AssemblyScript and decompile it to C
- Convert the Javascript to Python using Js2Py and convert the Python to C using CPython
- Convert the js to Lua with castl, then translate the Lua to C
Last edited by Raihan142857 (March 24, 2021 15:30:06)
- Aspirus
-
15 posts
Is it Possible to Convert Scratch to C++?
First you will need to get a debian installation. Goto debian.org and get the netinstall (its important to get the netinstall because we do not need to install any desktop enviroment)
then create a virtual machine and install debian (watch a tutorial maybe) just dont install any desktop environment.
now compile your scratch project using something like htmlifier or turbowarp into a HTML file.
now you need to boot into your debian virtual machine and then install a browser like firefox. then edit ~/.bashrc (this file can contain commands that run on startup) now we put the command startx firefox
make your html document the homepage of firefox
- Raihan142857
-
1000+ posts
Is it Possible to Convert Scratch to C++?
LOL First you will need to get a debian installation. Goto debian.org and get the netinstall (its important to get the netinstall because we do not need to install any desktop enviroment)
then create a virtual machine and install debian (watch a tutorial maybe) just dont install any desktop environment.
now compile your scratch project using something like htmlifier or turbowarp into a HTML file.
now you need to boot into your debian virtual machine and then install a browser like firefox. then edit ~/.bashrc (this file can contain commands that run on startup) now we put the command startx firefox
make your html document the homepage of firefox
also for a shortcut go to this link.
- minecraftprox101
-
500+ posts
Is it Possible to Convert Scratch to C++?
That is not my question, First you will need to get a debian installation. Goto debian.org and get the netinstall (its important to get the netinstall because we do not need to install any desktop enviroment)convert a scratch project to C++.
then create a virtual machine and install debian (watch a tutorial maybe) just dont install any desktop environment.
now compile your scratch project using something like htmlifier or turbowarp into a HTML file.
now you need to boot into your debian virtual machine and then install a browser like firefox. then edit ~/.bashrc (this file can contain commands that run on startup) now we put the command startx firefox
make your html document the homepage of firefox
Last edited by minecraftprox101 (March 26, 2021 13:17:30)
- Raihan142857
-
1000+ posts
Is it Possible to Convert Scratch to C++?
I already answered your question. -snip-
- Discussion Forums
- » Advanced Topics
-
» Is it Possible to Convert Scratch to C++?