Skip to content

Commit

Permalink
build: Use new --goos flag for crc-embedder --download
Browse files Browse the repository at this point in the history
This allows to run parts of `make packagedir` and `make msidir` on
non-native platforms.
  • Loading branch information
cfergeau authored and praveenkumar committed Jan 9, 2023
1 parent fd90e69 commit 765ab68
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,18 @@ goversioncheck:

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

embed-download: $(HOST_BUILD_DIR)/crc-embedder
.PHONY: embed-download-windows embed-download-darwin
embed-download-windows embed-download-darwin: embed-download-%: $(HOST_BUILD_DIR)/crc-embedder
ifeq ($(CUSTOM_EMBED),false)
mkdir -p $(EMBED_DOWNLOAD_DIR)
$(HOST_BUILD_DIR)/crc-embedder download $(EMBED_DOWNLOAD_DIR)
$(HOST_BUILD_DIR)/crc-embedder download --goos=$* $(EMBED_DOWNLOAD_DIR)
endif

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

packagedir: clean embed-download macos-universal-binary
packagedir: clean embed-download-darwin macos-universal-binary
echo -n $(CRC_VERSION) > packaging/VERSION
sed -e 's/__VERSION__/'$(CRC_VERSION)'/g' -e 's@__INSTALL_PATH__@$(MACOS_INSTALL_PATH)@g' packaging/darwin/Distribution.in >packaging/darwin/Distribution
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
Expand Down Expand Up @@ -359,7 +360,7 @@ CRC_EXE=crc.exe
BUNDLE_NAME=crc_hyperv_$(OPENSHIFT_VERSION).$(BUNDLE_EXTENSION)

.PHONY: msidir
msidir: clean embed-download $(HOST_BUILD_DIR)/GenMsiWxs windows-release-binary $(PACKAGE_DIR)/product.wxs.template
msidir: clean embed-download-windows $(HOST_BUILD_DIR)/GenMsiWxs windows-release-binary $(PACKAGE_DIR)/product.wxs.template
mkdir -p $(PACKAGE_DIR)/msi
cp $(EMBED_DOWNLOAD_DIR)/* $(PACKAGE_DIR)/msi
cp $(HOST_BUILD_DIR)/crc.exe $(PACKAGE_DIR)/msi/$(CRC_EXE)
Expand Down

0 comments on commit 765ab68

Please sign in to comment.