Closed Teeratat9 closed 3 years ago
Hi Teeratat,
You can get the Blockly Games code using the green "↓Code" button on the Blockly Games repo homepage. (You'll need to have git
and/or a GitHub client installed.)
After that you don't need to build—just point your browser at the file blockly-games/appengine/index.html
and away you go.
@cpcallen: I'm afraid it doesn't work this way. (I downloaded the zip file with code and unzipped it into c:\blockly-games-master) It seems like there is hardcoded some link to "generated" files. Am I doing something wrong?
I don't think @cpcallen got this one right. There are two approaches:
blockly-games/appengine/admin.html
and choose "Debug mode". Then you can go to index.html and play. Edits to the src files will work fine. But this doesn't work well over the Internet, since debug mode doesn't build/compress the files, meaning the load times will be very large.Thank you for your help, but I think there is still some misunderstanding. I'm trying the option 2 (to be able to make modifications). In offline version there is no admin.html. In github sources there it is, so I can switch to debug mode (which I can see in console "Uncompressed mode activated. Happy hacking!") but when I go to index.html then I get very similar errors.
I feel the problem is somewhere in boot.js around here:
// Load the chosen language pack.
var script = document.createElement('script');
if (debug) {
script.src = 'generated/msg/' + lang + '.js';
} else {
script.src = appName + '/generated/msg/' + lang + '.js';
}
script.type = 'text/javascript';
document.head.appendChild(script);
// Load the code bundle for the chosen game.
var script = document.createElement('script');
if (debug) {
script.src = appName + '/generated/uncompressed.js';
} else {
script.src = appName + '/generated/compressed.js';
}
script.type = 'text/javascript';
document.head.appendChild(script);
There is nothing like generated
or msg
or uncompresed
in the repository. Seems like I still have to build it at least once. (?) (I hoped to avoid getting python or java just for making javascript from javascript.)
It hard for me for edit a little thing on blockly game code