Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

phaoer/create-setuply

Repository files navigation

Setuply
GitHub Stars License: MIT Built with Tauri Node.js version

中文 | English

Quickly create beautiful and efficient Windows application installers — powered by Tauri 2


🧩 Prerequisites

Install Node.js

Visit the Node.js official website and install version 22.12.0 or higher.

Install Rust

Go to the Rust official website and follow the installation guide.


🔨 Usage

Npx

npx create-setuply

Git Fork

  1. Fork this repository.

  2. Add the upstream remote:

git remote add upstream https://github.com/phaoer/create-setuply
  1. Create your own branch:
git checkout -b your-branch
  1. Run the scaffolding tool:
npm run create-setuply
  1. Start development 🚀

🧱 Templates

Supports React and Vue for building custom UI installers.

Components

<Header />

provides a draggable navigation/header bar suitable for installer windows.

Hooks

function useInstallProgress ():{progress:number; reset: () => void} 

Returns the real-time installation progress (0-100) and a reset function to clear progress.

function useInstallError ():{error:string; reset: () => void} 

Returns the installation error message (or null) and a reset function to clear errors.

Methods / API

export function appQuit(): Promise<any>

Quit the installer application gracefully.

export function openUrl(url: string): Promise<any>

Open a URL or run a shell command on the host system (depending on implementation).

export function changePath(): Promise<string | null>

Open a folder picker to change the installation path. Returns the selected path or null if cancelled.

type InstallationParams = {
 packageDownloadUrl: string; // Installation package URL (supports online packages)
 packageFilename: string; // Saved filename for downloaded package
 installPath: string; // Installation directory path
 setting?: {
 reg?: { // Windows registry settings (optional)
 displayName: string;
 displayVersion: string;
 publisher: string;
 installLocation: string;
 uninstallString: string;
 };
 shortCut?: { // Desktop shortcut settings (optional)
 targetPath: string;
 shortcutName: string;
 workingDir: string;
 description: string;
 };
 };
}
export function installation(params: InstallationParams): Promise<string>

Begin the installation process with the provided parameters.

type LaunchParams = {
 exePath: string; // Path to the executable file you want to launch
}
export function launch(params: LaunchParams): Promise<string>

Launch the installed application executable.


📜 License

MIT

AltStyle によって変換されたページ (->オリジナル) /