Skip to content

Instantly share code, notes, and snippets.

View marakew's full-sized avatar

John Doe marakew

View GitHub Profile
@marakew
marakew / portable-msvc.py
Created April 18, 2024 11:16
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio
#
# original https://gist.github.com/mmozeiko/7f3162ec2988e81e56d5c4e22cde9977
# + append more verbose info
#
#!/usr/bin/env python3
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
import pprint
#if defined(_WIN32)
//jrtplib
inline unsigned __int64 CalculateFileTime(unsigned __int64 performancecount, unsigned __int64 performancefrequency)
{
unsigned __int64 f = performancefrequency;
unsigned __int64 a = performancecount;
unsigned __int64 b = a/f;
unsigned __int64 c = a%f; // a = b*f+c => (a*10'000'000)/f = b*10'000'000+(c*10'000'000)/f