Skip to content
Merged

V3 #157

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
bddb723
feat: Enable RTX via options.txt
jasonjgardner Jun 1, 2025
a9f2b3f
chore: Add else branch / Remove duplicate click event
jasonjgardner Jun 1, 2025
a3575f5
fix: Provide encoding for options file
jasonjgardner Jun 1, 2025
f0acb2e
feat: Tauri POC
jasonjgardner Aug 16, 2025
cf3b129
feat: initialize v3 installer with base components and UI structure
jasonjgardner Aug 16, 2025
7218953
feat: initialize v3 installer with Tauri and React setup
jasonjgardner Aug 16, 2025
79e7b0f
ci: add Tauri build workflow and configuration rules for Windows app
jasonjgardner Aug 16, 2025
973d316
upd: Improve styles
jasonjgardner Aug 16, 2025
37e80f4
fix: Restore correct BE calls
jasonjgardner Aug 16, 2025
7ec5d9a
upd: UI improvements; add .rtpack association
jasonjgardner Aug 16, 2025
005e9e6
feat: Add deep linking
jasonjgardner Aug 16, 2025
c9b7eba
Update tauri.yml
jasonjgardner Aug 16, 2025
0414007
chore: Version bump
jasonjgardner Aug 16, 2025
dae88c0
fix(ci): Added missing dependencies
jasonjgardner Aug 16, 2025
ab95750
fix(ci): Remove beta flag for build step only
jasonjgardner Aug 16, 2025
47d6977
upd: New layout / Custom Minecraft instance directories
jasonjgardner Aug 17, 2025
5449567
chore: Apply formatting
jasonjgardner Aug 17, 2025
8cd189c
fix: .rtpack drag and drop
jasonjgardner Aug 17, 2025
0945573
upd: Add version filter
jasonjgardner Aug 17, 2025
00e4d4b
feat: Layout and style improvements; Refactor to use Tauri plugins
jasonjgardner Aug 19, 2025
a44f35a
feat: Show creator settings in instance list
jasonjgardner Aug 20, 2025
93f55cd
feat: Individual material.bin presets
jasonjgardner Aug 20, 2025
43a076b
upd: Add uninstall; Add visual improvements
jasonjgardner Aug 21, 2025
ccfc369
feat: Add options.txt editor; Style improvements
jasonjgardner Aug 22, 2025
c05fbf8
upd: Add missing dialog
jasonjgardner Aug 22, 2025
94c5c98
Update v3/vite.config.ts
jasonjgardner Aug 23, 2025
b6bee61
upd: Add concurrency to Tauri Action
jasonjgardner Aug 23, 2025
c8875a8
Merge branch 'v3/tauri' of https://github.com/BetterRTX/BetterRTX-Ins…
jasonjgardner Aug 23, 2025
3f1a216
Update v3/src/components/presets/PresetIcon.tsx
jasonjgardner Aug 23, 2025
83e6741
fix: Add missing import
jasonjgardner Aug 23, 2025
8c9dca9
fix: Restore tab content scrolling
jasonjgardner Aug 23, 2025
2c67365
upd: bedrock.graphics preset link
jasonjgardner Aug 23, 2025
b4ca209
fix: Preset nav list state
jasonjgardner Aug 23, 2025
4d0eb28
chore: Remove mobile icons
jasonjgardner Aug 23, 2025
28fe11f
upd: Console not auto open
jasonjgardner Aug 23, 2025
9e5685c
upd: React improvements
jasonjgardner Aug 24, 2025
0ba5f8d
upd: Memoized preset list
jasonjgardner Aug 24, 2025
9716ce0
upd: Add disclaimer; Fix .rtpack load
jasonjgardner Aug 24, 2025
47d7b6c
upd: Do not use IOBit to copy to sideloaded instances
jasonjgardner Sep 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## PowerShell

- Prefer `[void]` over `| OutNull` to suppress GUI output in the host console.
- Always wrap error-prone code in try/catch.
- Do not use if/else when it is possible to use if/return instead.
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/tauri.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build Tauri App

on:
push:
branches: [ main, 'v3/**' ]
paths: [ 'v3/**' ]
pull_request:
branches: [ main ]
paths: [ 'v3/**' ]
workflow_dispatch:

# Cancel in-progress runs when a new workflow with the same group is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-tauri:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './v3/src-tauri -> target'

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install frontend dependencies
working-directory: ./v3
run: bun install

- name: Cache frontend dependencies
uses: actions/cache@v4
with:
path: |
./v3/node_modules
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Build frontend
working-directory: ./v3
run: bun run build

- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
projectPath: ./v3

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: brtx-installer-v3
path: |
./v3/src-tauri/target/release/bundle/
if-no-files-found: warn
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"github.copilot.chat.codeGeneration.useInstructionFiles": true
"github.copilot.chat.codeGeneration.useInstructionFiles": true,
"css.lint.unknownAtRules": "ignore",
"less.lint.unknownAtRules": "ignore",
"scss.lint.unknownAtRules": "ignore"
}
10 changes: 10 additions & 0 deletions .windsurf/rules/css.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
trigger: glob
globs: **/*.css,**/*.tsx
---

# Project Code Style - CSS / Tailwind

- Prefer grouping Tailwind styles into the styles.css file, using BEM and `@apply`.
- Always use theme variables instead of adding new colors, sizes, etc.
- Always use hover: and focus:
12 changes: 12 additions & 0 deletions .windsurf/rules/tauri.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
trigger: always_on
---

# Project Rules — BetterRTX Installer (Tauri v2)

- Use **Tauri v2** APIs and docs; prefer NSIS installer on Windows.
- Frontend: React + TS; strict mode; Tailwind CSS v4; keep UI edits isolated. Reference Tailwind @docs
- Rust core: small commands with `#[tauri::command]`; pure helpers.
- use context7 to referecne Tauri docs
- Test with `bun run tauri dev` from the `.v3/` directory. Do not use NPM.
- Prefer Tauri plugins over implementing own features.
37 changes: 37 additions & 0 deletions .windsurf/rules/typescript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
trigger: glob
globs: **/*.ts,**.*.tsx
---

# General Code Style & Formatting
- Use English for all code and documentation.
- Always declare the type of each variable and function (parameters and return value).
- Avoid using any.
- Create necessary types.
- Use JSDoc to document public classes and methods.
- Don't leave blank lines within a function.
- One export per file.

# Naming Conventions
- Use PascalCase for classes.
- Use camelCase for variables, functions, and methods.
- Use kebab-case for file and directory names.
- Use UPPERCASE for environment variables.
- Avoid magic numbers and define constants.

# Functions & Logic
- Keep functions short and single-purpose (<20 lines).
- Avoid deeply nested blocks by:
- Using early returns.
- Extracting logic into utility functions.
- Use higher-order functions (map, filter, reduce) to simplify logic.
- Use arrow functions for simple cases (<3 instructions), named functions otherwise.
- Use default parameter values instead of null/undefined checks.
- Use RO-RO (Receive Object, Return Object) for passing and returning multiple parameters.

# Data Handling
- Avoid excessive use of primitive types; encapsulate data in composite types.
- Avoid placing validation inside functions—use classes with internal validation instead.
- Prefer immutability for data:
- Use readonly for immutable properties.
- Use as const for literals that never change.
70 changes: 70 additions & 0 deletions v2/installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ $T = Data {
dlss_downloading = Downloading DLSS
dlss_updating = Updating DLSS
dlss_success = Successfully updated DLSS
update_options = Fix GFX Options
options_updated = Successfully updated GFX options
'@
}
$translationFilename = "installer.psd1"
Expand Down Expand Up @@ -882,11 +884,68 @@ function Install-DLSS() {
$StatusLabel.Text = $T.dlss_success
}

# Modify the options.txt file to enable certain graphics options for best RTX performance
# This is a workaround for the fact that the game doesn't allow you to enable these options in the UI
function Update-OptionsFile {
param(
[Parameter(Mandatory = $true)]
[string]$OptionsFile
)

try {
if (Test-Path $OptionsFile) {
$content = Get-Content $OptionsFile -Raw

if ($content -match "show_advanced_video_settings:0") {
$content = $content -replace "show_advanced_video_settings:0", "show_advanced_video_settings:1"
$content | Out-File $OptionsFile -Force -Encoding UTF8
}
elseif ($content -notmatch "show_advanced_video_settings:1") {
# Add the setting if not found
$content += "`nshow_advanced_video_settings:1"
$content | Out-File $OptionsFile -Force -Encoding UTF8
}

Write-Host "Updated video settings in $OptionsFile" -ForegroundColor Green
}
else {
Write-Host "Options file not found: $OptionsFile" -ForegroundColor Red
}
}
catch {
Write-Error "Failed to update options file ${OptionsFile}: $_"
}
}

function Enable-GfxOptions() {
$comMojang = [System.Environment]::GetFolderPath("LocalApplicationData") + "\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang"
$previewComMojang = [System.Environment]::GetFolderPath("LocalApplicationData") + "\Packages\Microsoft.MinecraftPreview_8wekyb3d8bbwe\LocalState\games\com.mojang"

$optionsFile = "$comMojang\minecraftpe\options.txt";
$previewOptionsFile = "$previewComMojang\minecraftpe\options.txt";

foreach ($mc in $dataSrc) {
if ($ListBox.SelectedItems -notcontains $mc.FriendlyName) {
continue
}

if ($mc.Preview) {
Update-OptionsFile -OptionsFile $previewOptionsFile
}
else {
Update-OptionsFile -OptionsFile $optionsFile
}
}
}

# Advanced Section
function Update-Advanced() {
$hasSelectedItems = -not ($ListBox.SelectedItems.Count -eq 0)
$dlssMenu = $advancedMenu.MenuItems | Where-Object { $_.Text -eq $T.update_dlss }
$dlssMenu.Enabled = $hasSelectedItems

$updateOptionsMenuItem = $advancedMenu.MenuItems | Where-Object { $_.Text -eq $T.update_options }
$updateOptionsMenuItem.Enabled = $hasSelectedItems
}

# Setup GUI
Expand Down Expand Up @@ -1165,6 +1224,17 @@ $dlssUpdateMenuItem.Enabled = $false
$dlssUpdateMenuItem.Add_Click({ Install-DLSS })
$advancedMenu.MenuItems.Add($dlssUpdateMenuItem) | Out-Null

$updateOptionsMenuItem = New-Object System.Windows.Forms.MenuItem
$updateOptionsMenuItem.Text = $T.update_options
$updateOptionsMenuItem.Enabled = $false
$updateOptionsMenuItem.Add_Click({
Enable-GfxOptions
$StatusLabel.Text = $T.options_updated
$StatusLabel.ForeColor = 'Green'
$StatusLabel.Visible = $true
})
$advancedMenu.MenuItems.Add($updateOptionsMenuItem) | Out-Null

$helpMenu = New-Object System.Windows.Forms.MenuItem
$helpMenu.Text = $T.help
$mainMenu.MenuItems.Add($helpMenu) | Out-Null
Expand Down
24 changes: 24 additions & 0 deletions v3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
7 changes: 7 additions & 0 deletions v3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Tauri + Vanilla TS

This template should help get you started developing with Tauri in vanilla HTML, CSS and Typescript.

## Recommended IDE Setup

- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
Binary file added v3/app-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading