Mastigophoran

Untitled

Sep 26th, 2021
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. # Here is a nightmare guide to compiling c-octo on ubuntu 16.04 wsl
  2.  
  3. # Because it involves building compilers in the mxe build stage
  4. # this will take some time. it takes me about 20-25 minutes but my CPU isn't very good
  5.  
  6. # Step 1, Make sure apt-get is up to date:
  7. sudo apt-get update
  8.  
  9. # Step 2, Get all mxe requirements per https://mxe.cc/#requirements-debian
  10. sudo apt-get install autoconf automake autopoint bash bison bzip2 flex g++ g++-multilib gettext git gperf intltool libc6-dev-i386 libgdk-pixbuf2.0-dev libltdl-dev libssl-dev libtool-bin libxml-parser-perl lzip make openssl p7zip-full patch perl python ruby sed unzip wget xz-utils
  11.  
  12. # Get mxe:
  13. git clone https://github.com/mxe/mxe.git
  14. # Get c-octo
  15. git clone https://github.com/JohnEarnest/c-octo.git
  16.  
  17. # Build mxe:
  18. cd mxe
  19. sudo make cc
  20. sudo make sdl2
  21. sudo make sdl2_mixer
  22.  
  23. # Build c-octo
  24.  
  25. cd ..
  26. cd c-octo
  27. mkdir build
  28.  
  29. # These massive piles of libs are by in large required by SDL and typically included via some SDL related param, but I'm not sure how to use these with mxe, so, I just wrote them all in.
  30.  
  31. ../mxe/usr/bin/i686-w64-mingw32.static-gcc src/octo_cli.c -o build/octo-cli.exe -Wall -Werror -Wextra -Wno-format-truncation -DVERSION="\"1.2\""
  32.  
  33. ../mxe/usr/bin/i686-w64-mingw32.static-gcc src/octo_run.c -o build/octo-run.exe -I../mxe/usr/i686-w64-mingw32.static/include/SDL2 -L../mxe/usr/i686-w64-mingw32.static/lib -lmingw32 -lSDL2main -lSDL2 -lSDL2_mixer -lgdi32 -lhid -l setupapi -lole32 -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -lsamplerate -Wall -Werror -Wextra -Wno-format-truncation -DVERSION="\"1.2\""
  34.  
  35. ../mxe/usr/bin/i686-w64-mingw32.static-gcc src/octo_de.c -o build/octo-de.exe -I../mxe/usr/i686-w64-mingw32.static/include/SDL2 -L../mxe/usr/i686-w64-mingw32.static/lib -lmingw32 -lSDL2main -lSDL2 -lSDL2_mixer -lgdi32 -lhid -l setupapi -lole32 -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -lsamplerate -Wall -Werror -Wextra -Wno-format-truncation -DVERSION="\"1.2\""
  36.  
  37. # You can then recover your files via: eg \\wsl$\Ubuntu-16.04\home as the file system is available via windows networking or whatever
Advertisement
Add Comment
Please, Sign In to add comment