Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 44 additions & 0 deletions .github/macos-installer/conclusion.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<style>
body {
font-family: -apple-system, Helvetica Neue, sans-serif;
font-size: 13px;
color: #1d1d1f;
margin: 20px 24px;
line-height: 1.5;
}
h2 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
p { margin: 0 0 10px; }
code {
background: #f2f2f7;
border-radius: 4px;
padding: 1px 5px;
font-size: 12px;
font-family: "SF Mono", Menlo, monospace;
}
pre {
background: #f2f2f7;
border-radius: 6px;
padding: 10px 12px;
font-size: 12px;
font-family: "SF Mono", Menlo, monospace;
}
a { color: #0066cc; }
</style>
</head>
<body>
<h2>Installation Successful</h2>
<p>
<code>deepdiffdb</code> has been installed to <code>/usr/local/bin/deepdiffdb</code>.
</p>
<p>Open a new Terminal window and run:</p>
<pre>deepdiffdb --version</pre>
<p>
Documentation &amp; guides:
<a href="https://iamvirul.github.io/deepdiff-db/">iamvirul.github.io/deepdiff-db</a>
</p>
</body>
</html>
41 changes: 41 additions & 0 deletions .github/macos-installer/distribution.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
macOS Distribution package definition for DeepDiff DB.
__APP_VERSION__ is substituted by the release workflow at build time.
__APP_TITLE__ is substituted with the full title string, e.g. "DeepDiff DB 1.4.1".
-->
<installer-gui-script minSpecVersion="2">

<title>__APP_TITLE__</title>
<organization>com.iamvirul</organization>

<!--
allow_localSystem = installs to /usr/local/bin on the boot volume (requires admin).
The standard destination-select pane lets the user pick which disk to install on.
-->
<domains enable_localSystem="true" enable_currentUserHome="false"/>
<options customize="never" require-scripts="false" rootVolumeOnly="false"/>

<!-- Custom intro page shown before the destination picker -->
<welcome file="welcome.html" mime-type="text/html"/>
<readme file="readme.html" mime-type="text/html"/>
<conclusion file="conclusion.html" mime-type="text/html"/>

<pkg-ref id="com.iamvirul.deepdiffdb"/>

<choices-outline>
<line choice="default">
<line choice="com.iamvirul.deepdiffdb"/>
</line>
</choices-outline>

<choice id="default"/>
<choice id="com.iamvirul.deepdiffdb" visible="false">
<pkg-ref id="com.iamvirul.deepdiffdb"/>
</choice>

<pkg-ref id="com.iamvirul.deepdiffdb"
version="__APP_VERSION__"
onConclusion="none">deepdiffdb-component.pkg</pkg-ref>

</installer-gui-script>
69 changes: 69 additions & 0 deletions .github/macos-installer/readme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<style>
body {
font-family: -apple-system, Helvetica Neue, sans-serif;
font-size: 13px;
color: #1d1d1f;
margin: 20px 24px;
line-height: 1.5;
}
h2 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
p { margin: 0 0 10px; }
ul { margin: 0 0 10px; padding-left: 20px; }
li { margin-bottom: 4px; }
code {
background: #f2f2f7;
border-radius: 4px;
padding: 1px 5px;
font-size: 12px;
font-family: "SF Mono", Menlo, monospace;
}
pre {
background: #f2f2f7;
border-radius: 6px;
padding: 10px 12px;
font-size: 12px;
font-family: "SF Mono", Menlo, monospace;
overflow-x: auto;
}
a { color: #0066cc; }
</style>
</head>
<body>
<h2>DeepDiff DB — Quick Start</h2>

<h3>System Requirements</h3>
<ul>
<li>macOS 11 (Big Sur) or later</li>
<li>Administrator password to install to <code>/usr/local/bin</code></li>
</ul>

<h3>After Installation</h3>
<p>Open a new Terminal window and verify the installation:</p>
<pre>deepdiffdb --version</pre>

<h3>Create a config file</h3>
<pre>deepdiffdb init</pre>

<h3>Run your first diff</h3>
<pre>deepdiffdb diff --html</pre>

<h3>Supported Databases</h3>
<ul>
<li>MySQL</li>
<li>PostgreSQL</li>
<li>SQLite</li>
<li>Microsoft SQL Server</li>
<li>Oracle Database</li>
</ul>

<p>
Full documentation:
<a href="https://iamvirul.github.io/deepdiff-db/">iamvirul.github.io/deepdiff-db</a>
</p>
</body>
</html>
42 changes: 42 additions & 0 deletions .github/macos-installer/welcome.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<style>
body {
font-family: -apple-system, Helvetica Neue, sans-serif;
font-size: 13px;
color: #1d1d1f;
margin: 20px 24px;
line-height: 1.5;
}
h2 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
p { margin: 0 0 10px; }
ul { margin: 0 0 10px; padding-left: 20px; }
li { margin-bottom: 4px; }
code {
background: #f2f2f7;
border-radius: 4px;
padding: 1px 5px;
font-size: 12px;
font-family: "SF Mono", Menlo, monospace;
}
</style>
</head>
<body>
<h2>Welcome to DeepDiff DB</h2>
<p>
This installer will place the <code>deepdiffdb</code> command-line tool
in <code>/usr/local/bin</code> on the selected volume.
</p>
<p>What this installer does:</p>
<ul>
<li>Installs the <code>deepdiffdb</code> binary to <code>/usr/local/bin/</code></li>
<li>Makes it immediately available in your shell — no PATH changes needed</li>
</ul>
<p>
After installation, open a new Terminal window and run
<code>deepdiffdb --version</code> to confirm it is working.
</p>
</body>
</html>
68 changes: 46 additions & 22 deletions .github/windows-installer.nsi
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
; DeepDiff DB — Windows Installer
; Built by the release workflow; __APP_VERSION__ is substituted at compile time.
;
; Installs deepdiffdb.exe to %ProgramFiles%\DeepDiffDB, adds that directory
; to the system PATH, and registers the app in Add/Remove Programs.
; Uses NSIS Modern UI 2 (bundled with NSIS — no external plugins required).
; Wizard pages: Welcome → Read Me → Directory → Installing → Finish

Unicode true
SetCompressor /SOLID lzma

; ── Modern UI 2 ────────────────────────────────────────────────────────────
!include "MUI2.nsh"

; ── Defines ─────────────────────────────────────────────────────────────────
!define APP_NAME "DeepDiff DB"
!define APP_VERSION "__APP_VERSION__"
!define PUBLISHER "iamvirul"
Expand All @@ -15,19 +19,43 @@ SetCompressor /SOLID lzma
!define UNINSTKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\DeepDiffDB"
!define REGKEY "Software\DeepDiffDB"

; ── MUI Settings ────────────────────────────────────────────────────────────
!define MUI_ABORTWARNING ; confirm before aborting
!define MUI_ABORTWARNING_TEXT "Are you sure you want to cancel the installation?"

; Welcome page
!define MUI_WELCOMEPAGE_TITLE "Welcome to DeepDiff DB ${APP_VERSION} Setup"
!define MUI_WELCOMEPAGE_TEXT "This wizard will install DeepDiff DB ${APP_VERSION} on your computer.$\r$\n$\r$\nDeepDiff DB is a command-line tool for comparing databases, detecting schema drift, and generating safe SQL migration packs.$\r$\n$\r$\nClick Next to continue."

; Finish page — offer to open the docs in a browser
!define MUI_FINISHPAGE_TITLE "Installation Complete"
!define MUI_FINISHPAGE_TEXT "DeepDiff DB ${APP_VERSION} has been installed.$\r$\n$\r$\nOpen a new Command Prompt or PowerShell window and run:$\r$\n$\r$\n deepdiffdb --version$\r$\n$\r$\nto verify the installation."
!define MUI_FINISHPAGE_LINK "Open documentation"
!define MUI_FINISHPAGE_LINK_LOCATION "${HOMEPAGE}"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT

; ── Installer Pages ──────────────────────────────────────────────────────────
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_README "readme.txt" ; generated by workflow at build time
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

; ── Uninstaller Pages ────────────────────────────────────────────────────────
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

; ── Language ─────────────────────────────────────────────────────────────────
!insertmacro MUI_LANGUAGE "English"

; ── Metadata ─────────────────────────────────────────────────────────────────
Name "${APP_NAME} ${APP_VERSION}"
OutFile "deepdiff-db-v__APP_VERSION__-windows-amd64-installer.exe"
InstallDir "${INSTALL_DIR}"
InstallDirRegKey HKLM "${REGKEY}" "InstallDir"
RequestExecutionLevel admin

; ── Pages ──────────────────────────────────────────────────────────────────
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles

; ── Install ────────────────────────────────────────────────────────────────
; ── Install ──────────────────────────────────────────────────────────────────
Section "DeepDiff DB" SecMain
SectionIn RO
SetOutPath "$INSTDIR"
Expand All @@ -42,8 +70,6 @@ Section "DeepDiff DB" SecMain
StrCpy $1 $0 "" -1 ; last char of current PATH
StrCmp $1 ";" 0 +2
StrCpy $0 $0 -1 ; strip trailing semicolon
; Check whether INSTDIR already appears (simple prefix/suffix check is fine
; because users rarely change the install location)
Push "$0"
Push "$INSTDIR"
Call StrContains
Expand Down Expand Up @@ -71,7 +97,7 @@ Section "DeepDiff DB" SecMain
WriteRegStr HKLM "${REGKEY}" "InstallDir" "$INSTDIR"
SectionEnd

; ── Uninstall ──────────────────────────────────────────────────────────────
; ── Uninstall ────────────────────────────────────────────────────────────────
Section "Uninstall"
Delete "$INSTDIR\deepdiffdb.exe"
Delete "$INSTDIR\README.md"
Expand All @@ -82,7 +108,6 @@ Section "Uninstall"
; Remove install dir from system PATH
ReadRegStr $0 HKLM \
"SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path"
; Strip "$INSTDIR;" and ";$INSTDIR" variants
Push "$0"
Push "$INSTDIR;"
Push ""
Expand All @@ -103,18 +128,17 @@ Section "Uninstall"
DeleteRegKey HKLM "${REGKEY}"
SectionEnd

; ── Helper: StrContains ────────────────────────────────────────────────────
; ── Helper: StrContains ──────────────────────────────────────────────────────
; Stack: [haystack] [needle] → [match-start or ""]
; Searches haystack for needle; pushes "" if not found.
Function StrContains
Exch $1 ; needle
Exch
Exch $0 ; haystack
Push $2
Push $3
Push $4
StrLen $3 $1 ; needle length
StrLen $4 $0 ; haystack length
StrLen $3 $1
StrLen $4 $0
IntOp $4 $4 - $3
StrCpy $2 0
loop:
Expand All @@ -137,18 +161,18 @@ Function StrContains
Push $R0
FunctionEnd

; ── Helper: StrReplaceAll ──────────────────────────────────────────────────
; ── Helper: StrReplaceAll ────────────────────────────────────────────────────
; Stack (top→bottom): [haystack] [find] [replace] → [result]
Function StrReplaceAll
Exch $2 ; replace
Exch
Exch $1 ; find
Exch 2
Exch $0 ; haystack
Push $3 ; working copy
Push $4 ; needle length
Push $5 ; result accumulator
Push $6 ; position
Push $3
Push $4
Push $5
Push $6
StrCpy $5 ""
StrLen $4 $1
StrCpy $3 $0
Expand Down
Loading
Loading