Merge remote-tracking branch 'origin/main'

This commit is contained in:
doregon committed 2021-08-04 14:01:30 -04:00
commit aaf3d7832b
9 files changed
+20 -38

No files matched your search

+11 -3
View File
@@ -10,6 +10,14 @@ DETECT := $(shell clang -v 2>&1 | grep Target | cut -b 9-60)
# version 1.3 on iPhone9,1 running 14.6
VERSION := $(shell cat DEBIAN/control | grep Version | cut -b 9-60)
COMMIT := $(shell git log --oneline | sed '2,10000000d' | cut -b 1-7)
ifndef RELEASE
RELEASE := 0
endif
ifeq ($(filter 1,$(RELEASE)),)
CMAKE_BUILD_TYPE := RelWithDebInfo
else
CMAKE_BUILD_TYPE := Debug
endif
# Distinguish iOS from macOS
ifneq ($(filter arm64-apple-ios%,$(DETECT)),)
@@ -97,7 +105,7 @@ native:
@echo 'Starting build task - native application'
@mkdir -p Natives/build
@cd Natives/build && cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) \
-DCMAKE_CROSSCOMPILING=true \
-DCMAKE_SYSTEM_NAME=Darwin \
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
@@ -105,8 +113,9 @@ native:
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_C_FLAGS="-arch arm64 -miphoneos-version-min=12.0" \
-DCONFIG_COMMIT="$(COMMIT)" \
-DCONFIG_RELEASE=$(RELEASE) \
..
@cd Natives/build && cmake --build . --config Release --target awt_headless awt_xawt pojavexec PojavLauncher
@cd Natives/build && cmake --build . --config $(CMAKE_BUILD_TYPE) --target awt_headless awt_xawt pojavexec PojavLauncher
@rm Natives/build/libawt_headless.dylib
@echo 'Finished build task - native application'
@@ -124,7 +133,6 @@ extras:
@if [ '$(IOS)' = '0' ]; then \
mkdir -p Natives/build/PojavLauncher.app/Base.lproj; \
xcrun actool Natives/Assets.xcassets --compile Natives/resources --platform iphoneos --minimum-deployment-target 12.0 --app-icon AppIcon --output-partial-info-plist /dev/null || exit 1; \
ibtool --compile Natives/build/PojavLauncher.app/Base.lproj/MinecraftSurface.storyboardc Natives/en.lproj/MinecraftSurface.storyboard || exit 1; \
ibtool --compile Natives/build/PojavLauncher.app/Base.lproj/LaunchScreen.storyboardc Natives/en.lproj/LaunchScreen.storyboard || exit 1; \
elif [ '$(IOS)' = '1' ]; then \
echo 'Due to the required tools not being available, you cannot compile the extras for PojavLauncher with an iOS device.'; \
+1 -1
View File
@@ -5,7 +5,7 @@
#import <sys/utsname.h>
#ifdef NDEBUG
#if CONFIG_RELEASE == 1
# define CONFIG_TYPE "release"
#else
# define CONFIG_TYPE "debug"
+1
View File
@@ -12,6 +12,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rpath @executable_path/Fr
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -rpath /usr/lib/jvm/java-8-openjdk/lib")
add_definitions(-DCONFIG_COMMIT="${CONFIG_COMMIT}")
add_definitions(-DCONFIG_RELEASE=${CONFIG_RELEASE})
# EXT: stub library, delete after compile awt_xawt
add_library(awt_headless SHARED
+6 -4
View File
@@ -77,6 +77,9 @@ int notchOffset;
savedWidth = roundf(width * screenScale);
savedHeight = roundf(height * screenScale);
MGLKView *surfaceView = [[MGLKView alloc] initWithFrame:self.view.frame];
self.view = surfaceView;
touchView = [[UIView alloc] initWithFrame:self.view.frame];
notchOffset = insets.left;
@@ -191,9 +194,8 @@ int notchOffset;
viewController = self;
MGLKView *view = glView = (MGLKView *) self.view;
view.drawableDepthFormat = MGLDrawableDepthFormat24;
view.enableSetNeedsDisplay = YES;
surfaceView.drawableDepthFormat = MGLDrawableDepthFormat24;
surfaceView.enableSetNeedsDisplay = YES;
// [self setPreferredFramesPerSecond:1000];
// Init GLES
@@ -207,7 +209,7 @@ int notchOffset;
NSLog(@"Failed to create ES context");
}
view.context = self.context;
surfaceView.context = self.context;
#ifndef USE_EGL
glContext = self.context;
#endif
@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="2">
<device id="retina6_1" orientation="landscape" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Surface View Controller-->
<scene sceneID="5">
<objects>
<viewController storyboardIdentifier="MinecraftSurfaceVC" id="2" customClass="SurfaceViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="pBr-B6-SMb"/>
<viewControllerLayoutGuide type="bottom" id="cBT-OE-m5j"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="3" customClass="MGLKView">
<rect key="frame" x="0.0" y="0.0" width="896" height="414"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="25" y="29"/>
</scene>
</scenes>
</document>
Binary file not shown.
+1 -2
View File
@@ -149,8 +149,7 @@ void UIKit_launchJarFile(const char* filepath) {
void UIKit_launchMinecraftSurfaceVC() {
dispatch_async(dispatch_get_main_queue(), ^{
UIViewController *rootController = UIApplication.sharedApplication.windows.lastObject.rootViewController;
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MinecraftSurface" bundle:nil];
SurfaceViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"MinecraftSurfaceVC"];
SurfaceViewController *vc = [[SurfaceViewController alloc] init];
vc.modalPresentationStyle = UIModalPresentationFullScreen;
[rootController presentViewController:vc animated:YES completion:nil];
// rootController.childForScreenEdgesDeferringSystemGestures = vc;