Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TIC work more like a compiler. #1247

Closed
nesbox opened this issue Nov 16, 2020 · 4 comments
Closed

Make TIC work more like a compiler. #1247

nesbox opened this issue Nov 16, 2020 · 4 comments
Assignees
Labels
console Issues related to console inside TIC-80

Comments

@nesbox
Copy link
Owner

nesbox commented Nov 16, 2020

We have to pass console commands as command-line arguments and process them without running UI.

@nesbox nesbox self-assigned this Nov 16, 2020
@nesbox nesbox added the console Issues related to console inside TIC-80 label Nov 16, 2020
nesbox added a commit that referenced this issue Nov 16, 2020
…s, temporary removed code/sprites/map injection
@nesbox
Copy link
Owner Author

nesbox commented Nov 16, 2020

1597f7b commit:

  • removed all the native file save/load dialogs
  • temporary removed code/sprites/map injection and live reloading
  • added as a submodule ArgParse lib to parse command-line arguments (https://github.com/cofyc/argparse), now it looks like:
$ ./tic80 -h
Usage: tic80 [cart] [options]

TIC-80 startup options:

    -h, --help        show this help message and exit
    --skip            skip startup animation
    --nosound         disable sound output
    --fullscreen      enable fullscreen mode
    --surf            run SURF mode to explore carts
    --fs=<str>        path to the file system folder
    --scale=<int>     main window scale
    --crt             enable CRT monitor effect

nesbox added a commit that referenced this issue Nov 17, 2020
nesbox added a commit that referenced this issue Nov 18, 2020
nesbox added a commit that referenced this issue Nov 18, 2020
nesbox added a commit that referenced this issue Nov 20, 2020
nesbox added a commit that referenced this issue Nov 20, 2020
nesbox added a commit that referenced this issue Nov 22, 2020
@nesbox
Copy link
Owner Author

nesbox commented Nov 22, 2020

Added cmd command-line option, you can pass commands directly to the Console.
For example, with the command tic80 --skip --cmd="load game.tic & export html game.zip & exit" you will load cart, export HTML and exit:

$ ./tic80 --skip --cmd="load bpp & export html game & exit"

 TIC-80 tiny computer 0.90.1432-dev Pro
 http://tic80.com (C) 2020

 hello! type help for help

>load bpp
cart bpp.tic loaded!
use RUN command to run it

>export html game
GET /export/0.90/html.zip [100%]
exporting html...

game.zip exported :)
>exit
>

@borbware
Copy link
Contributor

How about a headless mode to run console commands without opening a TIC-80 window?

That would make automating the creation of different native builds more painless!

nesbox added a commit that referenced this issue May 26, 2021
…ent), also fixed batch commands processing
@nesbox
Copy link
Owner Author

nesbox commented May 26, 2021

Added headless mode to run without main window here 29aa5fd

usage: 
tic80 --cli --cmd="load game.tic & export music track1.wav id=1 & exit"

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console Issues related to console inside TIC-80
Projects
None yet
Development

No branches or pull requests

2 participants