summaryrefslogtreecommitdiff
path: root/README.md
blob: a582bcbc61d12834ae1396a29d049709cdb26c8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Torch - [T]orch is [O]ur [R]esource [C]onversion [H]elper
A generic asset processor for games

## Usage
`./torch otr baserom.z64`
`./torch code baserom.z64`

# Windows

## Visual Studio

### Dependencies

  * Visual Studio 2022 Community Edition with the C++ feature set
  * One of the Windows SDKs that comes with Visual Studio, for example the current Windows 10 version 10.0.19041.0
  * The `MSVC v142 - VS 2019 C++ build tools` component of Visual Studio
  * Cmake (can be installed via chocolatey or manually)

### Compile

``` powershell
# Setup cmake project
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 17 2022" -T v142 -A x64 -DCMAKE_BUILD_TYPE=Debug
# or for VS2019
& 'C:\Program Files\CMake\bin\cmake' -S . -B "build/x64" -G "Visual Studio 16 2019" -T v142 -A x64 -DCMAKE_BUILD_TYPE=Debug
# Compile project
& 'C:\Program Files\CMake\bin\cmake.exe' --build .\build\x64
```

## WSL Ubuntu

### Dependencies

``` bash
sudo apt-get install cmake ninja-build libbz2-dev
```

### Compile

``` bash
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
cmake --build build-cmake -j
```

## MSYS2 MinGW-w64

### Dependencies

``` bash
pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-bzip2
```

### Compile

``` bash
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
cmake --build build-cmake -j
```

# Linux

### Dependencies

Requires `cmake, ninja-build, libbz2-dev`

### Compile

``` bash
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
cmake --build build-cmake -j
```

# Mac

### Dependencies

Requires Xcode (or xcode-tools) && `cmake, ninja` (can be installed via homebrew, macports, etc)

### Compile

``` bash
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
cmake --build build-cmake -j
```