mirror of
https://github.com/hacks-guide/Guide_Switch-OLD.git
synced 2024-11-23 09:39:45 +00:00
131 lines
4.0 KiB
Plaintext
131 lines
4.0 KiB
Plaintext
---
|
|
title: "Development (libtransistor)"
|
|
---
|
|
|
|
{% include toc title="Table of Contents" %}
|
|
|
|
### Required Reading
|
|
|
|
Note that, while the Homebrew Launcher alone is sufficient for running compiled homebrew, you may want a local PegaSwitch environment for more rapid development.
|
|
|
|
For information on setting up a local PegaSwitch environment, check out the [PegaSwitch](pegaswitch) page.
|
|
{: .notice--primary}
|
|
|
|
### What You Need
|
|
|
|
* A supported operating system
|
|
+ MacOS and most linux distributions are supported; commands for Arch Linux, Ubuntu, and Debian will be supplied
|
|
+ Windows is *only* supported using a [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) distribution
|
|
* Basic development tools
|
|
+ Linux / WSL: install the relevant development package for your distribution (such as `base-devel` on Arch, or `build-essential` on Ubuntu / Debian)
|
|
+ MacOS: install the Xcode Command Line Tools and the [Homebrew](https://brew.sh/) package manager
|
|
|
|
### Instructions
|
|
|
|
#### Section I - Installing Dependencies
|
|
|
|
The libtransistor library relies on several dependencies, including LLVM / Clang, Python 3, and cmake.
|
|
|
|
To install them, run the commands corresponding to your operating system.
|
|
|
|
+ MacOS:
|
|
|
|
~~~ bash
|
|
# install dependencies
|
|
brew install python3 cmake llvm
|
|
|
|
# manually add llvm to $PATH
|
|
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile
|
|
~~~
|
|
|
|
+ Arch Linux:
|
|
|
|
~~~ bash
|
|
# install dependencies
|
|
sudo pacman -Syu python python-pip cmake clang llvm lld nmap squashfs-tools
|
|
~~~
|
|
|
|
+ Ubuntu / Debian:
|
|
|
|
Before running these commands, add the [LLVM repository](https://apt.llvm.org/) corresponding to your operating system to `/etc/apt/sources.list`.
|
|
|
|
~~~ bash
|
|
# add the LLVM signature key
|
|
# fingerprint: 6084 F3CF 814B 57C1 CF12 EFD5 15CF 4D18 AF4F 7421
|
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
|
|
|
|
# install dependencies
|
|
sudo apt-get update
|
|
sudo apt-get install build-essential automake autoconf python3-setuptools squashfs-tools python3 python3-dev python3-pip cmake clang-5.0 lld-5.0 nmap
|
|
~~~
|
|
|
|
#### Section II - Building libtransistor
|
|
|
|
+ MacOS:
|
|
|
|
~~~ bash
|
|
# clone the repository
|
|
git clone --recursive https://github.com/reswitched/libtransistor
|
|
cd libtransistor
|
|
|
|
# install python dependencies
|
|
pip3 install -r requirements.txt --user
|
|
|
|
# set libtransistor environment variable to current directory
|
|
echo "export LIBTRANSISTOR_HOME=$(pwd)" >> ~/.bashrc
|
|
|
|
# build libtransistor
|
|
make
|
|
~~~
|
|
|
|
+ Arch Linux:
|
|
|
|
~~~ bash
|
|
# clone the repository
|
|
git clone --recursive https://github.com/reswitched/libtransistor
|
|
cd libtransistor
|
|
|
|
# install python dependencies
|
|
pip install -r requirements.txt --user
|
|
|
|
# set libtransistor environment variable to current directory
|
|
echo "export LIBTRANSISTOR_HOME=$(pwd)" >> ~/.bashrc
|
|
|
|
# build libtransistor
|
|
make
|
|
~~~
|
|
|
|
+ Ubuntu / Debian:
|
|
|
|
~~~ bash
|
|
# clone the repository
|
|
git clone --recursive https://github.com/reswitched/libtransistor
|
|
cd libtransistor
|
|
|
|
# install python dependencies
|
|
pip3 install -r requirements.txt --user
|
|
|
|
# set libtransistor environment variable to current directory
|
|
echo "export LIBTRANSISTOR_HOME=$(pwd)" >> ~/.bashrc
|
|
|
|
# build libtransistor
|
|
make LLVM_POSTFIX=-5.0
|
|
~~~
|
|
|
|
#### Section III - ACE Loader
|
|
|
|
For information on using ACE Loader, see the [repository](https://github.com/reswitched/libtransistor/tree/development/projects/ace_loader) on GitHub.
|
|
{: .notice--info}
|
|
|
|
#### Section IV - Mephisto
|
|
|
|
For information on using Mephisto, see the [repository](https://github.com/reswitched/Mephisto) on GitHub.
|
|
{: .notice--info}
|
|
|
|
___
|
|
|
|
You now have a fully functional libtransistor development environment.
|
|
{: .notice--success}
|
|
|
|
If you are interested in collaborating with ReSwitched members on Homebrew Development, check out [ReSwitched on Discord](https://discord.gg/ZdqEhed).
|
|
{: .notice--success} |