mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-07-22 04:14:33 +00:00
Fix several issues preventing builds on HTML5
This commit is contained in:
parent
03d46084b4
commit
adefa902e7
2
hmm.json
2
hmm.json
|
@ -143,7 +143,7 @@
|
|||
"name": "lime",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "1e79c20a6ee13fa168535f9f76a368e3284ddc3a",
|
||||
"ref": "be81ad7e4e1a92c3482bcc009648a4ac892cfa35",
|
||||
"url": "https://github.com/FunkinCrew/lime"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -53,7 +53,17 @@ class FileUtil
|
|||
* Paths which should not be deleted or modified by scripts.
|
||||
*/
|
||||
private static final PROTECTED_PATHS:Array<String> = [
|
||||
'', 'assets', 'manifest', 'manifest/*', 'plugins', 'plugins/*', 'Funkin.exe', 'Funkin', 'libvlc.dll', 'libvlccore.dll', 'lime.ndll'
|
||||
'',
|
||||
'assets',
|
||||
'manifest',
|
||||
'manifest/*',
|
||||
'plugins',
|
||||
'plugins/*',
|
||||
'Funkin.exe',
|
||||
'Funkin',
|
||||
'libvlc.dll',
|
||||
'libvlccore.dll',
|
||||
'lime.ndll'
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -269,7 +279,7 @@ class FileUtil
|
|||
|
||||
return true;
|
||||
#elseif html5
|
||||
var filter:String = defaultFileName != null ? Path.extension(defaultFileName) : null;
|
||||
var filter:Null<String> = defaultFileName != null ? Path.extension(defaultFileName) : null;
|
||||
var fileDialog:FileDialog = new FileDialog();
|
||||
if (onSave != null)
|
||||
{
|
||||
|
|
|
@ -69,6 +69,9 @@ class WindowUtil
|
|||
*/
|
||||
public static function openFolder(targetPath:String):Void
|
||||
{
|
||||
#if html5
|
||||
throw 'Cannot open URLs on this platform.';
|
||||
#else
|
||||
if (!sys.FileSystem.exists(targetPath) || !sys.FileSystem.isDirectory(targetPath)) throw 'openFolder should only be used to open existing folders.';
|
||||
#if FEATURE_OPEN_URL
|
||||
#if windows
|
||||
|
@ -81,6 +84,7 @@ class WindowUtil
|
|||
#else
|
||||
throw 'Cannot open URLs on this platform.';
|
||||
#end
|
||||
#end
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,6 +93,9 @@ class WindowUtil
|
|||
*/
|
||||
public static function openSelectFile(targetPath:String):Void
|
||||
{
|
||||
#if html5
|
||||
throw 'Cannot open URLs on this platform.';
|
||||
#else
|
||||
#if FEATURE_OPEN_URL
|
||||
#if windows
|
||||
Sys.command('explorer', ['/select,' + targetPath.replace('/', '\\')]);
|
||||
|
@ -101,6 +108,7 @@ class WindowUtil
|
|||
#else
|
||||
throw 'Cannot open URLs on this platform.';
|
||||
#end
|
||||
#end
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,6 @@ import haxe.macro.Expr.TypeDefKind;
|
|||
import haxe.macro.Expr.MetadataEntry;
|
||||
import haxe.macro.Type;
|
||||
import haxe.macro.Type.ClassType;
|
||||
import sys.FileSystem;
|
||||
|
||||
using Lambda;
|
||||
using haxe.macro.ExprTools;
|
||||
|
@ -362,7 +361,7 @@ class RegistryMacro
|
|||
static function listBaseGameEntryIds(dataFilePath:String):Array<Expr>
|
||||
{
|
||||
var result:Array<Expr> = [];
|
||||
var files:Array<String> = FileSystem.readDirectory(dataFilePath);
|
||||
var files:Array<String> = sys.FileSystem.readDirectory(dataFilePath);
|
||||
|
||||
for (file in files)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue