Skip to content

Commit 765ab68

Browse files
cfergeaupraveenkumar
authored andcommitted
build: Use new --goos flag for crc-embedder --download
This allows to run parts of `make packagedir` and `make msidir` on non-native platforms.
1 parent fd90e69 commit 765ab68

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,17 +301,18 @@ goversioncheck:
301301

302302
TRAY_RELEASE ?= packaging/tmp/crc-tray-macos.tar.gz
303303

304-
embed-download: $(HOST_BUILD_DIR)/crc-embedder
304+
.PHONY: embed-download-windows embed-download-darwin
305+
embed-download-windows embed-download-darwin: embed-download-%: $(HOST_BUILD_DIR)/crc-embedder
305306
ifeq ($(CUSTOM_EMBED),false)
306307
mkdir -p $(EMBED_DOWNLOAD_DIR)
307-
$(HOST_BUILD_DIR)/crc-embedder download $(EMBED_DOWNLOAD_DIR)
308+
$(HOST_BUILD_DIR)/crc-embedder download --goos=$* $(EMBED_DOWNLOAD_DIR)
308309
endif
309310

310311
macos-universal-binary: macos-release-binary $(TOOLS_BINDIR)/makefat
311312
mkdir -p out/macos-universal
312313
cd $(BUILD_DIR) && "$(TOOLS_BINDIR)"/makefat macos-universal/crc macos-amd64/crc macos-arm64/crc
313314

314-
packagedir: clean embed-download macos-universal-binary
315+
packagedir: clean embed-download-darwin macos-universal-binary
315316
echo -n $(CRC_VERSION) > packaging/VERSION
316317
sed -e 's/__VERSION__/'$(CRC_VERSION)'/g' -e 's@__INSTALL_PATH__@$(MACOS_INSTALL_PATH)@g' packaging/darwin/Distribution.in >packaging/darwin/Distribution
317318
sed -e 's/__VERSION__/'$(CRC_VERSION)'/g' -e 's@__INSTALL_PATH__@$(MACOS_INSTALL_PATH)@g' packaging/darwin/welcome.html.in >packaging/darwin/Resources/welcome.html
@@ -359,7 +360,7 @@ CRC_EXE=crc.exe
359360
BUNDLE_NAME=crc_hyperv_$(OPENSHIFT_VERSION).$(BUNDLE_EXTENSION)
360361

361362
.PHONY: msidir
362-
msidir: clean embed-download $(HOST_BUILD_DIR)/GenMsiWxs windows-release-binary $(PACKAGE_DIR)/product.wxs.template
363+
msidir: clean embed-download-windows $(HOST_BUILD_DIR)/GenMsiWxs windows-release-binary $(PACKAGE_DIR)/product.wxs.template
363364
mkdir -p $(PACKAGE_DIR)/msi
364365
cp $(EMBED_DOWNLOAD_DIR)/* $(PACKAGE_DIR)/msi
365366
cp $(HOST_BUILD_DIR)/crc.exe $(PACKAGE_DIR)/msi/$(CRC_EXE)

0 commit comments

Comments
 (0)