Skip to content

Commit

Permalink
Merge pull request #1631 from safing/fix/linux-tauri-build
Browse files Browse the repository at this point in the history
Fix Earthfile linux tauri build
  • Loading branch information
dhaavi authored Jul 23, 2024
2 parents 5ec32d1 + 735174d commit 4185504
Show file tree
Hide file tree
Showing 34 changed files with 190 additions and 151 deletions.
43 changes: 24 additions & 19 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ build:
# TODO:
# BUILD +tauri-build --target="x86_64-pc-windows-gnu"

# Bild Tauri release bundle for Windows:
# Bild Tauri bundle for Windows:
# ./dist/windows_amd64/portmaster-app_vX-X-X.zip
BUILD +tauri-windows-release-bundle
BUILD +tauri-build-windows-bundle

# Build UI assets:
# ./dist/all/assets.zip
Expand All @@ -82,7 +82,7 @@ angular-ci:

tauri-ci:
BUILD +tauri-build --target="x86_64-unknown-linux-gnu"
BUILD +tauri-windows-release-bundle
BUILD +tauri-build-windows-bundle

kext-ci:
BUILD +kext-build
Expand Down Expand Up @@ -183,19 +183,29 @@ go-build:
CACHE --sharing shared "$GOMODCACHE"

RUN mkdir /tmp/build
ENV CGO_ENABLED = "0"

# Fall back to build all binaries when none is specified.
IF [ "${CMDS}" = "" ]
LET CMDS=$(ls -1 "./cmds/")
END

# Build all go binaries from the specified in CMDS
FOR bin IN $CMDS
RUN --no-cache go build -ldflags="-X github.com/safing/portbase/info.version=${VERSION} -X github.com/safing/portbase/info.buildSource=${SOURCE} -X github.com/safing/portbase/info.buildTime=${BUILD_TIME}" -o "/tmp/build/" ./cmds/${bin}
# Add special build options.
IF [ "${GOOS}" = "windows" ] && [ "${bin}" = "portmaster-start" ]
# Windows, portmaster-start
ENV CGO_ENABLED = "1"
ENV EXTRA_LD_FLAGS = "-H windowsgui"
ELSE
# Defaults
ENV CGO_ENABLED = "0"
ENV EXTRA_LD_FLAGS = ""
END

RUN --no-cache go build -ldflags="-X github.com/safing/portbase/info.version=${VERSION} -X github.com/safing/portbase/info.buildSource=${SOURCE} -X github.com/safing/portbase/info.buildTime=${BUILD_TIME} ${EXTRA_LD_FLAGS}" -o "/tmp/build/" ./cmds/${bin}
END

DO +GO_ARCH_STRING --goos="${GOOS}" --goarch="${GOARCH}" --goarm="${GOARM}"

FOR bin IN $(ls -1 "/tmp/build/")
SAVE ARTIFACT --keep-ts "/tmp/build/${bin}" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/${bin}"
END
Expand Down Expand Up @@ -494,22 +504,17 @@ tauri-build:
# DO rust+CROSS --target="${target}"

RUN echo output: $(ls -R "target/${target}/release")
LET outbin="error"
FOR bin IN "portmaster Portmaster.exe WebView2Loader.dll"
# Modify output binary.
SET outbin="${bin}"
IF [ "${bin}" = "portmaster" ]
SET outbin="portmaster-app"
ELSE IF [ "${bin}" = "Portmaster.exe" ]
SET outbin="portmaster-app.exe"
END
# Save output binary as local artifact.
SAVE ARTIFACT --if-exists --keep-ts "target/${target}/release/${bin}" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/${outbin}"
END

# Binaries
SAVE ARTIFACT --if-exists --keep-ts "target/${target}/release/app" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/portmaster-app"
SAVE ARTIFACT --if-exists --keep-ts "target/${target}/release/app.exe" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/portmaster-app.exe"
SAVE ARTIFACT --if-exists --keep-ts "target/${target}/release/WebView2Loader.dll" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/WebView2Loader.dll"

# Installers
SAVE ARTIFACT --if-exists --keep-ts "target/${target}/release/bundle/deb/*.deb" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/"
SAVE ARTIFACT --if-exists --keep-ts "target/${target}/release/bundle/rpm/*.rpm" AS LOCAL "${outputDir}/${GO_ARCH_STRING}/"

tauri-windows-release-bundle:
tauri-build-windows-bundle:
FROM +tauri-src

ARG target="x86_64-pc-windows-gnu"
Expand Down
Binary file added assets/data/favicons/android-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/android-icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/android-icon-36x36.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/android-icon-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/android-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/android-icon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-114x114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon-precomposed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/apple-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/data/favicons/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig><msapplication><tile><square70x70logo src="/assets/favicons/ms-icon-70x70.png"/><square150x150logo src="/assets/favicons/ms-icon-150x150.png"/><square310x310logo src="/assets/favicons/ms-icon-310x310.png"/><TileColor>#121213</TileColor></tile></msapplication></browserconfig>
Binary file added assets/data/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions assets/data/favicons/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<link rel="apple-touch-icon" sizes="57x57" href="/assets/favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/assets/favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicons/favicon-16x16.png">
<link rel="manifest" href="/assets/favicons/manifest.json">
<meta name="msapplication-TileColor" content="#121213">
<meta name="msapplication-TileImage" content="/assets/favicons/ms-icon-144x144.png">
<meta name="theme-color" content="#121213">
41 changes: 41 additions & 0 deletions assets/data/favicons/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "App",
"icons": [
{
"src": "\/assets\/favicons\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/assets\/favicons\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/assets\/favicons\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/assets\/favicons\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/assets\/favicons\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/assets\/favicons\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}
Binary file added assets/data/favicons/ms-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/ms-icon-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/ms-icon-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/data/favicons/ms-icon-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 48 additions & 48 deletions assets/data/fonts/roboto-slimfix.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,110 +2,110 @@
font-family: 'Roboto';
font-weight: 400;
font-style: normal;
src: url('/assets/vendor/fonts/Roboto-300/Roboto-300.eot');
src: url('/assets/vendor/fonts/Roboto-300/Roboto-300.eot?#iefix') format('embedded-opentype'),
src: url('/assets/fonts/Roboto-300/Roboto-300.eot');
src: url('/assets/fonts/Roboto-300/Roboto-300.eot?#iefix') format('embedded-opentype'),
local('Roboto Light'),
local('Roboto-300'),
url('/assets/vendor/fonts/Roboto-300/Roboto-300.woff2') format('woff2'),
url('/assets/vendor/fonts/Roboto-300/Roboto-300.woff') format('woff'),
url('/assets/vendor/fonts/Roboto-300/Roboto-300.ttf') format('truetype'),
url('/assets/vendor/fonts/Roboto-300/Roboto-300.svg#Roboto') format('svg');
url('/assets/fonts/Roboto-300/Roboto-300.woff2') format('woff2'),
url('/assets/fonts/Roboto-300/Roboto-300.woff') format('woff'),
url('/assets/fonts/Roboto-300/Roboto-300.ttf') format('truetype'),
url('/assets/fonts/Roboto-300/Roboto-300.svg#Roboto') format('svg');
}

@font-face {
font-family: 'Roboto';
font-weight: 500;
font-style: normal;
src: url('/assets/vendor/fonts/Roboto-regular/Roboto-regular.eot');
src: url('/assets/vendor/fonts/Roboto-regular/Roboto-regular.eot?#iefix') format('embedded-opentype'),
src: url('/assets/fonts/Roboto-regular/Roboto-regular.eot');
src: url('/assets/fonts/Roboto-regular/Roboto-regular.eot?#iefix') format('embedded-opentype'),
local('Roboto'),
local('Roboto-regular'),
url('/assets/vendor/fonts/Roboto-regular/Roboto-regular.woff2') format('woff2'),
url('/assets/vendor/fonts/Roboto-regular/Roboto-regular.woff') format('woff'),
url('/assets/vendor/fonts/Roboto-regular/Roboto-regular.ttf') format('truetype'),
url('/assets/vendor/fonts/Roboto-regular/Roboto-regular.svg#Roboto') format('svg');
url('/assets/fonts/Roboto-regular/Roboto-regular.woff2') format('woff2'),
url('/assets/fonts/Roboto-regular/Roboto-regular.woff') format('woff'),
url('/assets/fonts/Roboto-regular/Roboto-regular.ttf') format('truetype'),
url('/assets/fonts/Roboto-regular/Roboto-regular.svg#Roboto') format('svg');
}

@font-face {
font-family: 'Roboto';
font-weight: 700;
font-style: normal;
src: url('/assets/vendor/fonts/Roboto-500/Roboto-500.eot');
src: url('/assets/vendor/fonts/Roboto-500/Roboto-500.eot?#iefix') format('embedded-opentype'),
src: url('/assets/fonts/Roboto-500/Roboto-500.eot');
src: url('/assets/fonts/Roboto-500/Roboto-500.eot?#iefix') format('embedded-opentype'),
local('Roboto Medium'),
local('Roboto-500'),
url('/assets/vendor/fonts/Roboto-500/Roboto-500.woff2') format('woff2'),
url('/assets/vendor/fonts/Roboto-500/Roboto-500.woff') format('woff'),
url('/assets/vendor/fonts/Roboto-500/Roboto-500.ttf') format('truetype'),
url('/assets/vendor/fonts/Roboto-500/Roboto-500.svg#Roboto') format('svg');
url('/assets/fonts/Roboto-500/Roboto-500.woff2') format('woff2'),
url('/assets/fonts/Roboto-500/Roboto-500.woff') format('woff'),
url('/assets/fonts/Roboto-500/Roboto-500.ttf') format('truetype'),
url('/assets/fonts/Roboto-500/Roboto-500.svg#Roboto') format('svg');
}

@font-face {
font-family: 'Roboto';
font-weight: 900;
font-style: normal;
src: url('/assets/vendor/fonts/Roboto-700/Roboto-700.eot');
src: url('/assets/vendor/fonts/Roboto-700/Roboto-700.eot?#iefix') format('embedded-opentype'),
src: url('/assets/fonts/Roboto-700/Roboto-700.eot');
src: url('/assets/fonts/Roboto-700/Roboto-700.eot?#iefix') format('embedded-opentype'),
local('Roboto Bold'),
local('Roboto-700'),
url('/assets/vendor/fonts/Roboto-700/Roboto-700.woff2') format('woff2'),
url('/assets/vendor/fonts/Roboto-700/Roboto-700.woff') format('woff'),
url('/assets/vendor/fonts/Roboto-700/Roboto-700.ttf') format('truetype'),
url('/assets/vendor/fonts/Roboto-700/Roboto-700.svg#Roboto') format('svg');
url('/assets/fonts/Roboto-700/Roboto-700.woff2') format('woff2'),
url('/assets/fonts/Roboto-700/Roboto-700.woff') format('woff'),
url('/assets/fonts/Roboto-700/Roboto-700.ttf') format('truetype'),
url('/assets/fonts/Roboto-700/Roboto-700.svg#Roboto') format('svg');
}

@font-face {
font-family: 'Roboto';
font-weight: 400;
font-style: italic;
src: url('/assets/vendor/fonts/Roboto-300italic/Roboto-300italic.eot');
src: url('/assets/vendor/fonts/Roboto-300italic/Roboto-300italic.eot?#iefix') format('embedded-opentype'),
src: url('/assets/fonts/Roboto-300italic/Roboto-300italic.eot');
src: url('/assets/fonts/Roboto-300italic/Roboto-300italic.eot?#iefix') format('embedded-opentype'),
local('Roboto Light Italic'),
local('Roboto-300italic'),
url('/assets/vendor/fonts/Roboto-300italic/Roboto-300italic.woff2') format('woff2'),
url('/assets/vendor/fonts/Roboto-300italic/Roboto-300italic.woff') format('woff'),
url('/assets/vendor/fonts/Roboto-300italic/Roboto-300italic.ttf') format('truetype'),
url('/assets/vendor/fonts/Roboto-300italic/Roboto-300italic.svg#Roboto') format('svg');
url('/assets/fonts/Roboto-300italic/Roboto-300italic.woff2') format('woff2'),
url('/assets/fonts/Roboto-300italic/Roboto-300italic.woff') format('woff'),
url('/assets/fonts/Roboto-300italic/Roboto-300italic.ttf') format('truetype'),
url('/assets/fonts/Roboto-300italic/Roboto-300italic.svg#Roboto') format('svg');
}

@font-face {
font-family: 'Roboto';
font-weight: 500;
font-style: italic;
src: url('/assets/vendor/fonts/Roboto-italic/Roboto-italic.eot');
src: url('/assets/vendor/fonts/Roboto-italic/Roboto-italic.eot?#iefix') format('embedded-opentype'),
src: url('/assets/fonts/Roboto-italic/Roboto-italic.eot');
src: url('/assets/fonts/Roboto-italic/Roboto-italic.eot?#iefix') format('embedded-opentype'),
local('Roboto Italic'),
local('Roboto-italic'),
url('/assets/vendor/fonts/Roboto-italic/Roboto-italic.woff2') format('woff2'),
url('/assets/vendor/fonts/Roboto-italic/Roboto-italic.woff') format('woff'),
url('/assets/vendor/fonts/Roboto-italic/Roboto-italic.ttf') format('truetype'),
url('/assets/vendor/fonts/Roboto-italic/Roboto-italic.svg#Roboto') format('svg');
url('/assets/fonts/Roboto-italic/Roboto-italic.woff2') format('woff2'),
url('/assets/fonts/Roboto-italic/Roboto-italic.woff') format('woff'),
url('/assets/fonts/Roboto-italic/Roboto-italic.ttf') format('truetype'),
url('/assets/fonts/Roboto-italic/Roboto-italic.svg#Roboto') format('svg');
}

@font-face {
font-family: 'Roboto';
font-weight: 700;
font-style: italic;
src: url('/assets/vendor/fonts/Roboto-500italic/Roboto-500italic.eot');
src: url('/assets/vendor/fonts/Roboto-500italic/Roboto-500italic.eot?#iefix') format('embedded-opentype'),
src: url('/assets/fonts/Roboto-500italic/Roboto-500italic.eot');
src: url('/assets/fonts/Roboto-500italic/Roboto-500italic.eot?#iefix') format('embedded-opentype'),
local('Roboto Medium Italic'),
local('Roboto-500italic'),
url('/assets/vendor/fonts/Roboto-500italic/Roboto-500italic.woff2') format('woff2'),
url('/assets/vendor/fonts/Roboto-500italic/Roboto-500italic.woff') format('woff'),
url('/assets/vendor/fonts/Roboto-500italic/Roboto-500italic.ttf') format('truetype'),
url('/assets/vendor/fonts/Roboto-500italic/Roboto-500italic.svg#Roboto') format('svg');
url('/assets/fonts/Roboto-500italic/Roboto-500italic.woff2') format('woff2'),
url('/assets/fonts/Roboto-500italic/Roboto-500italic.woff') format('woff'),
url('/assets/fonts/Roboto-500italic/Roboto-500italic.ttf') format('truetype'),
url('/assets/fonts/Roboto-500italic/Roboto-500italic.svg#Roboto') format('svg');
}

@font-face {
font-family: 'Roboto';
font-weight: 900;
font-style: italic;
src: url('/assets/vendor/fonts/Roboto-700italic/Roboto-700italic.eot');
src: url('/assets/vendor/fonts/Roboto-700italic/Roboto-700italic.eot?#iefix') format('embedded-opentype'),
src: url('/assets/fonts/Roboto-700italic/Roboto-700italic.eot');
src: url('/assets/fonts/Roboto-700italic/Roboto-700italic.eot?#iefix') format('embedded-opentype'),
local('Roboto Bold Italic'),
local('Roboto-700italic'),
url('/assets/vendor/fonts/Roboto-700italic/Roboto-700italic.woff2') format('woff2'),
url('/assets/vendor/fonts/Roboto-700italic/Roboto-700italic.woff') format('woff'),
url('/assets/vendor/fonts/Roboto-700italic/Roboto-700italic.ttf') format('truetype'),
url('/assets/vendor/fonts/Roboto-700italic/Roboto-700italic.svg#Roboto') format('svg');
url('/assets/fonts/Roboto-700italic/Roboto-700italic.woff2') format('woff2'),
url('/assets/fonts/Roboto-700italic/Roboto-700italic.woff') format('woff'),
url('/assets/fonts/Roboto-700italic/Roboto-700italic.ttf') format('truetype'),
url('/assets/fonts/Roboto-700italic/Roboto-700italic.svg#Roboto') format('svg');
}
Loading

0 comments on commit 4185504

Please sign in to comment.