paltryPaltry Portable Environment

联合创作 · 2023-09-30 03:30

Paltry Portable Environment

Paltry creates and updates a portable development environment for recent Windows installs. You might want this if your account doesn't have admin permissions, to avoid interfering with any software installed on the system, or to apply the best practices of DevOps to your development environment. Setup a new machine in minutes instead of hours and keep it up-to-date just as easily. Configurable and scriptable to accommodate your needs.

The following tools are available:

Prerequisites

  • Windows 10 (or upgrade to PowerShell 5.1)
  • No applications need be preloaded
  • No special permissions outside of being able to write to a user folder

Installation

  • Create a local folder for your portable environment (~\Developer recommended)
  • Download the latest Paltry ZIP archive
    • Unblock the downloaded ZIP archive
      • See here for instructions
    • Open the downloaded archive
    • Drag the paltry-master folder in the archive to the portable environment folder you created above and rename it to paltry
    • Open the extracted paltry folder
  • Configure your environment
    • If you have an existing config.json already prepared, overwrite the one in the extracted Paltry
    • Otherwise consider editing the default config.json to make it your own at this point
      • You can always customize this later and rerun the build
      • The default config comes with all the tools but some features require additional configuration
  • Double click on build.cmd in your paltry folder
    • Paltry will now build
    • The first time this will take anywhere from 1-15+ minutes depending on your selected plugins and network speed
    • By default - when the build completes - an explorer window will pop up with various shortcuts
      • Feel free to launch any of the tools from here
      • For bonus points add these as a toolbar
        • Right click on your taskbar
        • Toolbars
        • New toolbar...
        • Select the same path as the window launched after the build
          • Protip: you can copy the full path from the address bar of each

Configuration

The only file users should modify is config.json. It is intended to encompass all user-configurable behavior. The following is a definition of the supported configuration options.

  • cwd (string) - The current working directory to use when launching the console.
  • env ({string: string}) - Environment variables to set for the portable environment. Note that Path is special since it is appended to by Paltry and so should be extended with the path option below.
  • disabled ([string]) - A blacklist of the plugins not to run. Note that nonexistant plugins are ignored. The default config takes advantage of this to list available plugins "commented out" by prefixing them with //. Removing the "comment" in this list will actually disable that plugin. If you don't ever intend to disable a plugin feel free to remove it from this list entirely.
  • versions ({string: string}) - Most tools support installing the latest available version except for 7zip, which must have a version set. The maven, node, npm, and ruby tools support specifying an exact version here. An empty string value or omitting a key entirely defaults to the latest version.
  • path ([string]) - An array of additional locations to add to your path. Usefully for adding other tools not supported by Paltry that you manually downloaded.
  • scripts ({string: [string]}) - Custom scripts are defined with the name as the key (this becomes the filename/command used to call them) and an array of the lines in the script as the value. Note these will create batch files that are run with the command prompt.
  • eclipse (object)
    • skipIntro (boolean) - Bypass displaying maximized welcome screen that blocks immediate use.
    • unlimitedConsoleOutput (boolean) - Don't discard console output after a limited number of characters.
    • gitIconDecorations (boolean) - Use icons to label Git modified resources instead of text.
    • cleanInstallMavenLaunchConfig (boolean) - Add a launch configuration for Maven to perform a clean install build on the current project.
  • git (object)
    • ssh (boolean) - Enabling this will make sure you have SSH keys setup, generating them if needed. When keys are generated, the public key will be printed to the console. Please make sure to add this public key to any git remotes you intend to communicate with using SSH.
    • repos ({string: string}) - Git repositories you want Paltry to clone automatically on your behalf. The local folder to use is the key with the remote URL as the value.
  • maven (object)
    • cleanup (boolean) - Optionally cleanup remote repo data from your m2 repo. This will resolve some issues with not finding certain artifacts at the cost of a longer next build.
    • servers ([string]) - If you use private Maven repos (such as a Nexus server) then add their ids in an array to this property. The build will prompt for your credentials and will save encrypted versions of them to settings.xml. Different credentials per server are not supported at this time.
  • vscode (object)
    • extensions ([string]) - Array of extensions to ensure are installed. Make sure to use the fully qualified publisher.extension name.
    • settings (object) - User settings for VS Code. Note that these will override any existing settings on a per-property basis. Apologies in advance for the ugly formatting on the JSON output.

License

Paltry is MIT licensed. See LICENSE.

浏览 6
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报