Skip to content

Commit

Permalink
Updated to 0.14.4
Browse files Browse the repository at this point in the history
Watcom generated multireaded windows projects. Added features to visual Studio project generation. Added masm support and masm64 support
  • Loading branch information
burgerbecky committed May 4, 2023
1 parent db3db3b commit 637c77f
Show file tree
Hide file tree
Showing 9 changed files with 392 additions and 151 deletions.
2 changes: 1 addition & 1 deletion makeprojects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
########################################

# Current version of the library as a numeric tuple
__numversion__ = (0, 14, 3)
__numversion__ = (0, 14, 4)

# Current version of the library
__version__ = ".".join([str(num) for num in __numversion__])
Expand Down
4 changes: 2 additions & 2 deletions makeprojects/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ class SourceFile(object):
for processing.
@note
For hash consistency, @ref makeprojects.core.SourceFile.relative_pathname has all directory slashes
in Windows format "\" instead of Linux/BSD format on all platforms.
For hash consistency, @ref makeprojects.core.SourceFile.relative_pathname has all directory
slashes in Windows format "\" instead of Linux/BSD format on all platforms.
Attributes:
relative_pathname: File base name with extension
Expand Down
2 changes: 1 addition & 1 deletion makeprojects/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def configuration_presets(configuration):
libraries_list.extend(
["Kernel32.lib", "Gdi32.lib", "Shell32.lib", "Ole32.lib",
"User32.lib", "Advapi32.lib", "version.lib", "Ws2_32.lib",
"Comctl32.lib"])
"Comctl32.lib", "WinMM.lib"])

define_list.extend(["_WINDOWS", "WIN32_LEAN_AND_MEAN"])
if platform in (PlatformTypes.win64,
Expand Down
79 changes: 79 additions & 0 deletions makeprojects/masm_support.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Data and code to support MASM targets
This module contains data, classes and functions to support
building MASM files
@package makeprojects.masm_support
@var makeprojects.masm_support.MASM_BOOLEANS
Boolean list for MASM, Name, Default, switches
@var makeprojects.masm_support.MASM_STRINGS
Name, default, switch, generates output, quote parameters
"""

from __future__ import absolute_import, print_function, unicode_literals

from .validators import lookup_booleans, lookup_strings, lookup_enum_append_keys

# Enumerations for MASM warning levels
MASM_WARNINGLEVEL = (
("/W0", 0), ("/W1", 1), ("/W2", 2), ("/W3", 3)
)

# Not supported with MASM for VC 2003
# MASM_ERROR_REPORT = (
# ("/errorReport:prompt", 0), ("/errorReport:queue", 1),
# ("/errorReport:send", 2), ("/errorReport:none", 3)
# )

# Names, default, lookup tables for MASM enums
MASM_ENUMS = (
("WarningLevel", (3, MASM_WARNINGLEVEL)),
# ("ErrorReporting", (0, MASM_ERROR_REPORT))
)

# Boolean list for MASM, Name, Default, switches
MASM_BOOLEANS = (
("NoLogo", (True, "/nologo", True)),
("TinyMemoryModelSupport", (False, "/AT", True)),
("GenerateDebugInformation", (True, "/Zi", True))
)

# String entries for MASM, Name, default, switch, generates output, quote
# parameter
MASM_STRINGS = (
("ObjectFileName", (
"$(IntDir)%(FileName).obj", "/Fo", True, True)),
)


########################################


def make_masm_command(command_dict):
"""
Create MASM command line
Args:
command_dict: Dict with command overrides
Returns:
Command line, Description, Output list
"""

# Create the initial command line
# /c = Assemble without linking
cmd = ["ml.exe", "/c"]

# /errorReport:prompt /Ta "$(InputPath)"
lookup_booleans(cmd, MASM_BOOLEANS, command_dict)
lookup_enum_append_keys(cmd, MASM_ENUMS, command_dict)
outputs = lookup_strings(cmd, MASM_STRINGS, command_dict)
cmd.append("/Ta\"%(FullPath)\"")

description = "Assembling %(FileName)%(Extension)..."
return " ".join(cmd), description, outputs
Loading

0 comments on commit 637c77f

Please sign in to comment.