Code Monkey home page Code Monkey logo

Comments (4)

mirkobrombin avatar mirkobrombin commented on June 14, 2024 1

Action run_script implemented here: bottlesdevs/Bottles@fd5ceb4

Usage:

Name: test
Description: Testing scripts
Grade: Gold

Dependencies: []

Parameters: {}
  
Executable:
  name: Test
  file: Example.exe
  path: Program Files (x86)/Example
  
Steps:
- action: run_script
  script: |
    echo "Bottle is: !bottle_name"
    echo "Bottle path:"
    ls !bottle_path
    echo "Bottle drive_c:"
    ls !bottle_drive

Placeholders:

  • !bottle_name -> display the bottle name
  • !bottle_path -> point to the bottle root
  • !bottle_drive -> point to the bottle /drive_c

Preventions:

  • if bottle.yml is found in script, the installation will fail (should not be changed by scripts, btw no need for better preventions as every installer must be approved)

image

I will also provide actions like download_archive, extract_archive, get_from_cab, .. and others already seen for dependencies, but should only be used for specific program context, as if other programs can take benefits from these should be better to just make a dependency and declare in the manifest installer.

from programs.

mirkobrombin avatar mirkobrombin commented on June 14, 2024

Hi, this was already scheduled (at least in my mind :D). Planning for 2022.1.14.

I'll use this issue to take some notes:

  • every script should have access to some placeholders:
    • $BOTTLE_DIR
    • $TEMP_DIR
  • cwd should be set to the bottle path
  • scripts should not have access to curl/wget, better using the installer actions to register downloads with hash for corruption check

from programs.

fosspill avatar fosspill commented on June 14, 2024

Ah, sweet. I'll be writing some scripts once it arrives!

I completely agree with your points so far.

Maybe consider if other commands should be controlled by Bottles too? Either for security or convenience purposes.

An action for "write_to_file" for instance may be nicer looking than having a script which echos text into a file?

from programs.

mirkobrombin avatar mirkobrombin commented on June 14, 2024

Yes definitely, I should be able to work on this in the next days, if you think of other actions that should implemented to replace some scripts let me know

from programs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.