Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f80ccb
commit acb0d9a
Showing
6 changed files
with
131 additions
and
5 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>10.12</string> | ||
<key>LSArchitecturePriority</key> | ||
<array> | ||
<string>x86_64</string> | ||
</array> | ||
<key>CFBundleIconFile</key> | ||
<string>BTCPayServerVault.icns</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>{VersionPrefix}</string> | ||
<key>CFBundleVersion</key> | ||
<string>{VersionPrefix}</string> | ||
<key>CFBundleExecutable</key> | ||
<string>BTCPayServer.Vault</string> | ||
<key>CFBundleName</key> | ||
<string>{ApplicationName}</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>btcpayserver.vault</string> | ||
<key>NSHighResolutionCapable</key> | ||
<true/> | ||
<key>NSAppleScriptEnabled</key> | ||
<true/> | ||
<key>LSApplicationCategoryType</key> | ||
<string>public.app-category.finance</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
FROM mcr.microsoft.com/dotnet/core/sdk:3.0.101-buster AS builder | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends genisoimage git zlib1g-dev cmake make gcc g++ icnsutils imagemagick | ||
WORKDIR /source/Build | ||
RUN wget -qO hwi.tar.gz https://github.com/bitcoin-core/HWI/releases/download/1.0.3/hwi-1.0.3-mac-amd64.tar.gz && \ | ||
tar -zxvf hwi.tar.gz -C . hwi && \ | ||
echo "b0219f4f51d74e4525dd57a19f1aee9df409a879e041ea65f2d70cf90ac48a32 hwi" | sha256sum -c - && \ | ||
rm hwi.tar.gz | ||
|
||
WORKDIR /tmp | ||
ENV CC "gcc" | ||
ENV CXX "g++" | ||
RUN git clone https://github.com/theuni/libdmg-hfsplus && \ | ||
cd libdmg-hfsplus && \ | ||
git checkout libdmg-hfsplus-v0.1 && \ | ||
cmake . && \ | ||
make && \ | ||
cp dmg/dmg /bin && \ | ||
cd .. && rm -rf libdmg-hfsplus | ||
|
||
|
||
WORKDIR /source | ||
ENV RUNTIME "osx-x64" | ||
COPY BTCPayServerVault.ico BTCPayServerVault.ico | ||
COPY BTCPayServer.Hwi/BTCPayServer.Hwi.csproj BTCPayServer.Hwi/BTCPayServer.Hwi.csproj | ||
COPY BTCPayServer.Vault/BTCPayServer.Vault.csproj BTCPayServer.Vault/BTCPayServer.Vault.csproj | ||
ENV BUILD_ARGS "--runtime $RUNTIME -p:Configuration=Release -p:GithubDistrib=true" | ||
RUN dotnet restore $BUILD_ARGS BTCPayServer.Vault/BTCPayServer.Vault.csproj | ||
COPY BTCPayServer.Hwi BTCPayServer.Hwi | ||
COPY BTCPayServer.Vault BTCPayServer.Vault | ||
ENV FRAMEWORK "netcoreapp3.0" | ||
RUN dotnet publish --no-restore --framework $FRAMEWORK $BUILD_ARGS BTCPayServer.Vault/BTCPayServer.Vault.csproj | ||
|
||
COPY Build/extract-project-variables.sh Build/extract-project-variables.sh | ||
COPY Build/Info.plist.xml Build/Info.plist | ||
SHELL ["/bin/bash", "-c"] | ||
RUN source Build/extract-project-variables.sh "BTCPayServer.Vault/BTCPayServer.Vault.csproj" && \ | ||
sed -i "s/{VersionPrefix}/$VERSION/g" Build/Info.plist && \ | ||
sed -i "s/{ApplicationName}/$TITLE/g" Build/Info.plist | ||
|
||
COPY BTCPayServerVault.png /tmp/BTCPayServerVault.png | ||
WORKDIR /tmp | ||
RUN src=/tmp/BTCPayServerVault.png && \ | ||
dest=/tmp/BTCPayServerVault.iconset && mkdir $dest && \ | ||
convert -background none -resize '!16x16' "$src" "$dest/icon_16x16.png" && \ | ||
convert -background none -resize '!32x32' "$src" "$dest/icon_16x16@2x.png" && \ | ||
cp "$dest/icon_16x16@2x.png" "$dest/icon_32x32.png" && \ | ||
convert -background none -resize '!64x64' "$src" "$dest/icon_32x32@2x.png" && \ | ||
convert -background none -resize '!128x128' "$src" "$dest/icon_128x128.png" && \ | ||
convert -background none -resize '!256x256' "$src" "$dest/icon_128x128@2x.png" && \ | ||
cp "$dest/icon_128x128@2x.png" "$dest/icon_256x256.png" && \ | ||
convert -background none -resize '!512x512' "$src" "$dest/icon_256x256@2x.png" && \ | ||
cp "$dest/icon_256x256@2x.png" "$dest/icon_512x512.png" && \ | ||
convert -background none -resize '!1024x1024' "$src" "$dest/icon_512x512@2x.png" && \ | ||
# available on linux | ||
# png2icns is more finicky about its input than iconutil | ||
# 1. it doesn't support a 64x64 (aka 32x32@2x) | ||
# 2. it doesn't like duplicates (128x128@2x == 256x256) | ||
rm "$dest/icon_128x128@2x.png" && \ | ||
rm "$dest/icon_256x256@2x.png" && \ | ||
rm "$dest/icon_16x16@2x.png" && \ | ||
rm "$dest/icon_32x32@2x.png" && \ | ||
png2icns /source/Build/BTCPayServerVault.icns "$dest"/*png | ||
|
||
RUN source /source/Build/extract-project-variables.sh "/source/BTCPayServer.Vault/BTCPayServer.Vault.csproj" && \ | ||
macfolder=/tmp/Output/$TITLE.App && \ | ||
mkdir -p "$macfolder/Contents" && \ | ||
cp /source/Build/Info.plist "$macfolder/Contents/" && \ | ||
mv /source/BTCPayServer.Vault/bin/Release/$FRAMEWORK/$RUNTIME/publish "$macfolder/Contents/MacOS" && \ | ||
mv /source/Build/hwi "$macfolder/Contents/MacOS/" && \ | ||
mkdir -p "$macfolder/Resources" && \ | ||
cp /source/Build/BTCPayServerVault.icns "$macfolder/Resources/" && \ | ||
genisoimage -no-cache-inodes \ | ||
-D \ | ||
-l \ | ||
-probe \ | ||
-V "$TITLE" \ | ||
-no-pad \ | ||
-r \ | ||
-dir-mode 0755 \ | ||
-apple \ | ||
-o uncompressed.dmg \ | ||
"$macfolder/.." && \ | ||
mkdir -p /source/Build/Output && \ | ||
dmg dmg uncompressed.dmg /source/Build/Output/BTCPayServerVault-$VERSION-setup.dmg && rm uncompressed.dmg | ||
|
||
ENTRYPOINT [ "/bin/bash", "-c", "cp /source/Build/Output/* /opt/Output/" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
New-Item -Path "Output" -ItemType "Directory" -Force | ||
rm -Force -Recurse "Output\**" | ||
docker build -t temp -f build.win-x64.Dockerfile .. | ||
docker run --rm --name vaultbuild -d temp sleep 100 | ||
docker cp vaultbuild:/source/Build/Output/ . | ||
docker rm --force vaultbuild | ||
|
||
|
||
foreach ($arch in "win-x64","osx-x64") | ||
{ | ||
docker build -t "vault-$arch" -f "build.${arch}.Dockerfile" .. | ||
docker run --rm -v "$(pwd)/Output:/opt/Output" "vault-$arch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters