[MM-48380] ARM64 build for Windows/Linux (#2406)
* Test ARM build for Windows/Linux * Fix the windows build
This commit is contained in:
parent
b4e21b5c5e
commit
3c0d309697
|
@ -185,6 +185,11 @@ jobs:
|
|||
- run: mkdir -p ./build
|
||||
- attach_workspace:
|
||||
at: ./build
|
||||
- run: |
|
||||
$InstallPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
|
||||
$WorkLoads = '--add Microsoft.VisualStudio.Component.VC.ATL.ARM64'
|
||||
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, '--quiet', '--norestart', '--nocache')
|
||||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden -WorkingDirectory "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
|
||||
- run:
|
||||
name: Install yq
|
||||
command: choco install yq --version 4.15.1 -y
|
||||
|
@ -236,6 +241,11 @@ jobs:
|
|||
- run: mkdir -p ./build/
|
||||
- attach_workspace:
|
||||
at: ./build
|
||||
- run: |
|
||||
$InstallPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
|
||||
$WorkLoads = '--add Microsoft.VisualStudio.Component.VC.ATL.ARM64'
|
||||
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, '--quiet', '--norestart', '--nocache')
|
||||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden -WorkingDirectory "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
|
||||
- run:
|
||||
name: Install yq
|
||||
command: choco install yq --version 4.15.1 -y
|
||||
|
@ -263,6 +273,11 @@ jobs:
|
|||
- run: mkdir -p ./build
|
||||
- attach_workspace:
|
||||
at: ./build
|
||||
- run: |
|
||||
$InstallPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
|
||||
$WorkLoads = '--add Microsoft.VisualStudio.Component.VC.ATL.ARM64'
|
||||
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, '--quiet', '--norestart', '--nocache')
|
||||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden -WorkingDirectory "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
|
||||
- run:
|
||||
name: Install yq
|
||||
command: choco install yq --version 4.15.1 -y
|
||||
|
|
12
package.json
12
package.json
|
@ -48,17 +48,17 @@
|
|||
"test:unit-ci": "jest --runInBand",
|
||||
"test:coverage": "jest --coverage",
|
||||
"package:all": "cross-env NODE_ENV=production npm-run-all check-build-config package:windows package:windows-nsis package:mac package:mac-universal package:linux",
|
||||
"package:windows": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --win zip --x64 --ia32 --publish=never",
|
||||
"package:windows-nsis": "cross-env NODE_ENV=production CAN_UPGRADE=true npm-run-all check-build-config build && electron-builder --win zip nsis --x64 --ia32 --publish=never",
|
||||
"package:windows": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --win zip --x64 --ia32 --arm64 --publish=never",
|
||||
"package:windows-nsis": "cross-env NODE_ENV=production CAN_UPGRADE=true npm-run-all check-build-config build && electron-builder --win zip nsis --x64 --ia32 --arm64 --publish=never",
|
||||
"package:mac": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --mac --x64 --arm64 --publish=never",
|
||||
"package:mac-with-universal": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --mac --x64 --arm64 --universal --publish=never",
|
||||
"package:mas": "cross-env NODE_ENV=production IS_MAC_APP_STORE=true npm-run-all check-build-config build && electron-builder --mac mas --universal --publish=never",
|
||||
"package:mas-dev": "cross-env NODE_ENV=production IS_MAC_APP_STORE=true npm-run-all check-build-config build && electron-builder --mac mas-dev --universal --publish=never",
|
||||
"package:linux": "npm-run-all package:linux-*",
|
||||
"package:linux-appImage": "cross-env NODE_ENV=production CAN_UPGRADE=true npm-run-all check-build-config build && electron-builder --linux tar.gz appimage --x64 --publish=never",
|
||||
"package:linux-deb": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz deb --x64 --publish=never",
|
||||
"package:linux-rpm": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz rpm --x64 --publish=never",
|
||||
"package:linux-targz": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz --x64 --publish=never",
|
||||
"package:linux-appImage": "cross-env NODE_ENV=production CAN_UPGRADE=true npm-run-all check-build-config build && electron-builder --linux tar.gz appimage --x64 --arm64 --publish=never",
|
||||
"package:linux-deb": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz deb --x64 --arm64 --publish=never",
|
||||
"package:linux-rpm": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz rpm --x64 --arm64 --publish=never",
|
||||
"package:linux-targz": "cross-env NODE_ENV=production npm-run-all check-build-config build && electron-builder --linux tar.gz --x64 --arm64 --publish=never",
|
||||
"lint:js": "eslint --ignore-path .gitignore --ignore-pattern node_modules --ext .js --ext .jsx --ext .ts --ext .tsx .",
|
||||
"lint:js-quiet": "eslint --ignore-path .gitignore --ignore-pattern node_modules --ext .js --ext .jsx --ext .ts --ext .tsx . --quiet",
|
||||
"fix:js": "eslint --ignore-path .gitignore --ignore-pattern node_modules --quiet --ext .js --ext .jsx --ext .ts --ext .tsx . --fix",
|
||||
|
|
|
@ -20,20 +20,25 @@ if [[ -f "${SRC}/mattermost-desktop-${VERSION}-win-x64.zip" ]]; then
|
|||
cp "${SRC}/mattermost-desktop-${VERSION}-win-x64.zip" "${DEST}/mattermost-desktop-${VERSION}-win64.zip"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 1))
|
||||
fi
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-win-arm64.zip" ]]; then
|
||||
echo -e "Copying Win64\n"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-win-arm64.zip" "${DEST}/mattermost-desktop-${VERSION}-arm64.zip"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 2))
|
||||
fi
|
||||
if [[ ${MM_WIN_INSTALLERS-0} -eq 1 && -f "${SRC}/mattermost-desktop-setup-${VERSION}-win.exe" ]]; then
|
||||
echo -e "Copying win-no-arch\n"
|
||||
cp "${SRC}/mattermost-desktop-setup-${VERSION}-win.exe" "${DEST}/"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 2))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 3))
|
||||
fi
|
||||
if [[ ${MM_WIN_INSTALLERS-0} -eq 1 && -f "${SRC}/mattermost-desktop-${VERSION}-x64.msi" ]]; then
|
||||
echo -e "Copying win-msi-x64\n"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-x64.msi" "${DEST}/"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 3))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 4))
|
||||
fi
|
||||
if [[ ${MM_WIN_INSTALLERS-0} -eq 1 && -f "${SRC}/mattermost-desktop-${VERSION}-x86.msi" ]]; then
|
||||
echo -e "Copying win-msi-x86\n"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-x86.msi" "${DEST}/"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 4))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 5))
|
||||
fi
|
||||
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac.zip" ]]; then
|
||||
|
@ -42,7 +47,7 @@ if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac.zip" ]]; then
|
|||
if [[ -f "${SRC}"/mattermost-desktop-${VERSION}-mac.dmg ]]; then
|
||||
cp "${SRC}"/*.blockmap "${DEST}/"
|
||||
fi
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 5))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 6))
|
||||
fi
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac-x64.zip" ]]; then
|
||||
echo -e "Copying mac-x64\n"
|
||||
|
@ -51,7 +56,7 @@ if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac-x64.zip" ]]; then
|
|||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-x64.dmg.blockmap" "${DEST}/mattermost-desktop-${VERSION}-mac-x64.dmg.blockmap"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-x64.dmg" "${DEST}/mattermost-desktop-${VERSION}-mac-x64.dmg"
|
||||
fi
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 6))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 7))
|
||||
fi
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac-arm64.zip" ]]; then
|
||||
echo -e "Copying mac-arm64\n"
|
||||
|
@ -60,7 +65,7 @@ if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac-arm64.zip" ]]; then
|
|||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-arm64.dmg.blockmap" "${DEST}/mattermost-desktop-${VERSION}-mac-arm64.dmg.blockmap"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-arm64.dmg" "${DEST}/mattermost-desktop-${VERSION}-mac-arm64.dmg"
|
||||
fi
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 7))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 8))
|
||||
fi
|
||||
if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac-universal.zip" ]]; then
|
||||
echo -e "Copying mac-universal\n"
|
||||
|
@ -69,14 +74,23 @@ if [[ -f "${SRC}/mattermost-desktop-${VERSION}-mac-universal.zip" ]]; then
|
|||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-universal.dmg.blockmap" "${DEST}/mattermost-desktop-${VERSION}-mac-universal.dmg.blockmap"
|
||||
cp "${SRC}/mattermost-desktop-${VERSION}-mac-universal.dmg" "${DEST}/mattermost-desktop-${VERSION}-mac-universal.dmg"
|
||||
fi
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 8))
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 9))
|
||||
fi
|
||||
|
||||
if [[ -f "${SRC}"/mattermost-desktop-${VERSION}-linux-x64.tar.gz ]]; then
|
||||
echo -e "Copying linux\n"
|
||||
cp "${SRC}"/mattermost-desktop-*-linux-* "${DEST}/"
|
||||
cp "${SRC}"/mattermost-desktop_"${VERSION}"-1_*.deb "${DEST}/"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 9))
|
||||
cp "${SRC}"/mattermost-desktop-*-linux-x64* "${DEST}/"
|
||||
cp "${SRC}"/mattermost-desktop-*-linux-x86_64* "${DEST}/"
|
||||
cp "${SRC}"/mattermost-desktop_"${VERSION}"-1_amd64*.deb "${DEST}/"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 10))
|
||||
fi
|
||||
|
||||
if [[ -f "${SRC}"/mattermost-desktop-${VERSION}-linux-arm64.tar.gz ]]; then
|
||||
echo -e "Copying linux\n"
|
||||
cp "${SRC}"/mattermost-desktop-*-linux-arm64* "${DEST}/"
|
||||
cp "${SRC}"/mattermost-desktop-*-linux-aarch64* "${DEST}/"
|
||||
cp "${SRC}"/mattermost-desktop_"${VERSION}"-1_arm64*.deb "${DEST}/"
|
||||
SOMETHING_COPIED=$((SOMETHING_COPIED + 11))
|
||||
fi
|
||||
|
||||
if [[ $SOMETHING_COPIED -eq 0 ]]; then
|
||||
|
|
|
@ -31,6 +31,7 @@ $(print_link "${BASE_URL}/mattermost-desktop-setup-${VERSION}-win.exe")
|
|||
#### Windows - zip files
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-win32.zip")
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-win64.zip")
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-arm64.zip") (beta)
|
||||
|
||||
#### Mac
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-mac-universal.dmg")
|
||||
|
@ -38,18 +39,18 @@ $(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-mac-x64.dmg")
|
|||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-mac-m1.dmg")
|
||||
|
||||
#### Linux
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-ia32.tar.gz")
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-arm64.tar.gz") (beta)
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-x64.tar.gz")
|
||||
|
||||
#### Linux (Unofficial) - deb files
|
||||
$(print_link "${BASE_URL}/mattermost-desktop_${VERSION}-1_i386.deb")
|
||||
$(print_link "${BASE_URL}/mattermost-desktop_${VERSION}-1_arm64.deb") (beta)
|
||||
$(print_link "${BASE_URL}/mattermost-desktop_${VERSION}-1_amd64.deb")
|
||||
|
||||
#### Linux (Unofficial) - rpm files (beta)
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-i686.rpm")
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-aarch64.rpm") (beta)
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-x86_64.rpm")
|
||||
|
||||
#### Linux (Unofficial) - AppImage files
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-i386.AppImage")
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-arm64.AppImage") (beta)
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-linux-x86_64.AppImage")
|
||||
MD
|
||||
|
|
Loading…
Reference in a new issue