forked from ideal-fire/Higurashi-Vita
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCOMPILING
83 lines (78 loc) · 3.48 KB
/
COMPILING
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
Compiling (3ds)
========
Impossible right now, the 3ds version is outdated.
Compiling (Vita)
========
You need the modified Lua, version 5.3.4.
Precompiled version is already at ./lib/libluaVita.a, you only need to recompile Lua yourself if the build I posted is incompatible in the future.
Modified file is in /_Notes/ModifiedLuaSourceFile/
You need libsamplerate for PS Vita.
This does not come with vdpm.
You can either download the libsamplerate source code and make a makefile yourself or you can use the ZIP file I posted here (https://github.com/MyLegGuy/Higurashi-Vita/issues/7).
libvita2dplusbloat
You can find this here: https://github.com/MyLegGuy/libvita2dplusbloat
This can be installed alongside regular libvita2d, so don't worry.
libgoodbrew
Can be found here: https://github.com/MyLegGuy/libgoodbrew
If you already installed this library you may need to update it if it was a long time ago.
Everything else can be obtained with vdpm.
https://github.com/vitasdk/vdpm
If a miracle happens and you actually get all the libraries that you need, it can be compiled by just calling `make -f makefile.vita` and then `make -f makefile.vita stuffvpk`. (p)7zip is required for the `stuffvpk` target.
Compiling (Android)
========
Compile this with the Android NDK as you would any other SDL application written in C. You'll need to shift files around, this isn't an Android-ready project. I just shove all the source code files into the SDL Android sample project and compile it that way.
Starting points for compiling SDL applications for Android:
https://wiki.libsdl.org/Android
https://lazyfoo.net/tutorials/SDL/52_hello_mobile/index.php
Compiling (GNU/Linux)
========
first, using your package manager, install the development versions of these programs: SDL2, SDL2_image SDL2_ttf, SDL2_mixer
(for ubuntu: libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev)
also, install rsync. you probably already have it though.
next, run these commands one by one and do not proceed if one fails:
# get source code
git clone "https://github.com/mylegguy/libgoodbrew"
git clone "https://github.com/MyLegGuy/Higurashi-Vita"
wget "https://www.lua.org/ftp/lua-5.3.5.tar.gz"
# compile modified version of lua
tar -xf lua-5.3.5.tar.gz
cd lua-5.3.5
cp ../Higurashi-Vita/_Notes/ModifiedLuaSourceFile/llex.c ./src/llex.c
make generic
cp ./src/liblua.a ../Higurashi-Vita/lib/libluaLinux.a
mkdir ./../Higurashi-Vita/Include
mkdir ./../Higurashi-Vita/Include/Lua
cd src
cp *.h *.hpp ../../Higurashi-Vita/Include/Lua/
cd ../..
# compile libgoodbrew (ps vita & pc graphics wrapper) and SDLFontCache
cd libgoodbrew
cd SDL
./buildlinux
sudo cp libSDLFontCacheLinux.a /usr/local/lib/libSDLFontCache.a
sudo cp SDL_FontCache.h /usr/local/include/
cd ..
make
sudo make install
cd ..
# compile Higurashi-vita now that we have the dependencies
cd Higurashi-Vita
mkdir build
make -f makefile.general
# copy all assets
rsync -a ./VpkContents-Shared/Shared/* ./VpkContents-Shared/Vita/* ./VpkContents-Primary/Shared/* ./VpkContents-Primary/Vita/* ./build/
after this, the final executable is in Higurashi-Vita/build/a.exe
it's called "a.exe", regardless of the platform. rename it to "a.out" if that pleases you.
if running it from the terminal, you must use 'cd' to move to the 'build' folder first. otherwise you'll get a red F.
the "Games" and "Saves" folders are placed next to the executable.
arrow keys -> dpad
x -> cross
z -> circle
a -> square
s -> triangle
escape or enter -> start
e -> select
b -> android back button
l -> l
r -> r
mouse -> touch screen