Skip to content

[SETUPLIB][REACTOS][USETUP] Turn setuplib into a DLL shared between TUI and GUI 1st-stage setups #7523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

HBelusca
Copy link
Contributor

@HBelusca HBelusca commented Nov 23, 2024

Purpose

Turn setuplib into a DLL shared between TUI and GUI 1st-stage setups, so that the binaries (usetup.exe and the 1st-stage GUI reactos.exe setup) can share code.

NOTE: Since the setuplib itself is work-in-progress, some exported functions may change/be removed or added.

JIRA issue: CORE-13525

Observations

  • I've turned most of the exported functions from default cdecl to explicit stdcall / "NTAPI".
  • I've collapsed the two phases of InitializeSetup() to make the initialization simpler.

Sizes reductions

NOTE 1: All sizes are in bytes.
NOTE 2: "Before" is commit e51e5de.
NOTE 3: % Reduction = 100 * (Before - After) / Before

gcc-i386-Debug-0x502

File Before After % Reduction
reactos.exe 1,601,024 1,039,872 35.05
smss.exe 1,364,480 805,888 40.94
setuplib.dll 0 580,096
Total 2,965,504 2,425,856 18.20

gcc-i386-Release-0x502

File Before After % Reduction
reactos.exe 1,144,250 879,444 23.14
smss.exe 981,545 723,268 26.31
setuplib.dll 0 297,328
Total 2,125,795 1,900,040 10.62

gcc-amd64-Debug-0x502

File Before After % Reduction
reactos.exe 2,449,708 1,372,805 43.96
smss.exe 2,405,674 1,320,478 45.11
setuplib.dll 0 1,101,655
Total 4,855,382 3,794,938 21.84

gcc-amd64-Release-0x502

File Before After % Reduction
reactos.exe 1,094,739 842,674 23.03
smss.exe 1,078,998 833,237 22.78
setuplib.dll 0 283,874
Total 2,173,737 1,959,785 9.84

msvc14.2-i386-Debug-0x502

File Before After % Reduction
reactos.exe 1,236,480 803,840 34.99
smss.exe 1,101,824 676,864 38.57
setuplib.dll 0 443,904
Total 2,338,304 1,924,608 17.69

msvc14.2-i386-Release-0x502

File Before After % Reduction
reactos.exe 907,264 712,704 21.44
smss.exe 795,136 607,232 23.63
setuplib.dll 0 203,264
Total 1,702,400 1,523,200 10.53

msvc14.2-amd64-Debug-0x502

File Before After % Reduction
reactos.exe 1,401,344 879,104 37.27
smss.exe 1,351,168 836,608 38.08
setuplib.dll 0 536,576
Total 2,752,512 2,252,288 18.17

msvc14.2-amd64-Release-0x502

File Before After % Reduction
reactos.exe 950,784 735,744 22.62
smss.exe 946,176 739,840 21.81
setuplib.dll 0 226,304
Total 1,896,960 1,701,888 10.28

@HBelusca HBelusca self-assigned this Nov 23, 2024
@github-actions github-actions bot added the ROSTESTS Label for ROS testcases PRs. label Nov 23, 2024
@binarymaster binarymaster added enhancement For PRs with an enhancement/new feature. refactoring For refactoring changes. labels Nov 23, 2024
Copy link
Member

@binarymaster binarymaster left a comment

Choose a reason for hiding this comment

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

Looks nice, though I'd add the actual list of contributors to the header of RC file.

@binarymaster
Copy link
Member

Also maybe link to CORE-13525 in commit msg.

HBelusca added a commit that referenced this pull request Nov 24, 2024
…UI and GUI 1st-stage setups (#7523)

CORE-13525

Notes:
- Most of the exported functions have been turned from default cdecl to explicit stdcall / "NTAPI".
- The two phases of InitializeSetup() have been collapsed to make the initialization simpler.
@HBelusca HBelusca force-pushed the hbelusca/setuplib_dll branch from a47e3a1 to 8904243 Compare November 24, 2024 18:11
HBelusca added a commit that referenced this pull request Dec 2, 2024
…UI and GUI 1st-stage setups (#7523)

CORE-13525

Notes:
- Most of the exported functions have been turned from default cdecl to explicit stdcall / "NTAPI".
- The two phases of InitializeSetup() have been collapsed to make the initialization simpler.
@HBelusca HBelusca force-pushed the hbelusca/setuplib_dll branch from 8904243 to a91e230 Compare December 2, 2024 19:32
HBelusca added a commit that referenced this pull request Dec 2, 2024
…UI and GUI 1st-stage setups (#7523)

CORE-13525

Notes:
- Most of the exported functions have been turned from default cdecl to explicit stdcall / "NTAPI".
- The two InitializeSetup() phases have been collapsed to make the initialization simpler.
@HBelusca HBelusca force-pushed the hbelusca/setuplib_dll branch from a91e230 to 9b77c80 Compare December 2, 2024 19:58
…UI and GUI 1st-stage setups (#7523)

CORE-13525

Notes:
- Most of the exported functions have been turned from default cdecl to explicit stdcall / "NTAPI".
- The two InitializeSetup() phases have been collapsed to make the initialization simpler.

Average reductions (percentages; see PR #7523 for actual numbers):

x86 Debug builds:
reactos.exe: 35.1%
smss.exe   : 39.8%
Total (including setuplib.dll): 17.9%

x86 Release builds:
reactos.exe: 22.3%
smss.exe   : 25.0%
Total (including setuplib.dll): 10.6%

x64 Debug builds:
reactos.exe: 40.6%
smss.exe   : 41.6%
Total (including setuplib.dll): 20.0%

x64 Release builds:
reactos.exe: 22.8%
smss.exe   : 22.3%
Total (including setuplib.dll): 10.1%
@HBelusca HBelusca force-pushed the hbelusca/setuplib_dll branch from 9b77c80 to d7c1d22 Compare December 2, 2024 22:16
@HBelusca HBelusca merged commit d7c1d22 into master Dec 2, 2024
61 checks passed
@HBelusca HBelusca deleted the hbelusca/setuplib_dll branch December 2, 2024 22:17
DarkFire01 added a commit to DarkFire01/reactos that referenced this pull request Dec 7, 2024
…etween TUI and GUI 1st-stage setups (reactos#7523)"

This reverts commit d7c1d22.
DarkFire01 added a commit to DarkFire01/reactos that referenced this pull request Dec 8, 2024
…etween TUI and GUI 1st-stage setups (reactos#7523)"

This reverts commit d7c1d22.
DarkFire01 added a commit to DarkFire01/reactos that referenced this pull request Dec 27, 2024
…etween TUI and GUI 1st-stage setups (reactos#7523)"

This reverts commit d7c1d22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For PRs with an enhancement/new feature. refactoring For refactoring changes. ROSTESTS Label for ROS testcases PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants