Merge pull request #258 from 4r7if3x/hotfix/build-packaging

Final changes
This commit is contained in:
Giuliano Bellini 2023-06-07 22:38:15 +02:00 committed by GitHub
commit 78eefe2928
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 19 deletions

View file

@ -225,7 +225,7 @@ jobs:
- name: Install packaging tools
run: |
cargo install cargo-bundle toml-cli
cargo install toml-cli
brew install create-dmg
- uses: actions/download-artifact@v3
@ -238,20 +238,21 @@ jobs:
run: |
VERSION=$(toml get Cargo.toml package.version --raw)
sed -i'.bak' -e "s/0\.0\.0/${VERSION}/g" -e "s/fffffff/${GITHUB_SHA:0:7}/g" resources/packaging/macos/Info.plist
cargo bundle --release
targets=(
x86_64-apple-darwin
aarch64-apple-darwin
)
mkdir artifacts
for target in "${targets[@]}"; do
cp -R target/release/bundle target/${target}/release
cp -f target/${target}/release/sniffnet \
target/${target}/release/bundle/osx/Sniffnet.app/Contents/MacOS/sniffnet
cp resources/packaging/macos/wrapper.sh \
target/${target}/release/bundle/osx/Sniffnet.app/Contents/MacOS/wrapper.sh
mkdir -p target/${target}/release/bundle/osx/Sniffnet.app/Contents/{MacOS,Resources}
cp resources/packaging/macos/Info.plist \
target/${target}/release/bundle/osx/Sniffnet.app/Contents/Info.plist
target/${target}/release/bundle/osx/Sniffnet.app/Contents/
cp resources/packaging/macos/graphics/sniffnet.icns \
target/${target}/release/bundle/osx/Sniffnet.app/Contents/Resources/
cp target/${target}/release/sniffnet \
target/${target}/release/bundle/osx/Sniffnet.app/Contents/MacOS/
cp resources/packaging/macos/wrapper.sh \
target/${target}/release/bundle/osx/Sniffnet.app/Contents/MacOS/
create-dmg \
--volname "Sniffnet Installer" \
--background "resources/packaging/macos/graphics/dmg_bg.png" \

View file

@ -152,15 +152,5 @@ fontconfig = "*"
#───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[package.metadata.bundle]
name = "Sniffnet"
category = "Utilities"
identifier = "io.github.gyulyvgc.sniffnet"
icon = [
"resources/packaging/macos/graphics/sniffnet.icns"
]
#───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[package.metadata.wix]
include = [".\\resources\\packaging\\windows\\setup.wxs"]

View file

@ -3,7 +3,7 @@ Version=1.0
Type=Application
Name=Sniffnet
Comment=Application to comfortably monitor your network traffic
Categories=Network;
Categories=Network;Utility;
Icon=sniffnet
Exec=/usr/bin/sniffnet
StartupWMClass=sniffnet

View file

@ -13,6 +13,7 @@
<key>CFBundleShortVersionString</key><string>0.0.0</string>
<key>CFBundleVersion</key><string>fffffff</string>
<key>CSResourcesFileMapped</key><true/>
<key>LSApplicationCategoryType</key><string>public.app-category.utilities</string>
<key>LSRequiresCarbon</key><true/>
<key>NSHighResolutionCapable</key><true/>
</dict>