File tree Expand file tree Collapse file tree
admin/osx/mac-crafter/Sources Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,21 +208,33 @@ struct Build: ParsableCommand {
208208 )
209209 }
210210
211- print ( " Crafting \( appName) Desktop Client... " )
212-
213- let allOptionsString = craftOptions. map ( { " --options \" \( $0) \" " } ) . joined ( separator: " " )
214-
215211 let clientBuildDir = " \( buildPath) / \( craftTarget) /build/ \( craftBlueprintName) "
212+ print ( " Crafting \( appName) Desktop Client... " )
216213 if fullRebuild {
217214 do {
218215 try fm. removeItem ( atPath: clientBuildDir)
219216 } catch let error {
220217 print ( " WARNING! Error removing build directory: \( error) " )
221218 }
219+ } else {
220+ // HACK: When building the client we often run into issues with the shell integration
221+ // component -- particularly the FileProviderExt part. So we wipe out the build
222+ // artifacts so this part gets build first. Let's first check if we have an existing
223+ // build in the folder we expect
224+ let shellIntegrationDir = " \( clientBuildDir) /work/build/shell_integration/MacOSX "
225+ if fm. fileExists ( atPath: shellIntegrationDir) {
226+ print ( " Removing existing shell integration build artifacts... " )
227+ do {
228+ try fm. removeItem ( atPath: shellIntegrationDir)
229+ } catch let error {
230+ print ( " WARNING! Error removing shell integration build directory: \( error) " )
231+ }
232+ }
222233 }
223234
224235 let buildMode = fullRebuild ? " -i " : disableAppBundle ? " compile " : " --compile --install "
225236 let offlineMode = offline ? " --offline " : " "
237+ let allOptionsString = craftOptions. map ( { " --options \" \( $0) \" " } ) . joined ( separator: " " )
226238 guard shell (
227239 " \( craftCommand) --buildtype \( buildType) \( buildMode) \( offlineMode) \( allOptionsString) \( craftBlueprintName) "
228240 ) == 0 else {
You can’t perform that action at this time.
0 commit comments