Skip to content

Commit

Permalink
Merge pull request GyulyVGC#258 from 4r7if3x/hotfix/build-packaging
Browse files Browse the repository at this point in the history
Final changes
  • Loading branch information
GyulyVGC authored Jun 7, 2023
2 parents 929ea29 + 91a99e5 commit 78eefe2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" \
Expand Down
10 changes: 0 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion resources/packaging/linux/sniffnet.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions resources/packaging/macos/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 78eefe2

Please sign in to comment.