Skip to content

Commit

Permalink
WIP4
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Sep 5, 2024
1 parent d016678 commit c7c54a5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions fsxc/Fsxc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,11 @@ module FsxScriptInit
type FsiStub = { CommandLineArgs: array<string> }
let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() }
"""

let extraExtensionForMain: ExtraExtension = "fs"
let autogeneratedFile = GetAutoGenerationTargets origScript extraExtensionForMain

let autogeneratedFile =
GetAutoGenerationTargets origScript extraExtensionForMain

let binFolder = autogeneratedFile.Directory

Expand All @@ -605,10 +608,17 @@ let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() }
)

let extraExtensionForInitFile: ExtraExtension = "init.fs"
let initFile = GetAutoGenerationTargets origScript extraExtensionForInitFile

let initFile =
GetAutoGenerationTargets origScript extraExtensionForInitFile

File.WriteAllText(initFile.FullName, initialFileContent)

let extraExtensions = [extraExtensionForInitFile ; extraExtensionForMain]
let extraExtensions =
[
extraExtensionForInitFile
extraExtensionForMain
]

seq {
// for !LEGACY_FRAMEWORK, this init file will be added to the fsproj file
Expand Down Expand Up @@ -847,7 +857,7 @@ let fsi = { CommandLineArgs = System.Environment.GetCommandLineArgs() }
#if !LEGACY_FRAMEWORK
let projectFile = generateProjectFile script contents extraExtensions
#else // dummy for to just prevent "unused" warning, meh
for ext in extraExtensions do
for _ext in extraExtensions do
()
#endif

Expand Down

0 comments on commit c7c54a5

Please sign in to comment.