Relocate the external folder outside of mobile package.

This commit is contained in:
MAJigsaw77
2025-08-03 12:48:54 +07:00
committed by MoonDroid
parent 4cbfaefc1a
commit a92567886c
21 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -978,7 +978,7 @@ class Project extends HXProject
function configureAndroid()
{
javaPaths.push(Path.join([SOURCE_DIR, 'funkin/mobile/external/android/java']));
javaPaths.push(Path.join([SOURCE_DIR, 'funkin/external/android/java']));
if (isRelease())
{
+2 -2
View File
@@ -114,7 +114,7 @@ class InitState extends FlxState
#if ios
// Setup Audio session
funkin.mobile.external.ios.AudioSession.initialize();
funkin.external.ios.AudioSession.initialize();
#end
// This ain't a pixel art game! (most of the time)
@@ -202,7 +202,7 @@ class InitState extends FlxState
//
#if android
FlxG.android.preventDefaultKeys = [flixel.input.android.FlxAndroidKey.BACK];
funkin.mobile.external.android.CallbackUtil.init();
funkin.external.android.CallbackUtil.init();
#end
//
@@ -1,4 +1,4 @@
package funkin.mobile.external.android;
package funkin.external.android;
import lime.system.JNI;
import flixel.util.FlxSignal;
@@ -51,7 +51,7 @@ class CallbackUtil
class CallbackHandler #if (lime >= "8.0.0") implements JNISafety #end
{
#if android
@:allow(funkin.mobile.external.android.CallbackUtil)
@:allow(funkin.external.android.CallbackUtil)
function new():Void {}
/**
@@ -1,4 +1,4 @@
package funkin.mobile.external.android;
package funkin.external.android;
/**
* A Utility class to manage the Application's Data folder on Android.
@@ -1,4 +1,4 @@
package funkin.mobile.external.android;
package funkin.external.android;
#if android
import lime.system.JNI;
@@ -1,4 +1,4 @@
package funkin.mobile.external.android;
package funkin.external.android;
import lime.math.Rectangle;
import lime.system.JNI;
@@ -1,9 +1,9 @@
package funkin.mobile.external.ios;
package funkin.external.ios;
/**
* A Utility class to manage iOS audio.
*/
@:build(funkin.mobile.macros.LinkerMacro.xml('project/Build.xml'))
@:build(funkin.util.macro.LinkerMacro.xml('project/Build.xml'))
@:include('AudioSession.hpp')
@:unreflective
extern class AudioSession
@@ -1,9 +1,9 @@
package funkin.mobile.external.ios;
package funkin.external.ios;
/**
* A Utility class to get iOS screen related informations.
*/
@:build(funkin.mobile.macros.LinkerMacro.xml('project/Build.xml'))
@:build(funkin.util.macro.LinkerMacro.xml('project/Build.xml'))
@:include('ScreenUtil.hpp')
@:unreflective
extern class ScreenUtil
+2 -2
View File
@@ -1,9 +1,9 @@
package funkin.mobile.util;
#if ios
import funkin.mobile.external.ios.ScreenUtil as NativeScreenUtil;
import funkin.external.ios.ScreenUtil as NativeScreenUtil;
#elseif android
import funkin.mobile.external.android.ScreenUtil as NativeScreenUtil;
import funkin.external.android.ScreenUtil as NativeScreenUtil;
#end
import lime.math.Rectangle;
import lime.system.System;
+1 -1
View File
@@ -198,7 +198,7 @@ class OptionsMenu extends Page<OptionsMenuPageName>
#end
#if android
createItem("OPEN DATA FOLDER", function() {
funkin.mobile.external.android.DataFolderUtil.openDataFolder();
funkin.external.android.DataFolderUtil.openDataFolder();
});
#end
#if FEATURE_NEWGROUNDS
@@ -1,4 +1,4 @@
package funkin.mobile.macros;
package funkin.util.macro;
import haxe.macro.Context;
import haxe.macro.Expr;
@@ -16,14 +16,14 @@ class LinkerMacro
{
/**
* Adds an XML `<include>` element to the class's metadata, pointing to a specified build file.
* @param file_name The name of the XML file to include. Defaults to `Build.xml` if not provided.
* @param fileName The name of the XML file to include. Defaults to `Build.xml` if not provided.
* @return An array of fields that are processed during the build.
*/
public static macro function xml(?file_name:String = 'Build.xml'):Array<Field>
public static macro function xml(?fileName:String = 'Build.xml'):Array<Field>
{
final pos:Position = Context.currentPos();
final sourcePath:String = FileSystem.absolutePath(Context.getPosInfos(pos).file.directory()).removeTrailingSlashes();
final fileToInclude:String = Path.join([sourcePath, file_name?.length > 0 ? file_name : 'Build.xml']);
final fileToInclude:String = Path.join([sourcePath, fileName?.length > 0 ? fileName : 'Build.xml']);
if (!FileSystem.exists(fileToInclude)) Context.error('The specified file "$fileToInclude" could not be found at "$sourcePath".', pos);
@@ -5,7 +5,7 @@ import flixel.FlxBasic;
import funkin.ui.MusicBeatState;
import funkin.ui.MusicBeatSubState;
#if android
import funkin.mobile.external.android.CallbackUtil;
import funkin.external.android.CallbackUtil;
#end
/**