8000 GitHub - 0xStormbit/bwise
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

0xStormbit/bwise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

To build a .pkg installer (for macOS) for your C program (fetch_addr), we’ll follow this outline:


✅ Prerequisites (macOS):

  1. Xcode Command Line Tools (for gcc, pkgbuild, etc.)
xcode-select --install
  1. Homebrew dependencies:
brew install curl cjson

✅ Step 1: Save and Compile fetch_addr.c

Create fetch_addr.c from the code above, then compile:

gcc fetch_addr.c -o fetch_addr -lcurl -lcjson

You should now have a binary called fetch_addr.


✅ Step 2: Create the macOS .pkg Structure

Make a clean package layout:

mkdir -p pkg_root/usr/local/bin
cp fetch_addr pkg_root/usr/local/bin/

Set permissions:

chmod 755 pkg_root/usr/local/bin/fetch_addr

✅ Step 3: Build the .pkg

Use pkgbuild to make a simple installer:

pkgbuild \
  --identifier com.yourname.fetchaddr \
  --version 1.0.0 \
  --install-location /usr/local/bin \
  --root pkg_root \
  fetch_addr.pkg

This will generate fetch_addr.pkg in the current directory.


✅ Done!

Now you can run the .pkg installer on any macOS system. After install, fetch_addr will be available in terminal via:

fetch_addr

📦 Optional Enhancements

If you want:

  • A prettier GUI installer: Use productbuild + distribution.xml
  • To notarize and sign: You'll need an Apple Developer ID and codesigning tools

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0