Skip to content
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

Update preconfigure.bat #22842

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Update preconfigure.bat #22842

merged 1 commit into from
Apr 16, 2024

Conversation

mriamnobody
Copy link
Contributor

In previous code, if a user didn't provide any argument with the command then x86 will be selected as Host by default which is kind of Flawed.

This change will detect the Host system on its and will allow the user to select the target system

  • Mark this if you consider it ready to merge
  • I've added tests (optional)
  • I wrote some lines in the book (optional)

Description

In previous code, if a user didn't provide any argument with the command then x86 will be selected as Host by default which is kind of Flawed.

This change will detect the Host system on its and will allow the user to select the target system
@trufae
Copy link
Collaborator

trufae commented Apr 16, 2024

Now that you are messing with the windows build scripts, would you like to take a look at this ticket to do the windows-arm64 builds in the CI so we can have those artifacts in the next release? #22612

thanks!

@trufae trufae merged commit bd40c00 into radareorg:master Apr 16, 2024
40 checks passed
@mriamnobody
Copy link
Contributor Author

Now that you are messing with the windows build scripts, would you like to take a look at this ticket to do the windows-arm64 builds in the CI so we can have those artifacts in the next release? #22612

thanks!

Will definitely give it a look.

@mriamnobody
Copy link
Contributor Author

Now that you are messing with the windows build scripts, would you like to take a look at this ticket to do the windows-arm64 builds in the CI so we can have those artifacts in the next release? #22612

thanks!

I think the last update to preconfigure.bat should have solved this issue, as I ran preconfigure.bat with a fork, and VSARCH was successfully set to the selected value.

@mriamnobody
Copy link
Contributor Author

If you carefully observe the old code:

IF "%*" == "x86" (
  set VSARCH=x86
) ELSE IF "%*" == "arm64" (
  set VSARCH=x86_arm64
) ELSE (
  set VSARCH=x86_amd64
)

If the user does not specify an architecture as an argument while running preconfigure.bat, x86_amd64 will be selected by default, regardless of the host platform.

Also, if you provide the argument arm64 while running preconfigure.bat, the host architecture x86 will be selected, even if you prefer or your architecture is x64.

The new code will avoid all this hassle and give users the ability to select the required platforms.

@mriamnobody
Copy link
Contributor Author

If a user specifies an architecture as an argument while running preconfigure.bat, that argument will be set as the architecture for building. If no arguments are provided, the user will be presented with a menu to select the target system.

The host architecture is detected by the script using %PROCESSOR_ARCHITECTURE%. This step also helps to avoid burdening or confusing new users.

@trufae
Copy link
Collaborator

trufae commented Apr 17, 2024

@mriamnobody i think the blocker was that meson required a config file for crosscompiling, here's the latest attempt from @prodrigestivill to get this to work prodrigestivill@1e174f9 you can continue your patch from there. i'll find some time later today to try in local, but afaik it's "just" a "ci issue"

@prodrigestivill
Copy link
Contributor

Also is usefull this commit:
prodrigestivill@586ac97

Not sure why without this, the script doesn't detect the vscode. I don't have a windows environment to test it.

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.

3 participants