PojavLauncher_iOS icon indicating copy to clipboard operation
PojavLauncher_iOS copied to clipboard

Build documentation?

Open sl4shed opened this issue 1 year ago • 7 comments

Ask the question here.

Where is the build documentation? If (for example) I wanted to work on the project how would i build it? (Side-thought maybe its just as simple as opening it in XCode and hitting build, but even if that is the case you should add that to the docs OR inform me about that and I'll make a pull request)

sl4shed avatar Jul 04 '24 21:07 sl4shed

Update: I opened it in XCode and it's looking for /opt/homebrew/bin/gmake???

sl4shed avatar Jul 05 '24 18:07 sl4shed

We don’t have Xcode project at the moment as I spend most of the time compiling on my jailbroken phone. Another reason is we have to include a piece of Java code in the build process, which Xcode doesn’t support. We also don’t use Swift(UI) at the moment, but this will hopefully change later. Please refer to the workflow file for the complete build process. TL;DR: all you need to do is run:

gmake -j$(sysctl -n hw.ncpu) dsym package

khanhduytran0 avatar Jul 06 '24 12:07 khanhduytran0

Hi @khanhduytran0! I followed the workflow file successfully until it actually came to building PojavLauncher, when it told me i need to install JDK 8. No problem, so I went on oracle's website, and downloaded the macos X version from the jdk 8 archives. Problem is, it still can't locate JDK 8 since it really wants it to be in: /usr/lib/jvm/java-8-openjdk/bin

What JDK should i install?? I have no idea

sl4shed avatar Jul 07 '24 20:07 sl4shed

You could set BOOTJDK to point to your desired location. Also, if you’re building on arm64 Mac, you need to use Azul build.

khanhduytran0 avatar Jul 07 '24 22:07 khanhduytran0

Thank you! That got me a bit farther but I'm still getting some errors; mainly from the C compiler: image

fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Makefile:55: Building on macOS.
Makefile:79: Set PLATFORM to 2, which is equal to iOS.
Makefile:208: Unable to determine number of threads, defaulting to 2.
[PojavLauncher v3.0] native - start
[PojavLauncher v3.0] java - start
[PojavLauncher v3.0] assets - start
-- Configuring done (0.0s)
CMake Error at CMakeLists.txt:73 (add_library):
  Cannot find source file:

    external/AFNetworking/AFNetworking/AFSecurityPolicy.m

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
  .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
  .f95 .f03 .hip .ispc


CMake Error at CMakeLists.txt:95 (add_executable):
  Cannot find source file:

    external/fishhook/fishhook.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
  .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
  .f95 .f03 .hip .ispc


CMake Error at CMakeLists.txt:73 (add_library):
  No SOURCES given to target: AFNetworking


CMake Error at CMakeLists.txt:95 (add_executable):
  No SOURCES given to target: PojavLauncher


CMake Generate step failed.  Build files cannot be regenerated correctly.
gmake: *** [Makefile:251: native] Error 1
gmake: *** Waiting for unfinished jobs....
Note: src/main/java/net/kdt/pojavlaunch/PojavClassLoader.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[PojavLauncher v3.0] java - end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.actool.compilation-results</key>
	<dict>
		<key>output-files</key>
		<array>
			<string>/Users/andrew/Desktop/PojavLauncher_iOS-2.2/Natives/resources/[email protected]</string>
			<string>/Users/andrew/Desktop/PojavLauncher_iOS-2.2/Natives/resources/AppIcon-Dark76x76@2x~ipad.png</string>
			<string>/Users/andrew/Desktop/PojavLauncher_iOS-2.2/Natives/resources/[email protected]</string>
			<string>/Users/andrew/Desktop/PojavLauncher_iOS-2.2/Natives/resources/AppIcon-Development76x76@2x~ipad.png</string>
			<string>/Users/andrew/Desktop/PojavLauncher_iOS-2.2/Natives/resources/[email protected]</string>
			<string>/Users/andrew/Desktop/PojavLauncher_iOS-2.2/Natives/resources/AppIcon-Light76x76@2x~ipad.png</string>
			<string>/Users/andrew/Desktop/PojavLauncher_iOS-2.2/Natives/resources/Assets.car</string>
			<string>/dev/null</string>
		</array>
	</dict>
</dict>
</plist>
[PojavLauncher v3.0] assets - end```

sl4shed avatar Jul 08 '24 10:07 sl4shed

@khanhduytran0 What should I do?

sl4shed avatar Jul 08 '24 19:07 sl4shed

It looks like you haven't cloned subprojects yet. Run

git submodule update --init --recursive

khanhduytran0 avatar Jul 08 '24 22:07 khanhduytran0