Updated support for mingw.

This commit is contained in:
emb 2015-03-07 09:19:24 -06:00
parent f7a87f5efd
commit a025494647
3 changed files with 17 additions and 5 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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