Skip to content

Commit e8fb987

Browse files
committed
Initial commit: ModSync with Mac compatibility and CI/CD
0 parents  commit e8fb987

17 files changed

Lines changed: 5869 additions & 0 deletions

.github/CI_CD_GUIDE.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# CI/CD Build Instructions
2+
3+
ModSync now uses GitHub Actions to automatically build for both Windows and macOS.
4+
5+
## How It Works
6+
7+
Every time you push code to the `main` or `master` branch, GitHub Actions will:
8+
1. Build the Windows portable executable (`.exe`)
9+
2. Build the macOS disk image (`.dmg`)
10+
3. Upload both as downloadable artifacts
11+
12+
## Downloading Builds
13+
14+
### From GitHub Actions
15+
1. Go to your repository on GitHub
16+
2. Click the **Actions** tab
17+
3. Click on the most recent workflow run
18+
4. Scroll down to **Artifacts**
19+
5. Download:
20+
- `ModSync-Windows` for the Windows build
21+
- `ModSync-macOS` for the macOS build
22+
23+
### Manual Trigger
24+
You can also manually trigger a build:
25+
1. Go to **Actions** tab
26+
2. Click **Build ModSync** workflow
27+
3. Click **Run workflow** button
28+
4. Select branch and click **Run workflow**
29+
30+
## Build Triggers
31+
32+
Builds run automatically on:
33+
- Push to `main` or `master` branch
34+
- Pull requests to `main` or `master` branch
35+
- Manual workflow dispatch
36+
37+
## Artifacts Retention
38+
39+
Build artifacts are kept for **30 days** before being automatically deleted.
40+
41+
## First-Time Setup
42+
43+
After pushing this workflow to GitHub:
44+
1. Ensure Actions are enabled in your repository settings
45+
2. The first build will run automatically
46+
3. Check the Actions tab to monitor progress
47+
48+
## Troubleshooting
49+
50+
If builds fail:
51+
- Check the Actions tab for error logs
52+
- Ensure `package.json` dependencies are correct
53+
- Verify `build/entitlements.mac.plist` exists for macOS builds

.github/workflows/build.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build ModSync
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-windows:
12+
runs-on: windows-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build Windows app
28+
run: npm run build:win
29+
30+
- name: Upload Windows artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: ModSync-Windows
34+
path: dist/*.exe
35+
retention-days: 30
36+
37+
build-macos:
38+
runs-on: macos-latest
39+
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: '20'
48+
cache: 'npm'
49+
50+
- name: Install dependencies
51+
run: npm ci
52+
53+
- name: Build macOS app
54+
run: npm run build:mac
55+
56+
- name: Upload macOS artifact
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: ModSync-macOS
60+
path: dist/*.dmg
61+
retention-days: 30

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
7+
# OS files
8+
.DS_Store
9+
Thumbs.db
10+
11+
# IDE
12+
.vscode/
13+
.idea/
14+
15+
# Logs
16+
*.log
17+
npm-debug.log*
18+
19+
# Environment
20+
.env
21+
.env.local

README.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# ModSync
2+
3+
**Minecraft Modpack Auto-Updater** for private servers - Keep your mods in sync effortlessly!
4+
5+
[![Build Status](https://github.com/DizzyMii/modsync/workflows/Build%20ModSync/badge.svg)](https://github.com/DizzyMii/modsync/actions)
6+
7+
## Features
8+
9+
- **One-Click Updates** - Download and install modpacks instantly
10+
- **Auto-Detection** - Automatically finds your Minecraft mods folder
11+
- **Multiple Sources** - Support for Google Drive links or local zip files
12+
- **Cross-Platform** - Works on Windows, macOS, and Linux
13+
- **Safe** - Validates files and prevents data loss
14+
- **Fast** - Efficient extraction with progress tracking
15+
16+
## Download
17+
18+
Get the latest version from the [Releases](https://github.com/DizzyMii/modsync/releases) page:
19+
20+
- **Windows**: `ModSync.exe` (portable, no installation required)
21+
- **macOS**: `ModSync.dmg` (drag to Applications)
22+
23+
Or download from [GitHub Actions](https://github.com/DizzyMii/modsync/actions) artifacts.
24+
25+
## Usage
26+
27+
### Google Drive Method
28+
1. Launch ModSync
29+
2. Paste your Google Drive share link
30+
3. Click "Update from Google Drive"
31+
4. Wait for download and installation to complete
32+
33+
### Local File Method
34+
1. Download your modpack zip file
35+
2. Launch ModSync
36+
3. Switch to "Local File" tab
37+
4. Drag and drop your zip file or click to browse
38+
5. Click "Update from Local File"
39+
40+
## Supported Paths
41+
42+
- **Windows**: `%APPDATA%\.minecraft\mods`
43+
- **macOS**: `~/Library/Application Support/minecraft/mods`
44+
- **Linux**: `~/.minecraft/mods`
45+
46+
Can't find your mods folder? Use the "Browse" button to select it manually.
47+
48+
## Development
49+
50+
### Prerequisites
51+
- Node.js 20+
52+
- npm
53+
54+
### Setup
55+
```bash
56+
git clone https://github.com/DizzyMii/modsync.git
57+
cd modsync
58+
npm install
59+
```
60+
61+
### Run Development Build
62+
```bash
63+
npm run dev
64+
```
65+
66+
### Build for Production
67+
```bash
68+
npm run build:win # Windows
69+
npm run build:mac # macOS (requires macOS)
70+
npm run build # Both platforms
71+
```
72+
73+
## CI/CD
74+
75+
This project uses GitHub Actions to automatically build for both Windows and macOS on every push. Builds are available as artifacts in the Actions tab.
76+
77+
## Security
78+
79+
- ✅ Validates ZIP file integrity before extraction
80+
- ✅ Prevents zip-slip attacks
81+
- ✅ Checks file locks before deletion
82+
- ✅ No telemetry or data collection
83+
84+
## Troubleshooting
85+
86+
| Error | Solution |
87+
|-------|----------|
88+
| Minecraft folder not found | Ensure Minecraft is installed or use manual selection |
89+
| Cannot update while Minecraft is running | Close Minecraft completely before updating |
90+
| Google Drive download failed | Try the Local File method or check link permissions |
91+
| macOS "App can't be opened" | Right-click → Open → Open anyway, or run `xattr -cr /Applications/ModSync.app` |
92+
93+
## License
94+
95+
MIT

assets/icon.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is a placeholder for the app icon.
2+
# Replace this file with an actual PNG icon (256x256 or larger recommended).
3+
#
4+
# You can use tools like:
5+
# - GIMP or Photoshop to create custom icons
6+
# - Online icon generators
7+
# - Free Minecraft-themed icons from icon libraries
8+
#
9+
# For best results on all platforms:
10+
# - Windows: Use .ico format (or PNG, electron-builder will convert)
11+
# - macOS: Use .icns format (or PNG, electron-builder will convert)
12+
#
13+
# The icon should be at least 256x256 pixels for high-DPI displays.

build/entitlements.mac.plist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8+
<true/>
9+
<key>com.apple.security.cs.debugger</key>
10+
<true/>
11+
</dict>
12+
</plist>

0 commit comments

Comments
 (0)