Skip to content

Новый .iss файл для сборки установщика Windows#1690

Open
Bayselonarrend wants to merge 2 commits into
EvilBeaver:developfrom
Bayselonarrend:feature/installer
Open

Новый .iss файл для сборки установщика Windows#1690
Bayselonarrend wants to merge 2 commits into
EvilBeaver:developfrom
Bayselonarrend:feature/installer

Conversation

@Bayselonarrend
Copy link
Copy Markdown
Contributor

@Bayselonarrend Bayselonarrend commented May 27, 2026

Новый скрипт сборки установщика. Сделан на основе iss файла из lts
https://github.com/EvilBeaver/OneScript/blob/release/lts/install/install.iss

Пока есть две проблемы:

  1. Я не нашел никаких концов пайплайна сборки. Если он вообще был :)
  2. Если пайплайн все таки был, то надо добавить в него скачивание ovm.exe

Сейчас в установщик включен сам oscript (bin и lib), а также ovm.exe (при установке можно включить/выключить через флажок). TestApp, СП и доп. установщики пока не включал

Есть видео процесса установки:

3XkBKxtkss.mp4

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

📝 Walkthrough

Walkthrough

This PR introduces a complete Inno Setup installer script for OneScript that handles versioned deployments with optional OVM binary management. The installer supports both x86 and x64 architectures, presents a custom checkbox to enable OVM installation, manages directory junctions for version switching, and updates the user's Path environment variable during install and uninstall.

Changes

OneScript Installer with OVM Management

Layer / File(s) Summary
Installer Configuration & Metadata
install/install.iss
App constants, version parsing from DLL, [Setup] metadata (publisher, URLs, install paths, compression), [Files] directives with conditional OVM file inclusion, and [UninstallDelete] configuration.
Custom UI & Installation Control
install/install.iss
Custom wizard page with "Установить OVM" checkbox wired to control conditional OVM file installation via InstallOvmSelected().
Path & Directory Management Utilities
install/install.iss
Helper functions for removing directory links, creating junctions with mklink /J, testing path membership, and adding entries to semicolon-delimited registry Path with deduplication logic.
Installation Activation Flow
install/install.iss
Post-install event handler that creates the current version junction, writes OVM registry configuration when selected, and conditionally prepends entries to user Path for %OVM_OSCRIPTBIN% and install bin directory.
Uninstallation Cleanup
install/install.iss
Post-uninstall event handler that removes the current junction, clears OVM registry values if they match the uninstalled version, removes OVM entries from user Path, and deletes the Path key if empty.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A script compiled, with paths set straight,
Junctions dance and environments wait,
OVM flows through PATH with care,
Install, uninstall, cleanup fair,
OneScript finds its place to share! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Новый .iss файл для сборки установщика Windows' accurately describes the main change: adding a new .iss installer script file for Windows builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
install/install.iss (1)

197-209: 💤 Low value

Consider using the existing PrependUserPath helper.

Lines 197-209 duplicate the logic already implemented in PrependUserPath. This could be simplified while maintaining the same behavior.

♻️ Suggested simplification
-    if RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OldPath) then
-    begin
-      if not PathContains(OldPath, '%OVM_OSCRIPTBIN%') then
-      begin
-        if OldPath = '' then
-          NewPath := '%OVM_OSCRIPTBIN%'
-        else
-          NewPath := '%OVM_OSCRIPTBIN%;' + OldPath;
-        RegWriteExpandStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', NewPath);
-      end;
-    end
-    else
-      RegWriteExpandStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', '%OVM_OSCRIPTBIN%');
+    PrependUserPath('%OVM_OSCRIPTBIN%');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@install/install.iss` around lines 197 - 209, The block manually querying and
writing the current user's PATH duplicates the existing helper; replace the
RegQueryStringValue/RegWriteExpandStringValue logic with a single call to
PrependUserPath passing '%OVM_OSCRIPTBIN%'. Locate the duplicated block (the if
RegQueryStringValue... else ... end) and remove it, then invoke
PrependUserPath('%OVM_OSCRIPTBIN%') so the same behavior is retained via the
helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@install/install.iss`:
- Around line 197-209: The block manually querying and writing the current
user's PATH duplicates the existing helper; replace the
RegQueryStringValue/RegWriteExpandStringValue logic with a single call to
PrependUserPath passing '%OVM_OSCRIPTBIN%'. Locate the duplicated block (the if
RegQueryStringValue... else ... end) and remove it, then invoke
PrependUserPath('%OVM_OSCRIPTBIN%') so the same behavior is retained via the
helper.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c4028607-41bf-42d7-a1f4-a33fbf084bdb

📥 Commits

Reviewing files that changed from the base of the PR and between 94f66ea and 6028a89.

⛔ Files ignored due to path filters (1)
  • install/WizardImage.bmp is excluded by !**/*.bmp
📒 Files selected for processing (1)
  • install/install.iss

@EvilBeaver
Copy link
Copy Markdown
Owner

Я не понял, откуда берется ovm.exe при сборке? Это в смысле не сделано, т.к. не найден пайплайн? Пайплайн лежит в Jenkinsfile

@Bayselonarrend
Copy link
Copy Markdown
Contributor Author

Я не понял, откуда берется ovm.exe при сборке? Это в смысле не сделано, т.к. не найден пайплайн? Пайплайн лежит в Jenkinsfile

В пайплайне надо доработать скачивание ovm.exe из репы OVM. А пайплайн я не нашел в том смысле, что в lts есть iss файл, но в Jenkinsfile я не нашел место его сборки

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants