Compare commits
7 Commits
vagrant+pa
...
v1.1.4-xpl
Author | SHA1 | Date | |
---|---|---|---|
1108d7ca1f | |||
000a3e40e0 | |||
bf882f1dc1 | |||
8e0afaf846 | |||
f8850b1344 | |||
6b2d288fbd | |||
8303a7acbc |
5
.gitattributes
vendored
@ -1,7 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
*.cmd text eol=crlf
|
||||
*.bat text eol=crlf
|
||||
*.ps1 text eol=crlf
|
||||
*.md text eol=lf
|
||||
*.sh text eol=lf
|
||||
|
163
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@ -1,163 +0,0 @@
|
||||
name: "🐞 Bug report (encountered problems/errors)"
|
||||
description: Something is not working as it should
|
||||
title: "[Bug] "
|
||||
labels: "🐛 Type: Bug"
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for reporting a bug for the Cmder project!
|
||||
------------------------------------------------------------------
|
||||
|
||||
Please make sure you read and follow the following instructions carefully before reporting bugs, and/or requesting new features.
|
||||
|
||||
- You can find the version of Cmder.exe and ConEmu.exe binaries using Right Click → Properties → Details menu.
|
||||
|
||||
- type: textarea
|
||||
id: version
|
||||
attributes:
|
||||
label: Version Information
|
||||
description: |
|
||||
Please write your Cmder and ConEmu version below. If applicable, write down your Windows edition too.
|
||||
**👉 See:** [How to find out which Cmder version I'm using](https://github.com/cmderdev/cmder/wiki/Cmder-troubleshooting)
|
||||
placeholder: |
|
||||
Cmder version:
|
||||
Operating system:
|
||||
value: |
|
||||
Cmder version:
|
||||
Operating system:
|
||||
render: markdown
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: edition
|
||||
attributes:
|
||||
label: Cmder Edition
|
||||
description: What edition of Cmder are you running?
|
||||
options:
|
||||
- Cmder Full (with Git)
|
||||
- Cmder Mini
|
||||
- N/A
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Make sure that you have:
|
||||
|
||||
- Read both the README.md and the Wiki:
|
||||
|
||||
| **README.md** | **Wiki** |
|
||||
| ------------- | -------- |
|
||||
| 🌐 [Open Link](https://github.com/cmderdev/cmder/blob/master/README.md) | 🌐 [Open Link](https://github.com/cmderdev/cmder/wiki) |
|
||||
|
||||
(What you may be asking here could already be explained there!)
|
||||
|
||||
- Searched for existing issues (including the **closed** ones) for similar problems here:
|
||||
|
||||
🗃 https://github.com/cmderdev/cmder/issues?q=is:issue
|
||||
|
||||
- Please understand that Cmder uses ConEmu as the default underlying Terminal Emulator.
|
||||
|
||||
If your issue is regarding the **Terminal Emulator**, please visit the ConEmu issues page:
|
||||
|
||||
https://github.com/Maximus5/ConEmu/issues?q=is:issue
|
||||
|
||||
If there isn't an existing issue, you may open a new one there.
|
||||
|
||||
(We don't resolve issues regarding ConEmu here, so, please make sure you open the issue in the correct place.)
|
||||
|
||||
more info: https://conemu.github.io/en/ThirdPartyProblems.html
|
||||
|
||||
- If you are having an issue with any of the **upstream technologies** that are used by Cmder, please make sure that the issue is reproducible _only_ when used in combination with Cmder.
|
||||
|
||||
We may not directly address the issues related to the following tools:
|
||||
- **[Clink](https://github.com/chrisant996/clink)**, the default shell in Cmder
|
||||
- **[ConEmu](https://github.com/Maximus5/ConEmu)**, the terminal emulator
|
||||
- **[Git/MinGW](https://github.com/git-for-windows/git)**, which also provide *NIX tools (such as `ls`, `mv`, `cp`, etc)
|
||||
- **[clink-completions](https://github.com/vladimir-kotikov/clink-completions)**, which provides autocompletion for clink
|
||||
|
||||
We'll try our best to help you -- but we recommend creating an issue specifically at each of the corresponding repositories for the best result.
|
||||
|
||||
**👉 Note:** Try to reproduce the bug you're reporting, on a stand-alone edition of each tool, without using Cmder. If the bug applies when the mentioned tools are NOT used within Cmder, there's a good chance that you should open the bug at the corresponding repo instead.
|
||||
|
||||
- Lastly, have a look at the official documentation for Cmder over our website, and our wiki.
|
||||
|
||||
Read more about Cmder on ConEmu docs:
|
||||
https://conemu.github.io/en/cmder.html
|
||||
|
||||
#### Prerequisites before submitting an issue
|
||||
- We do not support any versions older than the current release series, if you are using an older Cmder please update to the latest version first.
|
||||
- Verify that the issue is not already fixed and is reproducible in the **[latest official Cmder version](https://github.com/cmderdev/cmder/releases).**
|
||||
- Check the **[current issues list](https://github.com/cmderdev/cmder/issues?q=is%3Aissue)** and perform a **search of the issue tracker (including closed ones)** to avoid posting a duplicate bug report.
|
||||
- Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/cmderdev/cmder/discussions)**, or the **[questions section](https://github.com/cmderdev/cmder/issues/new?template=question.yml)**.
|
||||
- Verify that the **[wiki](https://github.com/cmderdev/cmder/wiki)** did not contain a suitable solution either.
|
||||
|
||||
Thank you for making sure you are opening a new valid issue! ♥
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description of the issue
|
||||
description: Provide a clear and concise description of the problem here. Explain the actual behavior vs the expected behavior.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: How to reproduce
|
||||
description: Please provide reliable steps to reproduce the problem.
|
||||
placeholder: |
|
||||
1. In this environment...
|
||||
2. With this config...
|
||||
3. Run '...'
|
||||
4. See error...
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: notes
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add screenshots, etc. (Anything that will provide more context about the problem)
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
id: checklist
|
||||
attributes:
|
||||
label: Checklist
|
||||
description: Please check all boxes that apply
|
||||
options:
|
||||
- label: I have read the documentation.
|
||||
required: true
|
||||
- label: I have searched for similar issues and found none that describe my issue.
|
||||
required: true
|
||||
- label: I have reproduced the issue on the latest version of Cmder.
|
||||
required: true
|
||||
- label: I am certain my issues are not related to ConEmu, Clink, or other third-party tools that Cmder uses.
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Some tips on how to write a good bug report with the required information.
|
||||
- Make sure the description is worded well enough to be understood, and with as much context and examples as possible.
|
||||
- Post a screenshot or the command that triggered the problem, if applicable.
|
||||
- Use the *Preview* tab to see how your issue will actually look like, before sending it.
|
||||
⚠ If for some reason you can not see the text you just wrote, make sure you've read the instructions clearly
|
||||
- Avoid using ambiguous phrases like: doesn't work, there's a problem, etc.
|
||||
Help us reproduce the issue by explaining what went wrong, and what did you expect to happen.
|
||||
- Please keep the ticket language to English only here.
|
||||
We can't process your issue if it's written in Russian or Chinese as we can't understand them.
|
||||
- You can find the version of Cmder.exe and ConEmu.exe binaries using Right Click → Properties → Details menu.
|
||||
- Put an `x` into all the boxes `[ ]` relevant to your issue (correct example: `[x]` -- not like this: `[ x]` or `[x ]`).
|
||||
- Any text that is between the comment tags will get ignored, e.g.: `<!-- this will NOT work -- >`
|
||||
You need to write your text either outside the tags, or the line below it.
|
||||
- ⚠ Read the following page to avoid posting a bad issue: https://conemu.github.io/en/BadIssue.html
|
||||
|
||||
Failure to follow these guidelines may result in your issue getting closed. So please follow it carefully!
|
9
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,9 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 📄 Wiki
|
||||
url: "https://github.com/cmderdev/cmder/wiki"
|
||||
about: "Consult the wiki first, it might already contain the information you are looking for"
|
||||
|
||||
- name: 💬 Discussions
|
||||
url: "https://github.com/cmderdev/cmder/discussions"
|
||||
about: "Please ask questions related to usage/setup/support/non-issue development discussion in the Discussions section"
|
84
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@ -1,84 +0,0 @@
|
||||
name: "⭐ Feature request (request for new functionality)"
|
||||
description: Help make Cmder even better
|
||||
title: "[Feature request] "
|
||||
labels: "🛠 Type: Feature Request"
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for helping to improve the Cmder project!
|
||||
------------------------------------------------------------------
|
||||
|
||||
Please make sure you read and follow the following instructions carefully before reporting bugs, and/or requesting new features.
|
||||
|
||||
Make sure that you have:
|
||||
|
||||
- Searched for existing issues (including the **closed** ones) for similar feature requests here:
|
||||
|
||||
🗃 https://github.com/cmderdev/cmder/issues?q=is:issue
|
||||
|
||||
- If you are opening the feature request regarding any of the **upstream technologies** that are used by Cmder, please open the feature request at the corresponding upstream repos instead:
|
||||
- **[Clink](https://github.com/chrisant996/clink)**, the default shell in Cmder
|
||||
- **[ConEmu](https://github.com/Maximus5/ConEmu)**, the terminal emulator
|
||||
- **[Git/MinGW](https://github.com/git-for-windows/git)**, which also provide *NIX tools (such as `ls`, `mv`, `cp`, etc)
|
||||
- **[clink-completions](https://github.com/vladimir-kotikov/clink-completions)**, which provides autocompletion for clink
|
||||
|
||||
- If you would like to ask for guides on how to integrate Cmder with your favorite IDE of choice, or how to perform a specific task with Cmder, make sure you visit our label section first.
|
||||
|
||||
You may already have an answer under the Guides or Questions section.
|
||||
|
||||
For a list of labels, visit **[🌐 Labels](https://github.com/cmderdev/cmder/labels)**.
|
||||
|
||||
(Be sure to also check “Closed” issues in the labels section!)
|
||||
|
||||
- If you have a request to provide auto-complete support for a new tool, please post your request here instead:
|
||||
|
||||
https://github.com/vladimir-kotikov/clink-completions/issues
|
||||
|
||||
Thank you for making the Cmder project even better! ♥
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Suggestion
|
||||
description: Describe the feature
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: usecase
|
||||
attributes:
|
||||
label: Use case
|
||||
description: Include a usage example of the feature
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: notes
|
||||
attributes:
|
||||
label: Extra info/examples/attachments
|
||||
description: Extra information, similar tools, etc. If the feature is currently possible with a workaround
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
id: checklist
|
||||
attributes:
|
||||
label: Checklist
|
||||
description: Please check all boxes that apply
|
||||
options:
|
||||
- label: I have read the documentation and made sure this feature doesn't already exist.
|
||||
required: true
|
||||
- label: I have searched for similar issues and found none that describe my feature request.
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Some tips on how to write a better feature request
|
||||
- Make sure the description is worded well enough to be understood, and with as much context and examples as possible.
|
||||
- Use the *Preview* tab to see how your issue will actually look like, before sending it.
|
||||
⚠ If for some reason you can not see the text you just wrote, make sure you've read the instructions clearly
|
||||
- Please keep the ticket language to English only here.
|
||||
We can't process your issue if it's written in Russian or Chinese as we can't understand them.
|
45
.github/ISSUE_TEMPLATE/question.yml
vendored
@ -1,45 +0,0 @@
|
||||
name: "❓ Question"
|
||||
description: Something is unclear or needs to be discussed
|
||||
title: "Question: "
|
||||
labels: "❔ Type: Question"
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Before you ask your question, please make sure you read and follow the following instructions carefully.
|
||||
|
||||
- Read both the README.md and the Wiki, as well as the existing issues:
|
||||
|
||||
| **README.md** | **Wiki** | **Issues** |
|
||||
| ------------- | -------- | ---------- |
|
||||
| 🌐 [Open Link](https://github.com/cmderdev/cmder/blob/master/README.md) | 🌐 [Open Link](https://github.com/cmderdev/cmder/wiki) | 🗃 [Open Link](https://github.com/cmderdev/cmder/issues?q=is:issue) |
|
||||
|
||||
(What you may be asking here could already be explained there!)
|
||||
|
||||
- If you would like to ask for guides on how to integrate Cmder with your favorite IDE of choice, or how to perform a specific task with Cmder, make sure you visit our label section first.
|
||||
|
||||
You may already have an answer under the [💬 Guides](https://github.com/cmderdev/cmder/issues?q=label%3A%22%F0%9F%92%AC+Type%3A+Guide%22), [📖 Documentation](https://github.com/cmderdev/cmder/issues?q=label%3A%22%F0%9F%93%96+Documentation%22) or [❔ Questions](https://github.com/cmderdev/cmder/issues?q=is%3Aissue+label%3A%22%E2%9D%94+Type%3A+Question%22) section.
|
||||
|
||||
For a list of labels, visit **[Labels](https://github.com/cmderdev/cmder/labels)**.
|
||||
|
||||
(Be sure to also check “Closed” issues in the labels section!)
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Question
|
||||
description: What would you to ask about Cmder?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
id: checklist
|
||||
attributes:
|
||||
label: Checklist
|
||||
description: Please check all boxes that apply
|
||||
options:
|
||||
- label: I have read the documentation and made sure what I'm looking for isn't present, or is unclear.
|
||||
required: true
|
||||
- label: I have searched for similar issues, and either this question wasn't asked before, or I didn't find any that describe my question.
|
||||
required: true
|
11
.github/dependabot.yml
vendored
@ -1,11 +0,0 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
19
.github/stale.yml
vendored
@ -1,19 +0,0 @@
|
||||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- "📌 Pinned"
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: "👀 Awaiting Response"
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
any recent activity. It will be closed in a week if no further activity occurs.
|
||||
Thank you for your contribution(s).
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: >
|
||||
This issue has been automatically closed due to it not having any
|
||||
activity since it was marked as stale.
|
||||
Thank you for your contribution(s).
|
33
.github/workflows/branches.yml
vendored
@ -1,33 +0,0 @@
|
||||
name: Update branches
|
||||
|
||||
# Controls when the action will run.
|
||||
on:
|
||||
# Triggers the workflow on push events for the development branch
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This job updates the development branch with the master branch
|
||||
update-development:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # fetch all history for all branches and tags
|
||||
|
||||
# Runs a single command using the runners shell
|
||||
- name: Merge master into development
|
||||
run: |
|
||||
git config user.name "${{ github.actor }}"
|
||||
git config user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
git checkout development
|
||||
git merge --no-ff master
|
||||
git push origin development
|
90
.github/workflows/build.yml
vendored
@ -1,90 +0,0 @@
|
||||
#---------------------------------#
|
||||
# general configuration #
|
||||
#---------------------------------#
|
||||
|
||||
name: Build Cmder
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request events but only for the main branch
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
tags:
|
||||
- "v*"
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
#---------------------------------#
|
||||
# environment configuration #
|
||||
#---------------------------------#
|
||||
|
||||
env:
|
||||
# Path to the root of the Cmder project.
|
||||
CMDER_ROOT: ${{ github.workspace }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build Project
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: write
|
||||
discussions: write
|
||||
steps:
|
||||
- name: Check out repository code (Action from GitHub)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Build Cmder Launcher
|
||||
shell: pwsh
|
||||
working-directory: scripts
|
||||
run: .\build.ps1 -Compile -verbose
|
||||
|
||||
- name: Pack the built files
|
||||
shell: pwsh
|
||||
working-directory: scripts
|
||||
run: .\pack.ps1 -verbose
|
||||
|
||||
- name: Upload artifact (cmder.zip)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: build/cmder.zip
|
||||
name: cmder.zip
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload artifact (cmder.7z)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: build/cmder.7z
|
||||
name: cmder.7z
|
||||
|
||||
- name: Upload artifact (cmder_mini.zip)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: build/cmder_mini.zip
|
||||
name: cmder_mini.zip
|
||||
|
||||
- name: Upload artifact (hashes.txt)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: build/hashes.txt
|
||||
name: hashes.txt
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
build/cmder.zip
|
||||
build/cmder.7z
|
||||
build/cmder_mini.zip
|
||||
build/hashes.txt
|
||||
draft: true
|
||||
generate_release_notes: true
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
73
.github/workflows/codeql.yml
vendored
@ -1,73 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/*.txt'
|
||||
- '.github/**'
|
||||
- '**/.gitignore'
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "master" ]
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/*.txt'
|
||||
- '.github/**'
|
||||
- '**/.gitignore'
|
||||
schedule:
|
||||
- cron: '30 19 * * 0'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'cpp' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Build Cmder Launcher
|
||||
shell: pwsh
|
||||
working-directory: scripts
|
||||
run: .\build.ps1 -Compile -verbose
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
52
.github/workflows/tests.yml
vendored
@ -1,52 +0,0 @@
|
||||
name: Run Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/*.txt'
|
||||
- '.github/**'
|
||||
- '**/.gitignore'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- '**/*.txt'
|
||||
- '.github/**'
|
||||
- '**/.gitignore'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: cmd
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
tests:
|
||||
runs-on: windows-latest
|
||||
continue-on-error: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Initialize vendors
|
||||
shell: pwsh
|
||||
working-directory: scripts
|
||||
run: .\build.ps1 -verbose
|
||||
- name: Testing Clink Shell
|
||||
run: |
|
||||
cmd /c vendor\init.bat /v /d /t
|
||||
- name: Testing PowerShell
|
||||
run: |
|
||||
PowerShell.exe -ExecutionPolicy Bypass -NoLogo -NoProfile -Command "Invoke-Expression '. ''vendor\profile.ps1'''"
|
||||
- name: Testing Bash
|
||||
run: |
|
||||
bash vendor/cmder.sh
|
65
.github/workflows/vendor.yml
vendored
@ -1,65 +0,0 @@
|
||||
name: Update Vendor
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# At 13:37 UTC every day.
|
||||
- cron: '37 13 * * *'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: pwsh
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
vendor:
|
||||
|
||||
runs-on: windows-latest
|
||||
continue-on-error: false
|
||||
timeout-minutes: 15
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- id: make-changes
|
||||
name: Checking for updates
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
$currentVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json)
|
||||
. .\scripts\update.ps1 -verbose
|
||||
Set-GHVariable -Name COUNT_UPDATED -Value $count
|
||||
$newVersion = (Get-Content .\vendor\sources.json | ConvertFrom-Json)
|
||||
$listUpdated = ""
|
||||
$updateMessage = "| Name | Old Version | New Version |`n| :--- | ---- | ---- |`n"
|
||||
foreach ($s in $newVersion) {
|
||||
$oldVersion = ($currentVersion | Where-Object {$_.name -eq $s.name}).version
|
||||
if ($s.version -ne $oldVersion) {
|
||||
$repoUrl = ($repoUrl = $s.Url.Replace("/archive/", "/releases/")).Substring(0, $repoUrl.IndexOf("/releases/")) + "/releases"
|
||||
$listUpdated += "$($s.name) v$($s.version), "
|
||||
$updateMessage += "| **[$($s.name)]($repoUrl)** | $oldVersion | **$($s.version)** |`n"
|
||||
}
|
||||
}
|
||||
if ($count -eq 0) { return }
|
||||
Set-GHVariable -Name LIST_UPDATED -Value $listUpdated.Trim(', ')
|
||||
echo "UPDATE_MESSAGE<<<EOF`n$updateMessage`n<EOF" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
||||
|
||||
- uses: peter-evans/create-pull-request@v5
|
||||
if: env.COUNT_UPDATED > 0
|
||||
with:
|
||||
title: 'Updates to `${{ env.COUNT_UPDATED }}` vendored dependencies'
|
||||
body: |
|
||||
### Automatically updated `${{ env.COUNT_UPDATED }}` dependencies:
|
||||
${{ env.UPDATE_MESSAGE }}
|
||||
---
|
||||
Please verify and then **Merge** the pull request to update.
|
||||
commit-message: '⬆️ Update dependencies (${{ env.LIST_UPDATED }})'
|
||||
branch: update-vendor
|
||||
base: master
|
39
.gitignore
vendored
@ -1,40 +1,9 @@
|
||||
|
||||
## Those files should be taken from their repositary
|
||||
|
||||
bin/*
|
||||
!bin/Readme.md
|
||||
opt/*
|
||||
!opt/Readme.md
|
||||
|
||||
vendor/*/*
|
||||
!vendor/bin/*
|
||||
!vendor/lib/*
|
||||
!vendor/*
|
||||
!vendor/psmodules/*
|
||||
vendor/git-for-windows
|
||||
|
||||
config/*
|
||||
!config/Readme.md
|
||||
!config/profile.d/README.md
|
||||
|
||||
config_user/*
|
||||
|
||||
vendor/*
|
||||
!vendor/*.md
|
||||
!vendor/*.bat
|
||||
config/.history
|
||||
Thumbs.db
|
||||
*.exe
|
||||
*.dll
|
||||
build/
|
||||
/Version *
|
||||
*.bak
|
||||
.github_changelog_generator
|
||||
launcher/.vs
|
||||
launcher/src/version.rc2
|
||||
.vs/*
|
||||
.vscode
|
||||
.idea
|
||||
.vagrant/
|
||||
scripts/packer/iso/*.iso
|
||||
!scripts/packer/floppy/*.exe
|
||||
scripts/packer/packer_cache
|
||||
scripts/packer/output-*
|
||||
*.box
|
||||
|
||||
|
1191
CHANGELOG.md
@ -1,38 +0,0 @@
|
||||
# How to contribute
|
||||
|
||||
Unfortunately we all can't work on Cmder every day of the year, so I have decided to write some guidelines for contributing.
|
||||
|
||||
If you follow them your contribution will likely be pulled in quicker.
|
||||
|
||||
## Getting Started
|
||||
|
||||
* Fork the repository on GitHub (It's that easy)
|
||||
* Create a feature branch based on the `master` branch.
|
||||
|
||||
## Making Changes
|
||||
|
||||
* Make changes in your separate branch.
|
||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
* Make sure your commit messages are easy to understand
|
||||
* Squash your 'Correcting mistakes' commits if you have a lot of them. (See the 'Squashing Commits' link below)
|
||||
* Make sure your changes won't affect new users or user without a customised system, try out your changes on a fresh Windows VM to see if it would affect a new user's experience.
|
||||
* Sometimes a change that helps you with your cmder experience and tools doesn't always mean other people may need/want it.
|
||||
|
||||
## Making Trivial Changes
|
||||
|
||||
### Documentation
|
||||
|
||||
* If the documentation is about a currently available feature in cmder or correcting already created documentation, you can safely make your changes on the master branch and pull request them onto master.
|
||||
|
||||
## Submitting Changes
|
||||
|
||||
* Push your changes to the branch in your fork of the repository.
|
||||
* Submit a pull request to the develop branch of the cmder repository (unless it's a change in documentation [see above]).
|
||||
* Make sure you explicitly say to not complete the pull request if you are still making changes.
|
||||
|
||||
|
||||
# Additional Resources
|
||||
|
||||
* [Squashing Commits](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html)
|
||||
* [General GitHub documentation](http://help.github.com/)
|
||||
* [GitHub pull request documentation](http://help.github.com/articles/creating-a-pull-request/)
|
19
Cmder.bat
@ -1,20 +1,3 @@
|
||||
@echo off
|
||||
SET CMDER_ROOT=%~dp0
|
||||
|
||||
:: Remove Trailing '\'
|
||||
@if "%CMDER_ROOT:~-1%" == "\" SET CMDER_ROOT=%CMDER_ROOT:~0,-1%
|
||||
|
||||
if not exist "%CMDER_ROOT%\config\user_ConEmu.xml" (
|
||||
if not exist "%CMDER_ROOT%\config" mkdir "%CMDER_ROOT%\config" 2>nul
|
||||
copy "%CMDER_ROOT%\vendor\ConEmu.xml.default" "%CMDER_ROOT%\config\user_ConEmu.xml" 1>nul
|
||||
if %errorlevel% neq 0 (
|
||||
echo ERROR: CMDER Initialization has Failed
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
if exist "%~1" (
|
||||
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%~1"
|
||||
) else (
|
||||
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\user_ConEmu.xml"
|
||||
)
|
||||
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\ConEmu.xml"
|
||||
|
21
LICENSE
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Samuel Vasko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
419
README.md
@ -1,419 +0,0 @@
|
||||
# Cmder
|
||||
|
||||
[](https://gitter.im/cmderdev/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://ci.appveyor.com/project/cmderdev/cmder) [](https://github.com/cmderdev/cmder/actions/workflows/build.yml)
|
||||
|
||||
Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://conemu.github.io/) with *major* config overhaul, comes with a Monokai color scheme, amazing [clink](https://chrisant996.github.io/clink/) (further enhanced by [clink-completions](https://github.com/vladimir-kotikov/clink-completions)) and a custom prompt layout.
|
||||
|
||||

|
||||
|
||||
## Why use it
|
||||
|
||||
The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, which makes it great for **USB Sticks** or **cloud storage**. So you can carry your console, aliases and binaries (like `wget`, `curl` and `git`) with you anywhere.
|
||||
|
||||
The Cmder's user interface is also designed to be more eye pleasing, and you can compare the main differences between Cmder and ConEmu [here](https://conemu.github.io/en/cmder.html).
|
||||
|
||||
## Installation
|
||||
### Single User Portable Config
|
||||
|
||||
1. Download the [latest release](https://github.com/cmderdev/cmder/releases/)
|
||||
2. Extract the archive. *Note: This path should not be `C:\Program Files` or anywhere else that would require Administrator access for modifying configuration files*
|
||||
3. (optional) Place your own executable files into the `%cmder_root%\bin` folder to be injected into your PATH.
|
||||
4. Run `Cmder.exe`
|
||||
|
||||
### Shared Cmder install with Non-Portable Individual User Config
|
||||
1. Download the [latest release](https://github.com/cmderdev/cmder/releases/)
|
||||
2. Extract the archive to a shared location.
|
||||
3. (optional) Place your own executable files and custom app folders into the `%cmder_root%\bin`. See: [bin/README.md](./bin/Readme.md)
|
||||
- This folder to be injected into your PATH by default.
|
||||
- See `/max_depth [1-5]` in 'Command Line Arguments for `init.bat`' table to add subdirectories recursively.
|
||||
4. (optional) Place your own custom app folders into the `%cmder_root%\opt`. See: [opt/README.md](./opt/Readme.md)
|
||||
- This folder will NOT be injected into your PATH so you have total control of what gets added.
|
||||
5. Run `Cmder.exe` with `/C` command line argument. Example: `cmder.exe /C %userprofile%\cmder_config`
|
||||
* This will create the following directory structure if it is missing.
|
||||
|
||||
```
|
||||
c:\users\[username]\cmder_config
|
||||
├───bin
|
||||
├───config
|
||||
│ └───profile.d
|
||||
└───opt
|
||||
```
|
||||
|
||||
- (optional) Place your own executable files and custom app folders into `%userprofile%\cmder_config\bin`.
|
||||
- This folder to be injected into your PATH by default.
|
||||
- See `/max_depth [1-5]` in 'Command Line Arguments for `init.bat`' table to add subdirectories recursively.
|
||||
- (optional) Place your own custom app folders into the `%user_profile%\cmder_config\opt`.
|
||||
- This folder will NOT be injected into your PATH so you have total control of what gets added.
|
||||
|
||||
|
||||
* Both the shared install and the individual user config locations can contain a full set of init and profile.d scripts enabling shared config with user overrides. See below.
|
||||
|
||||
## Cmder.exe Command Line Arguments
|
||||
|
||||
|
||||
| Argument | Description |
|
||||
| ------------------------- | ----------------------------------------------------------------------- |
|
||||
| `/C [user_root_path]` | Individual user Cmder root folder. Example: `%userprofile%\cmder_config` |
|
||||
| `/M` | Use `conemu-%computername%.xml` for ConEmu settings storage instead of `user_conemu.xml` |
|
||||
| `/REGISTER [ALL, USER]` | Register a Windows Shell Menu shortcut. |
|
||||
| `/UNREGISTER [ALL, USER]` | Un-register a Windows Shell Menu shortcut. |
|
||||
| `/SINGLE` | Start Cmder in single mode. |
|
||||
| `/START [start_path]` | Folder path to start in. |
|
||||
| `/TASK [task_name]` | Task to start after launch. |
|
||||
| `/X [ConEmu extras pars]` | Forwards parameters to ConEmu |
|
||||
|
||||
## Context Menu Integration
|
||||
|
||||
So you've experimented with Cmder a little and want to give it a shot in a more permanent home;
|
||||
|
||||
### Shortcut to open Cmder in a chosen folder
|
||||
|
||||
1. Open a terminal as an Administrator
|
||||
2. Navigate to the directory you have placed Cmder
|
||||
3. Execute `.\cmder.exe /REGISTER ALL`
|
||||
_If you get an "Access Denied" message, make sure you are executing the command in an **Administrator** prompt._
|
||||
|
||||
In a file explorer window right click in or on a directory to see "Cmder Here" in the context menu.
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
### Tab manipulation
|
||||
|
||||
* <kbd>Ctrl</kbd> + <kbd>T</kbd> : New tab dialog (maybe you want to open cmd as admin?)
|
||||
* <kbd>Ctrl</kbd> + <kbd>W</kbd> : Close tab
|
||||
* <kbd>Ctrl</kbd> + <kbd>D</kbd> : Close tab (if pressed on empty command)
|
||||
* <kbd>Shift</kbd> + <kbd>Alt</kbd> + <kbd>#Number</kbd> : Fast new tab: <kbd>1</kbd> - CMD, <kbd>2</kbd> - PowerShell
|
||||
* <kbd>Ctrl</kbd> + <kbd>Tab</kbd> : Switch to next tab
|
||||
* <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Tab</kbd> : Switch to previous tab
|
||||
* <kbd>Ctrl</kbd> + <kbd>#Number</kbd> : Switch to tab #Number
|
||||
* <kbd>Alt</kbd> + <kbd>Enter</kbd>: Fullscreen
|
||||
|
||||
### Shell
|
||||
|
||||
* <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>U</kbd> : Traverse up in directory structure (lovely feature!)
|
||||
* <kbd>End</kbd>, <kbd>Home</kbd>, <kbd>Ctrl</kbd> : Traversing text with as usual on Windows
|
||||
* <kbd>Ctrl</kbd> + <kbd>R</kbd> : History search
|
||||
* <kbd>Shift</kbd> + Mouse : Select and copy text from buffer
|
||||
|
||||
_(Some shortcuts are not yet documented, though they exist - please document them here)_
|
||||
|
||||
## Features
|
||||
|
||||
### Access to multiple shells in one window using tabs
|
||||
You can open multiple tabs each containing one of the following shells:
|
||||
|
||||
| Task | Shell | Description |
|
||||
| ---- | ----- | ----------- |
|
||||
| Cmder | `cmd.exe` | Windows `cmd.exe` shell enhanced with Git, Git aware prompt, Clink (GNU Readline), and Aliases. |
|
||||
| Cmder as Admin | `cmd.exe` | Administrative Windows `cmd.exe` Cmder shell. |
|
||||
| PowerShell | `powershell.exe` | Windows PowerShell enhanced with Git and Git aware prompt . |
|
||||
| PowerShell as Admin | `powershell.exe` | Administrative Windows `powershell.exe` Cmder shell. |
|
||||
| Bash | `bash.exe` | Unix/Linux like bash shell running on Windows. |
|
||||
| Bash as Admin | `bash.exe` | Administrative Unix/Linux like bash shell running on Windows. |
|
||||
| Mintty | `bash.exe` | Unix/Linux like bash shell running on Windows. See below for Mintty configuration differences |
|
||||
| Mintty as Admin | `bash.exe` | Administrative Unix/Linux like bash shell running on Windows. See below for Mintty configuration differences |
|
||||
|
||||
Cmder, PowerShell, and Bash tabs all run on top of the Windows Console API and work as you might expect in Cmder with access to use ConEmu's color schemes, key bindings and other settings defined in the ConEmu Settings dialog.
|
||||
|
||||
⚠ *Note:* Only the full edition of Cmder comes with a pre-installed bash, using a vendored [git-for-windows](https://gitforwindows.org/) installation. The pre-configured Bash tabs may not work on Cmder mini edition without additional configuration.
|
||||
|
||||
You may however, choose to use an external installation of bash, such as Microsoft's [Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) (called WSL) or the [Cygwin](https://cygwin.com/) project which provides POSIX support on windows.
|
||||
|
||||
⚠ *Note:* Mintty tabs use a program called 'mintty' as the terminal emulator that is not based on the Windows Console API, rather it's rendered graphically by ConEmu. Mintty differs from the other tabs in that it supports xterm/xterm-256color TERM types, and does not work with ConEmu settings like color schemes and key bindings. As such, some differences in functionality are to be expected, such as Cmder not being able to apply a system-wide configuration to it.
|
||||
|
||||
As a result mintty specific config is done via the `[%USERPROFILE%|$HOME]/.minttyrc` file. You may read more about Mintty and its config file [here](https://github.com/mintty/mintty).
|
||||
|
||||
An example of setting Cmder portable terminal colors for mintty:
|
||||
|
||||
From a bash/mintty shell:
|
||||
|
||||
```
|
||||
cd $CMDER_ROOT/vendor
|
||||
git clone https://github.com/karlin/mintty-colors-solarized.git
|
||||
cd mintty-colors-solarized/
|
||||
echo source \$CMDER_ROOT/vendor/mintty-colors-solarized/mintty-solarized-dark.sh>>$CMDER_ROOT/config/user_profile.sh
|
||||
```
|
||||
|
||||
You may find some Monokai color schemes for mintty to match Cmder [here](https://github.com/oumu/mintty-color-schemes/blob/master/base16-monokai-mod.minttyrc).
|
||||
|
||||
### Changing Cmder Default `cmd.exe` Prompt Config File
|
||||
|
||||
The default Cmder shell `cmd::Cmder` prompt is customized using `Clink` and is configured by editing a config file that exists in one of two locations:
|
||||
|
||||
- Single User Portable Config `%CMDER_ROOT%\config\cmder_prompt_config.lua`
|
||||
- Shared Cmder install with Non-Portable Individual User Config `%CMDER_USER_CONFIG%\cmder_prompt_config.lua`
|
||||
|
||||
If your Cmder setup does not have this file create it from `%CMDER_ROOT%\vendor\cmder_prompt_config.lua.default`
|
||||
|
||||
Customizations include:
|
||||
|
||||
- Colors.
|
||||
- Single/Multi-line.
|
||||
- Full path/Folder only.
|
||||
- `[user]@[host]` to the beginning of the prompt.
|
||||
- `~` for home directory.
|
||||
- `λ` symbol
|
||||
|
||||
Documentation is in the file for each setting.
|
||||
|
||||
### Changing Cmder Default `cmd.exe` Shell Startup Behaviour Using Task Arguments
|
||||
|
||||
1. Press <kbd>Win</kbd> + <kbd>Alt</kbd> + <kbd>T</kbd>
|
||||
1. Click either:
|
||||
* `1. {cmd::Cmder as Admin}`
|
||||
* `2. {cmd::Cmder}`
|
||||
1. Add command line arguments where specified below:
|
||||
|
||||
*Note: Pay attention to the quotes!*
|
||||
|
||||
```
|
||||
cmd /s /k ""%ConEmuDir%\..\init.bat" [ADD ARGS HERE]"
|
||||
```
|
||||
|
||||
##### Command Line Arguments for `init.bat`
|
||||
|
||||
| Argument | Description | Default |
|
||||
| ----------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------- |
|
||||
| `/c [user cmder root]` | Enables user bin and config folders for 'Cmder as admin' sessions due to non-shared environment. | not set |
|
||||
| `/d` | Enables debug output. | not set |
|
||||
| `/f` | Enables Cmder Fast Init Mode. This disables some features, see pull request [#1492](https://github.com/cmderdev/cmder/pull/1942) for more details. | not set |
|
||||
| `/t` | Enables Cmder Timed Init Mode. This displays the time taken run init scripts | not set |
|
||||
| `/git_install_root [file path]` | User specified Git installation root path. | `%CMDER_ROOT%\vendor\Git-for-Windows` |
|
||||
| `/home [home folder]` | User specified folder path to set `%HOME%` environment variable. | `%userprofile%` |
|
||||
| `/max_depth [1-5]` | Define max recurse depth when adding to the path for `%cmder_root%\bin` and `%cmder_user_bin%` | 1 |
|
||||
| `/nix_tools [0-2]` | Define how `*nix` tools are added to the path. Prefer Windows Tools: 1, Prefer *nix Tools: 2, No `/usr/bin` in `%PATH%`: 0 | 1 |
|
||||
| `/svn_ssh [path to ssh.exe]` | Define `%SVN_SSH%` so we can use git svn with ssh svn repositories. | `%GIT_INSTALL_ROOT%\bin\ssh.exe` |
|
||||
| `/user_aliases [file path]` | File path pointing to user aliases. | `%CMDER_ROOT%\config\user_aliases.cmd` |
|
||||
| `/v` | Enables verbose output. | not set |
|
||||
| (custom arguments) | User defined arguments processed by `cexec`. Type `cexec /?` for more usage. | not set |
|
||||
|
||||
### Cmder Shell User Config
|
||||
Single user portable configuration is possible using the Cmder specific shell config files. Edit the below files to add your own configuration:
|
||||
|
||||
| Shell | Cmder Portable User Config |
|
||||
| ------------- | ----------------------------------------- |
|
||||
| Cmder | `%CMDER_ROOT%\config\user_profile.cmd` |
|
||||
| PowerShell | `$ENV:CMDER_ROOT\config\user_profile.ps1` |
|
||||
| Bash/Mintty | `$CMDER_ROOT/config/user_profile.sh` |
|
||||
|
||||
**Note:** Bash and Mintty sessions will also source the `$HOME/.bashrc` file if it exists after it sources `$CMDER_ROOT/config/user_profile.sh`.
|
||||
|
||||
You can write `*.cmd|*.bat`, `*.ps1`, and `*.sh` scripts and just drop them in the `%CMDER_ROOT%\config\profile.d` folder to add startup config to Cmder.
|
||||
|
||||
| Shell | Cmder `Profile.d` Scripts |
|
||||
| ------------- | -------------------------------------------------- |
|
||||
| Cmder | `%CMDER_ROOT%\config\profile.d\*.bat and *.cmd` |
|
||||
| PowerShell | `$ENV:CMDER_ROOT\config\profile.d\*.ps1` |
|
||||
| Bash/Mintty | `$CMDER_ROOT/config/profile.d/*.sh` |
|
||||
|
||||
#### Git Status Opt-Out
|
||||
|
||||
To disable Cmder prompt git status globally add the following to `~/.gitconfig` or locally for a single repo `[repo]/.git/config` and start a new session.
|
||||
|
||||
*Note: This configuration is not portable*
|
||||
|
||||
```
|
||||
[cmder]
|
||||
status = false # Opt out of Git status for 'ALL' Cmder supported shells.
|
||||
cmdstatus = false # Opt out of Git status for 'Cmd.exe' shells.
|
||||
psstatus = false # Opt out of Git status for 'Powershell.exe and 'Pwsh.exe' shells.
|
||||
shstatus = false # Opt out of Git status for 'bash.exe' shells.
|
||||
```
|
||||
|
||||
### Aliases
|
||||
#### Cmder(`Cmd.exe`) Aliases
|
||||
You can define simple aliases for `cmd.exe` sessions with a command like `alias name=command`. Cmd.exe aliases support optional parameters through the `$1-9` or the `$*` special characters so the alias `vi=vim.exe $*` typed as `vi [filename]` will open `[filename]` in `vim.exe`.
|
||||
|
||||
Cmd.exe aliases can also be more complex. See: [DOSKEY.EXE documentation](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/doskey) for additional details on complex aliases/macros for `cmd.exe`
|
||||
|
||||
Aliases defined using the `alias.bat` command will automatically be saved in the `%CMDER_ROOT%\config\user_aliases.cmd` file
|
||||
|
||||
To make an alias and/or any other profile settings permanent add it to one of the following:
|
||||
|
||||
Note: These are loaded in this order by `$CMDER_ROOT/vendor/init.bat`. Anything stored in `%CMDER_ROOT%` will be a portable setting and will follow Cmder to another machine.
|
||||
|
||||
* `%CMDER_ROOT%\config\profile.d\*.cmd` and `\*.bat`
|
||||
* `%CMDER_ROOT%\config\user_aliases.cmd`
|
||||
* `%CMDER_ROOT%\config\user_profile.cmd`
|
||||
|
||||
#### Bash.exe|Mintty.exe Aliases
|
||||
Bash shells support simple and complex aliases with optional parameters natively so they work a little different. Typing `alias name=command` will create an alias only for the current running session.
|
||||
|
||||
To make an alias and/or any other profile settings permanent add it to one of the following:
|
||||
|
||||
Note: These are loaded in this order by `$CMDER_ROOT/vendor/git-for-windows/etc/profile.d/cmder.sh`. Anything stored in `$CMDER_ROOT` will be a portable setting and will follow Cmder to another machine.
|
||||
|
||||
* `$CMDER_ROOT/config/profile.d/*.sh`
|
||||
* `$CMDER_ROOT/config/user_profile.sh`
|
||||
* `$HOME/.bashrc`
|
||||
|
||||
If you add bash aliases to `$CMDER_ROOT/config/user_profile.sh` they will be portable and follow your Cmder folder if you copy it to another machine. `$HOME/.bashrc` defined aliases are not portable.
|
||||
|
||||
#### PowerShell.exe Aliases
|
||||
PowerShell has native simple alias support, for example `[new-alias | set-alias] alias command`, so complex aliases with optional parameters are not supported in PowerShell sessions. Type `get-help [new-alias|set-alias] -full` for help on PowerShell aliases.
|
||||
|
||||
To make an alias and/or any other profile settings permanent add it to one of the following:
|
||||
|
||||
Note: These are loaded in this order by `$ENV:CMDER_ROOT\vendor\user_profile.ps1`. Anything stored in `$ENV:CMDER_ROOT` will be a portable setting and will follow Cmder to another machine.
|
||||
|
||||
* `$ENV:CMDER_ROOT\config\profile.d\*.ps1`
|
||||
* `$ENV:CMDER_ROOT\config\user_profile.ps1`
|
||||
|
||||
### SSH Agent
|
||||
|
||||
To start the vendored SSH agent simply call `start-ssh-agent`, which is in the `vendor/git-for-windows/cmd` folder.
|
||||
|
||||
If you want to run SSH agent on startup, include the line `@call "%GIT_INSTALL_ROOT%/cmd/start-ssh-agent.cmd"` in `%CMDER_ROOT%/config/user_profile.cmd` (usually just uncomment it).
|
||||
|
||||
### Vendored Git
|
||||
|
||||
Cmder is by default shipped with a vendored Git installation. On each instance of launching Cmder, an attempt is made to locate any other user provided Git binaries. Upon finding a `git.exe` binary, Cmder further compares its version against the vendored one _by executing_ it. The vendored `git.exe` binary is _only_ used when it is more recent than the user-installed one.
|
||||
|
||||
You may use your favorite version of Git by including its path in the `%PATH%` environment variable. Moreover, the **Mini** edition of Cmder (found on the [downloads page](https://github.com/cmderdev/cmder/releases)) excludes any vendored Git binaries.
|
||||
|
||||
### Using external Cygwin/Babun, MSys2, WSL, or Git for Windows SDK with Cmder.
|
||||
|
||||
You may run bash (the default shell used on Linux, macOS and GNU/Hurd) externally on Cmder, using the following instructions:
|
||||
|
||||
1. Setup a new task by pressing <kbd>Win</kbd> +<kbd>Alt</kbd> + <kbd>T</kbd>.
|
||||
1. Click the `+` button to add a task.
|
||||
1. Name the new task in the top text box.
|
||||
1. Provide task parameters, this is optional.
|
||||
1. Add `cmd /c "[path_to_external_env]\bin\bash --login -i" -new_console` to the `Commands` text box.
|
||||
|
||||
**Recommended Optional Steps:**
|
||||
|
||||
Copy the `vendor/cmder_exinit` file to the Cygwin/Babun, MSys2, or Git for Windows SDK environments `/etc/profile.d/` folder to use portable settings in the `$CMDER_ROOT/config` folder.
|
||||
|
||||
Note: MinGW could work if the init scripts include `profile.d` but this has not been tested.
|
||||
|
||||
The destination file extension depends on the shell you use in that environment. For example:
|
||||
|
||||
* bash - Copy to `/etc/profile.d/cmder_exinit.sh`
|
||||
* zsh - Copy to `/etc/profile.d/cmder_exinit.zsh`
|
||||
|
||||
Uncomment and edit the line below in the script to use Cmder config even when launched from outside Cmder.
|
||||
|
||||
```
|
||||
# CMDER_ROOT=${USERPROFILE}/cmder # This is not required if launched from Cmder.
|
||||
```
|
||||
|
||||
### Customizing user sessions using `init.bat` custom arguments.
|
||||
|
||||
You can pass custom arguments to `init.bat` and use `cexec.cmd` in your `user_profile.cmd` to evaluate these
|
||||
arguments then execute commands based on a particular flag being detected or not.
|
||||
|
||||
`init.bat` creates two shortcuts for using `cexec.cmd` in your profile scripts.
|
||||
|
||||
#### `%ccall%` - Evaluates flags, runs commands if found, and returns to the calling script and continues.
|
||||
|
||||
```
|
||||
ccall=call C:\Users\user\cmderdev\vendor\bin\cexec.cmd
|
||||
```
|
||||
|
||||
Example: `%ccall% /startnotepad start notepad.exe`
|
||||
|
||||
#### `%cexec%` - Evaluates flags, runs commands if found, and does not return to the calling script.
|
||||
|
||||
```
|
||||
cexec=C:\Users\user\cmderdev\vendor\bin\cexec.cmd
|
||||
```
|
||||
|
||||
Example: `%cexec% /startnotepad start notepad.exe`
|
||||
|
||||
It is useful when you have multiple tasks to execute `cmder` and need it to initialize
|
||||
the session differently depending on the task chosen.
|
||||
|
||||
To conditionally start `notepad.exe` when you start a specific `cmder` task:
|
||||
|
||||
* Press <kbd>win</kbd>+<kbd>alt</kbd>+<kbd>t</kbd>
|
||||
* Click `+` to add a new task.
|
||||
* Add the below to the `Commands` block:
|
||||
|
||||
```batch
|
||||
|
||||
cmd.exe /k ""%ConEmuDir%\..\init.bat" /startnotepad"
|
||||
|
||||
```
|
||||
|
||||
* Add the below to your `%cmder_root%\config\user_profile.cmd`
|
||||
|
||||
```batch
|
||||
|
||||
%ccall% "/startNotepad" "start" "notepad.exe"`
|
||||
|
||||
```
|
||||
|
||||
To see detailed usage of `cexec`, type `cexec /?` in Cmder.
|
||||
|
||||
### Integrating Cmder with [Windows Terminal](https://github.com/cmderdev/cmder/wiki/Seamless-Windows-Terminal-Integration), [VS Code](https://github.com/cmderdev/cmder/wiki/Seamless-VS-Code-Integration), and your favorite IDEs
|
||||
|
||||
Cmder by default comes with a vendored ConEmu installation as the underlying terminal emulator, as stated [here](https://conemu.github.io/en/cmder.html).
|
||||
|
||||
However, Cmder can in fact run in a variety of other terminal emulators, and even integrated IDEs. Assuming you have the latest version of Cmder, follow the following instructions to get Cmder working with your own terminal emulator.
|
||||
|
||||
For instructions on how to integrate Cmder with your IDE, please read our [Wiki section](https://github.com/cmderdev/cmder/wiki#cmder-integration).
|
||||
|
||||
## Upgrading
|
||||
|
||||
The process of upgrading Cmder depends on the version/build you are currently running.
|
||||
|
||||
If you have a `[cmder_root]/config/user[-|_]conemu.xml`, you are running a newer version of Cmder, follow the below process:
|
||||
|
||||
1. Exit all Cmder sessions and relaunch `[cmder_root]/cmder.exe`, this backs up your existing `[cmder_root]/vendor/conemu-maximus5/conemu.xml` to `[cmder_root]/config/user[-|_]conemu.xml`.
|
||||
|
||||
* The `[cmder_root]/config/user[-|_]conemu.xml` contains any custom settings you have made using the 'Setup Tasks' settings dialog.
|
||||
|
||||
2. Exit all Cmder sessions and backup any files you have manually edited under `[cmder_root]/vendor`.
|
||||
|
||||
* Editing files under `[cmder_root]/vendor` is not recommended since you will need to re-apply these changes after any upgrade. All user customizations should go in `[cmder_root]/config` folder.
|
||||
|
||||
3. Delete the `[cmder_root]/vendor` folder.
|
||||
4. Extract the new `cmder.zip` or `cmder_mini.zip` into `[cmder_root]/` overwriting all files when prompted.
|
||||
|
||||
If you do not have a `[cmder_root]/config/user[-|_]conemu.xml`, you are running an older version of cmder, follow the below process:
|
||||
|
||||
1. Exit all Cmder sessions and backup `[cmder_root]/vendor/conemu-maximus5/conemu.xml` to `[cmder_root]/config/user[-|_]conemu.xml`.
|
||||
|
||||
2. Backup any files you have manually edited under `[cmder_root]/vendor`.
|
||||
|
||||
* Editing files under `[cmder_root]/vendor` is not recommended since you will need to re-apply these changes after any upgrade. All user customizations should go in `[cmder_root]/config` folder.
|
||||
|
||||
3. Delete the `[cmder_root]/vendor` folder.
|
||||
4. Extract the new `cmder.zip` or `cmder_mini.zip` into `[cmder_root]/` overwriting all files when prompted.
|
||||
|
||||
## Current development builds
|
||||
|
||||
You can download builds of the current development branch by going to AppVeyor via the following link:
|
||||
|
||||
[](https://ci.appveyor.com/project/cmderdev/cmder/branch/master/artifacts)
|
||||
|
||||
The latest download builds by GitHub Actions can be downloaded from the link below:
|
||||
|
||||
[](https://github.com/cmderdev/cmder/actions/workflows/build.yml)
|
||||
|
||||
## License
|
||||
|
||||
All software included is bundled with own license
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Samuel Vasko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
81
Readme.md
Normal file
@ -0,0 +1,81 @@
|
||||
# Cmder
|
||||
|
||||
Latest release is **[v1.1.3](https://github.com/bliker/cmder/releases/tag/v1.1.3)**
|
||||
|
||||
Cmder is a **software package** created out of pure frustration over absence of usable console emulator on Windows. It is based on [ConEmu](https://code.google.com/p/conemu-maximus5/) with *major* config overhaul. Monokai color scheme, amazing [clink](https://code.google.com/p/clink/) and custom prompt layout.
|
||||
|
||||

|
||||
|
||||
## Why use it
|
||||
|
||||
The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, that is makes it great for **USB Sticks** or **Dropbox**. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download the latest release
|
||||
1. Extract
|
||||
1. (optional) Place files into `bin` folder, it will be injected into your PATH.
|
||||
1. Run cmder
|
||||
|
||||
*(There will be a version with installer)*
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
### Tab manipulation
|
||||
|
||||
* `Ctrl + t` : new tab dialog (maybe you want to open cmd as admin?)
|
||||
* `Ctrl + w` : close tab
|
||||
* `Ctrl + d` : close tab (if pressed on empty command)
|
||||
* `Shift + alt + number` : fast new tab: `1` - CMD, `2` - Powershell `*` - More to come
|
||||
* `Alt + enter`: Fullscreen
|
||||
|
||||
### Shell
|
||||
|
||||
* `Shift + Up` : Traverse up in directory structure (lovely feature!)
|
||||
* `End, Home, Ctrl` : Traversing text with as usual on Windows
|
||||
* `Ctrl + r` : History search
|
||||
* `Shift + mouse` : Select and copy text from buffer
|
||||
|
||||
(Some shortcuts are not yet documented, thought they exist, please add them here)
|
||||
|
||||
## Features
|
||||
|
||||
### Aliases
|
||||
You can define simple aliases with command `alias name=command`.
|
||||
|
||||
For example there is one defined for you `alias e.=explorer .`
|
||||
|
||||
All aliases will be saved in `/config/aliases` file
|
||||
|
||||
## Todo
|
||||
|
||||
1. Complete PowerShell compatibility.
|
||||
2. Workaround git.exe overload after msysgit download (Granted this is an upstream issue).
|
||||
3. Redo Build/Pack scripts or remove them altogether.
|
||||
4. Launcher XP compatibility.
|
||||
|
||||
## License
|
||||
|
||||
All software included is bundled with own license
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Samuel Vasko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
24
SECURITY.md
@ -1,24 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 1.3.x | :white_check_mark: |
|
||||
| < 1.3 | ❎ |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you discover a security issue in our project, please report it to [MartiUK](https://github.com/MartiUK). We will acknowledge your email within 24 hours and provide a more detailed response within 48 hours. We will try to fix the issue as soon as possible and inform you when a new version is released.
|
||||
|
||||
Please include as much of the information listed below as you can to help us better understand and resolve the issue:
|
||||
|
||||
- The nature of the issue
|
||||
- The affected source file(s) with full paths
|
||||
- The location of the vulnerable code (tag/branch/commit or direct URL)
|
||||
- Any special configuration needed to reproduce the issue
|
||||
- Detailed steps to reproduce the issue
|
||||
- Proof-of-concept or exploit code (if possible)
|
||||
- The impact of the issue, including how an attacker could exploit it
|
||||
|
||||
Please do not disclose the vulnerability publicly until we have resolved it.
|
66
Vagrantfile
vendored
@ -1,66 +0,0 @@
|
||||
required_plugins = %w( vagrant-vbguest )
|
||||
required_plugins.each do |plugin|
|
||||
unless Vagrant.has_plugin? plugin
|
||||
system "vagrant plugin install #{plugin}"
|
||||
p "Run 'vagrant up' again to continue."
|
||||
exit 0
|
||||
end
|
||||
end
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
# config.vbguest.iso_path = "../../../../usr/share/virtualbox/VBoxGuestAdditions.iso"
|
||||
config.vbguest.allow_downgrade = true
|
||||
|
||||
config.vm.define "cmderdev-10" do |b|
|
||||
b.vm.hostname = "cmderdev-10"
|
||||
b.vm.box = "dgames/cmderdev-10"
|
||||
b.vm.box_version = "1.0.0"
|
||||
|
||||
b.vm.provider :virtualbox do |v|
|
||||
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
v.customize ["modifyvm", :id, "--name", "cmderdev-10"]
|
||||
v.customize ["modifyvm", :id, "--ostype", "Windows10_64"]
|
||||
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
|
||||
v.customize ["modifyvm", :id, "--memory", 2048]
|
||||
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.define "cmderdev-10s" do |b|
|
||||
b.vm.hostname = 'cmderdev-10'
|
||||
b.vm.box = "dgames/cmderdev-10"
|
||||
b.vm.box_version = "1.0.0"
|
||||
|
||||
b.vm.provider :virtualbox do |v|
|
||||
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
v.customize ["modifyvm", :id, "--name", "cmderdev-10s"]
|
||||
v.customize ["modifyvm", :id, "--ostype", "Windows10_64"]
|
||||
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
|
||||
v.customize ["modifyvm", :id, "--memory", 2048]
|
||||
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
||||
v.customize ["setextradata", :id, "GUI/ScaleFactor", "1.75"]
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.define "cmderdev-11" do |b|
|
||||
b.vm.box = "dgames/cmderdev-11"
|
||||
b.vm.box_version = "1.0.0"
|
||||
|
||||
b.vm.provider :virtualbox do |v|
|
||||
# v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
v.customize ["modifyvm", :id, "--name", "cmderdev-11"]
|
||||
v.customize ["modifyvm", :id, "--ostype", "Windows11_64"]
|
||||
v.customize ["modifyvm", :id, "--graphicscontroller", "vboxvga"]
|
||||
v.customize ["modifyvm", :id, "--memory", 4096]
|
||||
v.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provision "file", source: "./scripts/vagrant/windows_terminal_settings.json.default", destination: "windows_terminal_settings.json.default"
|
||||
config.vm.provision "file", source: "./scripts/vagrant/windows_terminal_state.json.default", destination: "windows_terminal_state.json.default"
|
||||
config.vm.provision "file", source: "./vendor/bin/set-shortcut.ps1", destination: "c:\\windows\\set-shortcut.ps1"
|
||||
config.vm.provision "shell", path: './scripts/vagrant/add-cmder.ps1'
|
||||
config.vm.provision "shell", path: './vendor/bin/add-vscodeprofile.ps1'
|
||||
config.vm.provision "shell", path: './vendor/bin/add-windowsterminalprofiles.ps1'
|
||||
config.vm.provision "shell", path: './vendor/bin/add-cmdertodesktop.ps1'
|
||||
end
|
28
bin/alias.bat
Normal file
@ -0,0 +1,28 @@
|
||||
@echo off
|
||||
if ["%1"] == ["/?"] goto:p_help
|
||||
if ["%2"] == [""] echo Insufficient parameters. & goto:p_help
|
||||
::validate alias
|
||||
setlocal
|
||||
for /f "delims== tokens=1" %%G in ("%*") do set _temp2=%%G
|
||||
|
||||
set _temp=%_temp2: =%
|
||||
|
||||
if not ["%_temp%"] == ["%_temp2%"] (
|
||||
echo Your alias name can not contain a space
|
||||
endlocal
|
||||
goto:eof
|
||||
)
|
||||
|
||||
echo %* >> "%CMDER_ROOT%\config\aliases"
|
||||
doskey /macrofile="%CMDER_ROOT%\config\aliases"
|
||||
echo Alias created
|
||||
endlocal
|
||||
goto:eof
|
||||
|
||||
:p_help
|
||||
echo.Usage:
|
||||
echo. alias name=full command
|
||||
echo. $* allows the alias to assume all the parameters of the supplied command.
|
||||
echo. $1-$9 Allows you to seperate parameter by number, much like %%1 in batch.
|
||||
echo. $T is the command seperator, allowing you to string several commands together into one alias.
|
||||
echo. For more information, read DOSKEY/?
|
125
build.rb
Normal file
@ -0,0 +1,125 @@
|
||||
# Samuel Vasko 2013
|
||||
# Cmder build script
|
||||
# Like really a beta
|
||||
#
|
||||
# This script downloads dependencies form google code. Each software is extracted
|
||||
# in a folder with same name as the project on google code. So Conemu becomes
|
||||
# conemu-maximus5. Correct files are beeing picked by using labels.
|
||||
# I will move the script for getting files by labels from php to here as soon I feel like it
|
||||
|
||||
require 'fileutils'
|
||||
require 'open-uri'
|
||||
require 'uri'
|
||||
|
||||
def get_file project, query
|
||||
urlToFile = URI.escape('http://samuelvasko.tk/gcode/?project='+project+'&query='+query)
|
||||
open(urlToFile) do |resp|
|
||||
urlToFile = URI.escape(resp.read.split(/\r?\n/).first)
|
||||
end
|
||||
|
||||
extension = urlToFile.split('.').last
|
||||
filename = project+'.'+extension
|
||||
|
||||
puts "\n ------ Downloading #{project} from #{urlToFile} ------- \n \n"
|
||||
begin
|
||||
open(urlToFile, 'rb') do |infile|
|
||||
open(filename, 'wb') do |outfile|
|
||||
outfile.write(infile.read)
|
||||
end
|
||||
end
|
||||
rescue IOError => error
|
||||
puts error
|
||||
FileUtils.rm(filename) if File.exists?(filename)
|
||||
exit(1)
|
||||
end
|
||||
|
||||
system("7z x -o\"#{project}\" #{filename}")
|
||||
|
||||
File.unlink(project+"."+extension);
|
||||
|
||||
# When the folder contains another folder
|
||||
# that is not what we want
|
||||
if Dir.glob("#{project}/*").length == 1
|
||||
temp_name = "#{project}_temp"
|
||||
FileUtils.mv(project, temp_name)
|
||||
FileUtils.mv(Dir.glob("#{temp_name}/*")[0], project)
|
||||
FileUtils.rm_r(temp_name)
|
||||
end
|
||||
end
|
||||
|
||||
def find_on_path exe
|
||||
path = ENV['PATH'].split(File::PATH_SEPARATOR)
|
||||
for dir in path
|
||||
if File.exists?(File.join(dir, exe))
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
puts '
|
||||
______ _ _ _ _ _
|
||||
| ___ \ (_) | | (_) | |
|
||||
| |_/ /_ _ _| | __| |_ _ __ __ _ ___ _ __ ___ __| | ___ _ __
|
||||
| ___ \ | | | | |/ _` | | \'_ \ / _` | / __| \'_ ` _ \ / _` |/ _ \ \'__|
|
||||
| |_/ / |_| | | | (_| | | | | | (_| | | (__| | | | | | (_| | __/ |
|
||||
\____/ \__,_|_|_|\__,_|_|_| |_|\__, | \___|_| |_| |_|\__,_|\___|_|
|
||||
__/ |
|
||||
|___/
|
||||
'
|
||||
|
||||
unless find_on_path('7z.exe')
|
||||
puts '7z.exe not found. Ensure 7-zip is installed and on the PATH.'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
build_exe = true
|
||||
unless find_on_path('msbuild.exe')
|
||||
puts 'msbuild.exe not found. We need that to build the executable.'
|
||||
puts 'Do you want to continue? [Y/n]'
|
||||
build_exe = false
|
||||
exit(1) unless gets.chomp.downcase == 'y'
|
||||
end
|
||||
|
||||
puts 'Cleanup'
|
||||
|
||||
if Dir.exists?('vendor')
|
||||
Dir.glob('vendor/*') { |file| FileUtils.rm_rf(file) if File.directory?(file) }
|
||||
end
|
||||
|
||||
Dir.chdir('vendor')
|
||||
|
||||
puts 'Getting files'
|
||||
|
||||
get_file('clink', 'label:Type-Archive label:Featured')
|
||||
get_file('conemu-maximus5', 'label:Type-Archive label:Preview label:Featured')
|
||||
get_file('msysgit', 'label:Type-Archive label:Featured')
|
||||
|
||||
puts 'Creating executable'
|
||||
|
||||
puts 'Build for XP? (Default: No)'
|
||||
if gets.downcase =='yes' or 'y'
|
||||
XP = true
|
||||
elsif gets.downcase == 'no' or 'n'
|
||||
XP = false
|
||||
else
|
||||
puts 'Defaulting to non-XP build'
|
||||
XP = false
|
||||
end
|
||||
|
||||
if build_exe
|
||||
Dir.chdir('../launcher')
|
||||
if XP
|
||||
puts 'Building XP Compatible Launcher...'
|
||||
status = system('msbuild /p:Configuration=ReleaseXP')
|
||||
else
|
||||
status = system('msbuild /p:Configuration=Release')
|
||||
end
|
||||
unless status
|
||||
puts 'Looks like the build failed'
|
||||
exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
puts 'Done, bye'
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<key name="Software">
|
||||
<key name="ConEmu">
|
||||
<key name=".Vanilla" modified="2018-02-22 06:02:11" build="171109">
|
||||
<key name=".Vanilla" modified="2014-01-21 18:36:36" build="131215">
|
||||
<value name="ColorTable00" type="dword" data="00222827"/>
|
||||
<value name="ColorTable01" type="dword" data="009e5401"/>
|
||||
<value name="ColorTable02" type="dword" data="0004aa74"/>
|
||||
@ -59,7 +59,6 @@
|
||||
<value name="FadeInactive" type="hex" data="01"/>
|
||||
<value name="FadeInactiveLow" type="hex" data="00"/>
|
||||
<value name="FadeInactiveHigh" type="hex" data="c8"/>
|
||||
<value name="ComSpec.UncPaths" type="hex" data="01"/>
|
||||
<value name="ConVisible" type="hex" data="00"/>
|
||||
<value name="ConInMode" type="dword" data="ffffffff"/>
|
||||
<value name="UseInjects" type="hex" data="01"/>
|
||||
@ -73,12 +72,12 @@
|
||||
<value name="StartType" type="hex" data="02"/>
|
||||
<value name="CmdLine" type="string" data=""/>
|
||||
<value name="StartTasksFile" type="string" data=""/>
|
||||
<value name="StartTasksName" type="string" data="{cmd::Cmder}"/>
|
||||
<value name="StartTasksName" type="string" data="{cmd}"/>
|
||||
<value name="StartFarFolders" type="hex" data="00"/>
|
||||
<value name="StartFarEditors" type="hex" data="00"/>
|
||||
<value name="StoreTaskbarkTasks" type="hex" data="00"/>
|
||||
<value name="StoreTaskbarCommands" type="hex" data="00"/>
|
||||
<value name="CmdLineHistory" type="multi"></value>
|
||||
<value name="CmdLineHistory" type="multi"><line data=";C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\"/></value>
|
||||
<value name="SingleInstance" type="hex" data="00"/>
|
||||
<value name="ShowHelpTooltips" type="hex" data="01"/>
|
||||
<value name="Multi" type="hex" data="01"/>
|
||||
@ -102,12 +101,12 @@
|
||||
<value name="FontName" type="string" data="Consolas"/>
|
||||
<value name="FontName2" type="string" data="Lucida Console"/>
|
||||
<value name="FontAutoSize" type="hex" data="00"/>
|
||||
<value name="FontSize" type="ulong" data="16"/>
|
||||
<value name="FontSizeX" type="ulong" data="0"/>
|
||||
<value name="FontSizeX2" type="ulong" data="0"/>
|
||||
<value name="FontSizeX3" type="ulong" data="0"/>
|
||||
<value name="FontSize" type="dword" data="00000010"/>
|
||||
<value name="FontSizeX" type="dword" data="00000000"/>
|
||||
<value name="FontSizeX2" type="dword" data="00000000"/>
|
||||
<value name="FontSizeX3" type="dword" data="00000000"/>
|
||||
<value name="FontCharSet" type="hex" data="00"/>
|
||||
<value name="Anti-aliasing" type="ulong" data="6"/>
|
||||
<value name="Anti-aliasing" type="dword" data="00000006"/>
|
||||
<value name="FontBold" type="hex" data="00"/>
|
||||
<value name="FontItalic" type="hex" data="00"/>
|
||||
<value name="Monospace" type="hex" data="01"/>
|
||||
@ -124,29 +123,29 @@
|
||||
<value name="ColorKeyTransparent" type="hex" data="00"/>
|
||||
<value name="ColorKeyValue" type="dword" data="00010101"/>
|
||||
<value name="UseCurrentSizePos" type="hex" data="01"/>
|
||||
<value name="WindowMode" type="dword" data="00000520"/>
|
||||
<value name="ConWnd Width" type="dword" data="00000078"/>
|
||||
<value name="ConWnd Height" type="dword" data="0000001e"/>
|
||||
<value name="WindowMode" type="dword" data="0000051f"/>
|
||||
<value name="ConWnd Width" type="dword" data="0000006f"/>
|
||||
<value name="ConWnd Height" type="dword" data="0000001a"/>
|
||||
<value name="Cascaded" type="hex" data="01"/>
|
||||
<value name="ConWnd X" type="long" data="500"/>
|
||||
<value name="ConWnd Y" type="long" data="500"/>
|
||||
<value name="16bit Height" type="ulong" data="0"/>
|
||||
<value name="AutoSaveSizePos" type="hex" data="01"/>
|
||||
<value name="ConWnd X" type="dword" data="000000bc"/>
|
||||
<value name="ConWnd Y" type="dword" data="00000065"/>
|
||||
<value name="16bit Height" type="dword" data="00000000"/>
|
||||
<value name="AutoSaveSizePos" type="hex" data="00"/>
|
||||
<value name="IntegralSize" type="hex" data="00"/>
|
||||
<value name="QuakeStyle" type="hex" data="00"/>
|
||||
<value name="QuakeAnimation" type="ulong" data="300"/>
|
||||
<value name="QuakeAnimation" type="dword" data="0000012c"/>
|
||||
<value name="HideCaption" type="hex" data="00"/>
|
||||
<value name="HideChildCaption" type="hex" data="01"/>
|
||||
<value name="FocusInChildWindows" type="hex" data="01"/>
|
||||
<value name="HideCaptionAlways" type="hex" data="00"/>
|
||||
<value name="HideCaptionAlwaysFrame" type="hex" data="00"/>
|
||||
<value name="HideCaptionAlwaysDelay" type="ulong" data="2000"/>
|
||||
<value name="HideCaptionAlwaysDisappear" type="ulong" data="2000"/>
|
||||
<value name="HideCaptionAlwaysFrame" type="hex" data="ff"/>
|
||||
<value name="HideCaptionAlwaysDelay" type="dword" data="000007d0"/>
|
||||
<value name="HideCaptionAlwaysDisappear" type="dword" data="000007d0"/>
|
||||
<value name="DownShowHiddenMessage" type="hex" data="00"/>
|
||||
<value name="ConsoleFontName" type="string" data="Lucida Console"/>
|
||||
<value name="ConsoleFontWidth" type="long" data="3"/>
|
||||
<value name="ConsoleFontHeight" type="long" data="5"/>
|
||||
<value name="DefaultBufferHeight" type="long" data="1000"/>
|
||||
<value name="ConsoleFontWidth" type="dword" data="00000003"/>
|
||||
<value name="ConsoleFontHeight" type="dword" data="00000005"/>
|
||||
<value name="DefaultBufferHeight" type="dword" data="000003e8"/>
|
||||
<value name="AutoBufferHeight" type="hex" data="01"/>
|
||||
<value name="CmdOutputCP" type="dword" data="00000000"/>
|
||||
<value name="ComSpec.Type" type="hex" data="00"/>
|
||||
@ -154,7 +153,7 @@
|
||||
<value name="ComSpec.UpdateEnv" type="hex" data="00"/>
|
||||
<value name="ComSpec.EnvAddPath" type="hex" data="01"/>
|
||||
<value name="ComSpec.EnvAddExePath" type="hex" data="01"/>
|
||||
<value name="ComSpec.UncPaths" type="hex" data="01"/>
|
||||
<value name="ComSpec.UncPaths" type="hex" data="00"/>
|
||||
<value name="ComSpec.Path" type="string" data=""/>
|
||||
<value name="ConsoleTextSelection" type="hex" data="01"/>
|
||||
<value name="CTS.AutoCopy" type="hex" data="01"/>
|
||||
@ -168,7 +167,7 @@
|
||||
<value name="CTS.MBtnAction" type="hex" data="00"/>
|
||||
<value name="CTS.ColorIndex" type="hex" data="e0"/>
|
||||
<value name="ClipboardConfirmEnter" type="hex" data="01"/>
|
||||
<value name="ClipboardConfirmLonger" type="ulong" data="200"/>
|
||||
<value name="ClipboardConfirmLonger" type="dword" data="000000c8"/>
|
||||
<value name="FarGotoEditorOpt" type="hex" data="01"/>
|
||||
<value name="FarGotoEditorPath" type="string" data="far.exe /e%1:%2 "%3""/>
|
||||
<value name="FixFarBorders" type="hex" data="01"/>
|
||||
@ -199,7 +198,7 @@
|
||||
<value name="MouseSkipActivation" type="hex" data="01"/>
|
||||
<value name="MouseSkipMoving" type="hex" data="01"/>
|
||||
<value name="FarHourglass" type="hex" data="01"/>
|
||||
<value name="FarHourglassDelay" type="ulong" data="500"/>
|
||||
<value name="FarHourglassDelay" type="dword" data="000001f4"/>
|
||||
<value name="Dnd" type="hex" data="01"/>
|
||||
<value name="DndDrop" type="hex" data="01"/>
|
||||
<value name="DefCopy" type="hex" data="01"/>
|
||||
@ -213,8 +212,8 @@
|
||||
<value name="StatusBar.Show" type="hex" data="00"/>
|
||||
<value name="StatusBar.Flags" type="dword" data="00000002"/>
|
||||
<value name="StatusFontFace" type="string" data="Tahoma"/>
|
||||
<value name="StatusFontCharSet" type="ulong" data="0"/>
|
||||
<value name="StatusFontHeight" type="long" data="14"/>
|
||||
<value name="StatusFontCharSet" type="dword" data="00000000"/>
|
||||
<value name="StatusFontHeight" type="dword" data="0000000e"/>
|
||||
<value name="StatusBar.Color.Back" type="dword" data="00404040"/>
|
||||
<value name="StatusBar.Color.Light" type="dword" data="00ffffff"/>
|
||||
<value name="StatusBar.Color.Dark" type="dword" data="00a0a0a0"/>
|
||||
@ -254,35 +253,35 @@
|
||||
<value name="TabsLocation" type="hex" data="01"/>
|
||||
<value name="TabSelf" type="hex" data="01"/>
|
||||
<value name="TabLazy" type="hex" data="01"/>
|
||||
<value name="TabRecent" type="hex" data="00"/>
|
||||
<value name="TabDblClick" type="ulong" data="1"/>
|
||||
<value name="TabRecent" type="hex" data="01"/>
|
||||
<value name="TabDblClick" type="dword" data="00000001"/>
|
||||
<value name="TabsOnTaskBar" type="hex" data="02"/>
|
||||
<value name="TaskBarOverlay" type="hex" data="01"/>
|
||||
<value name="TabCloseMacro" type="string" data=""/>
|
||||
<value name="TabFontFace" type="string" data="Segoe UI"/>
|
||||
<value name="TabFontCharSet" type="ulong" data="0"/>
|
||||
<value name="TabFontHeight" type="long" data="16"/>
|
||||
<value name="TabFontCharSet" type="dword" data="00000000"/>
|
||||
<value name="TabFontHeight" type="dword" data="00000010"/>
|
||||
<value name="SaveAllEditors" type="string" data=""/>
|
||||
<value name="ToolbarAddSpace" type="long" data="0"/>
|
||||
<value name="ToolbarAddSpace" type="dword" data="00000000"/>
|
||||
<value name="TabConsole" type="string" data=" %n "/>
|
||||
<value name="TabSkipWords" type="string" data="Administrator:|Администратор:"/>
|
||||
<value name="TabPanels" type="string" data="<%c> %s"/>
|
||||
<value name="TabEditor" type="string" data="<%c.%i>{%s}"/>
|
||||
<value name="TabEditorModified" type="string" data="<%c.%i>[%s] *"/>
|
||||
<value name="TabViewer" type="string" data="<%c.%i>[%s]"/>
|
||||
<value name="TabLenMax" type="ulong" data="20"/>
|
||||
<value name="TabLenMax" type="dword" data="00000014"/>
|
||||
<value name="AdminTitleSuffix" type="string" data=" (Admin)"/>
|
||||
<value name="AdminShowShield" type="hex" data="01"/>
|
||||
<value name="HideInactiveConsoleTabs" type="hex" data="00"/>
|
||||
<value name="ShowFarWindows" type="hex" data="01"/>
|
||||
<value name="TryToCenter" type="hex" data="01"/>
|
||||
<value name="CenterConsolePad" type="ulong" data="8"/>
|
||||
<value name="CenterConsolePad" type="dword" data="00000008"/>
|
||||
<value name="ShowScrollbar" type="hex" data="02"/>
|
||||
<value name="ScrollBarAppearDelay" type="ulong" data="100"/>
|
||||
<value name="ScrollBarDisappearDelay" type="ulong" data="1000"/>
|
||||
<value name="IconID" type="ulong" data="1"/>
|
||||
<value name="MainTimerElapse" type="ulong" data="10"/>
|
||||
<value name="MainTimerInactiveElapse" type="ulong" data="1000"/>
|
||||
<value name="ScrollBarAppearDelay" type="dword" data="00000064"/>
|
||||
<value name="ScrollBarDisappearDelay" type="dword" data="000003e8"/>
|
||||
<value name="IconID" type="dword" data="00000001"/>
|
||||
<value name="MainTimerElapse" type="dword" data="0000000a"/>
|
||||
<value name="MainTimerInactiveElapse" type="dword" data="000003e8"/>
|
||||
<value name="AffinityMask" type="dword" data="00000000"/>
|
||||
<value name="SkipFocusEvents" type="hex" data="00"/>
|
||||
<value name="MonitorConsoleLang" type="hex" data="03"/>
|
||||
@ -298,32 +297,32 @@
|
||||
<value name="FindMatchWholeWords" type="hex" data="00"/>
|
||||
<value name="FindTransparent" type="hex" data="01"/>
|
||||
<value name="PanView.BackColor" type="dword" data="30ffffff"/>
|
||||
<value name="PanView.PFrame" type="long" data="1"/>
|
||||
<value name="PanView.PFrame" type="dword" data="00000001"/>
|
||||
<value name="PanView.PFrameColor" type="dword" data="28808080"/>
|
||||
<value name="PanView.SFrame" type="long" data="1"/>
|
||||
<value name="PanView.SFrame" type="dword" data="00000001"/>
|
||||
<value name="PanView.SFrameColor" type="dword" data="07c0c0c0"/>
|
||||
<value name="PanView.Thumbs.ImgSize" type="long" data="96"/>
|
||||
<value name="PanView.Thumbs.SpaceX1" type="long" data="1"/>
|
||||
<value name="PanView.Thumbs.SpaceY1" type="long" data="1"/>
|
||||
<value name="PanView.Thumbs.SpaceX2" type="long" data="5"/>
|
||||
<value name="PanView.Thumbs.SpaceY2" type="long" data="20"/>
|
||||
<value name="PanView.Thumbs.LabelSpacing" type="long" data="2"/>
|
||||
<value name="PanView.Thumbs.LabelPadding" type="long" data="0"/>
|
||||
<value name="PanView.Thumbs.ImgSize" type="dword" data="00000060"/>
|
||||
<value name="PanView.Thumbs.SpaceX1" type="dword" data="00000001"/>
|
||||
<value name="PanView.Thumbs.SpaceY1" type="dword" data="00000001"/>
|
||||
<value name="PanView.Thumbs.SpaceX2" type="dword" data="00000005"/>
|
||||
<value name="PanView.Thumbs.SpaceY2" type="dword" data="00000014"/>
|
||||
<value name="PanView.Thumbs.LabelSpacing" type="dword" data="00000002"/>
|
||||
<value name="PanView.Thumbs.LabelPadding" type="dword" data="00000000"/>
|
||||
<value name="PanView.Thumbs.FontName" type="string" data="Tahoma"/>
|
||||
<value name="PanView.Thumbs.FontHeight" type="long" data="14"/>
|
||||
<value name="PanView.Tiles.ImgSize" type="long" data="48"/>
|
||||
<value name="PanView.Tiles.SpaceX1" type="long" data="4"/>
|
||||
<value name="PanView.Tiles.SpaceY1" type="long" data="4"/>
|
||||
<value name="PanView.Tiles.SpaceX2" type="long" data="172"/>
|
||||
<value name="PanView.Tiles.SpaceY2" type="long" data="4"/>
|
||||
<value name="PanView.Tiles.LabelSpacing" type="long" data="4"/>
|
||||
<value name="PanView.Tiles.LabelPadding" type="long" data="1"/>
|
||||
<value name="PanView.Thumbs.FontHeight" type="dword" data="0000000e"/>
|
||||
<value name="PanView.Tiles.ImgSize" type="dword" data="00000030"/>
|
||||
<value name="PanView.Tiles.SpaceX1" type="dword" data="00000004"/>
|
||||
<value name="PanView.Tiles.SpaceY1" type="dword" data="00000004"/>
|
||||
<value name="PanView.Tiles.SpaceX2" type="dword" data="000000ac"/>
|
||||
<value name="PanView.Tiles.SpaceY2" type="dword" data="00000004"/>
|
||||
<value name="PanView.Tiles.LabelSpacing" type="dword" data="00000004"/>
|
||||
<value name="PanView.Tiles.LabelPadding" type="dword" data="00000001"/>
|
||||
<value name="PanView.Tiles.FontName" type="string" data="Tahoma"/>
|
||||
<value name="PanView.Tiles.FontHeight" type="long" data="14"/>
|
||||
<value name="PanView.Tiles.FontHeight" type="dword" data="0000000e"/>
|
||||
<value name="PanView.LoadPreviews" type="hex" data="03"/>
|
||||
<value name="PanView.LoadFolders" type="hex" data="01"/>
|
||||
<value name="PanView.LoadTimeout" type="ulong" data="15"/>
|
||||
<value name="PanView.MaxZoom" type="ulong" data="600"/>
|
||||
<value name="PanView.LoadTimeout" type="dword" data="0000000f"/>
|
||||
<value name="PanView.MaxZoom" type="dword" data="00000258"/>
|
||||
<value name="PanView.UsePicView2" type="hex" data="01"/>
|
||||
<value name="PanView.RestoreOnStartup" type="hex" data="00"/>
|
||||
<value name="Update.VerLocation" type="string" data=""/>
|
||||
@ -350,7 +349,7 @@
|
||||
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
|
||||
<value name="SetFocusGui" type="dword" data="00000000"/>
|
||||
<value name="SetFocusChild" type="dword" data="00000000"/>
|
||||
<value name="ChildSystemMenu" type="dword" data="ffffffff"/>
|
||||
<value name="ChildSystemMenu" type="dword" data="00000000"/>
|
||||
<value name="Multi.NewConsole" type="dword" data="80808000"/>
|
||||
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
|
||||
<value name="Multi.NewConsolePopup" type="dword" data="80808000"/>
|
||||
@ -420,8 +419,8 @@
|
||||
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
|
||||
<value name="KeyMacro04" type="dword" data="000011d1"/>
|
||||
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
|
||||
<value name="KeyMacro05" type="dword" data="0012a033"/>
|
||||
<value name="KeyMacro05.Text" type="string" data="Task("PowerShell as Admin")"/>
|
||||
<value name="KeyMacro05" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro05.Text" type="string" data=""/>
|
||||
<value name="KeyMacro06" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro06.Text" type="string" data=""/>
|
||||
<value name="KeyMacro07" type="dword" data="00000000"/>
|
||||
@ -484,98 +483,30 @@
|
||||
<value name="DndLKey" type="hex" data="00"/>
|
||||
<value name="DndRKey" type="hex" data="a2"/>
|
||||
<value name="WndDragKey" type="dword" data="00121101"/>
|
||||
<key name="Tasks" modified="2018-02-22 06:02:12" build="171109">
|
||||
<value name="Count" type="long" data="9"/>
|
||||
<key name="Task1" modified="2018-02-22 06:02:12" build="171109">
|
||||
<value name="Name" type="string" data="{cmd::Cmder as Admin}"/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="*cmd /k ""%ConEmuDir%\..\init.bat" ""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<key name="Tasks" modified="2014-01-21 18:36:36" build="131215">
|
||||
<value name="Count" type="dword" data="00000002"/>
|
||||
<key name="Task1" modified="2014-01-21 18:36:36" build="131215">
|
||||
<value name="Name" type="string" data="{cmd}"/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\cmder.exe""/>
|
||||
<value name="Cmd1" type="string" data="cmd /k "%CMDER_ROOT%\vendor\init.bat" -new_console:d:%USERPROFILE%"/>
|
||||
<value name="Active" type="dword" data="00000000"/>
|
||||
<value name="Count" type="dword" data="00000001"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
</key>
|
||||
<key name="Task2" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{cmd::Cmder}"/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="cmd /k ""%ConEmuDir%\..\init.bat" ""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<key name="Task2" modified="2014-01-21 18:36:36" build="131215">
|
||||
<value name="Name" type="string" data="{PowerShell}"/>
|
||||
<value name="GuiArgs" type="string" data="/dir "%userprofile%""/>
|
||||
<value name="Cmd1" type="string" data="powershell"/>
|
||||
<value name="Active" type="dword" data="00000000"/>
|
||||
<value name="Count" type="dword" data="00000001"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
</key>
|
||||
<key name="Task3" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{PowerShell::PowerShell as Admin}"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="*PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression 'Import-Module ''%ConEmuDir%\..\profile.ps1'''""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
</key>
|
||||
<key name="Task4" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{PowerShell::PowerShell}"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="PowerShell -ExecutionPolicy Bypass -NoLogo -NoProfile -NoExit -Command "Invoke-Expression 'Import-Module ''%ConEmuDir%\..\profile.ps1'''""/>
|
||||
<value name="Cmd2" type="string" data=""%CMDER_ROOT%\vendor\git-for-windows\git-bash.exe""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
</key>
|
||||
<key name="Task5" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{bash::mintty as Admin}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data="/icon "%ConEmuDir%\..\git-for-windows\usr\share\git\git-for-windows.ico""/>
|
||||
<value name="Cmd1" type="string" data="*"%ConEmuDir%\..\git-for-windows\usr\bin\mintty.exe" /bin/bash -l"/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
</key>
|
||||
<key name="Task6" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{bash::mintty}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data="/icon "%ConEmuDir%\..\git-for-windows\usr\share\git\git-for-windows.ico""/>
|
||||
<value name="Cmd1" type="string" data=""%ConEmuDir%\..\git-for-windows\usr\bin\mintty.exe" /bin/bash -l"/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Cmd2" type="string" data=""%CMDER_ROOT%vendor\git-for-windows\usr\bin\mintty.exe" /bin/bash -l"/>
|
||||
</key>
|
||||
<key name="Task7" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{bash::bash as Admin}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Cmd1" type="string" data="*set "PATH=%ConEmuDir%\..\git-for-windows\usr\bin;%PATH%" & %ConEmuDir%\..\git-for-windows\git-cmd.exe --no-cd --command=%ConEmuBaseDirShort%\conemu-msys2-64.exe "%ConEmuDir%\..\git-for-windows\usr\bin\bash.exe" --login -i"/>
|
||||
</key>
|
||||
<key name="Task8" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Name" type="string" data="{bash::bash}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data=" /icon "%CMDER_ROOT%\icons\cmder.ico""/>
|
||||
<value name="Cmd1" type="string" data="set "PATH=%ConEmuDir%\..\git-for-windows\usr\bin;%PATH%" & %ConEmuDir%\..\git-for-windows\git-cmd.exe --no-cd --command=%ConEmuBaseDirShort%\conemu-msys2-64.exe "%ConEmuDir%\..\git-for-windows\usr\bin\bash.exe" --login -i"/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
</key>
|
||||
<key name="Task9" modified="2018-03-23 23:26:53" build="180318">
|
||||
<value name="Name" type="string" data="{WSL::bash}"/>
|
||||
<value name="Flags" type="dword" data="00000000"/>
|
||||
<value name="Hotkey" type="dword" data="00000000"/>
|
||||
<value name="GuiArgs" type="string" data='-icon "%USERPROFILE%\AppData\Local\lxss\bash.ico"'/>
|
||||
<value name="Cmd1" type="string" data='set "PATH=%ConEmuBaseDirShort%\wsl;%PATH%" & %ConEmuBaseDirShort%\conemu-cyg-64.exe --wsl -cur_console:pm:/mnt'/>
|
||||
<value name="Active" type="long" data="0"/>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
</key>
|
||||
</key>
|
||||
|
||||
<key name="Apps" modified="2018-02-22 06:05:13" build="171109">
|
||||
<value name="Count" type="long" data="0"/>
|
||||
<key name="Apps" modified="2014-01-21 18:36:36" build="131215">
|
||||
<value name="Count" type="dword" data="00000000"/>
|
||||
</key>
|
||||
<key name="Colors" modified="2018-02-22 06:05:13" build="171109">
|
||||
<key name="Palette1" modified="2018-02-22 06:05:13" build="171109">
|
||||
<key name="Colors" modified="2014-01-31 17:13:53" build="131107">
|
||||
<key name="Palette1" modified="2014-01-31 17:13:53" build="131107">
|
||||
<value name="Name" type="string" data="Monokai"/>
|
||||
<value name="ExtendColors" type="hex" data="00"/>
|
||||
<value name="ExtendColorIdx" type="hex" data="0e"/>
|
||||
@ -616,11 +547,11 @@
|
||||
<value name="ColorTable30" type="dword" data="0000ffff"/>
|
||||
<value name="ColorTable31" type="dword" data="00ffffff"/>
|
||||
</key>
|
||||
<value name="Count" type="long" data="1"/>
|
||||
<value name="Count" type="dword" data="00000001"/>
|
||||
</key>
|
||||
<value name="OneTabPerGroup" type="hex" data="00"/>
|
||||
<value name="ActivateSplitMouseOver" type="hex" data="01"/>
|
||||
<value name="TabBtnDblClick" type="ulong" data="0"/>
|
||||
<value name="TabBtnDblClick" type="dword" data="00000000"/>
|
||||
<value name="ConsoleExceptionHandler" type="hex" data="00"/>
|
||||
<value name="SaveCmdHistory" type="hex" data="00"/>
|
||||
<value name="CTS.IBeam" type="hex" data="01"/>
|
||||
@ -650,258 +581,6 @@
|
||||
<value name="TransparencyDec" type="dword" data="00000000"/>
|
||||
<value name="Key.MaximizeWidth" type="dword" data="00000000"/>
|
||||
<value name="Key.MaximizeHeight" type="dword" data="00000000"/>
|
||||
<value name="DefaultTerminalAgressive" type="hex" data="01"/>
|
||||
<value name="DefaultTerminalNewWindow" type="hex" data="00"/>
|
||||
<value name="AnsiLog" type="hex" data="00"/>
|
||||
<value name="AnsiLogPath" type="string" data="%ConEmuDir%\Logs\"/>
|
||||
<value name="Multi.DupConfirm" type="hex" data="01"/>
|
||||
<value name="Multi.DetachConfirm" type="hex" data="01"/>
|
||||
<value name="CTS.Intelligent" type="hex" data="01"/>
|
||||
<value name="CTS.IntelligentExceptions" type="string" data="far|vim.exe"/>
|
||||
<value name="StatusBar.Hide.Time" type="hex" data="01"/>
|
||||
<value name="TaskbarProgress" type="hex" data="01"/>
|
||||
<value name="RetardInactivePanes" type="hex" data="00"/>
|
||||
<value name="ProcessCmdStart" type="hex" data="01"/>
|
||||
<value name="Multi.ShowSearch" type="hex" data="01"/>
|
||||
<value name="Multi.CloseConfirmFlags" type="hex" data="04"/>
|
||||
<value name="FontUseDpi" type="hex" data="01"/>
|
||||
<value name="FontUseUnits" type="hex" data="00"/>
|
||||
<value name="UseScrollLock" type="hex" data="01"/>
|
||||
<value name="CTS.ForceLocale" type="dword" data="00000000"/>
|
||||
<value name="StatusBar.Hide.VisL" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.KeyHooks" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.WVBack" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.WVDC" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.Zoom" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.Dpi" type="hex" data="01"/>
|
||||
<value name="TabFlashChanged" type="long" data="8"/>
|
||||
<value name="TabModifiedSuffix" type="string" data="[*]"/>
|
||||
<key name="HotKeys" modified="2018-02-22 06:02:12" build="171109">
|
||||
<value name="KeyMacroVersion" type="hex" data="02"/>
|
||||
<value name="Multi.Modifier" type="dword" data="00000011"/>
|
||||
<value name="Multi.ArrowsModifier" type="dword" data="0000005b"/>
|
||||
<value name="MinimizeRestore" type="dword" data="000011c0"/>
|
||||
<value name="MinimizeRestore2" type="dword" data="00000000"/>
|
||||
<value name="GlobalRestore" type="dword" data="00000000"/>
|
||||
<value name="CdExplorerPath" type="dword" data="00000000"/>
|
||||
<value name="ForcedFullScreen" type="dword" data="12115b0d"/>
|
||||
<value name="SwitchGuiFocus" type="dword" data="00000000"/>
|
||||
<value name="SetFocusGui" type="dword" data="00000000"/>
|
||||
<value name="SetFocusChild" type="dword" data="00000000"/>
|
||||
<value name="ChildSystemMenu" type="dword" data="000011ff"/>
|
||||
<value name="Multi.NewConsole" type="dword" data="00000000"/>
|
||||
<value name="Multi.NewConsoleShift" type="dword" data="00001154"/>
|
||||
<value name="Multi.CmdKey" type="dword" data="00000000"/>
|
||||
<value name="Multi.NewWindow" type="dword" data="00000000"/>
|
||||
<value name="Multi.NewConsolePopup" type="dword" data="00000000"/>
|
||||
<value name="Multi.NewConsolePopup2" type="dword" data="00000000"/>
|
||||
<value name="Multi.NewAttach" type="dword" data="00000000"/>
|
||||
<value name="Multi.NewSplitV" type="dword" data="00000000"/>
|
||||
<value name="Multi.NewSplitH" type="dword" data="00000000"/>
|
||||
<value name="Multi.SplitMaximize" type="dword" data="00005d0d"/>
|
||||
<value name="Multi.SplitSizeVU" type="dword" data="00105d26"/>
|
||||
<value name="Multi.SplitSizeVD" type="dword" data="00105d28"/>
|
||||
<value name="Multi.SplitSizeHL" type="dword" data="00105d25"/>
|
||||
<value name="Multi.SplitSizeHR" type="dword" data="00105d27"/>
|
||||
<value name="Key.TabPane1" type="dword" data="00000000"/>
|
||||
<value name="Key.TabPane2" type="dword" data="00000000"/>
|
||||
<value name="Multi.SplitFocusU" type="dword" data="00005d26"/>
|
||||
<value name="Multi.SplitFocusD" type="dword" data="00005d28"/>
|
||||
<value name="Multi.SplitFocusL" type="dword" data="00005d25"/>
|
||||
<value name="Multi.SplitFocusR" type="dword" data="00005d27"/>
|
||||
<value name="Multi.Next" type="dword" data="00000000"/>
|
||||
<value name="Multi.NextShift" type="dword" data="00000000"/>
|
||||
<value name="Multi.Recreate" type="dword" data="00000000"/>
|
||||
<value name="Multi.AltCon" type="dword" data="00000000"/>
|
||||
<value name="Multi.Pause" type="dword" data="80808013"/>
|
||||
<value name="Multi.Scroll" type="dword" data="00000000"/>
|
||||
<value name="Multi.GroupInput" type="dword" data="00005d47"/>
|
||||
<value name="Multi.Detach" type="dword" data="00000000"/>
|
||||
<value name="Multi.Close" type="dword" data="00001157"/>
|
||||
<value name="CloseTabKey" type="dword" data="00000000"/>
|
||||
<value name="CloseGroupKey" type="dword" data="00000000"/>
|
||||
<value name="CloseGroupPrcKey" type="dword" data="00000000"/>
|
||||
<value name="CloseAllConKey" type="dword" data="00000000"/>
|
||||
<value name="CloseZombiesKey" type="dword" data="00000000"/>
|
||||
<value name="CloseExceptConKey" type="dword" data="00000000"/>
|
||||
<value name="KillProcessKey" type="dword" data="00000000"/>
|
||||
<value name="KillAllButShellKey" type="dword" data="00105b2e"/>
|
||||
<value name="DuplicateRootKey" type="dword" data="00000000"/>
|
||||
<value name="CloseConEmuKey" type="dword" data="00001273"/>
|
||||
<value name="Multi.Rename" type="dword" data="00000000"/>
|
||||
<value name="AffinityPriorityKey" type="dword" data="00005d41"/>
|
||||
<value name="Multi.MoveLeft" type="dword" data="00125b25"/>
|
||||
<value name="Multi.MoveRight" type="dword" data="00125b27"/>
|
||||
<value name="CTS.VkBlockStart" type="dword" data="00000000"/>
|
||||
<value name="CTS.VkTextStart" type="dword" data="00000000"/>
|
||||
<value name="CTS.VkCopyFmt0" type="dword" data="00001143"/>
|
||||
<value name="CTS.VkCopyFmt1" type="dword" data="00101143"/>
|
||||
<value name="CTS.VkCopyFmt2" type="dword" data="00000000"/>
|
||||
<value name="CTS.VkCopyAll" type="dword" data="00000000"/>
|
||||
<value name="HighlightMouseSwitch" type="dword" data="00005d4c"/>
|
||||
<value name="HighlightMouseSwitchX" type="dword" data="00005d58"/>
|
||||
<value name="Multi.ShowTabsList" type="dword" data="00000000"/>
|
||||
<value name="Multi.ShowTabsList2" type="dword" data="00000000"/>
|
||||
<value name="ClipboardVkAllLines" type="dword" data="0000102d"/>
|
||||
<value name="ClipboardVkFirstLine" type="dword" data="00001156"/>
|
||||
<value name="DeleteWordToLeft" type="dword" data="00001108"/>
|
||||
<value name="FindTextKey" type="dword" data="00005d46"/>
|
||||
<value name="ScreenshotKey" type="dword" data="00000000"/>
|
||||
<value name="ScreenshotFullKey" type="dword" data="00000000"/>
|
||||
<value name="ShowStatusBarKey" type="dword" data="00000000"/>
|
||||
<value name="ShowTabBarKey" type="dword" data="00000000"/>
|
||||
<value name="ShowCaptionKey" type="dword" data="00000000"/>
|
||||
<value name="AlwaysOnTopKey" type="dword" data="00000000"/>
|
||||
<value name="TransparencyInc" type="dword" data="00000000"/>
|
||||
<value name="TransparencyDec" type="dword" data="00000000"/>
|
||||
<value name="Key.TabMenu" type="dword" data="00000000"/>
|
||||
<value name="Key.TabMenu2" type="dword" data="00000000"/>
|
||||
<value name="Key.Maximize" type="dword" data="00000000"/>
|
||||
<value name="Key.MaximizeWidth" type="dword" data="00000000"/>
|
||||
<value name="Key.MaximizeHeight" type="dword" data="00000000"/>
|
||||
<value name="Key.TileToLeft" type="dword" data="00000000"/>
|
||||
<value name="Key.TileToRight" type="dword" data="00000000"/>
|
||||
<value name="Key.JumpPrevMonitor" type="dword" data="00000000"/>
|
||||
<value name="Key.JumpNextMonitor" type="dword" data="00000000"/>
|
||||
<value name="Key.FullScreen" type="dword" data="0000120d"/>
|
||||
<value name="Key.SysMenu" type="dword" data="00000000"/>
|
||||
<value name="Key.SysMenu2" type="dword" data="00001102"/>
|
||||
<value name="Key.BufUp" type="dword" data="00001126"/>
|
||||
<value name="Key.BufDn" type="dword" data="00001128"/>
|
||||
<value name="Key.BufPgUp" type="dword" data="00001121"/>
|
||||
<value name="Key.BufPgDn" type="dword" data="00001122"/>
|
||||
<value name="Key.BufHfPgUp" type="dword" data="00005d21"/>
|
||||
<value name="Key.BufHfPgDn" type="dword" data="00005d22"/>
|
||||
<value name="Key.BufTop" type="dword" data="00005d24"/>
|
||||
<value name="Key.BufBottom" type="dword" data="00005d23"/>
|
||||
<value name="Key.BufCursor" type="dword" data="00005d08"/>
|
||||
<value name="FontLargerKey" type="dword" data="00000000"/>
|
||||
<value name="FontSmallerKey" type="dword" data="00000000"/>
|
||||
<value name="FontOriginalKey" type="dword" data="00001104"/>
|
||||
<value name="PasteFileKey" type="dword" data="00101146"/>
|
||||
<value name="PastePathKey" type="dword" data="00101144"/>
|
||||
<value name="PasteCygwinKey" type="dword" data="00005d2d"/>
|
||||
<value name="KeyMacro01" type="dword" data="00a01231"/>
|
||||
<value name="KeyMacro01.Text" type="string" data="Task(1)"/>
|
||||
<value name="KeyMacro02" type="dword" data="00a01232"/>
|
||||
<value name="KeyMacro02.Text" type="string" data="Task(2)"/>
|
||||
<value name="KeyMacro03" type="dword" data="000011d0"/>
|
||||
<value name="KeyMacro03.Text" type="string" data="FontSetSize(1,2)"/>
|
||||
<value name="KeyMacro04" type="dword" data="000011d1"/>
|
||||
<value name="KeyMacro04.Text" type="string" data="FontSetSize(1,-2)"/>
|
||||
<value name="KeyMacro05" type="dword" data="00a01233"/>
|
||||
<value name="KeyMacro05.Text" type="string" data="Task(3)"/>
|
||||
<value name="KeyMacro06" type="dword" data="00a01234"/>
|
||||
<value name="KeyMacro06.Text" type="string" data="Task(4)"/>
|
||||
<value name="KeyMacro07" type="dword" data="00a01235"/>
|
||||
<value name="KeyMacro07.Text" type="string" data="Task(5)"/>
|
||||
<value name="KeyMacro08" type="dword" data="00a01236"/>
|
||||
<value name="KeyMacro08.Text" type="string" data="Task(6)"/>
|
||||
<value name="KeyMacro09" type="dword" data="00a01237"/>
|
||||
<value name="KeyMacro09.Text" type="string" data="Task(7)"/>
|
||||
<value name="KeyMacro10" type="dword" data="00a01238"/>
|
||||
<value name="KeyMacro10.Text" type="string" data="Task(8)"/>
|
||||
<value name="KeyMacro11" type="dword" data="00a01239"/>
|
||||
<value name="KeyMacro11.Text" type="string" data="Task(9)"/>
|
||||
<value name="KeyMacro12" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro12.Text" type="string" data=""/>
|
||||
<value name="KeyMacro13" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro13.Text" type="string" data=""/>
|
||||
<value name="KeyMacro14" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro14.Text" type="string" data=""/>
|
||||
<value name="KeyMacro15" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro15.Text" type="string" data=""/>
|
||||
<value name="KeyMacro16" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro16.Text" type="string" data=""/>
|
||||
<value name="KeyMacro17" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro17.Text" type="string" data=""/>
|
||||
<value name="KeyMacro18" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro18.Text" type="string" data=""/>
|
||||
<value name="KeyMacro19" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro19.Text" type="string" data=""/>
|
||||
<value name="KeyMacro20" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro20.Text" type="string" data=""/>
|
||||
<value name="KeyMacro21" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro21.Text" type="string" data=""/>
|
||||
<value name="KeyMacro22" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro22.Text" type="string" data=""/>
|
||||
<value name="KeyMacro23" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro23.Text" type="string" data=""/>
|
||||
<value name="KeyMacro24" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro24.Text" type="string" data=""/>
|
||||
<value name="KeyMacro25" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro25.Text" type="string" data=""/>
|
||||
<value name="KeyMacro26" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro26.Text" type="string" data=""/>
|
||||
<value name="KeyMacro27" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro27.Text" type="string" data=""/>
|
||||
<value name="KeyMacro28" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro28.Text" type="string" data=""/>
|
||||
<value name="KeyMacro29" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro29.Text" type="string" data=""/>
|
||||
<value name="KeyMacro30" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro30.Text" type="string" data=""/>
|
||||
<value name="KeyMacro31" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro31.Text" type="string" data=""/>
|
||||
<value name="KeyMacro32" type="dword" data="00000000"/>
|
||||
<value name="KeyMacro32.Text" type="string" data=""/>
|
||||
<value name="CTS.VkBlock" type="hex" data="a4"/>
|
||||
<value name="CTS.VkText" type="hex" data="a0"/>
|
||||
<value name="CTS.VkAct" type="hex" data="00"/>
|
||||
<value name="CTS.VkPrompt" type="hex" data="00"/>
|
||||
<value name="FarGotoEditorVk" type="hex" data="a2"/>
|
||||
<value name="DndLKey" type="hex" data="00"/>
|
||||
<value name="DndRKey" type="hex" data="a2"/>
|
||||
<value name="WndDragKey" type="dword" data="00121101"/>
|
||||
<value name="Multi.Unfasten" type="dword" data="00000000"/>
|
||||
<value name="Key.DebugProcess" type="dword" data="00105b44"/>
|
||||
<value name="Key.DumpProcess" type="dword" data="00000000"/>
|
||||
<value name="Key.DumpTree" type="dword" data="00000000"/>
|
||||
<value name="Multi.SplitSwap" type="dword" data="00125d58"/>
|
||||
<value name="Multi.SplitSwapU" type="dword" data="00125d26"/>
|
||||
<value name="Multi.SplitSwapD" type="dword" data="00125d28"/>
|
||||
<value name="Multi.SplitSwapL" type="dword" data="00125d25"/>
|
||||
<value name="Multi.SplitSwapR" type="dword" data="00125d27"/>
|
||||
<value name="Multi.GroupInputAll" type="dword" data="00105d47"/>
|
||||
<value name="Multi.GroupInputKey" type="dword" data="00125d47"/>
|
||||
<value name="Key.AltNumpad" type="dword" data="00000000"/>
|
||||
<value name="Key.JumpActiveMonitor" type="dword" data="00000000"/>
|
||||
<value name="Key.BufPrUp" type="dword" data="00121121"/>
|
||||
<value name="Key.BufPrDn" type="dword" data="00121122"/>
|
||||
<value name="Key.ResetTerm" type="dword" data="00000000"/>
|
||||
</key>
|
||||
<value name="StartCreateDelay" type="ulong" data="100"/>
|
||||
<value name="DefaultTerminalDebugLog" type="hex" data="00"/>
|
||||
<value name="LastMonitor" type="string" data="0,0,1440,1050"/>
|
||||
<value name="Restore2ActiveMon" type="hex" data="00"/>
|
||||
<value name="DownShowExOnTopMessage" type="hex" data="00"/>
|
||||
<value name="EnvironmentSet" type="multi">
|
||||
<line data="set PATH=%ConEmuBaseDir%\Scripts;%PATH%"/>
|
||||
</value>
|
||||
<value name="Update.InetTool" type="hex" data="00"/>
|
||||
<value name="Update.InetToolCmd" type="string" data=""/>
|
||||
<value name="SuppressBells" type="hex" data="01"/>
|
||||
<value name="ClipboardAllLinesPosix" type="hex" data="00"/>
|
||||
<value name="ClipboardFirstLinePosix" type="hex" data="00"/>
|
||||
<value name="VividColors" type="hex" data="01"/>
|
||||
<value name="AnsiExecution" type="hex" data="01"/>
|
||||
<value name="AnsiAllowedCommands" type="multi">
|
||||
<line data="cmd -cur_console:R /cGitShowBranch.cmd"/>
|
||||
</value>
|
||||
<value name="KillSshAgent" type="hex" data="01"/>
|
||||
<value name="ProcessCtrlZ" type="hex" data="00"/>
|
||||
<value name="JumpListAutoUpdate" type="hex" data="01"/>
|
||||
<value name="CompressLongStrings" type="hex" data="01"/>
|
||||
<value name="DynamicBufferHeight" type="hex" data="01"/>
|
||||
<value name="CTS.ResetOnRelease" type="hex" data="00"/>
|
||||
<value name="CTS.EraseBeforeReset" type="hex" data="01"/>
|
||||
<value name="Anti-aliasing2" type="hex" data="00"/>
|
||||
<value name="UseAltGrayPlus" type="hex" data="01"/>
|
||||
<value name="MouseDragWindow" type="hex" data="01"/>
|
||||
<value name="DebugLog" type="hex" data="00"/>
|
||||
<value name="StatusBar.Hide.TMode" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.RMode" type="hex" data="01"/>
|
||||
<value name="StatusBar.Hide.CellI" type="hex" data="01"/>
|
||||
</key>
|
||||
</key>
|
||||
</key>
|
@ -1,16 +1,3 @@
|
||||
## Config
|
||||
|
||||
All config files must be in this folder. If there is no option to set this folder
|
||||
directly, it has to be hardlinked.
|
||||
|
||||
* `user_aliases.cmd`: aliases in cmd; called from vendor\init.bat; autocreated from
|
||||
`vendor\user_aliases.cmd.default`.
|
||||
* `*.lua`: clink completions and prompt filters; autoloaded after all
|
||||
prompt filter and clink completions are initialized; add your own.
|
||||
* `user_profile.{sh|cmd|ps1}`: startup files for bash|cmd|powershell tasks; called from their
|
||||
respective startup scripts in `vendor\`; autocreated from
|
||||
`vendor\user_profile.{sh|cmd|ps1}.default` on first start of such a task.
|
||||
* `.history`: the current commandline history; autoupdated on close.
|
||||
* `settings`: settings for readline; overwritten on update.
|
||||
* `user-ConEmu.xml`: settings from ConEmu the UI of Cmder. ;
|
||||
Do not edit this file directly it is overwritten on each cmder.exe launch.
|
||||
All config files must be in this folder. If there is no option to set this folder directly, it has to be hardlinked.
|
5
config/aliases
Normal file
@ -0,0 +1,5 @@
|
||||
e.=explorer .
|
||||
gl=git log --oneline --all --graph --decorate $*
|
||||
ls=ls --color $*
|
||||
pwd=cd
|
||||
clear=cls
|
50
config/git.lua
Normal file
@ -0,0 +1,50 @@
|
||||
---
|
||||
-- Find out current branch
|
||||
-- @return {false|git branch name}
|
||||
---
|
||||
function get_git_branch()
|
||||
for line in io.popen("git branch 2>nul"):lines() do
|
||||
local m = line:match("%* (.+)$")
|
||||
if m then
|
||||
return m
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
---
|
||||
-- Get the status of working dir
|
||||
-- @return {bool}
|
||||
---
|
||||
function get_git_status()
|
||||
return os.execute("git diff --quiet --ignore-submodules HEAD")
|
||||
end
|
||||
|
||||
function git_prompt_filter()
|
||||
|
||||
-- Colors for git status
|
||||
local colors = {
|
||||
clean = "\x1b[1;37;40m",
|
||||
dirty = "\x1b[31;1m",
|
||||
}
|
||||
|
||||
local branch = get_git_branch()
|
||||
if branch then
|
||||
-- Has branch => therefore it is a git folder, now figure out status
|
||||
if get_git_status() then
|
||||
color = colors.clean
|
||||
else
|
||||
color = colors.dirty
|
||||
end
|
||||
|
||||
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", color.."("..branch..")")
|
||||
return true
|
||||
end
|
||||
|
||||
-- No git present or not in git file
|
||||
clink.prompt.value = string.gsub(clink.prompt.value, "{git}", "")
|
||||
return false
|
||||
end
|
||||
|
||||
clink.prompt.register_filter(git_prompt_filter, 50)
|
@ -1,3 +0,0 @@
|
||||
## Profile.d Folder
|
||||
|
||||
* Files in this folder named `*.{sh|cmd|ps1}`: Will be executed by the appropriate shell when starting the shell.
|
5
config/prompt.lua
Normal file
@ -0,0 +1,5 @@
|
||||
function lambda_prompt_filter()
|
||||
clink.prompt.value = string.gsub(clink.prompt.value, "{lamb}", "λ")
|
||||
end
|
||||
|
||||
clink.prompt.register_filter(lambda_prompt_filter, 40)
|
43
config/settings
Normal file
@ -0,0 +1,43 @@
|
||||
# name: Ctrl-D exits
|
||||
# type: bool
|
||||
# Ctrl-D exits the process when it is pressed on an empty line.
|
||||
ctrld_exits = 1
|
||||
|
||||
# name: Ctrl-C raises exception
|
||||
# type: bool
|
||||
# When Ctrl-C is pressed Clink will pass it thourgh to the parent by raising the
|
||||
# appropriate exception.
|
||||
passthrough_ctrlc = 1
|
||||
|
||||
# name: Esc clears line
|
||||
# type: bool
|
||||
# Clink clears the current line when Esc is pressed (unless Readline's Vi mode
|
||||
# is enabled).
|
||||
esc_clears_line = 1
|
||||
|
||||
# name: Match display colour
|
||||
# type: int
|
||||
# Colour to use when displaying matches. A value less than 0 will be the
|
||||
# opposite brightness of the default colour.
|
||||
match_colour = -1
|
||||
|
||||
# name: Executable match style
|
||||
# type: enum
|
||||
# Changes how Clink will match executables when there is no path separator on
|
||||
# the line. 0 = PATH only, 1 = PATH and CWD, 2 = PATH, CWD, and directories. In
|
||||
# all cases both executables and directories are matched when there is a path
|
||||
# separator present.
|
||||
exec_match_style = -1
|
||||
|
||||
# name: Prompt colour
|
||||
# type: int
|
||||
# Surrounds the prompt in ANSI escape codes to set the prompt's colour. Disabled
|
||||
# when the value is less than 0.
|
||||
prompt_colour = -1
|
||||
|
||||
# name: Auto-answer terminate prompt
|
||||
# type: enum
|
||||
# Automatically answers cmd.exe's 'Terminate batch job (Y/N)?' prompts. 0 =
|
||||
# disabled, 1 = answer 'Y', 2 = answer 'N'.
|
||||
terminate_autoanswer = 0
|
||||
|
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 256 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 256 B |
Before Width: | Height: | Size: 271 B |
Before Width: | Height: | Size: 257 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 371 B |
Before Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 364 B |
Before Width: | Height: | Size: 392 B |
Before Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 498 B |
Before Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 501 B |
Before Width: | Height: | Size: 493 B |
@ -1,26 +1,26 @@
|
||||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
# Visual Studio Express 2013 for Windows Desktop
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmderLauncher", "CmderLauncher.vcxproj", "{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
DebugXP|Win32 = DebugXP|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
ReleaseXP|Win32 = ReleaseXP|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.DebugXP|Win32.ActiveCfg = DebugXP|Win32
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.DebugXP|Win32.Build.0 = DebugXP|Win32
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|Win32.Build.0 = Release|Win32
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Debug|x64.Build.0 = Debug|x64
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|x64.ActiveCfg = Release|x64
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.Release|x64.Build.0 = Release|x64
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.ReleaseXP|Win32.ActiveCfg = ReleaseXP|Win32
|
||||
{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}.ReleaseXP|Win32.Build.0 = ReleaseXP|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1,55 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="DebugXP|Win32">
|
||||
<Configuration>DebugXP</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="ReleaseXP|Win32">
|
||||
<Configuration>ReleaseXP</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{4A8485A5-B7DD-4C44-B7F6-3E2765DD0CD3}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>CmderLauncher</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@ -57,13 +56,13 @@
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
@ -71,15 +70,15 @@
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>Cmder</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>Cmder</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>Cmder</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetName>Cmder</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>Cmder</TargetName>
|
||||
</PropertyGroup>
|
||||
@ -95,14 +94,21 @@
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<!-- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies> -->
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>src/app.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugXP|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;XP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
@ -115,43 +121,18 @@
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<!-- <AdditionalDependencies>comctl32.lib;shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies> -->
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>src/app.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PostBuildEvent>
|
||||
<Command>copy "$(TargetPath)" "$(SolutionDir)..\$(TargetFileName)"</Command>
|
||||
<Command>copy $(TargetPath) $(SolutionDir)..\$(TargetFileName)</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>src/app.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_USING_V110_SDK71_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseXP|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
@ -159,10 +140,9 @@
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;XP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -170,17 +150,12 @@
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>src/app.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(TargetPath) $(SolutionDir)..\$(TargetFileName)</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="src\resource.rc">
|
||||
<FileType>RC</FileType>
|
||||
</ResourceCompile>
|
||||
<ResourceCompile Include="src\Resource.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\resource.h" />
|
||||
|
@ -3,14 +3,8 @@
|
||||
#include <Shlwapi.h>
|
||||
#include "resource.h"
|
||||
#include <vector>
|
||||
#include <shlobj.h>
|
||||
|
||||
#include <regex>
|
||||
#include <iostream>
|
||||
|
||||
#pragma comment(lib, "Shlwapi.lib")
|
||||
#pragma comment(lib, "comctl32.lib")
|
||||
#pragma warning( disable : 4091 )
|
||||
|
||||
#ifndef UNICODE
|
||||
#error "Must be compiled with unicode support."
|
||||
@ -19,12 +13,9 @@
|
||||
#define USE_TASKBAR_API (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
|
||||
|
||||
#define MB_TITLE L"Cmder Launcher"
|
||||
#define SHELL_MENU_REGISTRY_PATH_BACKGROUND L"Directory\\Background\\shell\\Cmder"
|
||||
#define SHELL_MENU_REGISTRY_PATH_LISTITEM L"Directory\\shell\\Cmder"
|
||||
#define SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND L"Drive\\Background\\shell\\Cmder"
|
||||
#define SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM L"Drive\\shell\\Cmder"
|
||||
#define SHELL_MENU_REGISTRY_PATH L"Directory\\Background\\shell\\Cmder"
|
||||
|
||||
#define streqi(a, b) (_wcsicmp((a), (b)) == 0)
|
||||
#define streqi(a, b) (_wcsicmp((a), (b)) == 0)
|
||||
|
||||
#define WIDEN2(x) L ## x
|
||||
#define WIDEN(x) WIDEN2(x)
|
||||
@ -32,44 +23,11 @@
|
||||
|
||||
#define FAIL_ON_ERROR(x) { DWORD ec; if ((ec = (x)) != ERROR_SUCCESS) { ShowErrorAndExit(ec, __WFUNCTION__, __LINE__); } }
|
||||
|
||||
void TaskDialogOpen( PCWSTR mainStr, PCWSTR contentStr )
|
||||
{
|
||||
|
||||
HRESULT hr = NULL;
|
||||
|
||||
TASKDIALOGCONFIG tsk = {sizeof(tsk)};
|
||||
|
||||
HWND hOwner = NULL;
|
||||
HINSTANCE hInstance = GetModuleHandle(NULL);
|
||||
PCWSTR tskTitle = MAKEINTRESOURCE(IDS_TITLE);
|
||||
|
||||
tsk.hInstance = hInstance;
|
||||
tsk.pszMainIcon = MAKEINTRESOURCE(IDI_CMDER);
|
||||
tsk.pszWindowTitle = tskTitle;
|
||||
tsk.pszMainInstruction = mainStr;
|
||||
tsk.pszContent = contentStr;
|
||||
|
||||
TASKDIALOG_BUTTON btns[1] = {
|
||||
{ IDOK, L"OK" }
|
||||
};
|
||||
|
||||
tsk.dwFlags = TDF_ALLOW_DIALOG_CANCELLATION|TDF_ENABLE_HYPERLINKS;
|
||||
tsk.pButtons = btns;
|
||||
tsk.cButtons = _countof(btns);
|
||||
|
||||
tsk.hwndParent = hOwner;
|
||||
|
||||
int selectedButtonId = IDOK;
|
||||
|
||||
hr = TaskDialogIndirect( &tsk, &selectedButtonId, NULL, NULL );
|
||||
|
||||
}
|
||||
|
||||
void ShowErrorAndExit(DWORD ec, const wchar_t * func, int line)
|
||||
{
|
||||
wchar_t * buffer;
|
||||
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL, ec, 0, (LPWSTR)&buffer, 0, NULL) == 0)
|
||||
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL, ec, 0, (LPWSTR) &buffer, 0, NULL) == 0)
|
||||
{
|
||||
buffer = L"Unknown error. FormatMessage failed.";
|
||||
}
|
||||
@ -92,20 +50,33 @@ typedef struct _option
|
||||
|
||||
typedef std::pair<std::wstring, std::wstring> optpair;
|
||||
|
||||
bool FileExists(const wchar_t * filePath)
|
||||
{
|
||||
HANDLE hFile = CreateFile(filePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
optpair GetOption()
|
||||
{
|
||||
wchar_t * cmd = GetCommandLine();
|
||||
int argc;
|
||||
wchar_t ** argv = CommandLineToArgvW(cmd, &argc);
|
||||
optpair pair;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
CloseHandle(hFile);
|
||||
return true;
|
||||
pair = optpair(L"/START", L"");
|
||||
}
|
||||
else if (argc == 2 && argv[1][0] != L'/')
|
||||
{
|
||||
pair = optpair(L"/START", argv[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
pair = optpair(argv[1], argc > 2 ? argv[2] : L"");
|
||||
}
|
||||
|
||||
return false;
|
||||
LocalFree(argv);
|
||||
|
||||
return pair;
|
||||
}
|
||||
|
||||
void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstring taskName = L"", std::wstring title = L"", std::wstring iconPath = L"", std::wstring cfgRoot = L"", bool use_user_cfg = true, std::wstring conemu_args = L"")
|
||||
void StartCmder(std::wstring path)
|
||||
{
|
||||
#if USE_TASKBAR_API
|
||||
wchar_t appId[MAX_PATH] = { 0 };
|
||||
@ -113,30 +84,8 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
wchar_t exeDir[MAX_PATH] = { 0 };
|
||||
wchar_t icoPath[MAX_PATH] = { 0 };
|
||||
wchar_t cfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t backupCfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t cpuCfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t userCfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t defaultCfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t conEmuPath[MAX_PATH] = { 0 };
|
||||
wchar_t configDirPath[MAX_PATH] = { 0 };
|
||||
wchar_t userConfigDirPath[MAX_PATH] = { 0 };
|
||||
wchar_t userBinDirPath[MAX_PATH] = { 0 };
|
||||
wchar_t userProfiledDirPath[MAX_PATH] = { 0 };
|
||||
wchar_t userProfilePath[MAX_PATH] = { 0 };
|
||||
wchar_t legacyUserProfilePath[MAX_PATH] = { 0 };
|
||||
wchar_t userAliasesPath[MAX_PATH] = { 0 };
|
||||
wchar_t legacyUserAliasesPath[MAX_PATH] = { 0 };
|
||||
wchar_t args[MAX_PATH * 2 + 256] = { 0 };
|
||||
wchar_t userConEmuCfgPath[MAX_PATH] = { 0 };
|
||||
|
||||
|
||||
std::wstring cmderStart = path;
|
||||
std::wstring cmderTask = taskName;
|
||||
std::wstring cmderTitle = title;
|
||||
std::wstring cmderConEmuArgs = conemu_args;
|
||||
|
||||
std::copy(cfgRoot.begin(), cfgRoot.end(), userConfigDirPath);
|
||||
userConfigDirPath[cfgRoot.length()] = 0;
|
||||
|
||||
GetModuleFileName(NULL, exeDir, sizeof(exeDir));
|
||||
|
||||
@ -146,332 +95,25 @@ void StartCmder(std::wstring path = L"", bool is_single_mode = false, std::wstr
|
||||
|
||||
PathRemoveFileSpec(exeDir);
|
||||
|
||||
if (PathFileExists(iconPath.c_str()))
|
||||
{
|
||||
std::copy(iconPath.begin(), iconPath.end(), icoPath);
|
||||
icoPath[iconPath.length()] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
||||
}
|
||||
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
||||
PathCombine(cfgPath, exeDir, L"config\\ConEmu.xml");
|
||||
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
||||
|
||||
PathCombine(configDirPath, exeDir, L"config");
|
||||
|
||||
/*
|
||||
Convert legacy user-profile.cmd to new name user_profile.cmd
|
||||
*/
|
||||
PathCombine(legacyUserProfilePath, configDirPath, L"user-profile.cmd");
|
||||
if (PathFileExists(legacyUserProfilePath))
|
||||
{
|
||||
PathCombine(userProfilePath, configDirPath, L"user_profile.cmd");
|
||||
|
||||
char *lPr = (char *)malloc(MAX_PATH);
|
||||
char *pR = (char *)malloc(MAX_PATH);
|
||||
size_t i;
|
||||
wcstombs_s(&i, lPr, (size_t)MAX_PATH,
|
||||
legacyUserProfilePath, (size_t)MAX_PATH);
|
||||
wcstombs_s(&i, pR, (size_t)MAX_PATH,
|
||||
userProfilePath, (size_t)MAX_PATH);
|
||||
rename(lPr, pR);
|
||||
}
|
||||
|
||||
/*
|
||||
Convert legacy user-aliases.cmd to new name user_aliases.cmd
|
||||
*/
|
||||
PathCombine(legacyUserAliasesPath, configDirPath, L"user-aliases.cmd");
|
||||
if (PathFileExists(legacyUserAliasesPath))
|
||||
{
|
||||
PathCombine(userAliasesPath, configDirPath, L"user_aliases.cmd");
|
||||
|
||||
char *lPr = (char *)malloc(MAX_PATH);
|
||||
char *pR = (char *)malloc(MAX_PATH);
|
||||
size_t i;
|
||||
wcstombs_s(&i, lPr, (size_t)MAX_PATH,
|
||||
legacyUserAliasesPath, (size_t)MAX_PATH);
|
||||
wcstombs_s(&i, pR, (size_t)MAX_PATH,
|
||||
userAliasesPath, (size_t)MAX_PATH);
|
||||
rename(lPr, pR);
|
||||
}
|
||||
|
||||
/*
|
||||
Was /c [path] specified?
|
||||
*/
|
||||
if (wcscmp(userConfigDirPath, L"") == 0)
|
||||
{
|
||||
// No - It wasn't.
|
||||
PathCombine(userConfigDirPath, exeDir, L"config");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Yes - It was.
|
||||
PathCombine(userBinDirPath, userConfigDirPath, L"bin");
|
||||
SHCreateDirectoryEx(0, userBinDirPath, 0);
|
||||
|
||||
PathCombine(userConfigDirPath, userConfigDirPath, L"config");
|
||||
SHCreateDirectoryEx(0, userConfigDirPath, 0);
|
||||
|
||||
PathCombine(userProfiledDirPath, userConfigDirPath, L"profile.d");
|
||||
SHCreateDirectoryEx(0, userProfiledDirPath, 0);
|
||||
|
||||
/*
|
||||
Convert legacy user-profile.cmd to new name user_profile.cmd
|
||||
*/
|
||||
PathCombine(legacyUserProfilePath, userConfigDirPath, L"user-profile.cmd");
|
||||
if (PathFileExists(legacyUserProfilePath))
|
||||
{
|
||||
PathCombine(userProfilePath, userConfigDirPath, L"user_profile.cmd");
|
||||
|
||||
char *lPr = (char *)malloc(MAX_PATH);
|
||||
char *pR = (char *)malloc(MAX_PATH);
|
||||
size_t i;
|
||||
wcstombs_s(&i, lPr, (size_t)MAX_PATH,
|
||||
legacyUserProfilePath, (size_t)MAX_PATH);
|
||||
wcstombs_s(&i, pR, (size_t)MAX_PATH,
|
||||
userProfilePath, (size_t)MAX_PATH);
|
||||
rename(lPr, pR);
|
||||
}
|
||||
|
||||
/*
|
||||
Convert legacy user-aliases.cmd to new name user_aliases.cmd
|
||||
*/
|
||||
PathCombine(legacyUserAliasesPath, userConfigDirPath, L"user-aliases.cmd");
|
||||
if (PathFileExists(legacyUserAliasesPath))
|
||||
{
|
||||
PathCombine(userAliasesPath, userConfigDirPath, L"user_aliases.cmd");
|
||||
|
||||
char *lPr = (char *)malloc(MAX_PATH);
|
||||
char *pR = (char *)malloc(MAX_PATH);
|
||||
size_t i;
|
||||
wcstombs_s(&i, lPr, (size_t)MAX_PATH,
|
||||
legacyUserAliasesPath, (size_t)MAX_PATH);
|
||||
wcstombs_s(&i, pR, (size_t)MAX_PATH,
|
||||
userAliasesPath, (size_t)MAX_PATH);
|
||||
rename(lPr, pR);
|
||||
}
|
||||
}
|
||||
|
||||
// Set path to vendored ConEmu config file
|
||||
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml");
|
||||
|
||||
// Set path to Cmder default ConEmu config file
|
||||
PathCombine(defaultCfgPath, exeDir, L"vendor\\ConEmu.xml.default");
|
||||
|
||||
// Check for machine-specific then user config source file.
|
||||
PathCombine(cpuCfgPath, userConfigDirPath, L"ConEmu-%COMPUTERNAME%.xml");
|
||||
ExpandEnvironmentStrings(cpuCfgPath, cpuCfgPath, sizeof(cpuCfgPath) / sizeof(cpuCfgPath[0]));
|
||||
|
||||
// Set path to Cmder user ConEmu config file
|
||||
PathCombine(userCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
|
||||
if ( PathFileExists(cpuCfgPath) || use_user_cfg == false ) // config/ConEmu-%COMPUTERNAME%.xml file exists or /m was specified on command line, use machine specific config.
|
||||
{
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml file exists, copy vendor/conemu-maximus5/ConEmu.xml to config/ConEmu-%COMPUTERNAME%.xml.
|
||||
{
|
||||
if (!CopyFile(cfgPath, cpuCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else // vendor/conemu-maximus5/ConEmu.xml config file does not exist, copy config/ConEmu-%COMPUTERNAME%.xml to vendor/conemu-maximus5/ConEmu.xml file
|
||||
{
|
||||
if (!CopyFile(cpuCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy config/ConEmu-%COMPUTERNAME%.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // '/c [path]' was specified, don't copy anything and use existing conemu-%COMPUTERNAME%.xml to start comemu.
|
||||
{
|
||||
if (use_user_cfg == false && PathFileExists(cfgPath) && !PathFileExists(cpuCfgPath)) // vendor/conemu-maximus5/ConEmu.xml file exists, copy vendor/conemu-maximus5/ConEmu.xml to config/ConEmu-%COMPUTERNAME%.xml.
|
||||
{
|
||||
if (!CopyFile(cfgPath, cpuCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/ConEmu-%COMPUTERNAME%.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"ConEmu-%COMPUTERNAME%.xml");
|
||||
ExpandEnvironmentStrings(userConEmuCfgPath, userConEmuCfgPath, sizeof(userConEmuCfgPath) / sizeof(userConEmuCfgPath[0]));
|
||||
}
|
||||
}
|
||||
else if (PathFileExists(userCfgPath)) // config/user_conemu.xml exists, use it.
|
||||
{
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml.
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else // vendor/conemu-maximus5/ConEmu.xml does not exist, copy config/user-conemu.xml to vendor/conemu-maximus5/ConEmu.xml
|
||||
{
|
||||
if (!CopyFile(userCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy config/user-conemu.xml file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // '/c [path]' was specified, don't copy anything and use existing user_conemu.xml to start comemu.
|
||||
{
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
}
|
||||
else if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
else // vendor/ConEmu.xml.default config exists, copy Cmder vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml.
|
||||
{
|
||||
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!CopyFile(defaultCfgPath, cfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to vendor/conemu-maximus5/ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (PathFileExists(cfgPath)) // vendor/conemu-maximus5/ConEmu.xml exists, copy vendor/conemu-maximus5/ConEmu.xml to config/user_conemu.xml
|
||||
{
|
||||
if (!CopyFile(cfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/conemu-maximus5/ConEmu.xml file to config/user-conemu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
else // '/c [path]' was specified and 'vendor/ConEmu.xml.default' config exists, copy Cmder 'vendor/ConEmu.xml.default' file to '[user specified path]/config/user_ConEmu.xml'.
|
||||
{
|
||||
if ( ! CopyFile(defaultCfgPath, userCfgPath, FALSE))
|
||||
{
|
||||
MessageBox(NULL,
|
||||
(GetLastError() == ERROR_ACCESS_DENIED)
|
||||
? L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml! Access Denied."
|
||||
: L"Failed to copy vendor/ConEmu.xml.default file to [user specified path]/config/user_ConEmu.xml!", MB_TITLE, MB_ICONSTOP);
|
||||
exit(1);
|
||||
}
|
||||
PathCombine(userConEmuCfgPath, userConfigDirPath, L"user-ConEmu.xml");
|
||||
}
|
||||
|
||||
SYSTEM_INFO sysInfo;
|
||||
GetNativeSystemInfo(&sysInfo);
|
||||
if (sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||
{
|
||||
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu64.exe");
|
||||
}
|
||||
else
|
||||
{
|
||||
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
||||
}
|
||||
|
||||
swprintf_s(args, L"%s /Icon \"%s\"", args, icoPath);
|
||||
|
||||
if (!streqi(cmderStart.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s /dir \"%s\"", args, cmderStart.c_str());
|
||||
}
|
||||
|
||||
if (is_single_mode)
|
||||
{
|
||||
swprintf_s(args, L"%s /single", args);
|
||||
}
|
||||
|
||||
if (!streqi(cmderTitle.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s /title \"%s\"", args, cmderTitle.c_str());
|
||||
}
|
||||
|
||||
if (cfgRoot.length() != 0)
|
||||
{
|
||||
swprintf_s(args, L"%s -loadcfgfile \"%s\"", args, userConEmuCfgPath);
|
||||
}
|
||||
|
||||
if (!streqi(cmderConEmuArgs.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s %s", args, cmderConEmuArgs.c_str());
|
||||
}
|
||||
|
||||
// The `/run` arg and its value MUST be the last arg of ConEmu
|
||||
// see : https://conemu.github.io/en/ConEmuArgs.html
|
||||
// > This must be the last used switch (excepting -new_console and -cur_console)
|
||||
if (!streqi(cmderTask.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"%s /run {%s}", args, cmderTask.c_str());
|
||||
}
|
||||
swprintf_s(args, L"/Icon \"%s\" /Title Cmder /LoadCfgFile \"%s\"", icoPath, cfgPath);
|
||||
|
||||
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
|
||||
if (wcscmp(userConfigDirPath, configDirPath) != 0)
|
||||
{
|
||||
SetEnvironmentVariable(L"CMDER_USER_CONFIG", userConfigDirPath);
|
||||
SetEnvironmentVariable(L"CMDER_USER_BIN", userBinDirPath);
|
||||
}
|
||||
|
||||
// Ensure EnvironmentVariables are propagated.
|
||||
SetEnvironmentVariable(L"CMDER_START", path.c_str());
|
||||
|
||||
STARTUPINFO si = { 0 };
|
||||
|
||||
si.cb = sizeof(STARTUPINFO);
|
||||
#if USE_TASKBAR_API
|
||||
si.lpTitle = appId;
|
||||
si.dwFlags = STARTF_TITLEISAPPID;
|
||||
#endif
|
||||
PROCESS_INFORMATION pi;
|
||||
if (!CreateProcess(conEmuPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi)) {
|
||||
MessageBox(NULL, _T("Unable to create the ConEmu process!"), _T("Error"), MB_OK);
|
||||
return;
|
||||
}
|
||||
|
||||
LRESULT lr = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG | SMTO_NOTIMEOUTIFNOTHUNG, 5000, NULL);
|
||||
lr = SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)L"Environment", SMTO_ABORTIFHUNG | SMTO_NOTIMEOUTIFNOTHUNG, 5000, NULL); // For Windows >= 8
|
||||
PROCESS_INFORMATION pi;
|
||||
|
||||
CreateProcess(conEmuPath, args, NULL, NULL, false, 0, NULL, NULL, &si, &pi);
|
||||
}
|
||||
|
||||
bool IsUserOnly(std::wstring opt)
|
||||
@ -501,7 +143,8 @@ HKEY GetRootKey(std::wstring opt)
|
||||
|
||||
if (IsUserOnly(opt))
|
||||
{
|
||||
FAIL_ON_ERROR(RegCreateKeyEx(HKEY_CURRENT_USER, L"Software\\Classes", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &root, NULL));
|
||||
FAIL_ON_ERROR(RegCreateKeyEx(HKEY_CURRENT_USER, L"Software\\Classes", 0, NULL,
|
||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &root, NULL));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -511,54 +154,29 @@ HKEY GetRootKey(std::wstring opt)
|
||||
return root;
|
||||
}
|
||||
|
||||
void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName, std::wstring cfgRoot, bool single)
|
||||
void RegisterShellMenu(std::wstring opt)
|
||||
{
|
||||
wchar_t userConfigDirPath[MAX_PATH] = { 0 };
|
||||
|
||||
// First, get the paths we will use
|
||||
|
||||
wchar_t exePath[MAX_PATH] = { 0 };
|
||||
wchar_t icoPath[MAX_PATH] = { 0 };
|
||||
|
||||
GetModuleFileName(NULL, exePath, sizeof(exePath));
|
||||
|
||||
wchar_t commandStr[MAX_PATH + 20] = { 0 };
|
||||
wchar_t baseCommandStr[MAX_PATH + 20] = { 0 };
|
||||
if (!single) {
|
||||
swprintf_s(baseCommandStr, L"\"%s\"", exePath);
|
||||
}
|
||||
else {
|
||||
swprintf_s(baseCommandStr, L"\"%s\" /single", exePath);
|
||||
}
|
||||
|
||||
if (cfgRoot.length() == 0) // '/c [path]' was NOT specified
|
||||
{
|
||||
swprintf_s(commandStr, L"%s \"%%V\"", baseCommandStr);
|
||||
}
|
||||
else {
|
||||
std::copy(cfgRoot.begin(), cfgRoot.end(), userConfigDirPath);
|
||||
userConfigDirPath[cfgRoot.length()] = 0;
|
||||
swprintf_s(commandStr, L"%s /c \"%s\" \"%%V\"", baseCommandStr, userConfigDirPath);
|
||||
}
|
||||
|
||||
// Now that we have `commandStr`, it's OK to change `exePath`...
|
||||
PathRemoveFileSpec(exePath);
|
||||
|
||||
PathCombine(icoPath, exePath, L"icons\\cmder.ico");
|
||||
|
||||
// Now set the registry keys
|
||||
HKEY root = GetRootKey(opt);
|
||||
|
||||
HKEY cmderKey;
|
||||
FAIL_ON_ERROR(RegCreateKeyEx(root, keyBaseName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||
FAIL_ON_ERROR(
|
||||
RegCreateKeyEx(root, SHELL_MENU_REGISTRY_PATH, 0, NULL,
|
||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||
|
||||
FAIL_ON_ERROR(RegSetValue(cmderKey, L"", REG_SZ, L"Cmder Here", NULL));
|
||||
FAIL_ON_ERROR(RegSetValueEx(cmderKey, L"NoWorkingDirectory", 0, REG_SZ, (BYTE *)L"", 2));
|
||||
|
||||
FAIL_ON_ERROR(RegSetValueEx(cmderKey, L"Icon", 0, REG_SZ, (BYTE *)icoPath, wcslen(icoPath) * sizeof(wchar_t)));
|
||||
|
||||
HKEY command;
|
||||
FAIL_ON_ERROR(RegCreateKeyEx(cmderKey, L"command", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &command, NULL));
|
||||
FAIL_ON_ERROR(
|
||||
RegCreateKeyEx(cmderKey, L"command", 0, NULL,
|
||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &command, NULL));
|
||||
|
||||
wchar_t exePath[MAX_PATH] = { 0 };
|
||||
|
||||
GetModuleFileName(NULL, exePath, sizeof(exePath));
|
||||
|
||||
wchar_t commandStr[MAX_PATH + 20] = { 0 };
|
||||
swprintf_s(commandStr, L"\"%s\" \"%%V\"", exePath);
|
||||
|
||||
FAIL_ON_ERROR(RegSetValue(command, L"", REG_SZ, commandStr, NULL));
|
||||
|
||||
@ -567,187 +185,24 @@ void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName, std::wstring cfgR
|
||||
RegCloseKey(root);
|
||||
}
|
||||
|
||||
void UnregisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||
void UnregisterShellMenu(std::wstring opt)
|
||||
{
|
||||
HKEY root = GetRootKey(opt);
|
||||
HKEY cmderKey;
|
||||
FAIL_ON_ERROR(RegCreateKeyEx(root, keyBaseName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||
FAIL_ON_ERROR(
|
||||
RegCreateKeyEx(root, SHELL_MENU_REGISTRY_PATH, 0, NULL,
|
||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||
#ifdef XP
|
||||
FAIL_ON_ERROR(SHDeleteKey(cmderKey, NULL));
|
||||
FAIL_ON_ERROR(SHDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
|
||||
#else
|
||||
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
|
||||
RegDeleteKeyEx(root, keyBaseName, KEY_ALL_ACCESS, NULL);
|
||||
FAIL_ON_ERROR(RegDeleteKey(root, SHELL_MENU_REGISTRY_PATH));
|
||||
#endif
|
||||
RegCloseKey(cmderKey);
|
||||
RegCloseKey(root);
|
||||
}
|
||||
|
||||
struct cmderOptions
|
||||
{
|
||||
std::wstring cmderCfgRoot = L"";
|
||||
std::wstring cmderStart = L"";
|
||||
std::wstring cmderTask = L"";
|
||||
std::wstring cmderTitle = L"Cmder";
|
||||
std::wstring cmderIcon = L"";
|
||||
std::wstring cmderRegScope = L"USER";
|
||||
std::wstring cmderConEmuArgs = L"";
|
||||
bool cmderSingle = false;
|
||||
bool cmderUserCfg = true;
|
||||
bool registerApp = false;
|
||||
bool unRegisterApp = false;
|
||||
bool error = false;
|
||||
};
|
||||
|
||||
cmderOptions GetOption()
|
||||
{
|
||||
cmderOptions cmderOptions;
|
||||
LPWSTR *szArgList;
|
||||
int argCount;
|
||||
|
||||
szArgList = CommandLineToArgvW(GetCommandLine(), &argCount);
|
||||
|
||||
for (int i = 1; i < argCount; i++)
|
||||
{
|
||||
|
||||
// MessageBox(NULL, szArgList[i], L"Arglist contents", MB_OK);
|
||||
if (cmderOptions.error == false) {
|
||||
if (_wcsicmp(L"/c", szArgList[i]) == 0)
|
||||
{
|
||||
TCHAR userProfile[MAX_PATH];
|
||||
const DWORD ret = GetEnvironmentVariable(L"USERPROFILE", userProfile, MAX_PATH);
|
||||
|
||||
wchar_t cmderCfgRoot[MAX_PATH] = { 0 };
|
||||
PathCombine(cmderCfgRoot, userProfile, L"cmder_cfg");
|
||||
|
||||
cmderOptions.cmderCfgRoot = cmderCfgRoot;
|
||||
|
||||
if (szArgList[i + 1] != NULL && szArgList[i + 1][0] != '/')
|
||||
{
|
||||
cmderOptions.cmderCfgRoot = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(L"/start", szArgList[i]) == 0)
|
||||
{
|
||||
int len = wcslen(szArgList[i + 1]);
|
||||
if (wcscmp(&szArgList[i + 1][len - 1], L"\"") == 0)
|
||||
{
|
||||
szArgList[i + 1][len - 1] = '\0';
|
||||
}
|
||||
|
||||
if (PathFileExists(szArgList[i + 1]))
|
||||
{
|
||||
cmderOptions.cmderStart = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, szArgList[i + 1], L"/START - Folder does not exist!", MB_OK);
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(L"/task", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderTask = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
else if (_wcsicmp(L"/title", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderTitle = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
else if (_wcsicmp(L"/icon", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderIcon = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
else if (_wcsicmp(L"/single", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderSingle = true;
|
||||
}
|
||||
else if (_wcsicmp(L"/m", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderUserCfg = false;
|
||||
}
|
||||
else if (_wcsicmp(L"/register", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.registerApp = true;
|
||||
cmderOptions.unRegisterApp = false;
|
||||
if (szArgList[i + 1] != NULL)
|
||||
{
|
||||
if (_wcsicmp(L"all", szArgList[i + 1]) == 0 || _wcsicmp(L"user", szArgList[i + 1]) == 0)
|
||||
{
|
||||
cmderOptions.cmderRegScope = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_wcsicmp(L"/unregister", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.unRegisterApp = true;
|
||||
cmderOptions.registerApp = false;
|
||||
if (szArgList[i + 1] != NULL)
|
||||
{
|
||||
if (_wcsicmp(L"all", szArgList[i + 1]) == 0 || _wcsicmp(L"user", szArgList[i + 1]) == 0)
|
||||
{
|
||||
cmderOptions.cmderRegScope = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Used for passing arguments to conemu prog */
|
||||
else if (_wcsicmp(L"/x", szArgList[i]) == 0)
|
||||
{
|
||||
cmderOptions.cmderConEmuArgs = szArgList[i + 1];
|
||||
i++;
|
||||
}
|
||||
/* Bare double dash, remaining commandline is for conemu */
|
||||
else if (_wcsicmp(L"--", szArgList[i]) == 0)
|
||||
{
|
||||
std::wstring cmdline = std::wstring(GetCommandLineW());
|
||||
auto doubledash = cmdline.find(L" -- ");
|
||||
if (doubledash != std::string::npos)
|
||||
{
|
||||
cmderOptions.cmderConEmuArgs = cmdline.substr(doubledash + 4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (cmderOptions.cmderStart == L"")
|
||||
{
|
||||
int len = wcslen(szArgList[i]);
|
||||
if (wcscmp(&szArgList[i][len - 1], L"\"") == 0)
|
||||
{
|
||||
szArgList[i][len - 1] = '\0';
|
||||
}
|
||||
|
||||
if (PathFileExists(szArgList[i]))
|
||||
{
|
||||
cmderOptions.cmderStart = szArgList[i];
|
||||
i++;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmderOptions.error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cmderOptions.error = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (cmderOptions.error == true)
|
||||
{
|
||||
wchar_t validOptions[512];
|
||||
HMODULE hMod = GetModuleHandle(NULL);
|
||||
LoadString(hMod, IDS_SWITCHES, validOptions, 512);
|
||||
|
||||
// display list of valid options on unrecognized parameter
|
||||
TaskDialogOpen( L"Unrecognized parameter.", validOptions );
|
||||
}
|
||||
|
||||
LocalFree(szArgList);
|
||||
|
||||
return cmderOptions;
|
||||
}
|
||||
|
||||
int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
_In_opt_ HINSTANCE hPrevInstance,
|
||||
_In_ LPTSTR lpCmdLine,
|
||||
@ -757,30 +212,25 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
UNREFERENCED_PARAMETER(nCmdShow);
|
||||
|
||||
cmderOptions cmderOptions = GetOption();
|
||||
optpair opt = GetOption();
|
||||
|
||||
if (cmderOptions.registerApp == true)
|
||||
if (streqi(opt.first.c_str(), L"/START"))
|
||||
{
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
RegisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM, cmderOptions.cmderCfgRoot, cmderOptions.cmderSingle);
|
||||
StartCmder(opt.second);
|
||||
}
|
||||
else if (cmderOptions.unRegisterApp == true)
|
||||
else if (streqi(opt.first.c_str(), L"/REGISTER"))
|
||||
{
|
||||
UnregisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_BACKGROUND);
|
||||
UnregisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_PATH_LISTITEM);
|
||||
UnregisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_BACKGROUND);
|
||||
UnregisterShellMenu(cmderOptions.cmderRegScope, SHELL_MENU_REGISTRY_DRIVE_PATH_LISTITEM);
|
||||
RegisterShellMenu(opt.second);
|
||||
}
|
||||
else if (cmderOptions.error == true)
|
||||
else if (streqi(opt.first.c_str(), L"/UNREGISTER"))
|
||||
{
|
||||
return 1;
|
||||
UnregisterShellMenu(opt.second);
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderConEmuArgs);
|
||||
MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n /START <path>\n /REGISTER [USER/ALL]\n /UNREGISTER [USER/ALL]", MB_TITLE, MB_OK);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
BIN
launcher/src/Resource.rc
Normal file
@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
|
||||
<!-- Project description definition -->
|
||||
<description>Cmder Console Emulator</description>
|
||||
|
||||
<!-- Project dependency definition -->
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0" processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*" />
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
<!-- Win32 User Account Control definition -->
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="asInvoker"
|
||||
uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<!-- Required for appcompat behaviour -->
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows 10 and Windows 11 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Add DPI awareness -->
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
|
||||
<dpiAware>true/pm</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
|
||||
</assembly>
|
@ -1,109 +0,0 @@
|
||||
/* _
|
||||
___ _ __ ___ __| | ___ _ __
|
||||
/ __| '_ ` _ \ / _` |/ _ \ '__|
|
||||
| (__| | | | | | (_| | __/ |
|
||||
\___|_| |_| |_|\__,_|\___|_|
|
||||
=============================================================================
|
||||
The Cmder Console Emulator Project
|
||||
*/
|
||||
|
||||
#include "resource.h"
|
||||
#include "version.rc2"
|
||||
#include "strings.rc2"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (United States) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_CMDER ICON "..\\..\\icons\\cmder.ico"
|
||||
#endif // English (United States) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION
|
||||
PRODUCTVERSION CMDER_MAJOR_VERSION,CMDER_MINOR_VERSION,CMDER_REVISION_VERSION,CMDER_BUILD_VERSION
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS (CMDER_DEBUGFLAG | CMDER_BUILDFLAGS)
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "100904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", CMDER_COMPANY_NAME_STR "\0"
|
||||
VALUE "FileDescription", CMDER_FILE_DESCRIPTION_STR "\0"
|
||||
VALUE "FileVersion", CMDER_VERSION_STR "\0"
|
||||
VALUE "InternalName", CMDER_INTERNAL_NAME_STR "\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) " CMDER_COPYRIGHT_YEAR_STR " " CMDER_COMPANY_NAME_STR "\0"
|
||||
VALUE "OriginalFilename", CMDER_ORIGINAL_FILENAME_STR "\0"
|
||||
VALUE "ProductName", CMDER_PRODUCT_NAME_STR "\0"
|
||||
VALUE "ProductVersion", CMDER_VERSION_STR "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x1009, 1200
|
||||
END
|
||||
END
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
@ -1,12 +0,0 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Corresponding ids should be defined in `resource.h` file.
|
||||
|
||||
STRINGTABLE
|
||||
{
|
||||
IDS_TITLE "Cmder Launcher"
|
||||
|
||||
IDS_SWITCHES L"Valid options:\n\n /c [CMDER User Root Path]\n /task [ConEmu Task Name]\n /icon [CMDER Icon Path]\n [/start [Start in Path] | [Start in Path]]\n /single\n /m\n /x [ConEmu extra arguments]\n\nor, either:\n /register [USER | ALL]\n /unregister [USER | ALL]"
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
@ -1,27 +0,0 @@
|
||||
|
||||
/**
|
||||
* WARNING: do NOT modify this file! the content of this file should be
|
||||
* automatically genereted before AppVeyor builds using the
|
||||
* respective .ps1 Powershell scripts.
|
||||
*
|
||||
*/
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Define the version numbers and build information manually here:
|
||||
|
||||
#define CMDER_MAJOR_VERSION {Cmder-Major-Version}
|
||||
#define CMDER_MINOR_VERSION {Cmder-Minor-Version}
|
||||
#define CMDER_REVISION_VERSION {Cmder-Revision-Version}
|
||||
#define CMDER_BUILD_VERSION {Cmder-Build-Version}
|
||||
#define CMDER_VERSION_STR {Cmder-Version-Str}
|
||||
|
||||
#define CMDER_PRODUCT_NAME_STR "Cmder"
|
||||
#define CMDER_FILE_DESCRIPTION_STR "Cmder: Lovely Console Emulator."
|
||||
#define CMDER_INTERNAL_NAME_STR "Cmder"
|
||||
#define CMDER_ORIGINAL_FILENAME_STR "Cmder.exe"
|
||||
#define CMDER_COMPANY_NAME_STR "Samuel Vasko"
|
||||
#define CMDER_COPYRIGHT_YEAR_STR "2016"
|
||||
|
||||
#define CMDER_DEBUGFLAG 0x0L // set to 0x1L to enable debug mode
|
||||
#define CMDER_BUILDFLAGS 0x0L
|
||||
/////////////////////////////////////////////////////////////////////////////
|
BIN
msvcp120.dll
Normal file
BIN
msvcr120.dll
Normal file
@ -1,5 +0,0 @@
|
||||
## Bin
|
||||
|
||||
This folder is for optional user packages and will not be automatically injected into the PATH.
|
||||
|
||||
Use `%lib_path% enhance_path "%cmder_root%\[path to folder]"` in `%cmder_root%\config\user_profile.cmd` or `%cmder_root%\config\profile.d\*.cmd` to add to the path.
|
40
pack.rb
Normal file
@ -0,0 +1,40 @@
|
||||
# Samuel Vasko 2013
|
||||
# Cmder packing script -- Creates zip files for relase
|
||||
|
||||
require "fileutils"
|
||||
|
||||
def create_archive name, exclude
|
||||
if exclude
|
||||
exclude = " -x!cmder\\" + exclude
|
||||
else
|
||||
exclude = ""
|
||||
end
|
||||
system('ls')
|
||||
puts "Running 7z a -x@cmder\\packignore" + exclude + " " + name + " cmder"
|
||||
system("7z a -x@cmder\\packignore" + exclude + " " + name + " cmder")
|
||||
end
|
||||
|
||||
targets = [
|
||||
["cmder.zip"],
|
||||
["cmder.7z"],
|
||||
["cmder_mini.zip", "vendor\\msysgit"]
|
||||
]
|
||||
|
||||
unless system("git describe --abbrev=0 --tags")
|
||||
puts "Failied to get the last tag from git, looks like something is missing"
|
||||
end
|
||||
|
||||
version = `git describe --abbrev=0 --tags`
|
||||
|
||||
FileUtils.touch('Version ' + version.chomp)
|
||||
FileUtils.rm('config/.history') if File.exists?('config/.history')
|
||||
|
||||
Dir.chdir('..')
|
||||
|
||||
targets.each do |ar|
|
||||
create_archive ar[0], ar[1]
|
||||
end
|
||||
|
||||
Dir.chdir('cmder')
|
||||
|
||||
FileUtils.rm('Version ' + version.chomp)
|
37
packignore
@ -1,29 +1,8 @@
|
||||
launcher
|
||||
.gitignore
|
||||
.gitattributes
|
||||
.git
|
||||
.github
|
||||
.vs
|
||||
.vscode
|
||||
.idea
|
||||
*.md
|
||||
build
|
||||
scripts
|
||||
config\.history
|
||||
packignore
|
||||
Thumbs.db
|
||||
icons\cmder_icon.psd
|
||||
icons\icon_16*.png
|
||||
icons\icon_32*.png
|
||||
icons\icon_48*.png
|
||||
icons\icon_256*.png
|
||||
Cmder.bat
|
||||
vendor\tmp
|
||||
appveyor.yml
|
||||
vendor\cmder.sh
|
||||
vendor\git-prompt.sh
|
||||
config\user-*
|
||||
clink_history*
|
||||
*.log
|
||||
Vagrantfile
|
||||
*.box
|
||||
cmder\launcher
|
||||
cmder\icons
|
||||
cmder\.gitignore
|
||||
cmder\.gitattributes
|
||||
cmder\.git
|
||||
cmder\*.rb
|
||||
cmder\packignore
|
||||
cmder\Cmder.bat
|
@ -1,181 +0,0 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Build Cmder
|
||||
.DESCRIPTION
|
||||
Use this script to build your own edition of Cmder
|
||||
|
||||
This script builds dependencies from current vendor/sources.json file and unpacks them.
|
||||
|
||||
You will need to make this script executable by setting your Powershell Execution Policy to Remote signed
|
||||
Then unblock the script for execution with UnblockFile .\build.ps1
|
||||
.EXAMPLE
|
||||
.\build.ps1
|
||||
|
||||
Executes the default build for Cmder; ConEmu, clink. This is equivalent to the "minimum" style package in the releases
|
||||
.EXAMPLE
|
||||
.\build.ps1 -Compile
|
||||
|
||||
Recompile the launcher executable if you have the requisite build tools for C++ installed.
|
||||
.EXAMPLE
|
||||
.\build.ps1 -Compile -NoVendor
|
||||
|
||||
Skip all downloads and only build launcher.
|
||||
.EXAMPLE
|
||||
.\build -verbose
|
||||
|
||||
Execute the build and see what's going on.
|
||||
.EXAMPLE
|
||||
.\build.ps1 -SourcesPath '~/custom/vendors.json'
|
||||
|
||||
Build cmder with your own packages. See vendor/sources.json for the syntax you need to copy.
|
||||
.NOTES
|
||||
AUTHORS
|
||||
Samuel Vasko, Jack Bennett
|
||||
Part of the Cmder project.
|
||||
.LINK
|
||||
http://cmder.app/ - Project Home
|
||||
#>
|
||||
[CmdletBinding(SupportsShouldProcess = $true)]
|
||||
Param(
|
||||
# CmdletBinding will give us;
|
||||
# -verbose switch to turn on logging and
|
||||
# -whatif switch to not actually make changes
|
||||
|
||||
# Path to the vendor configuration source file
|
||||
[string]$sourcesPath = "$PSScriptRoot\..\vendor\sources.json",
|
||||
|
||||
# Vendor folder location
|
||||
[string]$saveTo = "$PSScriptRoot\..\vendor\",
|
||||
|
||||
# Launcher folder location
|
||||
[string]$launcher = "$PSScriptRoot\..\launcher",
|
||||
|
||||
# Config folder location
|
||||
[string]$config = "$PSScriptRoot\..\config",
|
||||
|
||||
# Using this option will skip all downloads, if you only need to build launcher
|
||||
[switch]$noVendor,
|
||||
|
||||
# Build launcher if you have MSBuild tools installed
|
||||
[switch]$Compile
|
||||
)
|
||||
|
||||
# Get the scripts and cmder root dirs we are building in.
|
||||
$cmder_root = Resolve-Path "$PSScriptRoot\.."
|
||||
|
||||
# Dot source util functions into this scope
|
||||
. "$PSScriptRoot\utils.ps1"
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if ($Compile) {
|
||||
# Check for requirements
|
||||
Ensure-Executable "msbuild"
|
||||
|
||||
# Get the version string
|
||||
$version = Get-VersionStr
|
||||
|
||||
Push-Location -Path $launcher
|
||||
Create-RC $version ($launcher + '\src\version.rc2')
|
||||
|
||||
Write-Verbose "Building the launcher..."
|
||||
|
||||
# Referene: https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
|
||||
msbuild CmderLauncher.vcxproj /t:Clean,Build /p:configuration=Release /m
|
||||
|
||||
if ($LastExitCode -ne 0) {
|
||||
throw "MSBuild failed to build the launcher executable."
|
||||
}
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
if (-not $noVendor) {
|
||||
# Check for requirements
|
||||
Ensure-Exists $sourcesPath
|
||||
Ensure-Executable "7z"
|
||||
|
||||
# Get the vendor sources
|
||||
$sources = Get-Content $sourcesPath | Out-String | ConvertFrom-Json
|
||||
|
||||
Push-Location -Path $saveTo
|
||||
New-Item -Type Directory -Path (Join-Path $saveTo "/tmp/") -ErrorAction SilentlyContinue >$null
|
||||
|
||||
$vend = $pwd
|
||||
|
||||
# Preserve modified (by user) ConEmu setting file
|
||||
if ($config -ne "") {
|
||||
$ConEmuXml = Join-Path $saveTo "conemu-maximus5\ConEmu.xml"
|
||||
if (Test-Path $ConEmuXml -pathType leaf) {
|
||||
$ConEmuXmlSave = Join-Path $config "ConEmu.xml"
|
||||
Write-Verbose "Backup '$ConEmuXml' to '$ConEmuXmlSave'"
|
||||
Copy-Item $ConEmuXml $ConEmuXmlSave
|
||||
}
|
||||
else { $ConEmuXml = "" }
|
||||
}
|
||||
else { $ConEmuXml = "" }
|
||||
|
||||
# Kill ssh-agent.exe if it is running from the $env:cmder_root we are building
|
||||
foreach ($ssh_agent in $(Get-Process ssh-agent -ErrorAction SilentlyContinue)) {
|
||||
if ([string]$($ssh_agent.path) -Match [string]$cmder_root.replace('\', '\\')) {
|
||||
Write-Verbose $("Stopping " + $ssh_agent.path + "!")
|
||||
Stop-Process $ssh_agent.id
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($s in $sources) {
|
||||
Write-Verbose "Getting vendored $($s.name) $($s.version)..."
|
||||
|
||||
# We do not care about the extensions/type of archive
|
||||
$tempArchive = "tmp/$($s.name).tmp"
|
||||
Delete-Existing $tempArchive
|
||||
Delete-Existing $s.name
|
||||
|
||||
Download-File -Url $s.url -File $vend\$tempArchive -ErrorAction Stop
|
||||
Extract-Archive $tempArchive $s.name
|
||||
|
||||
if ((Get-ChildItem $s.name).Count -eq 1) {
|
||||
Flatten-Directory($s.name)
|
||||
}
|
||||
|
||||
# Write current version to .cmderver file, for later.
|
||||
"$($s.version)" | Out-File "$($s.name)/.cmderver"
|
||||
}
|
||||
|
||||
# Restore ConEmu user configuration
|
||||
if ($ConEmuXml -ne "") {
|
||||
Write-Verbose "Restore '$ConEmuXmlSave' to '$ConEmuXml'"
|
||||
Copy-Item $ConEmuXmlSave $ConEmuXml
|
||||
}
|
||||
|
||||
# Put vendor\cmder.sh in /etc/profile.d so it runs when we start bash or mintty
|
||||
if ( (Test-Path $($saveTo + "git-for-windows/etc/profile.d") ) ) {
|
||||
Write-Verbose "Adding cmder.sh /etc/profile.d"
|
||||
Copy-Item $($saveTo + "cmder.sh") $($saveTo + "git-for-windows/etc/profile.d/cmder.sh")
|
||||
}
|
||||
|
||||
# Replace /etc/profile.d/git-prompt.sh with cmder lambda prompt so it runs when we start bash or mintty
|
||||
if ( !(Test-Path $($saveTo + "git-for-windows/etc/profile.d/git-prompt.sh.bak") ) ) {
|
||||
Write-Verbose "Replacing /etc/profile.d/git-prompt.sh with our git-prompt.sh"
|
||||
Move-Item $($saveTo + "git-for-windows/etc/profile.d/git-prompt.sh") $($saveTo + "git-for-windows/etc/profile.d/git-prompt.sh.bak")
|
||||
Copy-Item $($saveTo + "git-prompt.sh") $($saveTo + "git-for-windows/etc/profile.d/git-prompt.sh")
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
if (-not $Compile -or $noVendor) {
|
||||
Write-Warning "You are not building the full project, Use -Compile without -noVendor"
|
||||
Write-Warning "This cannot be a release. Test build only!"
|
||||
return
|
||||
}
|
||||
|
||||
Write-Verbose "Successfully built Cmder v$version!"
|
||||
|
||||
if ( $Env:APPVEYOR -eq 'True' ) {
|
||||
Add-AppveyorMessage -Message "Building Cmder v$version was successful." -Category Information
|
||||
}
|
||||
|
||||
if ( $Env:GITHUB_ACTIONS -eq 'true' ) {
|
||||
Write-Output "::notice title=Build Complete::Building Cmder v$version was successful."
|
||||
}
|
||||
|
||||
Write-Host -ForegroundColor green "All good and done!"
|
@ -1,76 +0,0 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Pack Cmder
|
||||
.DESCRIPTION
|
||||
Use this script to pack cmder into release archives
|
||||
|
||||
You will need to make this script executable by setting your Powershell Execution Policy to Remote signed
|
||||
Then unblock the script for execution with UnblockFile .\pack.ps1
|
||||
.EXAMPLE
|
||||
.\pack.ps1
|
||||
|
||||
Creates default archives for cmder
|
||||
.EXAMPLE
|
||||
.\pack.ps1 -verbose
|
||||
|
||||
Creates default archives for cmder with plenty of information
|
||||
.NOTES
|
||||
AUTHORS
|
||||
Samuel Vasko, Jack Bennett, Martin Kemp
|
||||
Part of the Cmder project.
|
||||
.LINK
|
||||
https://github.com/cmderdev/cmder - Project Home
|
||||
#>
|
||||
|
||||
[CmdletBinding(SupportsShouldProcess = $true)]
|
||||
Param(
|
||||
# CmdletBinding will give us;
|
||||
# -verbose switch to turn on logging and
|
||||
# -whatif switch to not actually make changes
|
||||
|
||||
# Path to the vendor configuration source file
|
||||
[string]$cmderRoot = "$PSScriptRoot\..",
|
||||
|
||||
# Vendor folder locaton
|
||||
[string]$saveTo = "$PSScriptRoot\..\build"
|
||||
)
|
||||
|
||||
$cmderRoot = Resolve-Path $cmderRoot
|
||||
|
||||
. "$PSScriptRoot\utils.ps1"
|
||||
$ErrorActionPreference = "Stop"
|
||||
Ensure-Executable "7z"
|
||||
|
||||
$targets = @{
|
||||
"cmder.7z" = "-t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on -myx=7 -mqs=on";
|
||||
"cmder.zip" = "-mm=Deflate -mfb=128 -mpass=3";
|
||||
"cmder_mini.zip" = "-xr!`"vendor\git-for-windows`"";
|
||||
}
|
||||
|
||||
Push-Location -Path $cmderRoot
|
||||
|
||||
Delete-Existing "$cmderRoot\Version*"
|
||||
Delete-Existing "$cmderRoot\build\*"
|
||||
|
||||
if (-not (Test-Path -PathType container $saveTo)) {
|
||||
(New-Item -ItemType Directory -Path $saveTo) | Out-Null
|
||||
}
|
||||
|
||||
$saveTo = Resolve-Path $saveTo
|
||||
|
||||
$version = Get-VersionStr
|
||||
(New-Item -ItemType file "$cmderRoot\Version $version") | Out-Null
|
||||
|
||||
if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
|
||||
Write-Verbose "Packing Cmder $version in $saveTo..."
|
||||
$excluded = (Get-Content -Path "$cmderRoot\packignore") -Split [System.Environment]::NewLine | Where-Object { $_ }
|
||||
Get-ChildItem $cmderRoot -Force -Exclude $excluded
|
||||
}
|
||||
|
||||
foreach ($t in $targets.GetEnumerator()) {
|
||||
Create-Archive "$cmderRoot" "$saveTo\$($t.Name)" $t.Value
|
||||
$hash = (Digest-Hash "$saveTo\$($t.Name)")
|
||||
Add-Content -path "$saveTo\hashes.txt" -value ($t.Name + ' ' + $hash)
|
||||
}
|
||||
|
||||
Pop-Location
|
@ -1,8 +0,0 @@
|
||||
# Packer Support - Release Notes
|
||||
|
||||
Most of the Packer support for Cmder is shamelessly being borrowed from the following repositories.
|
||||
|
||||
- [StefanScherer/packer-windows](https://github.com/StefanScherer/packer-windows)
|
||||
- [Baune8D/packer-windows-desktop](https://github.com/Baune8D/packer-windows-desktop)
|
||||
|
||||
Thank you both for the good work!
|
@ -1,228 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<servicing/>
|
||||
<settings pass="windowsPE">
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Size>500</Size>
|
||||
<Type>EFI</Type>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Size>128</Size>
|
||||
<Type>MSR</Type>
|
||||
</CreatePartition>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>3</Order>
|
||||
<Extend>true</Extend>
|
||||
<Type>Primary</Type>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
</DiskConfiguration>
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<FullName>Vagrant</FullName>
|
||||
<Organization>Vagrant</Organization>
|
||||
<ProductKey>
|
||||
<Key>W269N-WFGWX-YVC9B-4J6C9-T83GX</Key>
|
||||
<WillShowUI>Never</WillShowUI>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>3</PartitionID>
|
||||
</InstallTo>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
</component>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<SetupUILanguage>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
</SetupUILanguage>
|
||||
<InputLocale>en-US</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="offlineServicing">
|
||||
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<EnableLUA>false</EnableLUA>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="oobeSystem">
|
||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<InputLocale>en-US</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>vagrant</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Password>
|
||||
<Value>vagrant</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Description>Vagrant User</Description>
|
||||
<DisplayName>vagrant</DisplayName>
|
||||
<Group>administrators</Group>
|
||||
<Name>vagrant</Name>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
<OOBE>
|
||||
<HideEULAPage>true</HideEULAPage>
|
||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||
<NetworkLocation>Home</NetworkLocation>
|
||||
<ProtectYourPC>1</ProtectYourPC>
|
||||
</OOBE>
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>vagrant</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Username>vagrant</Username>
|
||||
<Enabled>true</Enabled>
|
||||
</AutoLogon>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<Description>Set Execution Policy 64 Bit</Description>
|
||||
<Order>1</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<Description>Set Execution Policy 32 Bit</Description>
|
||||
<Order>2</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c reg add "HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff"</CommandLine>
|
||||
<Description>Network prompt</Description>
|
||||
<Order>3</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File e:\fixnetwork.ps1</CommandLine>
|
||||
<Description>Fix public network</Description>
|
||||
<Order>4</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File e:\disable-winrm.ps1</CommandLine>
|
||||
<Description>Disable WinRM</Description>
|
||||
<Order>5</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>6</Order>
|
||||
<Description>Show file extensions in Explorer</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>7</Order>
|
||||
<Description>Enable QuickEdit mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>8</Order>
|
||||
<Description>Show Run command in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>9</Order>
|
||||
<Description>Show Administrative Tools in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>10</Order>
|
||||
<Description>Zero Hibernation File</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>11</Order>
|
||||
<Description>Disable Hibernation Mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE</CommandLine>
|
||||
<Order>12</Order>
|
||||
<Description>Disable password expiration for vagrant user</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "vagrant" /f</CommandLine>
|
||||
<Order>13</Order>
|
||||
<Description>Enable AutoLogon</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f</CommandLine>
|
||||
<Order>14</Order>
|
||||
<Description>Enable AutoLogon</Description>
|
||||
</SynchronousCommand>
|
||||
<!-- WITHOUT WINDOWS UPDATES -->
|
||||
<!--
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File e:\enable-winrm.ps1</CommandLine>
|
||||
<Description>Enable WinRM</Description>
|
||||
<Order>99</Order>
|
||||
</SynchronousCommand>
|
||||
-->
|
||||
<!-- END WITHOUT WINDOWS UPDATES -->
|
||||
<!-- WITH WINDOWS UPDATES -->
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c e:\microsoft-updates.bat</CommandLine>
|
||||
<Order>98</Order>
|
||||
<Description>Enable Microsoft Updates</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File e:\disable-screensaver.ps1</CommandLine>
|
||||
<Description>Disable Screensaver</Description>
|
||||
<Order>99</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File e:\win-updates.ps1</CommandLine>
|
||||
<Description>Install Windows Updates</Description>
|
||||
<Order>100</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<!-- END WITH WINDOWS UPDATES -->
|
||||
</FirstLogonCommands>
|
||||
<ShowWindowsLive>false</ShowWindowsLive>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<OEMInformation>
|
||||
<HelpCustomized>false</HelpCustomized>
|
||||
</OEMInformation>
|
||||
<!-- Rename computer here. -->
|
||||
<ComputerName>vagrant-win10</ComputerName>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
<RegisteredOwner/>
|
||||
</component>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
</settings>
|
||||
<cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="catalog:d:/sources/install_windows 7 ENTERPRISE.clg"/>
|
||||
</unattend>
|
@ -1,298 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<servicing/>
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-PnpCustomizationsWinPE"
|
||||
publicKeyToken="31bf3856ad364e35" language="neutral"
|
||||
versionScope="nonSxS" processorArchitecture="amd64"
|
||||
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||
|
||||
<!--
|
||||
This makes the VirtIO drivers available to Windows, assuming that
|
||||
the VirtIO driver disk at https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
|
||||
(see https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html#virtio-win-direct-downloads)
|
||||
is available as drive E:
|
||||
-->
|
||||
<DriverPaths>
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="2">
|
||||
<Path>E:\viostor\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="3">
|
||||
<Path>E:\NetKVM\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="4">
|
||||
<Path>E:\Balloon\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="5">
|
||||
<Path>E:\pvpanic\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="6">
|
||||
<Path>E:\qemupciserial\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="7">
|
||||
<Path>E:\qxldod\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="8">
|
||||
<Path>E:\vioinput\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="9">
|
||||
<Path>E:\viorng\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="10">
|
||||
<Path>E:\vioscsi\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
|
||||
<PathAndCredentials wcm:action="add" wcm:keyValue="11">
|
||||
<Path>E:\vioserial\w10\amd64</Path>
|
||||
</PathAndCredentials>
|
||||
</DriverPaths>
|
||||
</component>
|
||||
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<DiskConfiguration>
|
||||
<Disk wcm:action="add">
|
||||
<CreatePartitions>
|
||||
<CreatePartition wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Type>Primary</Type>
|
||||
<Extend>true</Extend>
|
||||
</CreatePartition>
|
||||
</CreatePartitions>
|
||||
<ModifyPartitions>
|
||||
<ModifyPartition wcm:action="add">
|
||||
<Extend>false</Extend>
|
||||
<Format>NTFS</Format>
|
||||
<Letter>C</Letter>
|
||||
<Order>1</Order>
|
||||
<PartitionID>1</PartitionID>
|
||||
<Label>Windows 11</Label>
|
||||
</ModifyPartition>
|
||||
</ModifyPartitions>
|
||||
<DiskID>0</DiskID>
|
||||
<WillWipeDisk>true</WillWipeDisk>
|
||||
</Disk>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</DiskConfiguration>
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<FullName>Vagrant</FullName>
|
||||
<Organization>Vagrant</Organization>
|
||||
|
||||
<!--
|
||||
NOTE: If you are re-configuring this for use of a retail key
|
||||
and using a retail ISO, you need to adjust the <ProductKey> block
|
||||
below to look like this:
|
||||
|
||||
<ProductKey>
|
||||
<Key>W269N-WFGWX-YVC9B-4J6C9-T83GX</Key>
|
||||
<WillShowUI>Never</WillShowUI>
|
||||
</ProductKey>
|
||||
|
||||
Notice the addition of the `<Key>` element.
|
||||
-->
|
||||
</UserData>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>1</PartitionID>
|
||||
</InstallTo>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/NAME</Key>
|
||||
<Value>Windows 11 Enterprise Evaluation</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
</component>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<SetupUILanguage>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
</SetupUILanguage>
|
||||
<InputLocale>en-US</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UILanguageFallback>en-US</UILanguageFallback>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="offlineServicing">
|
||||
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<EnableLUA>false</EnableLUA>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="oobeSystem">
|
||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<InputLocale>en-US</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value>vagrant</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
<LocalAccounts>
|
||||
<LocalAccount wcm:action="add">
|
||||
<Password>
|
||||
<Value>vagrant</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Description>Vagrant User</Description>
|
||||
<DisplayName>vagrant</DisplayName>
|
||||
<Group>administrators</Group>
|
||||
<Name>vagrant</Name>
|
||||
</LocalAccount>
|
||||
</LocalAccounts>
|
||||
</UserAccounts>
|
||||
<OOBE>
|
||||
<HideEULAPage>true</HideEULAPage>
|
||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||
<NetworkLocation>Home</NetworkLocation>
|
||||
<ProtectYourPC>1</ProtectYourPC>
|
||||
</OOBE>
|
||||
<AutoLogon>
|
||||
<Password>
|
||||
<Value>vagrant</Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<Username>vagrant</Username>
|
||||
<Enabled>true</Enabled>
|
||||
</AutoLogon>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<Description>Set Execution Policy 64 Bit</Description>
|
||||
<Order>1</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>C:\Windows\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force"</CommandLine>
|
||||
<Description>Set Execution Policy 32 Bit</Description>
|
||||
<Order>2</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c reg add "HKLM\System\CurrentControlSet\Control\Network\NewNetworkWindowOff"</CommandLine>
|
||||
<Description>Network prompt</Description>
|
||||
<Order>3</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\fixnetwork.ps1</CommandLine>
|
||||
<Description>Fix public network</Description>
|
||||
<Order>4</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\disable-winrm.ps1</CommandLine>
|
||||
<Description>Disable WinRM</Description>
|
||||
<Order>5</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>6</Order>
|
||||
<Description>Show file extensions in Explorer</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\Console /v QuickEdit /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>7</Order>
|
||||
<Description>Enable QuickEdit mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Start_ShowRun /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>8</Order>
|
||||
<Description>Show Run command in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v StartMenuAdminTools /t REG_DWORD /d 1 /f</CommandLine>
|
||||
<Order>9</Order>
|
||||
<Description>Show Administrative Tools in Start Menu</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>10</Order>
|
||||
<Description>Zero Hibernation File</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f</CommandLine>
|
||||
<Order>11</Order>
|
||||
<Description>Disable Hibernation Mode</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c wmic useraccount where "name='vagrant'" set PasswordExpires=FALSE</CommandLine>
|
||||
<Order>12</Order>
|
||||
<Description>Disable password expiration for vagrant user</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "vagrant" /f</CommandLine>
|
||||
<Order>13</Order>
|
||||
<Description>Enable AutoLogon</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>%SystemRoot%\System32\reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f</CommandLine>
|
||||
<Order>14</Order>
|
||||
<Description>Enable AutoLogon</Description>
|
||||
</SynchronousCommand>
|
||||
<!-- WITHOUT WINDOWS UPDATES -->
|
||||
<!--
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\enable-winrm.ps1</CommandLine>
|
||||
<Description>Enable WinRM</Description>
|
||||
<Order>99</Order>
|
||||
</SynchronousCommand>
|
||||
-->
|
||||
<!-- END WITHOUT WINDOWS UPDATES -->
|
||||
<!-- WITH WINDOWS UPDATES -->
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c a:\microsoft-updates.bat</CommandLine>
|
||||
<Order>98</Order>
|
||||
<Description>Enable Microsoft Updates</Description>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\disable-screensaver.ps1</CommandLine>
|
||||
<Description>Disable Screensaver</Description>
|
||||
<Order>99</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\win-updates.ps1</CommandLine>
|
||||
<Description>Install Windows Updates</Description>
|
||||
<Order>100</Order>
|
||||
<RequiresUserInput>true</RequiresUserInput>
|
||||
</SynchronousCommand>
|
||||
<!-- END WITH WINDOWS UPDATES -->
|
||||
</FirstLogonCommands>
|
||||
<ShowWindowsLive>false</ShowWindowsLive>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<OEMInformation>
|
||||
<HelpCustomized>false</HelpCustomized>
|
||||
</OEMInformation>
|
||||
<!-- Rename computer here. -->
|
||||
<ComputerName>vagrant-11</ComputerName>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
<RegisteredOwner/>
|
||||
</component>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<SkipAutoActivation>true</SkipAutoActivation>
|
||||
</component>
|
||||
</settings>
|
||||
<cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="catalog:d:/sources/install_windows 7 ENTERPRISE.clg"/>
|
||||
</unattend>
|
@ -1,3 +0,0 @@
|
||||
@echo off
|
||||
|
||||
packer build --force --only=%~1-iso windows_10.json
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
packer build --force --only=$1-iso windows_10.json
|
@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
|
||||
packer build --only=%1-iso windows_11.json
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
packer build --only=$1-iso windows_11.json
|
||||
|
@ -1,38 +0,0 @@
|
||||
: Release v1.2 - Stuart Pearson 16th Nov 2015
|
||||
:
|
||||
: Command line tool to pin and unpin exe / lnk files to the Windows 10 taskbar and start menu.
|
||||
:
|
||||
: PinTo10 is a command line tool to pin and unpin .exe or .lnk files to or from the Windows 10 taskbar and start menu.
|
||||
: With it you can pin or unpin up to 10 different shortcuts to either the taskbar or start menu in one run of the command.
|
||||
: It replaces functionality that Microsoft have removed from their Windows 10 scripting interface.
|
||||
:
|
||||
: The exe needs to be run with at least one pair of switches specified for each function to Pin / Unpin to Taskbar / Start Menu...
|
||||
:
|
||||
: To pin an application or shortcut to the taskbar (replace XX with 01-10)...
|
||||
: /PTFOLXX: Followed by the folder containing the file you want to pin.
|
||||
: /PTFILEXX: Followed by the name of the file you want to pin.
|
||||
:
|
||||
: To unpin an application or shortcut to the taskbar (replace XX with 01-10)...
|
||||
: /UTFOLXX: Followed by the folder containing the file you want to unpin.
|
||||
: /UTFILEXX: Followed by the name of the file you want to unpin.
|
||||
|
||||
: To pin an application or shortcut to the start menu (replace XX with 01-10)...
|
||||
: /PSFOLXX: Followed by the folder containing the file you want to pin.
|
||||
: /PSFILEXX: Followed by the name of the file you want to pin.
|
||||
|
||||
: To unpin an application or shortcut to the start menu (replace XX with 01-10)...
|
||||
: /USFOLXX: Followed by the folder containing the file you want to unpin.
|
||||
: /USFILEXX: Followed by the name of the file you want to unpin.
|
||||
|
||||
|
||||
: Example for pinning two shortcuts to the taskbar...
|
||||
PinTo10.exe /PTFOL01:'%USERPROFILE:%\Desktop' /PTFILE01:'Word 2016.lnk' /PTFOL02:'%USERPROFILE:%\Desktop' /PTFILE02:'Excel 2016.lnk'
|
||||
|
||||
: Example for unpinning a file to the taskbar...
|
||||
PinTo10.exe /UTFOL01:'C\Windows' /UTFILE01:'notepad.exe'
|
||||
|
||||
: Example for pinning a file to the start menu...
|
||||
PinTo10.exe /PSFOL01:'C\Windows' /PSFILE01:'notepad.exe'
|
||||
|
||||
: Example for unpinning a file from the start menu...
|
||||
PinTo10.exe /USFOL01:'%USERPROFILE:%\Desktop' /USFILE01:'Word 2016.lnk'
|
@ -1,26 +0,0 @@
|
||||
### What Is This Directory For?
|
||||
|
||||
You should download your Windows Server ISO images from TechNet/MSDN and place them in this folder. We need to do this because MSDN / TechNet are protected by Microsoft (Live) ID, which does not support HTTP basic authentication or the OAuth2 username / password flow.
|
||||
|
||||
For example, you might want to start with one of the following:
|
||||
|
||||
* Windows Server 2008 R2 + SP1:
|
||||
* File Name: en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso
|
||||
* SHA1 Hash: D3FD7BF85EE1D5BDD72DE5B2C69A7B470733CD0A
|
||||
* Direct Download: http://msdn.microsoft.com/subscriptions/json/GetDownloadRequest?brand=MSDN&locale=en-us&fileId=44782&activexDisabled=true&akamaiDL=false
|
||||
* Windows Server 2008 R2 + SP1 (Volume License):
|
||||
* File Name: en_windows_server_2008_r2_with_sp1_vl_build_x64_dvd_617403.iso
|
||||
* SHA1 Hash: 7E7E9425041B3328CCF723A0855C2BC4F462EC57
|
||||
* Direct Download: http://msdn.microsoft.com/subscriptions/json/GetDownloadRequest?brand=MSDN&locale=en-us&fileId=44783&activexDisabled=true&akamaiDL=false
|
||||
* Windows Server 2012:
|
||||
* File Name: en_windows_server_2012_x64_dvd_915478.iso
|
||||
* SHA1 Hash: D09E752B1EE480BC7E93DFA7D5C3A9B8AAC477BA
|
||||
* Direct Download: http://msdn.microsoft.com/subscriptions/json/GetDownloadRequest?brand=MSDN&locale=en-us&fileId=50539&activexDisabled=true&akamaiDL=false
|
||||
* Windows Server 2012 (Volume License):
|
||||
* File Name: en_windows_server_2012_vl_x64_dvd_917758.iso
|
||||
* SHA1 Hash: 063BC26ED45C50D3745CCAD52DD7B3F3CE13F36D
|
||||
* Direct Download: http://msdn.microsoft.com/subscriptions/json/GetDownloadRequest?brand=MSDN&locale=en-us&fileId=50573&activexDisabled=true&akamaiDL=false
|
||||
|
||||
Or Build one using the Windows Installation Media Creation Tools:
|
||||
|
||||
https://support.microsoft.com/en-us/windows/create-installation-media-for-windows-99a58364-8c02-206f-aa6f-40c3b507420d
|
@ -1 +0,0 @@
|
||||
powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
|
@ -1,26 +0,0 @@
|
||||
choco install -y boxstarter.winconfig
|
||||
|
||||
# Editors
|
||||
choco install -y notepadplusplus
|
||||
|
||||
# Terminals
|
||||
choco install -y microsoft-windows-terminal
|
||||
choco install -y fluent-terminal
|
||||
choco install -y hyper
|
||||
choco install -y tabby
|
||||
choco install -y conemu
|
||||
|
||||
# other
|
||||
choco install -y poshgit
|
||||
|
||||
# IDE/Software development
|
||||
choco install -y vscode
|
||||
choco install -y visualstudio2022community --execution-timeout 9000 --package-parameters "--add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended"
|
||||
|
||||
md C:\users\vagrant\bin
|
||||
if (test-path "a:/set-shortcut.ps1") {
|
||||
copy "a:/set-shortcut.ps1" C:\users\vagrant\bin
|
||||
} elseif (test-path "e:/set-shortcut.ps1") {
|
||||
copy "e:/set-shortcut.ps1" C:\users\vagrant\bin
|
||||
}
|
||||
|
@ -1,39 +0,0 @@
|
||||
if "%PACKER_BUILDER_TYPE:~0,6%"=="hyperv" (
|
||||
echo "Skip compact steps in Hyper-V build."
|
||||
goto :eof
|
||||
)
|
||||
if not exist "C:\Windows\Temp\7z1900-x64.msi" (
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')" <NUL
|
||||
)
|
||||
msiexec /qb /i C:\Windows\Temp\7z1900-x64.msi
|
||||
|
||||
if not exist "C:\Windows\Temp\ultradefrag.zip" (
|
||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://downloads.sourceforge.net/project/ultradefrag/stable-release/6.1.0/ultradefrag-portable-6.1.0.bin.amd64.zip', 'C:\Windows\Temp\ultradefrag.zip')" <NUL
|
||||
)
|
||||
|
||||
if not exist "C:\Windows\Temp\ultradefrag-portable-6.1.0.amd64\udefrag.exe" (
|
||||
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\ultradefrag.zip -oC:\Windows\Temp"
|
||||
)
|
||||
|
||||
if not exist "C:\Windows\Temp\SDelete.zip" (
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://download.sysinternals.com/files/SDelete.zip', 'C:\Windows\Temp\SDelete.zip')" <NUL
|
||||
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://vagrantboxes.blob.core.windows.net/box/sdelete/v1.6.1/sdelete.exe', 'C:\Windows\Temp\sdelete.exe')" <NUL
|
||||
)
|
||||
|
||||
if not exist "C:\Windows\Temp\sdelete.exe" (
|
||||
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\SDelete.zip -oC:\Windows\Temp"
|
||||
)
|
||||
|
||||
msiexec /qb /x C:\Windows\Temp\7z1900-x64.msi
|
||||
|
||||
net stop wuauserv
|
||||
rmdir /S /Q C:\Windows\SoftwareDistribution\Download
|
||||
mkdir C:\Windows\SoftwareDistribution\Download
|
||||
net start wuauserv
|
||||
|
||||
if "%PACKER_BUILDER_TYPE%" neq "hyperv-iso" (
|
||||
cmd /c C:\Windows\Temp\ultradefrag-portable-6.1.0.amd64\udefrag.exe --optimize --repeat C:
|
||||
|
||||
cmd /c %SystemRoot%\System32\reg.exe ADD HKCU\Software\Sysinternals\SDelete /v EulaAccepted /t REG_DWORD /d 1 /f
|
||||
cmd /c C:\Windows\Temp\sdelete.exe -q -z C:
|
||||
)
|
@ -1,17 +0,0 @@
|
||||
::http://support.microsoft.com/kb/2570538
|
||||
::http://robrelyea.wordpress.com/2007/07/13/may-be-helpful-ngen-exe-executequeueditems/
|
||||
|
||||
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto 64BIT
|
||||
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue > NUL
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems > NUL
|
||||
|
||||
exit 0
|
||||
|
||||
:64BIT
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue > NUL
|
||||
%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue > NUL
|
||||
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe executequeueditems > NUL
|
||||
%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe executequeueditems > NUL
|
||||
|
||||
exit 0
|
@ -1,33 +0,0 @@
|
||||
if ($env:PACKER_BUILDER_TYPE -And $($env:PACKER_BUILDER_TYPE).startsWith("hyperv")) {
|
||||
Write-Output Skip debloat steps in Hyper-V build.
|
||||
}
|
||||
else {
|
||||
Write-Output Downloading debloat zip
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$url = "https://github.com/StefanScherer/Debloat-Windows-10/archive/master.zip"
|
||||
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\debloat.zip")
|
||||
Expand-Archive -Path $env:TEMP\debloat.zip -DestinationPath $env:TEMP -Force
|
||||
|
||||
#Write-Output Disable scheduled tasks
|
||||
#. $env:TEMP\Debloat-Windows-10-master\utils\disable-scheduled-tasks.ps1
|
||||
#Write-Output Block telemetry
|
||||
#. $env:TEMP\Debloat-Windows-10-master\scripts\block-telemetry.ps1
|
||||
#Write-Output Disable services
|
||||
#. $env:TEMP\Debloat-Windows-10-master\scripts\disable-services.ps1
|
||||
Write-Output Disable Windows Defender
|
||||
if ($(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName.StartsWith("Windows 10")) {
|
||||
. $env:TEMP\Debloat-Windows-10-master\scripts\disable-windows-defender.ps1
|
||||
}
|
||||
else {
|
||||
Uninstall-WindowsFeature Windows-Defender
|
||||
}
|
||||
Write-Output Optimize Windows Update
|
||||
. $env:TEMP\Debloat-Windows-10-master\scripts\optimize-windows-update.ps1
|
||||
#Write-Output Disable Windows Update
|
||||
#Set-Service wuauserv -StartupType Disabled
|
||||
#Write-Output Remove OneDrive
|
||||
#. $env:TEMP\Debloat-Windows-10-master\scripts\remove-onedrive.ps1
|
||||
|
||||
Remove-Item $env:TEMP\debloat.zip
|
||||
Remove-Item -recurse $env:TEMP\Debloat-Windows-10-master
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
rem http://www.windows-commandline.com/disable-automatic-updates-command-line/
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
|
||||
|
||||
rem remove optional WSUS server settings
|
||||
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f
|
||||
|
||||
rem even harder, disable windows update service
|
||||
rem sc config wuauserv start= disabled
|
||||
rem net stop wuauserv
|
||||
set logfile=C:\Windows\Temp\win-updates.log
|
||||
|
||||
if exist %logfile% (
|
||||
echo Show Windows Updates log file %logfile%
|
||||
dir %logfile%
|
||||
type %logfile%
|
||||
rem output of type command is not fully shown in packer/ssh session, so try PowerShell
|
||||
rem but it will hang if log file is about 22 KByte
|
||||
rem powershell -command "Get-Content %logfile%"
|
||||
echo End of Windows Updates log file %logfile%
|
||||
)
|
@ -1,4 +0,0 @@
|
||||
Write-Output "Disabling Screensaver"
|
||||
Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord
|
||||
& powercfg -x -monitor-timeout-ac 0
|
||||
& powercfg -x -monitor-timeout-dc 0
|
@ -1,8 +0,0 @@
|
||||
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=block
|
||||
netsh advfirewall firewall set rule group="Windows Remote Management" new enable=yes
|
||||
$winrmService = Get-Service -Name WinRM
|
||||
if ($winrmService.Status -eq "Running") {
|
||||
Disable-PSRemoting -Force
|
||||
}
|
||||
Stop-Service winrm
|
||||
Set-Service -Name winrm -StartupType Disabled
|
@ -1,4 +0,0 @@
|
||||
$DefenderInstalled = Get-Command -Module Defender
|
||||
if($null -ne $DefenderInstalled) {
|
||||
Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
netsh advfirewall firewall add rule name="Open Port 3389" dir=in action=allow protocol=TCP localport=3389
|
||||
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
|
@ -1,27 +0,0 @@
|
||||
write-host "==> 'enable-winrm.ps1' - START..."
|
||||
write-host "====> Getting Connections..."
|
||||
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
|
||||
|
||||
write-host "====> Enable PSRemoting..."
|
||||
Enable-PSRemoting -Force
|
||||
|
||||
write-host "====> WINRM Quick Config..."
|
||||
winrm quickconfig -q
|
||||
winrm quickconfig -transport:http
|
||||
|
||||
write-host "====> WINRM Set Config..."
|
||||
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
|
||||
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="800"}'
|
||||
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
|
||||
winrm set winrm/config/service/auth '@{Basic="true"}'
|
||||
winrm set winrm/config/client/auth '@{Basic="true"}'
|
||||
winrm set winrm/config/listener?Address=*+Transport=HTTP '@{Port="5985"}'
|
||||
|
||||
write-host "====> Configure Firewall..."
|
||||
netsh advfirewall firewall set rule group="Windows Remote Administration" new enable=yes
|
||||
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=allow remoteip=any
|
||||
write-host "====> Set WINRM Service Statup..."
|
||||
Set-Service winrm -startuptype "auto"
|
||||
write-host "====> Restart WINRM Service..."
|
||||
Restart-Service winrm
|
||||
write-host "==> 'enable-winrm.ps1' - END..."
|