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

Replace current C#-based shim with C version #3

Closed
wants to merge 4 commits into from

Conversation

gerardog
Copy link

As stated in ScoopInstaller/Scoop#3634,

The current C# based implementation can be replaced by a faster and better solution in C, proposed by @rasa. Its readme explains the benefits. Also closes several issues mentioned in ScoopInstaller/Scoop#3634.

This PR uses @rasa code and updates the appveyor build scripts. The build scripts can be improved for sure. Sorry it was my first use of AppVeyor.

@gerardog
Copy link
Author

Hi @r15ch13, The build is failing when running a script you added that collects the release notes.
Could you please help me fix it?
Thanks.

@Ash258
Copy link

Ash258 commented Jan 28, 2020

@ScoopInstaller/maintainers Please create a develop branch when you have time

@gerardog

  • Do not delete code of old shim
    • Just add new src/shim.c with all needed build files
  • Rebase to develop after branch creation
    • For local testing it will be better to have them in one place to not always switching branches

This weekend I am finally getting back from Swiss work trip and I will have time for proper review. @gerardog Are you familiar with code or you just copied it from https://github.com/71/scoop-better-shimexe?
As soon as I have my environment we can adjust build and CI related stuff.

- original C# shim (shim.cs -> shim.exe)
- new C shim (shim.c -> newshim.exe)
@gerardog
Copy link
Author

Just add new src/shim.c with all needed build files

Done @Ash258. Note that the same build scripts fails on a different point on my repo, after collecting the artifacts

Rebase to develop after branch creation

Sure, waiting for the develop branch to be created. If new develop==current master then we also could just change the base branch of this PR.

@gerardog Are you familiar with code or you just copied it

I just copied it but It looks simple enough so I can give a try if something comes up.

@71
Copy link

71 commented Feb 3, 2020

I can also help if there's a problem. We should also find a way to sync changes from https://github.com/71/scoop-better-shimexe to this repo if other changes are made to the source over time.

Copy link

@Ash258 Ash258 left a comment

Choose a reason for hiding this comment

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

if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }

# Import Visual Studio 2017 MsBuild Env Vars
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat`" && set > %temp%\vcvars.txt"
Copy link

Choose a reason for hiding this comment

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

Why external cmd??

}

Write-Output 'Compiling shim.c ...'
& cmd /c cl.exe /O1 /Fe"$build\newshim.exe" "$src\shim.c" '2>&1'
Copy link

Choose a reason for hiding this comment

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

Why external cmd??

@ScoopInstaller ScoopInstaller deleted a comment Nov 10, 2021
@gerardog
Copy link
Author

Closing, as I believe scoop team is handling this now.

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