Initial public release of MDEditor

This commit is contained in:
sinmb79
2026-03-30 11:45:27 +09:00
commit 7a27714040
43 changed files with 13498 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
param(
[Parameter(Position = 0)]
[ValidateSet('build', 'dev')]
[string]$Mode = 'build',
[switch]$SkipPandocSync
)
$ErrorActionPreference = 'Stop'
$repoRoot = Split-Path -Parent $PSScriptRoot
$vsDevShell = 'C:\Program Files\Microsoft Visual Studio\18\Community\Common7\Tools\Launch-VsDevShell.ps1'
$tauriCli = Join-Path $repoRoot 'node_modules\.bin\tauri.cmd'
$pandocSyncScript = Join-Path $PSScriptRoot 'Sync-PandocSidecar.ps1'
if (-not (Test-Path $vsDevShell)) {
throw "Visual Studio Developer Shell was not found at '$vsDevShell'."
}
if (-not (Test-Path $tauriCli)) {
throw "Local Tauri CLI was not found at '$tauriCli'. Run 'npm install' first."
}
& $vsDevShell -Arch amd64 -HostArch amd64 > $null
Set-Location $repoRoot
$env:PATH = "$env:USERPROFILE\.cargo\bin;$env:PATH"
if (-not (Get-Command cargo -ErrorAction SilentlyContinue)) {
throw "Cargo is not available on PATH after loading the developer shell."
}
if (-not $SkipPandocSync) {
& $pandocSyncScript
}
Write-Host "Running Tauri $Mode from '$repoRoot'..."
& $tauriCli $Mode
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
+24
View File
@@ -0,0 +1,24 @@
param()
$ErrorActionPreference = 'Stop'
$repoRoot = Split-Path -Parent $PSScriptRoot
$destination = Join-Path $repoRoot 'src-tauri\binaries\pandoc-x86_64-pc-windows-msvc.exe'
$candidatePaths = @(
(Join-Path $env:LOCALAPPDATA 'Pandoc\pandoc.exe')
)
$pandocCommand = Get-Command pandoc -ErrorAction SilentlyContinue
if ($pandocCommand) {
$candidatePaths += $pandocCommand.Source
}
$source = $candidatePaths | Where-Object { $_ -and (Test-Path $_) } | Select-Object -First 1
if (-not $source) {
throw "Pandoc was not found. Install it first or place the sidecar manually at '$destination'."
}
Copy-Item -LiteralPath $source -Destination $destination -Force
Write-Host "Synced Pandoc sidecar from '$source' to '$destination'."