diff --git a/RetroFE/Source/CMakeLists.txt b/RetroFE/Source/CMakeLists.txt index ed1f8e0..7d459b3 100644 --- a/RetroFE/Source/CMakeLists.txt +++ b/RetroFE/Source/CMakeLists.txt @@ -23,8 +23,11 @@ if(WIN32) set(GSTREAMER_ROOT "C:/gstreamer/1.0/x86" CACHE STRING "location of where your gstreamer include and lib folders reside") set(GLIB2_ROOT "${GSTREAMER_ROOT}") + +if(MSVC) set(DIRENT_INCLUDE_DIR "${RETROFE_THIRD_PARTY_DIR}/dirent-1.20.1/include") endif() +endif() if(WIN32) find_package(Glib2 REQUIRED) diff --git a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp index c552f0e..f0f8aef 100644 --- a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp +++ b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp @@ -68,7 +68,7 @@ bool CollectionInfoBuilder::CreateCollectionDirectory(std::string name) { std::cout << "Creating folder \"" << *it << "\"" << std::endl; -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__GNUC__) if(!CreateDirectory(it->c_str(), NULL)) { if(ERROR_ALREADY_EXISTS != GetLastError()) @@ -78,7 +78,11 @@ bool CollectionInfoBuilder::CreateCollectionDirectory(std::string name) } } #else +#if defined(__MINGW32__) + if(mkdir(it->c_str()) == -1) +#else if(mkdir(it->c_str(), 0744) == -1) +#endif { std::cout << "Could not create folder \"" << *it << "\":" << strerror(errno) << std::endl; } diff --git a/Scripts/Package.py b/Scripts/Package.py index 83df9cb..89ab9f2 100644 --- a/Scripts/Package.py +++ b/Scripts/Package.py @@ -32,9 +32,10 @@ def mkdir_p(path): ##################################################################### parser = argparse.ArgumentParser(description='Bundle up some RetroFE common files.') parser.add_argument('--os', choices=['windows','linux'], required=True, help='Operating System (windows or linux)') -parser.add_argument('--gstreamer_path', help='path to gstreamer sdk (i.e. D:/gstreamer') -parser.add_argument('--build', default='full', help='define what contents to package (full, core, engine, layout,none') -parser.add_argument('--clean', action='store_true', help='clean the output directory') +parser.add_argument('--gstreamer_path', help='Path to gstreamer sdk (i.e. D:/gstreamer') +parser.add_argument('--build', default='full', help='Define what contents to package (full, core, engine, layout,none') +parser.add_argument('--clean', action='store_true', help='Clean the output directory') +parser.add_argument('--compiler', help='Compiler to use (vs, mingw, gcc') args = parser.parse_args() @@ -121,7 +122,11 @@ elif args.build == 'layout': if args.os == 'windows': if args.build == 'full' or args.build == 'core' or args.build == 'engine': # copy retrofe.exe to core folder - src_exe = os.path.join(base_path, 'RetroFE', 'Build', 'Release', 'retrofe.exe') + if(hasattr(args, 'compiler') and args.compiler == 'mingw'): + src_exe = os.path.join(base_path, 'RetroFE', 'Build', 'Release', 'retrofe.exe') + else: + src_exe = os.path.join(base_path, 'RetroFE', 'Build', 'retrofe.exe') + core_path = os.path.join(output_path, 'core') # create the core folder