Replies: 17 comments 47 replies
-
Yes, you will need a physical or virtual machine with those operating systems. TurboWarp Desktop uses a custom GitHub Actions script (https://github.com/TurboWarp/desktop/blob/master/.github/workflows/release.yml) to run builds on all platforms whenever a tag is pushed, you could do something similar.
Modifying them is fine. Adding new addons is significantly less trivial and currently undocumented. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for your answer. I noticed that the code of the desktop app is mainly a downloader and compiler of code that is somewhere else. I have found in the code many instructions referring to several URLs but I wasn't able to locate the URL where the forked code should reside. Where should I change the downloader code in order to build a customized forked version? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot. So, as the only reference to my scratchdesignstudio repository (the one where I forked Turbowarp/scratch-gui, Turbowarp/scratch-vm, Turbowarp/scratch-blocks, etc) is the line "scratch-gui": "github:scratchdesignstudio/scratch-gui#desktop" in package.json, I don't have to apply any further change to package.json. Is that right? (sorry for asking, but, as I said, I'm working on something completely new for me) |
Beta Was this translation helpful? Give feedback.
-
I'm trying now to work on scratch-blocks in my new account scratchforsccom. First thing I noticed, reading the package-lock.json in TurboWarp/desktop, I see that the referred branch is "develop-builds". So I made a very slight modification (changed "forever" to "for1ever") in my https://github.com/scratchforsccom/scratch-blocks/blob/develop-builds/msg/messages.js file that, if I correctly understood, should change the name of the forever block. Then I have run the usual steps:
At the end, my forever blocks is still called "forever", not "for1ever". I noticed, in the newly created package-block.json, that the account for scratch-blocks (and the other repositories) is still TurboWarp and not scratchforsccom: "scratch-blocks": "github:TurboWarp/scratch-blocks#develop-builds", So, I suppose I must change or update something in order to create a package-lock.json that refers to my scratchforsccom account. Any help, as always, is welcome |
Beta Was this translation helpful? Give feedback.
-
I'm stuck. I tried again the following steps:
To be sure they were correct, I tried all the steps described at https://scratch.mit.edu/discuss/topic/289503/ on the Scratch source code to create the block "move 100 steps". I got the correct blue block with the correct text until I have run the "npm link scratch-vm" step. After that step the block gets red and without any text, even if, when clicked, it correctly moves the sprite of 100 steps. So, the block works, but it is wrong for shape, color and text (no text at all). Same happens in TurboWarp. Do you have a sequence of steps to create a simple block in a fork of your TurboWarp Desktop app? Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
I noticed now that the TurboWarp blocks I thought you had added (such as "is compiler") are "backpack" blocks. Just to avoid to bother you, you didn't add new blocks to the standard Scratch categories, did you? Thanks again for your help |
Beta Was this translation helpful? Give feedback.
-
BTW, the code for the "forever if" block works very well in Scratch 3 (with the usual strategy of not to "npm link scratch-vm" but manually coping the Scratch3_....js scripts to the scratch-gui/node_modules/scratch-vm/src/blocks folder instead) |
Beta Was this translation helpful? Give feedback.
-
To sum up:
To get the correct result on Scratch 3, I have not to run “npm link scratch-vm” and I have to manually move the scratch3_motion.js and the scratch3_control.js files to the node_modules/scratch-vm /src/blocks folder of scratch-gui. Is there a way to get the same result in TurboWarp Desktop? |
Beta Was this translation helpful? Give feedback.
-
I compared the files that I have changed in GitHub (in the same repositories and branches listed in the package.json files) and the local files I found in desktop/node_modules after I run
So, if there are no alternative folders to which the files should be copied (as I said, I couldn't find the node_modules/scratch-gui/node_modules/scratch-vm/src/blocks path you mentioned), every file after running Anything else I can try? Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
I made it. Partially. I made the block "move 100 steps" work. I was concentrated on the "forever if" block that I got by changing the "while" block. So I don't know exactly when the "move 100 steps" started working. So I'm now going to redo all the steps and see when the correct look of the "move 100 steps" block shows up. I still need help to make the "forever if" block work. In the meantime, the sequence of steps I applied is the following (basically, installing TurboWarp desktop as a first step and then reinstalling the scratch-blocks and scratch-vm repositories of TurboWarp inside it, as described in the https://scratch.mit.edu/discuss/topic/289503/ tutorial): forked https://github.com/turbowarp/desktop to stefanofederici account
git clone https://github.com/stefanofederici/desktop |
Beta Was this translation helpful? Give feedback.
-
Ok, I had missed something in the scratch3_control.js file in the repository. By adding the "control_foreverif: this.foreverIf," line in the following code under //SF:NEW: to desktop/node_modules/scratch-vm/src/blocks/scratch3_control.js, the "forever if" block works as expected:
The only remaining problems are now:
|
Beta Was this translation helpful? Give feedback.
-
I'm now trying to create a custom online version of TurboWarp with the "forever if" block. I have run
but with
I diff'ed the two scratch-gui folders and, except for updates to scripts that (I guess) should not impact, the only real differences are between the package.json and make-toolbox-xml.js, as expected. Is there something intrinsically new in TurboWarp so that I should refork the repositories? The result of my Files online-sf/scratch-gui/.git/config and online-tw/scratch-gui/.git/config differ |
Beta Was this translation helpful? Give feedback.
-
I need now to compile my custom TW for Windows. I tried following the instructions on the usual tutorial https://scratch.mit.edu/discuss/topic/289503/ that said I needed to use Windows Subsystem for Linux. So I installed WSL. But even the tw's original source code raises an error when I So I tried to use the command prompt, and I was able to run and build tw's original source code. But when I try to add and compile the scratch-blocks repository and I I also tried (I guess it isn't logical, but I don't know much about npm) to run Is there a way to create a windows executable in WSL (that, if I correctly understood, has a longer path limit)? Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
I don't know how much I can help you at this point. You're quite far into the weeds now.
It won't be updated soon. Since it sounds like you don't care about the compiler you can try to manually revert TurboWarp/addons@069aadc by editing scratch-gui/src/addons/addons/debugger/userscript.js but I can't guarantee it'll work.
Having multiple "layers" of forks will make things more annoying. You don't need to be doing that. A fork is just a branch owned by someone else.
Yes, that is the point Regrading that npm build error, downgrade Node.js to v14.x and it'll probably work in WSL. Recent versions are apparently problematic. Modding Scratch is very messy right now. |
Beta Was this translation helpful? Give feedback.
-
(This is just another account to test the debugger addon) I tried. The userscript.js file in the scratch-gui#desktop repository is completely different from the file I see In the change (and that I fully see when I click "view file" at TurboWarp/addons@069aadc). So I just replaced it with the full file at https://github.com/TurboWarp/addons/blob/069aadc73ff3a7250d272f1abcc03c0b02bdb975/addons/debugger/userscript.js. Is that what you meant? Now I see the blocks of the debugger extension (that I don't see instead in the TurboWarp website when I enable the debugger addon) but I don't see the button to open the debugger window. |
Beta Was this translation helpful? Give feedback.
-
It's always me. Do you know of any problem when importing gif images with the code I have forked at the beginning of February to create my custom TurboWarp Desktop? I discovered that I can import jpeg and png image, but no gif images. Instead, I can import even gif images by using turbowarp desktop 1.1.3. Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
-
This is excellent news! Thanks for letting me know |
Beta Was this translation helpful? Give feedback.
-
I followed the instructions at https://github.com/TurboWarp/desktop and everything went really smoothly with my Mac.
Now I have two questions:
Beta Was this translation helpful? Give feedback.
All reactions