Portable Build Tools

Started by Vortex, March 02, 2024, 02:14:43 PM

Previous topic - Next topic

airr

https://share.binarymagic.net/-iA2EXK2MHP

I had the previous link set to expire in 30 days.

AIR.

JohnClaw

Quote from: airr on March 07, 2024, 08:07:02 PM
64bit only, working here with BED (limited testing), I got it down to 242MB.  YMMV....just trying this to see if it can be done.  :)

https://share.binarymagic.net/-8uQSGMAx5e

AIR.

Link doesn't work anymore. Re-upload it, please.

Vortex

Hi MrBcx,

For the moment, no any special triks. Maybe, one could remove some import libraries to reduce the size of the package. The purpose is to use only the most important libraries.

Robert

Quote from: airr on March 07, 2024, 08:07:02 PM
64bit only, working here with BED (limited testing), I got it down to 242MB.  YMMV....just trying this to see if it can be done.  :)

https://share.binarymagic.net/-8uQSGMAx5e

AIR.

I'm going to pair it with Wine.

Thanks

airr

64bit only, working here with BED (limited testing), I got it down to 242MB.  YMMV....just trying this to see if it can be done.  :)

https://share.binarymagic.net/-8uQSGMAx5e

AIR.

MrBcx

A 690mb MSVC installation is pretty damn impressive.  I'm interested to read
whether Vortex has any tricks up his sleeve.  My only thought on further reduction
involves the UPX packer which is known to trigger AV false positives, so I would
not recommend it.

airr

So here's a quick question:  How small can you make the actual MSVC installation for use with BED/BCX?

I installed using the tool (Thanks, Vortex for the link!) and it came in at about 1.2GB.

I managed to remove enough to get it down to about 690MB and working with BED with the same example file Vortex used, but I'd like to go even smaller.

Any tips?

AIR.

Vortex

Hi MrBcx,

No worries, it's OK.

MrBcx

Vortex -- Sorry for inadvertently hijacking your original thread.   ;)

I moved the BCX installer discussion into its own thread.
https://bcxbasiccoders.com/smf/index.php?topic=1003.0

Now we can keep these two discussions better organized.

Robert

Very interesting.

Portable stripped down Pelles can be done as well.

Just the tickets for the new soon-to-be-released BCX installer. Ahem, um, cough, cough ...

Vortex

PortableBuildTools :

QuotePortable, simple and fast installer for Visual Studio Build Tools.

Downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK, into a portable folder, without installing Visual Studio. Has only bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.

https://github.com/Data-Oriented-House/PortableBuildTools

Modifying \BCX\bed\Bat\MSVC\Config32.bat to use BCX with Portable Build Tools, x86 host compiling 32-bit code :

SET MSVCFolder="R:\BuildTools-Hostx86-x86\VC\Tools\MSVC\14.39.33519\bin\Hostx86\x86"

CALL "R:\BuildTools-Hostx86-x86\devcmd.bat"

@SET BCX=D:\BCX


devcmd.bat created by Portable Build Tools :

@echo off

set WindowsSDKDir=R:\BuildTools-Hostx86-x86\Windows Kits\10
set WindowsSDKVersion=10.0.22621.0
set VCToolsInstallDir=R:\BuildTools-Hostx86-x86\VC\Tools\MSVC\14.39.33519\
set VSCMD_ARG_TGT_ARCH=x86

set MSVC_BIN=R:\BuildTools-Hostx86-x86\VC\Tools\MSVC\14.39.33519\bin\Hostx86\x86
set SDK_BIN=R:\BuildTools-Hostx86-x86\Windows Kits\10\bin\10.0.22621.0\x86;R:\BuildTools-Hostx86-x86\Windows Kits\10\bin\10.0.22621.0\x86\ucrt
set PATH=%MSVC_BIN%;%SDK_BIN%;%PATH%
set INCLUDE=R:\BuildTools-Hostx86-x86\VC\Tools\MSVC\14.39.33519\include;R:\BuildTools-Hostx86-x86\Windows Kits\10\Include\10.0.22621.0\ucrt;R:\BuildTools-Hostx86-x86\Windows Kits\10\Include\10.0.22621.0\shared;R:\BuildTools-Hostx86-x86\Windows Kits\10\Include\10.0.22621.0\um;R:\BuildTools-Hostx86-x86\Windows Kits\10\Include\10.0.22621.0\winrt;R:\BuildTools-Hostx86-x86\Windows Kits\10\Include\10.0.22621.0\cppwinrt
set LIB=R:\BuildTools-Hostx86-x86\VC\Tools\MSVC\14.39.33519\lib\x86;R:\BuildTools-Hostx86-x86\Windows Kits\10\Lib\10.0.22621.0\ucrt\x86;R:\BuildTools-Hostx86-x86\Windows Kits\10\Lib\10.0.22621.0\um\x86


A quick test, building the GetBmp SaveBmp Demo by Robert Wishlaw  :

BCX BASIC to C/C++ Translator (c) 1999-2024 by Kevin Diggins
Version 8.0.8 (12/27/2023) Compiled using MS Visual C++ for 64-bit Windows Systems
[Lines In: 113] [Lines Out: 742] [Statements: 79] [Time: 0.01 Sec's]
BCX translated [Savebmp.Bas] to [Savebmp.C] for a C Compiler
**************************************************************************
MSVC is compiling [ "D:\BCX\bed\SaveBmp" ] as a 32-bit GUI application.
SaveBmp.c
Linking "D:\BCX\bed\SaveBmp"
Microsoft (R) Incremental Linker Version 14.39.33519.0
Copyright (C) Microsoft Corporation.  All rights reserved.
**************************************************************************
MSVC built [ "D:\BCX\bed\SaveBmp".exe ]
**************************************************************************
Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33519 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.