Relocate the external folder outside of mobile package.
This commit is contained in:
+1
-1
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
//
|
||||
|
||||
+2
-2
@@ -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
-1
@@ -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.
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
package funkin.mobile.external.android;
|
||||
package funkin.external.android;
|
||||
|
||||
#if android
|
||||
import lime.system.JNI;
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
package funkin.mobile.external.android;
|
||||
package funkin.external.android;
|
||||
|
||||
import lime.math.Rectangle;
|
||||
import lime.system.JNI;
|
||||
Vendored
+2
-2
@@ -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
|
||||
+2
-2
@@ -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
|
||||
Vendored
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
+4
-4
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user