Skip to content

Commit 6345e73

Browse files
committed
Migrate to Xcode project & remove AltKit
1 parent 5bf8778 commit 6345e73

21 files changed

Lines changed: 3493 additions & 1170 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/build
12
/packages
23
/artifacts
34
/JavaApp/.gradle

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
path = Natives/external/fishhook
66
url = https://github.com/khanhduytran0/fishhook
77
branch = jev/main
8+
[submodule "Natives/external/UnzipKit"]
9+
path = Natives/external/UnzipKit
10+
url = https://github.com/abbeycode/UnzipKit
811
[submodule "Natives/external/AFNetworking"]
912
path = Natives/external/AFNetworking
1013
url = https://github.com/AFNetworking/AFNetworking

Amethyst.xcodeproj/project.pbxproj

Lines changed: 3473 additions & 53 deletions
Large diffs are not rendered by default.

Natives/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -rpath @loader_path
3838

3939
# EXT: stub library, delete after compile awt_xawt
4040
add_library(awt_headless SHARED
41-
awt_xawt/empty.m
41+
awt_xawt/empty.mx
4242
)
4343
target_link_libraries(awt_headless)
4444

Natives/Info.plist

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<key>CADisableMinimumFrameDurationOnPhone</key>
88
<true/>
99
<key>CFBundleDevelopmentRegion</key>
10-
<string>en</string>
10+
<string>$(DEVELOPMENT_LANGUAGE)</string>
1111
<key>CFBundleDisplayName</key>
1212
<string>Amethyst</string>
1313
<key>CFBundleExecutable</key>
14-
<string>AngelAuraAmethyst</string>
14+
<string>$(EXECUTABLE_NAME)</string>
1515
<key>CFBundleIcons</key>
1616
<dict>
1717
<key>CFBundleAlternateIcons</key>
@@ -74,17 +74,15 @@
7474
</dict>
7575
</dict>
7676
<key>CFBundleIdentifier</key>
77-
<string>org.angelauramc.amethyst</string>
77+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
7878
<key>CFBundleInfoDictionaryVersion</key>
7979
<string>6.0</string>
8080
<key>CFBundleName</key>
81-
<string>AngelAuraAmethyst</string>
81+
<string>$(PRODUCT_NAME)</string>
8282
<key>CFBundlePackageType</key>
83-
<string>APPL</string>
83+
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
8484
<key>CFBundleShortVersionString</key>
85-
<string>1.0</string>
86-
<key>CFBundleSignature</key>
87-
<string>????</string>
85+
<string>$(MARKETING_VERSION)</string>
8886
<key>CFBundleURLTypes</key>
8987
<array>
9088
<dict>
@@ -97,7 +95,7 @@
9795
</dict>
9896
</array>
9997
<key>CFBundleVersion</key>
100-
<string>1.0</string>
98+
<string>$(CURRENT_PROJECT_VERSION)</string>
10199
<key>GCSupportedGameControllers</key>
102100
<array>
103101
<dict>
@@ -117,8 +115,6 @@
117115
<string>santander</string>
118116
<string>shareddocuments</string>
119117
</array>
120-
<key>LSRequiresIPhoneOS</key>
121-
<true/>
122118
<key>LSSupportsOpeningDocumentsInPlace</key>
123119
<true/>
124120
<key>MinimumOSVersion</key>

Natives/LauncherMenuViewController.m

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#import "authenticator/BaseAuthenticator.h"
22
#import "AccountListViewController.h"
33
#import "AFNetworking.h"
4-
#import "ALTServerConnection.h"
54
#import "LauncherNavigationController.h"
65
#import "LauncherMenuViewController.h"
76
#import "LauncherNewsViewController.h"
@@ -140,7 +139,7 @@ - (void)viewDidLoad {
140139
[self displayProgress:localize(@"login.jit.enabled", nil)];
141140
[self displayProgress:nil];
142141
} else {
143-
[self enableJITWithAltKit];
142+
[self enableJITWithStikDebug];
144143
}
145144
} else if (!NSProcessInfo.processInfo.macCatalystApp && !getenv("SIMULATOR_DEVICE_NAME")) {
146145
[self displayProgress:localize(@"login.jit.fail", nil)];
@@ -344,28 +343,10 @@ - (void)displayProgress:(NSString *)status {
344343
}
345344
}
346345

347-
- (void)enableJITWithAltKit {
348-
[ALTServerManager.sharedManager startDiscovering];
349-
[ALTServerManager.sharedManager autoconnectWithCompletionHandler:^(ALTServerConnection *connection, NSError *error) {
350-
if (error) {
351-
NSLog(@"[AltKit] Could not auto-connect to server. %@", error.localizedRecoverySuggestion);
352-
[self displayProgress:localize(@"login.jit.fail", nil)];
353-
[self displayProgress:nil];
354-
}
355-
[connection enableUnsignedCodeExecutionWithCompletionHandler:^(BOOL success, NSError *error) {
356-
if (success) {
357-
NSLog(@"[AltKit] Successfully enabled JIT compilation!");
358-
[ALTServerManager.sharedManager stopDiscovering];
359-
[self displayProgress:localize(@"login.jit.enabled", nil)];
360-
[self displayProgress:nil];
361-
} else {
362-
NSLog(@"[AltKit] Error enabling JIT: %@", error.localizedRecoverySuggestion);
363-
[self displayProgress:localize(@"login.jit.fail", nil)];
364-
[self displayProgress:nil];
365-
}
366-
[connection disconnect];
367-
}];
368-
}];
346+
- (void)enableJITWithStikDebug {
347+
if(@available(iOS 17.4, *)) {
348+
// TODO
349+
}
369350
}
370351

371352
@end

Natives/LauncherNavigationController.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
22
#import "authenticator/BaseAuthenticator.h"
33
#import "AFNetworking.h"
4-
#import "ALTServerConnection.h"
54
#import "CustomControlsViewController.h"
65
#import "DownloadProgressViewController.h"
76
#import "JavaGUIViewController.h"
@@ -373,7 +372,6 @@ - (void)invokeAfterJITEnabled:(void(^)(void))handler {
373372
BOOL hasTrollStoreJIT = getEntitlementValue(@"com.apple.private.local.sandboxed-jit");
374373

375374
if (isJITEnabled(false)) {
376-
[ALTServerManager.sharedManager stopDiscovering];
377375
handler();
378376
return;
379377
} else if (hasTrollStoreJIT) {

Natives/external/AltKit/ALTServerConnection.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

Natives/external/UnzipKit

Submodule UnzipKit added at 6379f78

0 commit comments

Comments
 (0)