Skip to content

Commit c5bc6fc

Browse files
committed
Enhanced compatibility with Windows 11: Introduced the winconsole project to ensure the console version of nuBASIC functions correctly under the new OS environment.
1 parent 9e5592e commit c5bc6fc

File tree

17 files changed

+563
-25
lines changed

17 files changed

+563
-25
lines changed

config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
#define PACKAGE_NAME "nubasic"
7575

7676
/* Define to the full name and version of this package. */
77-
#define PACKAGE_STRING "nubasic 1.52"
77+
#define PACKAGE_STRING "nubasic 1.53"
7878

7979
/* Define to the one symbol short name of this package. */
8080
#define PACKAGE_TARNAME "nubasic"
@@ -83,13 +83,13 @@
8383
#define PACKAGE_URL ""
8484

8585
/* Define to the version of this package. */
86-
#define PACKAGE_VERSION "1.52"
86+
#define PACKAGE_VERSION "1.53"
8787

8888
/* Define to 1 if you have the ANSI C header files. */
8989
#define STDC_HEADERS 1
9090

9191
/* Version number of package */
92-
#define VERSION "1.52"
92+
#define VERSION "1.53"
9393

9494
/* Define to `__inline__' or `__inline' if that's what the C compiler
9595
calls it, or to nothing if 'inline' is not supported under any name. */

include/nu_about.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
/* -------------------------------------------------------------------------- */
1010

11-
#ifndef __NU_ABOUT_H__
12-
#define __NU_ABOUT_H__
11+
#pragma once
1312

1413

1514
/* -------------------------------------------------------------------------- */
@@ -36,7 +35,7 @@ namespace about {
3635
static const char* const homepage = "http://www.nubasic.eu";
3736
static const char* const license = "The MIT License (MIT)";
3837
static const char* const version = PACKAGE_VERSION;
39-
static const char* const copyright = "2014-2022";
38+
static const char* const copyright = "2014-2024";
4039
static const char* const description
4140
= "nuBASIC is a programming language from the BASIC family.\n"
4241
"nuBASIC has been written in C++ and distributed under MIT License."
@@ -53,8 +52,4 @@ namespace about {
5352
}
5453

5554

56-
/* -------------------------------------------------------------------------- */
57-
58-
#endif // __NU_ABOUT_H__
59-
6055
/* -------------------------------------------------------------------------- */

include/nu_variant.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
/* -------------------------------------------------------------------------- */
1010

11-
#ifndef __NU_VARIANT_H__
12-
#define __NU_VARIANT_H__
11+
#pragma once
1312

1413

1514
/* -------------------------------------------------------------------------- */
@@ -422,5 +421,3 @@ class variant_t {
422421

423422

424423
/* -------------------------------------------------------------------------- */
425-
426-
#endif // __NU_VARIANT_H__

main.cc

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//
1+
//
22
// This file is part of nuBASIC
33
// Copyright (c) Antonino Calderone (antonino.calderone@gmail.com)
4-
// All rights reserved.
5-
// Licensed under the MIT License.
4+
// All rights reserved.
5+
// Licensed under the MIT License.
66
// See COPYING file in the project root for full license information.
77
//
88

@@ -13,9 +13,8 @@
1313
#include "nu_interpreter.h"
1414
#include "nu_os_console.h"
1515
#include "nu_os_std.h"
16-
#include "nu_terminal_frame.h"
1716
#include "nu_reserved_keywords.h"
18-
17+
#include "nu_terminal_frame.h"
1918

2019
#include <cassert>
2120
#include <iostream>
@@ -26,10 +25,10 @@
2625
#include <variant>
2726

2827
#ifdef WIN32
28+
#pragma message("Warning: Use winconsole project to build command line version of nuBASIC, which is compatible with Windows 11")
2929
#include <Windows.h>
3030
#endif
3131

32-
3332
/* -------------------------------------------------------------------------- */
3433

3534
static nu::interpreter_t::exec_res_t exec_command(
@@ -47,7 +46,7 @@ static nu::interpreter_t::exec_res_t exec_command(
4746
basic.get_cur_line_n());
4847
else if (res == nu::interpreter_t::exec_res_t::STOP_REQ)
4948
printf("Execution stopped at STOP instruction, line %i.\n"
50-
"Type 'cont' to continue\n",
49+
"Type 'cont' to continue\n",
5150
basic.get_cur_line_n());
5251
return res;
5352
}
@@ -80,7 +79,6 @@ static nu::interpreter_t::exec_res_t exec_command(
8079
return nu::interpreter_t::exec_res_t::CMD_EXEC;
8180
}
8281

83-
8482
/* -------------------------------------------------------------------------- */
8583

8684
static int nuBASIC_console(int argc, char* argv[])
@@ -195,7 +193,6 @@ static int nuBASIC_console(int argc, char* argv[])
195193
return 0;
196194
}
197195

198-
199196
/* -------------------------------------------------------------------------- */
200197

201198
int main(int argc, char* argv[])

nubasic.sln

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26228.9
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.6.34302.98
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nubasic", "nubasic.vcxproj", "{E0C5DA15-A4C6-4FB4-BAC6-92DEB60B6B49}"
77
ProjectSection(ProjectDependencies) = postProject
@@ -15,6 +15,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NuBasicIDE", "ide\win\nuBas
1515
EndProject
1616
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "interpreter", "lib\win\interpreter.vcxproj", "{9622E9B4-A6E2-474F-804F-241C8AC419CF}"
1717
EndProject
18+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winconsole", "winconsole\winconsole.vcxproj", "{8A85877F-8A47-49DE-8308-929CC10C8F02}"
19+
EndProject
1820
Global
1921
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2022
Debug|x64 = Debug|x64
@@ -47,6 +49,14 @@ Global
4749
{9622E9B4-A6E2-474F-804F-241C8AC419CF}.Release|x64.Build.0 = Release|x64
4850
{9622E9B4-A6E2-474F-804F-241C8AC419CF}.Release|x86.ActiveCfg = Release|Win32
4951
{9622E9B4-A6E2-474F-804F-241C8AC419CF}.Release|x86.Build.0 = Release|Win32
52+
{8A85877F-8A47-49DE-8308-929CC10C8F02}.Debug|x64.ActiveCfg = Debug|x64
53+
{8A85877F-8A47-49DE-8308-929CC10C8F02}.Debug|x64.Build.0 = Debug|x64
54+
{8A85877F-8A47-49DE-8308-929CC10C8F02}.Debug|x86.ActiveCfg = Debug|Win32
55+
{8A85877F-8A47-49DE-8308-929CC10C8F02}.Debug|x86.Build.0 = Debug|Win32
56+
{8A85877F-8A47-49DE-8308-929CC10C8F02}.Release|x64.ActiveCfg = Release|x64
57+
{8A85877F-8A47-49DE-8308-929CC10C8F02}.Release|x64.Build.0 = Release|x64
58+
{8A85877F-8A47-49DE-8308-929CC10C8F02}.Release|x86.ActiveCfg = Release|Win32
59+
{8A85877F-8A47-49DE-8308-929CC10C8F02}.Release|x86.Build.0 = Release|Win32
5060
EndGlobalSection
5161
GlobalSection(SolutionProperties) = preSolution
5262
HideSolutionNode = FALSE

winconsole/Resource.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//{{NO_DEPENDENCIES}}
2+
// Microsoft Visual C++ generated include file.
3+
// Used by winconsole.rc
4+
5+
#define IDS_APP_TITLE 103
6+
7+
#define IDR_MAINFRAME 128
8+
#define IDD_WINCONSOLE_DIALOG 102
9+
#define IDD_ABOUTBOX 103
10+
#define IDM_ABOUT 104
11+
#define IDM_EXIT 105
12+
#define IDI_WINCONSOLE 107
13+
#define IDI_SMALL 108
14+
#define IDC_WINCONSOLE 109
15+
#define IDC_MYICON 2
16+
#ifndef IDC_STATIC
17+
#define IDC_STATIC -1
18+
#endif
19+
// Next default values for new objects
20+
//
21+
#ifdef APSTUDIO_INVOKED
22+
#ifndef APSTUDIO_READONLY_SYMBOLS
23+
24+
#define _APS_NO_MFC 130
25+
#define _APS_NEXT_RESOURCE_VALUE 129
26+
#define _APS_NEXT_COMMAND_VALUE 32771
27+
#define _APS_NEXT_CONTROL_VALUE 1000
28+
#define _APS_NEXT_SYMED_VALUE 110
29+
#endif
30+
#endif

winconsole/framework.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// header.h : include file for standard system include files,
2+
// or project specific include files
3+
//
4+
5+
#pragma once
6+
7+
#include "targetver.h"
8+
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
9+
// Windows Header Files
10+
#include <windows.h>
11+
#include <shellapi.h>
12+
13+
// C RunTime Header Files
14+
#include <stdlib.h>
15+
#include <malloc.h>
16+
#include <memory.h>
17+
#include <tchar.h>

winconsole/nuBasic.ico

23 KB
Binary file not shown.

winconsole/small.ico

2.93 KB
Binary file not shown.

winconsole/targetver.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#pragma once
2+
3+
// // Including SDKDDKVer.h defines the highest available Windows platform.
4+
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
5+
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
6+
#include <SDKDDKVer.h>

0 commit comments

Comments
 (0)