Skip to content

Commit

Permalink
port-msc: some WIP, unfortunatly cmd line length must be < 8000 chars…
Browse files Browse the repository at this point in the history
…, so we need to trick a bit
  • Loading branch information
andreasdr committed Jan 21, 2025
1 parent 7c67a4d commit ce59b0a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
26 changes: 16 additions & 10 deletions make-msc-module.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -199,29 +199,35 @@ function: buildLibraryMSC($name, $libraries, $definitions, $includes, $ldFlags,
$libraryExtension = ".dll"

try
try
filesystem.removePath($objectPath, true)
catch ($exception)
end

# create paths
createPathRecusively($objectPath)
createPathRecusively($libraryPath)

# compile each compilation units
$compilationUnitIdx = 0
$fileObjectPaths = {}
$commands = []
$compilationUnits = ""
forEach($file in $files)
#
# $fileObjectPath = filesystem.getPathName($file)
$fileObjectPath = ""
$fileObjectPathCandidate =
$name +
"/" +
filesystem.getFileName(filesystem.getPathName(filesystem.getPathName($file))) +
"/" +
filesystem.getFileName(filesystem.getPathName($file))
if ($fileObjectPaths->contains($fileObjectPathCandidate) == false)
$fileObjectPaths->set($fileObjectPathCandidate, $fileObjectPaths->getSize())
end
$fileObjectPath =
$name +
"/" +
$fileObjectPaths->get($fileObjectPathCandidate)

# create file object path
createPathRecusively($objectPath + "/" + $fileObjectPath)

#
$compilationUnit = $objectPath + "/" + ($compilationUnitIdx++) + ".obj"
$compilationUnit = $objectPath + "/" + $fileObjectPath + "/" + filesystem.removeFileExtension(filesystem.getFileName($file)) + ".obj"
if ($compilationUnits->isEmpty() == false)
$compilationUnits = $compilationUnits + " "
end
Expand Down Expand Up @@ -266,7 +272,7 @@ function: buildLibraryMSC($name, $libraries, $definitions, $includes, $ldFlags,
" " +
$file +
" " +
"1 > nul"
"1>nul"
#
if ($command == null)
continue
Expand Down
1 change: 1 addition & 0 deletions make.tscript
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ function: main()
$executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libminitscript.lib\""
$executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libyannet.lib\""
$executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libtdme-ext.lib\""
$executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libagui.lib\""
$executableLdFlags = $executableLdFlags + " " + "/LIBPATH \"lib/libtdme.lib\""
elseif ($$.application::OS == "Windows-MINGW")
$yannetPlatformFiles = [
Expand Down

0 comments on commit ce59b0a

Please sign in to comment.