Browse Source

Merge pull request #67340 from bruvzg/mac_export_min

Fix macOS export plugin build without regex module.
Rémi Verschelde 2 years ago
parent
commit
fd4572cc45

+ 0 - 6
platform/macos/export/lipo.cpp

@@ -28,12 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#include "modules/modules_enabled.gen.h" // For regex.
-
 #include "lipo.h"
 #include "lipo.h"
 
 
-#ifdef MODULE_REGEX_ENABLED
-
 bool LipO::is_lipo(const String &p_path) {
 bool LipO::is_lipo(const String &p_path) {
 	Ref<FileAccess> fb = FileAccess::open(p_path, FileAccess::READ);
 	Ref<FileAccess> fb = FileAccess::open(p_path, FileAccess::READ);
 	ERR_FAIL_COND_V_MSG(fb.is_null(), false, vformat("LipO: Can't open file: \"%s\".", p_path));
 	ERR_FAIL_COND_V_MSG(fb.is_null(), false, vformat("LipO: Can't open file: \"%s\".", p_path));
@@ -232,5 +228,3 @@ void LipO::close() {
 LipO::~LipO() {
 LipO::~LipO() {
 	close();
 	close();
 }
 }
-
-#endif // MODULE_REGEX_ENABLED

+ 0 - 5
platform/macos/export/lipo.h

@@ -35,12 +35,9 @@
 
 
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "modules/modules_enabled.gen.h" // For regex.
 
 
 #include "macho.h"
 #include "macho.h"
 
 
-#ifdef MODULE_REGEX_ENABLED
-
 class LipO : public RefCounted {
 class LipO : public RefCounted {
 	struct FatArch {
 	struct FatArch {
 		uint32_t cputype;
 		uint32_t cputype;
@@ -71,6 +68,4 @@ public:
 	~LipO();
 	~LipO();
 };
 };
 
 
-#endif // MODULE_REGEX_ENABLED
-
 #endif // MACOS_LIPO_H
 #endif // MACOS_LIPO_H

+ 0 - 6
platform/macos/export/macho.cpp

@@ -28,12 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#include "modules/modules_enabled.gen.h" // For regex.
-
 #include "macho.h"
 #include "macho.h"
 
 
-#ifdef MODULE_REGEX_ENABLED
-
 uint32_t MachO::seg_align(uint64_t p_vmaddr, uint32_t p_min, uint32_t p_max) {
 uint32_t MachO::seg_align(uint64_t p_vmaddr, uint32_t p_min, uint32_t p_max) {
 	uint32_t salign = p_max;
 	uint32_t salign = p_max;
 	if (p_vmaddr != 0) {
 	if (p_vmaddr != 0) {
@@ -544,5 +540,3 @@ bool MachO::set_signature_size(uint64_t p_size) {
 	}
 	}
 	return true;
 	return true;
 }
 }
-
-#endif // MODULE_REGEX_ENABLED

+ 0 - 5
platform/macos/export/macho.h

@@ -37,9 +37,6 @@
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "modules/modules_enabled.gen.h" // For regex.
-
-#ifdef MODULE_REGEX_ENABLED
 
 
 class MachO : public RefCounted {
 class MachO : public RefCounted {
 	struct MachHeader {
 	struct MachHeader {
@@ -210,6 +207,4 @@ public:
 	bool set_signature_size(uint64_t p_size);
 	bool set_signature_size(uint64_t p_size);
 };
 };
 
 
-#endif // MODULE_REGEX_ENABLED
-
 #endif // MACOS_MACHO_H
 #endif // MACOS_MACHO_H

+ 0 - 6
platform/macos/export/plist.cpp

@@ -28,12 +28,8 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#include "modules/modules_enabled.gen.h" // For regex.
-
 #include "plist.h"
 #include "plist.h"
 
 
-#ifdef MODULE_REGEX_ENABLED
-
 Ref<PListNode> PListNode::new_array() {
 Ref<PListNode> PListNode::new_array() {
 	Ref<PListNode> node = memnew(PListNode());
 	Ref<PListNode> node = memnew(PListNode());
 	ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
 	ERR_FAIL_COND_V(node.is_null(), Ref<PListNode>());
@@ -566,5 +562,3 @@ String PList::save_text() const {
 Ref<PListNode> PList::get_root() {
 Ref<PListNode> PList::get_root() {
 	return root;
 	return root;
 }
 }
-
-#endif // MODULE_REGEX_ENABLED

+ 0 - 5
platform/macos/export/plist.h

@@ -35,9 +35,6 @@
 
 
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
-#include "modules/modules_enabled.gen.h" // For regex.
-
-#ifdef MODULE_REGEX_ENABLED
 
 
 class PListNode;
 class PListNode;
 
 
@@ -111,6 +108,4 @@ public:
 	~PListNode() {}
 	~PListNode() {}
 };
 };
 
 
-#endif // MODULE_REGEX_ENABLED
-
 #endif // MACOS_PLIST_H
 #endif // MACOS_PLIST_H