@@ -14,7 +14,7 @@ public struct GetTargetPlatformInformationResult
1414
1515 }
1616
17- public static GetTargetPlatformInformationResult Do ( string desiredPlatform )
17+ public static GetTargetPlatformInformationResult Do ( string desiredPlatform , string specifiedPlatfromFromCustom )
1818 {
1919 string netCorePublishRid = string . Empty ;
2020 string electronPackerPlatform = string . Empty ;
@@ -33,34 +33,27 @@ public static GetTargetPlatformInformationResult Do(string desiredPlatform)
3333 netCorePublishRid = "linux-x64" ;
3434 electronPackerPlatform = "linux" ;
3535 break ;
36+ case "custom" :
37+ var splittedSpecified = specifiedPlatfromFromCustom . Split ( ';' ) ;
38+ netCorePublishRid = splittedSpecified [ 0 ] ;
39+ electronPackerPlatform = splittedSpecified [ 1 ] ;
40+ break ;
3641 default :
37- if ( desiredPlatform . StartsWith ( "custom=" ) )
42+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
3843 {
39-
44+ netCorePublishRid = "win-x64" ;
45+ electronPackerPlatform = "win32" ;
4046 }
41- else
47+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
4248 {
43-
44- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
45- {
46- desiredPlatform = "win" ;
47- netCorePublishRid = "win-x64" ;
48- electronPackerPlatform = "win32" ;
49- }
50- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
51- {
52- desiredPlatform = "osx" ;
53- netCorePublishRid = "osx-x64" ;
54- electronPackerPlatform = "darwin" ;
55- }
56- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
57- {
58- desiredPlatform = "linux" ;
59- netCorePublishRid = "linux-x64" ;
60- electronPackerPlatform = "linux" ;
61- }
49+ netCorePublishRid = "osx-x64" ;
50+ electronPackerPlatform = "darwin" ;
51+ }
52+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
53+ {
54+ netCorePublishRid = "linux-x64" ;
55+ electronPackerPlatform = "linux" ;
6256 }
63-
6457
6558 break ;
6659 }
0 commit comments