Commit e427a7fb authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl
Browse files

for windows add application option: Run from console, does the same as passing...

for windows add application option: Run from console, does the same as passing -con to the executable: no AllocConsole and no press any key to exit
parent 424963ab
Pipeline #54337 passed with stage
in 38 seconds
......@@ -284,6 +284,11 @@ where
)
[ ControlPos (Left,zero)
]
:+: CheckControl
[ ("Run from console", Nothing, toMark ao.run_from_console, noPS (\l->{l & ao = {l.ao & run_from_console = not l.ao.run_from_console}}))
]
(Columns 1)
[ControlPos (Left,zero)]
:+: PlatformDependant
NilLS
(FontNameSizeControl inifn inifs fontNames fontSizes fontfun sizefun [])
......
......@@ -4,11 +4,10 @@ import StdArray,StdChar,StdFile, StdInt
import PmTypes
ApplicationOptionsToFlags :: !ApplicationOptions -> Int
ApplicationOptionsToFlags {sgc,pss,marking_collection,set,o,memoryProfiling,write_stderr_to_file,disable_rts_flags}
= flags
ApplicationOptionsToFlags {sgc,pss,marking_collection,set,o,memoryProfiling,write_stderr_to_file,run_from_console,disable_rts_flags}
= showgc+printstacksize+showexectime+cons+marking_collection_mask+memory_profiling_mask+
write_stderr_to_file_mask+run_from_console_mask+disable_rts_flags_mask
where
flags
= showgc+printstacksize+showexectime+cons+marking_collection_mask+memory_profiling_mask+write_stderr_to_file_mask+disable_rts_flags_mask
showgc
| sgc = 2
= 0
......@@ -37,33 +36,39 @@ where
disable_rts_flags_mask
| disable_rts_flags = 8192
= 0
run_from_console_mask
| run_from_console = 2048
= 0
FlagsToApplicationOptions :: !Int !ApplicationOptions -> ApplicationOptions;
FlagsToApplicationOptions flags applicationOptions
= {applicationOptions & sgc=showgc,pss=printstacksize,marking_collection=marking_collection,set=showexectime,
o=output, memoryProfiling=memoryProfiling, write_stderr_to_file=write_stderr_to_file, disable_rts_flags=disable_rts_flags};
= {applicationOptions & sgc=showgc,pss=printstacksize,marking_collection=marking_collection,set=showexectime,
o=output,memoryProfiling=memoryProfiling,write_stderr_to_file=write_stderr_to_file,
run_from_console=run_from_console,disable_rts_flags=disable_rts_flags};
where
showgc
= (flags bitand 2) <> 0;
printstacksize
= (flags bitand 4) <> 0;
showexectime
= (flags bitand 8) <> 0;
memoryProfiling
= (flags bitand 32) <> 0;
marking_collection
= (flags bitand 64) <> 0;
write_stderr_to_file
= (flags bitand 128) <> 0;
output
| (flags bitand 16) <> 0
= NoConsole;
| (flags bitand 1) <> 0
= BasicValuesOnly;
// otherwise
= ShowConstructors;
disable_rts_flags
= (flags bitand 8192) <> 0;
showgc
= flags bitand 2 <> 0;
printstacksize
= flags bitand 4 <> 0;
showexectime
= flags bitand 8 <> 0;
memoryProfiling
= flags bitand 32 <> 0;
marking_collection
= flags bitand 64 <> 0;
write_stderr_to_file
= flags bitand 128 <> 0;
output
| flags bitand 16 <> 0
= NoConsole;
| flags bitand 1 <> 0
= BasicValuesOnly;
// otherwise
= ShowConstructors;
disable_rts_flags
= flags bitand 8192 <> 0;
run_from_console
= flags bitand 2048 <> 0;
write_options_file :: !{#.Char} !.Int !.Int !.Int !.Int !.Int !.Int !Bool !*a -> *(!Bool,!*a) | FileSystem a;
......
......@@ -402,6 +402,7 @@ ApplicationOptionsTable =
SimpleOption "ShowStackSize" (\a->a.pss) (\v a->{a & pss=v}),
SimpleOption "MarkingCollector" (\a->a.marking_collection) (\v a->{a & marking_collection=v}),
SimpleOption "DisableRTSFlags" (\a->a.disable_rts_flags) (\v a->{a & disable_rts_flags=v}),
SimpleOption "RunFromConsole" (\a->a.run_from_console) (\v a->{a & run_from_console=v}),
SimpleOption "StandardRuntimeEnv" (\a->a.standard_rte) (\v a->{a & standard_rte=v}),
GroupedOption "Profile" ApplicationProfileOptionsTable id const,
GroupedOption "Output" ApplicationOutputOptionsTable id const
......
......@@ -309,6 +309,7 @@ eqAppOpts ao1 ao2
ao1.fn == ao2.fn &&
ao1.fs == ao2.fs &&
ao1.write_stderr_to_file == ao2.write_stderr_to_file &&
ao1.run_from_console == ao2.run_from_console &&
ao1.memoryProfiling == ao2.memoryProfiling &&
ao1.memoryProfilingMinimumHeapSize == ao2.memoryProfilingMinimumHeapSize &&
ao1.profiling == ao2.profiling &&
......
......@@ -129,6 +129,7 @@ DefCodeGenOptions :: CodeGenOptions
, fn :: !String // font name: only on Mac platform
, fs :: !Int // font size: only on Mac platform
, write_stderr_to_file :: !Bool
, run_from_console :: !Bool // only used on Windows
, memoryProfiling :: !Bool
, memoryProfilingMinimumHeapSize :: !Int
......
......@@ -326,6 +326,7 @@ DefCodeGenOptions =
, fn :: !String // !FontName
, fs :: !Int // !FontSize
, write_stderr_to_file :: !Bool
, run_from_console :: !Bool
, memoryProfiling :: !Bool
, memoryProfilingMinimumHeapSize :: !Int
, profiling :: !Bool
......@@ -352,8 +353,8 @@ DefApplicationOptions =
, o = ShowConstructors
, fn = "Monaco" //=> platform dependant?
, fs = 9 //=> platform dependant?
, write_stderr_to_file
= False
, write_stderr_to_file = False
, run_from_console = False
, memoryProfiling = False
, memoryProfilingMinimumHeapSize = 0
, profiling = False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment