如何在 Docker 容器(在 Windows 上)中设置 VB6 IDE? [英] How to setup the VB6 IDE in a Docker container (on Windows)?

查看:25
本文介绍了如何在 Docker 容器(在 Windows 上)中设置 VB6 IDE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以创建一个可用于运行 VB6 IDE 的 Docker 容器?是否有任何引人注目的问题/不兼容性?

根据我对 Docker 的了解(可能不多),它似乎是一种运行 VB6 IDE 和编译器的轻量级方法,尤其是与虚拟机相比.

我对此有两种设想:

  • 在干净"的环境中执行构建

  • 日常软件开发任务

在安装 & 时,我们似乎需要处理一些特殊情况.在新机器上配置 VB6,因此将所有内容捆绑到一个容器中可以节省大量时间并避免一些陷阱.

Docker 配置的一个关键属性似乎是使用特定的注册 COM DLL 等设置环境,也许还有其他细节,如常规文件等.我的印象是,你可以在基于某种容器分层的 Docker 环境中积累这些东西.当然,重点是将这些东西排除在实际的 Windows 操作系统配置之外.

注意:我有 VB6 的合法/原始安装媒体 &SP6.

<小时>

我在 GitHub 上看过 这个项目,但它是用于在 Linux 上的 WINE 下运行 VB6,这不是我需要的.也许这可能是在 Windows 上构建容器的有用起点.

<小时>

背景:

目前我使用虚拟机运行 VB6 IDE 来执行构建.此功能正常,但似乎相对较慢,并且会占用 很多 磁盘空间.由于这些开销,它不适合开发使用.

使用 Kinook Visual Build Pro 运行构建,还包括构建一些 .NET 程序集、WISE 安装程序等.最终,我希望将所有这些都放入容器中.

解决方案

我们在 docker for windows 中编译 vb6 项目.同时拥有 3 百万个 loc 和 1000 万个 .NET LOC.

<小时>

你需要完整版的 windows,因为 WindowsServerCore 还不工作.

<块引用>

来自 mcr.microsoft.com/windows:1903

  1. 使用静默安装方式安装 VB6 ide.

<块引用>

%INSTDIR%setupacmsetup.exe/K "12345678"/T "%INSTDIR%setupVB98PRO.STF"/S "%INSTDIR%"/n "用户名"/o "公司名"/b 1/gc %cd%vb6_install_log.txt/qtn

  1. 安装 VB6-SP6.

<块引用>

要安装vbsp6,解压VS6sp61.cab(VS6sp62.cab、VS6sp63.cab、VS6sp64.cab必须在文件旁边).然后将 VB98 目录复制到现有的 VB6 安装上.

如果您遇到访问冲突异常的问题,您将需要此安装.

  1. 立即试用编译器

构建一个小项目非常容易.只需从一个默认项目开始,然后继续.

  1. 第三方组件

这是困难的部分.大多数时候,旧组件没有静默安装程序.您可以通过自己注册第三方文件来解决此问题.只需使用 regsvr32 即可.

<小时>

你可以在 github 上找到完整的食谱:

https://github.com/Ro-Fo/Vb6IdeDocker

Is it possible to create a Docker container which can be used to run the VB6 IDE? Are there any showstopper issues / incompatibilities?

From what I understand of Docker (maybe not much) it seems like it could be a lightweight method of running the VB6 IDE and compiler, especially compared to virtual machines.

I have two scenarios in mind for this:

  • Performing builds in a 'clean' environment

  • Routine software development tasks

There seem to be a number of peculiarities we need to deal with when installing & configuring VB6 on a new machine, and so bundling all that up into a container could save lots of time and avoid some pitfalls.

It seems a key attribute of the Docker configuration would be to setup the environment with specific registered COM DLLs, etc., and maybe other details like regular files and so on. I have the impression you can accumulate these kinds of things in a Docker environment based on some kind of layering of containers. The point of course would be to keep these things OUT of the actual Windows OS configuration.

NB: I have legit / original installation media for VB6 & SP6.


I have seen this project at GitHub but it is for running VB6 under WINE on Linux, which is not what I need. Maybe it could be a useful starting point for building a container on Windows.


For background:

At present I use virtual machines to run the VB6 IDE for performing builds. This functions OK but seems relatively slow and consumes a lot of disk space. It is unsuitable for development use because of these overheads.

Builds are run using Kinook Visual Build Pro, and also include building some .NET assemblies, WISE installers, etc. Ultimately I'd like to get all of that into containers as well.

解决方案

We do compile vb6 projects in docker for windows. While having 3 mil loc and 10mil .NET LOC.


You need the full version of windows, since WindowsServerCore does not work yet.

FROM mcr.microsoft.com/windows:1903

  1. Install VB6 ide with silent install.

%INSTDIR%setupacmsetup.exe /K "12345678" /T "%INSTDIR%setupVB98PRO.STF" /S "%INSTDIR%" /n "User Name" /o "Company name" /b 1 /gc %cd%vb6_install_log.txt /qtn

  1. Install the VB6-SP6.

To install vbsp6, extract VS6sp61.cab (VS6sp62.cab, VS6sp63.cab, VS6sp64.cab must be beside the file). Then you copy the VB98 Dir over the existing VB6 installation.

You will need this installation if you having problems with access violation exceptions.

  1. Try the compiler now

Building a small project was very easy. Just start with a default project and go on from that point.

  1. third party components

this is the difficult part. The most of the time there are no silent installer for old components. You can fix this by register your third party files by yourself. Just use regsvr32 for that porpose.


The full recipe you can find on github:

https://github.com/Ro-Fo/Vb6IdeDocker

这篇关于如何在 Docker 容器(在 Windows 上)中设置 VB6 IDE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆