Giter Club home page Giter Club logo

winepresets's Introduction

winepresets

This is a command-line WINE prefix manager. Very WIP!

Concept: A preset is a small script that can set up environment variables, provide a setup function that gets run when a new prefix is created. Most importantly, presets can inherit other presets. This allows for sharing common functionality (such as setting up dxvk or setting up a game launcher that gets used by multiple games) between multiple presets.

Dependencies

  • bash
  • coreutils
  • dialog
  • dos2unix
  • wget
  • wine
  • winetricks

Usage

  1. Clone this repo into some directory. The directory you clone into must stay constant because the generated prefixes reference it (you can move it if you then replace the platform symlink in each of the prefixes' directories).
  2. Run wp-newprefix to create a new prefix. Example: wp-newprefix -p the-elder-scrolls-online eso to create a new prefix with the the-elder-scrolls-online preset in the eso directory. This will also automatically run the set-up script of that preset, which for game presets usually installs the game.
  3. Setup scripts that install applications usually create launcher scripts in the prefix directory. In that case, you can directly start the application by executing that launcher script. To create custom launcher scripts, see the section Entering a prefix context below.

Entering a prefix context

Each launcher script sources the env script in the prefix directory. However, that script can also be sourced directly from an interactive shell to set up the environment for that prefix (such as the WINEPREFIX environment variable). This will also provide the user with a couple useful commands:

  • setup, to re-run the setup script in case the user created the prefix with the option to suppress running the setup (-S)
  • mklaunch, which generates a launcher script in the prefix directory. Syntax: mklaunch <name> <exe-path> [args...] where exe-path is a Windows path inside the WINE prefix (e.g. mklaunch launcher.sh 'C:\Program Files (x86)\TmNationsForever\TmForeverLauncher.exe'.

NOTE: The functions prefixed with wp_ are internal and should not be called directly!

This feature (sourcing the env script from an interactive shell) was tested with the Bash and Zsh shells and might not work correctly with other shells.

winepresets's People

Contributors

2xsaiko avatar

Watchers

 avatar  avatar

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.