-
1Installation
You can follow the video tutorial (part 04:24-05:55), or follow written instructions.
To start, you need to:
- download the latest release of IDE package from GitHub: https://github.com/adbrt/cb-legacy-dev/releases
it will contain the installation script, required configuration files and a bunch of FOSS software and required frameworks (CodeBlocks, TDM-GCC, MinGW-w64, wxWidgets, DJGPP, OpenWatcom, DOSBox-X) - prepare your Windows 3.11 for Workgroups (English version) and Windows 95 (OSR2 English version - WIN95 subdirectory) installation files in order to run the built-in emulation. You can skip the installation of either of these systems if you don't need it.
Now unpack the installation files to the directory where you want it to be installed, and execute the SetupCodeBlocks_AllInOne.bat file and follow the on-screen instructions.
The installer will create a portable installation, everything will be placed into a single directory.
It will automatically extract included files and download any necessary dependencies. Free Borland C++ 5.5 compiler will be downloaded from Embarcadero website - it is the only not open-source (but still freeware) compiler that will be used. For Windows 95+ applications MinGW can be used instead. CodeBlocks, wxWidgets, utilities, wizards, templates and configuration files will be extracted.
At some point you will be prompted to paste your Windows 3.11 installation files - a window will pop up:
Place these files (they can be in a form of disk images) into the directory and press any key to continue. The installer will automatically download updates and drivers for Windows 3.11: Win32S (PW1118.exe), TCP32B (tcp32b.exe), Video for Windows (wv1160.exe), Windows Media Player (MPSetup.exe), WingG 1.0 (wing10.exe), S3 driver (w3117004.zip).
The same will happen for Windows 95 in the next step, you will need to paste the contents of your WIN95 directory.
The installer will aslo download necessary drivers and updates for Windows 95: DirectX 7.0A (DX7Aeng.exe), DCOM95 (dcom95.exe), Year 2000 patch (w95y2k.exe), Windows Media Player 6.4 (mpfull.exe), Winsock 2 Update (W95WS2setup.exe), 3Dfx Voodoo Graphics driver (vg-w9x-q3.exe), S3 Graphics driver (w9521103.zip).During Windows 95 installation a DOSBox-X window with some automated scripts running will appear, please do not interfere, the Windows system files structure is being created:
This should be the last step.
After the installation is done, a file runCodeBlocks.bat will apppear - you can use it to run the IDE.
- download the latest release of IDE package from GitHub: https://github.com/adbrt/cb-legacy-dev/releases
-
2Creating your first Windows 3.11 application
This will be a Win32s application, which requires Win32s addon on the Windows 3.11 (already pre-installed in the emulator).
You can follow the video tutorial (part 05:47-08:54), or follow written instructions.Open the IDE by clicking runCodeBlocks.bat.
Now click "Create a new project":
Select a wxWidget project template and choose wxWidgets 2.8.x, then the option to execute in Win 3.11:
Select where you want to save your project:
Select wxSmith and a Frame Based application with sample elements
Configure the project as shown here:
Borland C++ Compiler, Release configuration, no Unicode, other options not selectedNow you can see a simple GUI for a test application:
If you want to edit the code, you can double click on the control you want to interact with in your application (e.g. a button), and the editor will appear:
To build and run the application in Windows 3.11, just press the red Debug button:
If you want to run the application on the host machine instead, just press the "Build and run" button:
You can also add new build targets, either for Windows 95 or modern 64-bit systems by pressing File -> New -> Build target and choosing appropriate frameworks and compilers. Then, you can switch the targets from the drop-down list next to the "Build and run" button.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.