@@ -63,7 +63,7 @@ class QtVersion
63
63
64
64
static List < QtVersion > FindQt ( )
65
65
{
66
- var home = Environment . GetFolderPath ( System . Environment . SpecialFolder . Personal ) ;
66
+ var home = Environment . GetFolderPath ( Environment . SpecialFolder . Personal ) ;
67
67
var qts = new List < QtVersion > ( ) ;
68
68
69
69
var qtPath = Path . Combine ( home , "Qt" ) ;
@@ -154,7 +154,7 @@ static bool QueryQt(QtVersion qt, bool debug)
154
154
const string includeDirsRegex = @"#include <\.\.\.> search starts here:(?<includes>.+)End of search list" ;
155
155
string allIncludes = Regex . Match ( output , includeDirsRegex , RegexOptions . Singleline ) . Groups [ "includes" ] . Value ;
156
156
var includeDirs = allIncludes . Split ( new [ ] { Environment . NewLine } , StringSplitOptions . RemoveEmptyEntries )
157
- . Select ( s => s . Trim ( ) ) ;
157
+ . Select ( s => s . Trim ( ) ) . ToList ( ) ;
158
158
159
159
const string frameworkDirectory = "(framework directory)" ;
160
160
@@ -187,7 +187,7 @@ static IEnumerable<string> ParseDependenciesFromLibtool(string libFile)
187
187
188
188
var matches = Regex . Matches ( libs . Groups [ 1 ] . Value , @"-framework\s+(\w+)" ) ;
189
189
var frameworks = matches . OfType < Match > ( ) . Select ( m => m . Groups [ 1 ] . Value )
190
- . Where ( s => s . StartsWith ( "Qt" ) ) ;
190
+ . Where ( s => s . StartsWith ( "Qt" , StringComparison . Ordinal ) ) ;
191
191
192
192
if ( Platform . IsMacOS )
193
193
frameworks = frameworks . Select ( framework => framework + ".framework" ) ;
@@ -315,7 +315,7 @@ public static int Main(string[] args)
315
315
if ( ! Platform . IsWindows )
316
316
lib = lib . Replace ( "Qt" , "Qt5" ) ;
317
317
318
- if ( ! modules . Any ( m => m = = Path . GetFileNameWithoutExtension ( lib ) ) )
318
+ if ( modules . All ( m => m ! = Path . GetFileNameWithoutExtension ( lib ) ) )
319
319
continue ;
320
320
321
321
if ( log )
@@ -328,8 +328,8 @@ public static int Main(string[] args)
328
328
libFile , qt . Target , qt . SystemIncludeDirs , qt . FrameworkDirs , qt . Docs ) ) ;
329
329
ConsoleDriver . Run ( qtSharp ) ;
330
330
331
- if ( File . Exists ( qtSharp . LibraryName ) && File . Exists ( Path . Combine ( "release" , qtSharp . InlinesLibraryName ) ) )
332
- wrappedModules . Add ( new KeyValuePair < string , string > ( qtSharp . LibraryName , qtSharp . InlinesLibraryName ) ) ;
331
+ if ( File . Exists ( qtSharp . LibraryName ) && File . Exists ( qtSharp . InlinesLibraryPath ) )
332
+ wrappedModules . Add ( new KeyValuePair < string , string > ( qtSharp . LibraryName , qtSharp . InlinesLibraryPath ) ) ;
333
333
334
334
if ( log )
335
335
logredirect . Stop ( ) ;
@@ -357,7 +357,7 @@ public static int Main(string[] args)
357
357
zipArchive . CreateEntryFromFile ( wrappedModule . Key , wrappedModule . Key ) ;
358
358
var documentation = Path . ChangeExtension ( wrappedModule . Key , "xml" ) ;
359
359
zipArchive . CreateEntryFromFile ( documentation , documentation ) ;
360
- zipArchive . CreateEntryFromFile ( Path . Combine ( "release" , wrappedModule . Value ) , wrappedModule . Value ) ;
360
+ zipArchive . CreateEntryFromFile ( wrappedModule . Value , Path . GetFileName ( wrappedModule . Value ) ) ;
361
361
}
362
362
zipArchive . CreateEntryFromFile ( "CppSharp.Runtime.dll" , "CppSharp.Runtime.dll" ) ;
363
363
}
0 commit comments