Last active
September 1, 2018 00:12
Revisions
-
gogromat revised this gist
Jan 12, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -92,6 +92,8 @@ Now it is time to see if you have any prerequisites missing, lol. If prerequisites are missing (like Java, or node), then the path will be missing essential binaries. ### Check if emconfigure works Check if you have command **emconfigure**. If not, you need to manually add emscripten to the PATH -
gogromat revised this gist
Jan 12, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -143,7 +143,7 @@ Better start it as a server: - **python -m SimpleHTTPServer** - in browser go to **localhost:8000/dropbox.html** Firefox is probably going to lag, but it's better than Chrome which doesn't even load for some reason :s. You can also follow the patches at em-dosbox project's [readme][dosbox]. -
gogromat revised this gist
Jan 12, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -126,7 +126,7 @@ You will need **automake** & **autoconf** packages installed - **sudo apt-get install autoconf** - **git clone https://github.com/dreamlayers/em-dosbox.git** - **cd** into em-dosbox - following commands are better run in **bash** as **root** (do exactly as it is listed below) - **sudo -s** - **./autogen.sh** - **emconfigure ./configure** -
gogromat revised this gist
Jan 11, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # Install Em-Dosbox on Ubuntu 14.04 # Part 1: Install emscripten & clang ## Install preprequisites -
gogromat revised this gist
Dec 29, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -148,7 +148,7 @@ You can also follow the patches at em-dosbox project's [readme][dosbox]. ## Packaging games Next is to change the PYTHON to 'python' inside of **src/packager.py**. This file tries to use emscripten's **file_packager** and uses the mysterious **PYTHON** variable. Since script is going to fail, it's time to open it up and change it - nano /src/packager.py -
gogromat revised this gist
Dec 29, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -156,6 +156,7 @@ Since script is going to fail, it's time to open it up and change it Now we are ready to try running some games! - As a test I recommend to download "Blocks from Hell" from [here][blocks]. (Do it from under Linux, otherwise it downloads some weird installer) - place blocks into the **/src/** folder so it becomes **/src/blocks**. - **cd** to **/src** - Now switch to root in bash: **sudo -s** -
gogromat revised this gist
Dec 29, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Part 1: Install emscripten & clang ## Install preprequisites @@ -116,7 +116,7 @@ WARNING root: no input files - If it works, modify ~/.emscripten and Change NODE_... with "nodejs" # Part 2: Install em-dosbox After you are sure that **emcc** shows no errors or warnings, let's clone [em-dosbox][dosbox]. You will need **automake** & **autoconf** packages installed -
gogromat revised this gist
Dec 27, 2014 . 1 changed file with 37 additions and 37 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ #Update the package lists sudo apt-get update # Install **gcc** (and related dependencies) sudo apt-get install build-essential # Install cmake @@ -34,22 +34,22 @@ I think you can install it from a package, but maybe you will need to compile it ### If installing from package I think this should do it: - **sudo apt-get install libsdl-image1.2-dev** **OR** - **sudo apt-get install libsdl1.2-dev libsdl1.2debian** ### If compiling manually - Download **source code** from sdl website [here][sdl]. - Extract to folder of your liking - **cd** into it - sudo ./configure If you use Ubuntu x32 you can probably proceed at running **make** and **make install** at this point. If you use Ubuntu x64 you would probably need to fix **x11** video reference at this point. Somehow it does not work, so the steps are the following: - **cd** **/src/video/x11** - **nano +166 SDL_x11sym.h** (because it is around line 166) - add **#if 0** and **#endif** wrapper around this part: ``` #if 0 <- add this! @@ -70,7 +70,7 @@ This should do the trick. Let's continue. - Grab source file from [here][emsdk] - Extract to folder of your liking - **cd** into it ``` # Fetch the latest registry of available tools. @@ -90,20 +90,20 @@ Now it is time to see if you have any prerequisites missing, lol. If prerequisites are missing (like Java, or node), then the path will be missing essential binaries. Check if you have command **emconfigure**. If not, you need to manually add emscripten to the PATH Add this to **~/.bashrc** : - **nano ~/.bashrc** ``` export EMSCRIPTEN=/PATH/TO/emsdk/emscripten/master export EMSCRIPTEN_ROOT=$EMSCRIPTEN: export PATH=$PATH:$EMSCRIPTEN: ``` - **source ~/.bashrc** Check that **emcc** does not return any error. Ideally you should see the following: ``` INFO root: (Emscripten: Running sanity checks) @@ -118,50 +118,50 @@ WARNING root: no input files ## Install em-dosbox After you are sure that **emcc** shows no errors or warnings, let's clone [em-dosbox][dosbox]. You will need **automake** & **autoconf** packages installed - **sudo apt-get install autoconf** - **git clone https://github.com/dreamlayers/em-dosbox.git** - **cd** into em-dosbox - following commands are better run in **bash** as **root** - **sudo -s** - **./autogen.sh** - **emconfigure ./configure** - **make** If you are lucky, the horror of installation is almost over. In /src/ you should see **dosbox.html** and **dosbox.js** files Now you can try opening dosbox.html in your browser. Better start it as a server: "Remember that the same origin policy prevent access to data files in some browsers when using file:// URLs." - **cd** to **/src** folder - **python -m SimpleHTTPServer** - in browser go to **localhost:8000/dropbox.html** Firefox is probably going to lag a lot, but it's better than Chrome which doesn't even load for some reason :s. You can also follow the patches at em-dosbox project's [readme][dosbox]. ## Packaging games Next is to change the PYTHON to 'python' inside of **src/packager.py**. This file tries to use emscripten file_packager and uses the mysterious **PYTHON** variable. Since script is going to fail, it's time to open it up and change it - nano /src/packager.py - change PYTHON to 'python' Now we are ready to try running some games! - As a test I recommend to download "Blocks from Hell" from [here][blocks]. - place blocks into the **/src/** folder so it becomes **/src/blocks**. - **cd** to **/src** - Now switch to root in bash: **sudo -s** - Run **./packager.py blocks blocks.exe** - It should create **blocks.html** file - Go to **localhost:8000/blocks.html** If you are lucky, you will be able to play Blocks from Hell! w00t! -
gogromat created this gist
Dec 27, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,171 @@ # Install emscripten & clang ## Install preprequisites ``` #Update the package lists sudo apt-get update # Install *gcc* (and related dependencies) sudo apt-get install build-essential # Install cmake sudo apt-get install cmake # Install Python (by default is bundled with Ubuntu) sudo apt-get install python2.7 # Install node.js sudo apt-get install nodejs # Install Java sudo apt-get install default-jre # Install git (optional) sudo apt-get install git-core ``` ## Install sdl 1.2 library - Only install ~1.2+, NOT SDL 2+. Otherwise it won't work :s I think you can install it from a package, but maybe you will need to compile it. ### If installing from package I think this should do it: - *sudo apt-get install libsdl-image1.2-dev* *OR* - *sudo apt-get install libsdl1.2-dev libsdl1.2debian* ### If compiling manually - Download *source code* from sdl website [here][sdl]. - Extract to folder of your liking - *cd* into it - sudo ./configure If you use Ubuntu x32 you can probably proceed at running *make* and *make install* at this point. If you use Ubuntu x64 you would probably need to fix *x11* video reference at this point. Somehow it does not work, so the steps are the following: - *cd* /src/video/x11 - *nano +166 SDL_x11sym.h* (because it is around line 166) - add *#if 0* and *#endif* wrapper around this part: ``` #if 0 <- add this! #ifdef LONG64 SDL_X11_MODULE(IO_32BIT) SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) #endif #endif <- add this! ``` This should do the trick. Let's continue. - sudo make - sudo make install ## Install emsdk - Grab source file from [here][emsdk] - Extract to folder of your liking - *cd* into it ``` # Fetch the latest registry of available tools. ./emsdk update # Download and install the latest SDK tools. ./emsdk install latest # Set up the compiler configuration to point to the "latest" SDK. ./emsdk activate latest # Linux/Mac OS X only: Set the current Emscripten path source ./emsdk_env.sh ``` Now it is time to see if you have any prerequisites missing, lol. If prerequisites are missing (like Java, or node), then the path will be missing essential binaries. Check if you have command *emconfigure*. If not, you need to manually add emscripten to the PATH Add this to *~/.bashrc* : - *nano ~/.bashrc* ``` export EMSCRIPTEN=/PATH/TO/emsdk/emscripten/master export EMSCRIPTEN_ROOT=$EMSCRIPTEN: export PATH=$PATH:$EMSCRIPTEN: ``` - *source ~/.bashrc* Check that *emcc* does not return any error. Ideally you should see the following: ``` INFO root: (Emscripten: Running sanity checks) WARNING root: no input files ``` ## Point node to nodejs - Error ex. "Node is missing, blah blah blah". - Make sure you have node installed. Test it with "nodejs" - If it works, modify ~/.emscripten and Change NODE_... with "nodejs" ## Install em-dosbox After you are sure that *emcc* shows no errors or warnings, let's clone [em-dosbox][dosbox]. You will need *automake* & *autoconf* packages installed - *sudo apt-get install autoconf* - **git clone https://github.com/dreamlayers/em-dosbox.git** - *cd* into em-dosbox - following commands are better run in *bash* as *root* - *sudo -s* - *./autogen.sh* - *emconfigure ./configure* - *make* If you are lucky, the horror of installation is almost over. In /src/ you should see *dosbox.html* and *dosbox.js* files Now you can try opening dosbox.html in your browser. Better start it as a server: "Remember that the same origin policy prevent access to data files in some browsers when using file:// URLs." - *cd* to */src* folder - *python -m SimpleHTTPServer* - in browser go to *localhost:8000/dropbox.html* Firefox is probably going to lag a lot, but it's better than Chrome which doesn't even load for some reason :s. You can also follow the patches at em-dosbox project's [readme][dosbox]. ## Packaging games Next is to change the PYTHON to 'python' inside of *src/packager.py*. This file tries to use emscripten file_packager and uses the mysterious *PYTHON* variable. Since script is going to fail, it's time to open it up and change it - nano /src/packager.py - change PYTHON to 'python' Now we are ready to try running some games! - As a test I recommend to download "Blocks from Hell" from [here][blocks]. - place blocks into the */src/* folder so it becomes */src/blocks*. - *cd* to */src* - Now switch to root in bash: *sudo -s* - Run *./packager.py blocks blocks.exe* - It should create *blocks.html* file - Go to *localhost:8000/blocks.html* If you are lucky, you will be able to play Blocks from Hell! w00t! [emsdk]: http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#sdk-downloads [dosbox]: https://github.com/dreamlayers/em-dosbox.git [sdl]: https://www.libsdl.org/download-1.2.php [blocks]: http://www.dosgamesarchive.com/file/blocks-from-hell/blocks/