Skip to content

Building from source

Marvin1099 edited this page Dec 8, 2023 · 31 revisions

I you want to build from source, you can do so on Windows and Linux.
Here is a detailed step by step guide.
Grab Python
Download the repository
Fix a later Issue
Download Dependency's
Sound Effects
Update Submodules
Run Pyinstaller
Add BEE Items
Linux Puzzlemaker Fix
Run BEE 2

1. Grab Python

  • On Linux
    • Download python from your your package manager (also grab python-pip and git)
    • If you want to you can try and grab the required packages from your package manager
    • Not all of them will exist in your package manager
    • So grab the rest or just all of the required packages over a python venv
      • For this you will need to run something like this
      • python -m venv %YOUR-PREFERRED-PATH-FOR-VENV% (You will need to change this to any path you like to use)
      • At this point you will need to source the venv, so on a bash terminal you will need to run
      • source %YOUR-PREFERRED-PATH-FOR-VENV%/bin/activate
  • On Windows

2. Download the repository

  • For that go copy the main github repo link (so https://github.com/BEEmod/BEE2.4)
  • Then clone the repo (you can also download the zip on the main github repo)
    • Run git clone --recurse-submodules https://github.com/BEEmod/BEE2.4.git for the main repo
    • Alternatively you can run git clone -b dev --recurse-submodules https://github.com/BEEmod/BEE2.4.git to get the dev branch

3. Fix a problem for later

  • Here you will need to rename or delete the geocable.py that is not working right now (and is not required anyway)
    • So on Linux run mv BEE2.4/hammeraddons/transforms/geocable.py BEE2.4/hammeraddons/transforms/geocable.py.disabeled
    • On Windows run ren BEE2.4\hammeraddons\transforms\geocable.py BEE2.4\hammeraddons\transforms\geocable.py.disabeled

4. Download Dependency's

  • For that fist go into the cloned BEE2.4 directory
    • So type cd Bee2.4
  • So now install the requirements from the requirements.txt file
    • So run pip install -r requirements.txt
    • You also need to run pip install -r dev-requirements.txt if you grabbed the dev branch

5. Enable sound effects

  • For that you will need a copy of FFmpeg
  • You will need to put these in the lib-32 and/or lib-64/ folders (if you are in the BEE2.4 Folder).
  • Then copy the contents of the bin folder into the appropriate lib-XX folder mentioned.

6. Update the submodules

  • Here just run git submodule update --init

7. Run the pyinstaller

  • To do this run cd src from the BEE2.4 directory (your terminal should still be in there)
  • Compile the app
    • Here run pyinstaller --distpath ../dist/64bit/ --workpath ../build_tmp compiler.spec
    • Also run pyinstaller --distpath ../dist/64bit/ --workpath ../build_tmp BEE2.spec

8. Add Items to BEE

  • Change directory to ../dist/64bit/BEE2/packages/
    • So on Linux run cd ../dist/64bit/BEE2/
    • On Windows you will need cd ..\dist\64bit\BEE2\
    • Keep in mind if you build for 32 bit you will need to use the 32bit folder
  • Create the packages folder
    • So run mkdir packages
  • Here you will need to grab the items from the newest release
  • Then copy over the files inside the zip into the package directory

9. Fix puzzlemaker on Linux

  • On Linux the puzzlemaker seems to be broken
  • One way that was found to fix it is here portal2/issues/403
  • Essentially what you will need to do is download a old version and copy over the working library file
  • Fist make sure steam is not running
  • Then run steam -console or steam-native -console
  • After steam has started click on console
  • Then in there run download_depot 620 661 2854055004190207766
  • Then go to the folder ~/.local/share/Steam/ubuntu12_32/steamapps/content/app_620/depot_661/bin/linux32
  • There copy the filesystem_stdio.so to ~/.local/share/Steam/steamapps/common/Portal 2/bin/linux32
    • You can also use this command for that cp "~/.local/share/Steam/ubuntu12_32/steamapps/content/app_620/depot_661/bin/linux32/filesystem_stdio.so" " ~/.local/share/Steam/steamapps/common/Portal 2/bin/linux32/filesystem_stdio.so"

10. Run Bee2

  • Finally go back to the BEE2.4/dist/64bit/BEE2/ folder and run the BEE2 file
  • At this point you can do any use BEE2 as you expect it to like setting presets and exporting to portal 2
Clone this wiki locally