Skip to content

Commit

Permalink
fix win
Browse files Browse the repository at this point in the history
  • Loading branch information
0vercl0k committed Aug 16, 2022
1 parent d7477f4 commit dd79187
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions src/libs/bochscpu-bins/build-bochscpu.bat
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
REM # Axel '0vercl0k' Souchet - May 2 2020
REM This assume to be run from the libs directory.
REM OK here is a bunch of stuff to understand about the structure of the repositories.
REM - bochscpu is the repository that users are supposed to use. Because @ypr604 is such
REM a nice person it is designed to not have to build bochs. So what this repo expects is to
REM find a 'lib' directory with a bunch of .lib as well as a 'bochs' folder which contains bochs'
REM sources as well as the object files generated during compilation etc. So in that case, you
REM would download an archive that has those 'bochs' / 'lib' folder and build bochscpu-ffi (which
REM builds bochscpu for you).
REM - If you want to build it yourself though, there is bochscpu-build which clones the svn repo
REM and where you actually compile bochs. Once you are done with it you drop the .lib I mentioned
REM above in the bochscpu 'lib' folder, same with the 'bochs' tree.
REM
REM If you want to enable source debugging, you can set _CL_=/Z7, set _LINK_=/DEBUG:FULL.
REM set _CL_=/Z7
REM set _LINK_=/DEBUG:FULL

REM Use WSL to configure / clone the bochs repository.
bash -c "cd bochscpu-build && sh prep.sh && cd bochs && sh .conf.cpu-msvc"
pushd .

mkdir bxbuild-win
cd bxbuild-win

REM Use WSL to configure / clone the repositories.
bash -c "git clone https://github.com/yrp604/bochscpu-build.git && git clone https://github.com/yrp604/bochscpu && git clone https://github.com/yrp604/bochscpu-ffi && cd bochscpu-build && bash prep.sh && cd bochs && bash .conf.cpu-msvc"

REM Build bochs; libinstrument.a is expected to fail to build so don't freak out.
REM You can run nmake all-clean to clean up the build.
Expand Down Expand Up @@ -43,5 +38,5 @@ cargo clean
cargo build
cargo build --release

REM Get back to libs.
cd ..
REM Get back to where we were.
popd

0 comments on commit dd79187

Please sign in to comment.