Skip to content

support console programs (beta-3.0) - #489

Merged
mortend merged 2 commits into
fuse-open:beta-3.0from
mortend:console
May 28, 2023
Merged

mortend merged 2 commits into
fuse-open:beta-3.0from
mortend:console

Conversation

@mortend

@mortend mortend commented May 28, 2023

Copy link
Copy Markdown
Member

compiler: support console programs

This makes it possible to build normal console programs in Uno, using
"static int Main(string[] args)" entrypoints (return type and args are
optional), just like in C#.

  • Set "outputType" to "console" (unoproj) to create a console program
  • Supported by dotnet and native build targets

UnoCore: refactor GetCommandLineArgs() for C++

Store argc and argv from main() and move the implementation into
Environment.GetCommandLineArgs().

@mortend
mortend force-pushed the console branch 5 times, most recently from 8456cf2 to 7f4577f Compare May 28, 2023 08:33
mortend added 2 commits May 28, 2023 16:18
Store argc and argv from main() and move the implementation into
Environment.GetCommandLineArgs().
This makes it possible to build normal console programs in Uno, using
"static int Main(string[] args)" entrypoints (return type and args are
optional), just like in C#.

* Set "outputType" to "console" (unoproj) to create a console program
* Supported by dotnet and native build targets
@mortend
mortend merged commit 724f61a into fuse-open:beta-3.0 May 28, 2023
@mortend
mortend deleted the console branch May 28, 2023 11:14
mortend added a commit to mortend/uno that referenced this pull request May 29, 2023
This fixes compile errors such as:

    main-mobile.cpp(1): E3356: 'Uno.Environment.GetCommandLineArgs()'
    could not be resolved

Regressed in c049bc1 (fuse-open#489)
mortend added a commit to mortend/uno that referenced this pull request May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant