Compare commits
1130 Commits
v1.3.0-pre
...
vagrant+pa
Author | SHA1 | Date | |
---|---|---|---|
396a9a0890 | |||
98a1e9621e | |||
4f32d23c30 | |||
1ad836b288 | |||
1b9a1e5b6f | |||
29650960aa | |||
3ea9728ffd | |||
4b0344172a | |||
5e219fe34e | |||
9be28807cb | |||
e2168a361c | |||
7542376213 | |||
84ee96c64f | |||
320f928830 | |||
e9750ab73d | |||
e0915777c0 | |||
23d3add2d1 | |||
59e14a1783 | |||
34f2aabb8e | |||
845720e25a | |||
55676399d5 | |||
48e4dff882 | |||
a605ec520d | |||
5fab87f4d6 | |||
c9153c96bf | |||
74381ecd19 | |||
8d39f79a90 | |||
7b880efda4 | |||
4aefd0bb71 | |||
7daeb465e8 | |||
23488fcbb2 | |||
d838f861af | |||
d80202c791 | |||
1c399c470f | |||
65d6ecb9f1 | |||
5cb8705f65 | |||
aa56c778cb | |||
eae0a22782 | |||
2a62a045d9 | |||
73034f9e31 | |||
8875f77573 | |||
1d1e815c91 | |||
b4ed3bac6d | |||
739dcb1f8c | |||
ce69566201 | |||
ffda6f70f7 | |||
95c833204f | |||
5d270b477c | |||
91939db852 | |||
e8d5528e5e | |||
0aad7daca3 | |||
80888644cc | |||
600552f061 | |||
bc0db6a7b6 | |||
eb2444d04a | |||
36ad85c7b7 | |||
f318bcc1b5 | |||
c56559873c | |||
e33713a93f | |||
324aaf74f2 | |||
d73f9592d8 | |||
bbb50f99f8 | |||
4efbe0bd62 | |||
476fd2d324 | |||
b3af7c3983 | |||
d82fece61e | |||
6bd2e260f0 | |||
c9d2b33792 | |||
9e87f375f1 | |||
84262c4476 | |||
0b01ea6f63 | |||
af6472cb57 | |||
fd12ece9af | |||
b5ae5eb711 | |||
c9e872e826 | |||
f99480fd49 | |||
834940cddb | |||
5135370ec1 | |||
92a3c9c215 | |||
f22943212b | |||
dc2bc9bda7 | |||
a03ad615f1 | |||
8b3f38ad21 | |||
9e55c48200 | |||
3b6e1cbf5f | |||
e1bf703f50 | |||
2e9b512102 | |||
9bbc97c981 | |||
4766425ad3 | |||
470808838f | |||
328f4b3073 | |||
691addb95c | |||
efa2e576d0 | |||
5eaf0d0396 | |||
0e34d925ce | |||
9d2ac373c5 | |||
835343f9d6 | |||
271fe4c822 | |||
24ba9c3fa5 | |||
0fdcda98cf | |||
42df6cd05b | |||
a4fa8d5333 | |||
1ba542e915 | |||
2c656a9c34 | |||
0adbc47c7e | |||
e0ade8f3f1 | |||
ba97011bbc | |||
cfcfe6f282 | |||
048692b5b5 | |||
7c74931af8 | |||
e3d9f81e25 | |||
7c309c6a7b | |||
0c1ab3fbb1 | |||
fc44def0ad | |||
fbe3e17eea | |||
47caafb800 | |||
efb3338f5c | |||
3859f6ffc0 | |||
4e1918dcf7 | |||
dcc06a9d70 | |||
d3026aef5d | |||
159937b2df | |||
3214a6d5ea | |||
02970841c3 | |||
04bbea7d24 | |||
c8d48b7f3e | |||
0f6ed93d0d | |||
2be652707b | |||
96ce96c53d | |||
ce23189427 | |||
a2a996147e | |||
6d46df634e | |||
fe08df3fdc | |||
39ac92d61c | |||
bdbd3aab2b | |||
18aea2b258 | |||
5cd05b056b | |||
c0fc10009a | |||
cc5e4a0e60 | |||
6e0e1729d8 | |||
cbb10de06d | |||
0b7e47cdc2 | |||
96ca7cea4a | |||
0ba0dea6a2 | |||
e320ba8aae | |||
23b80264b0 | |||
90cd1130ac | |||
7f71456a41 | |||
c606e5c8ee | |||
98d28846b3 | |||
27f28e6ed7 | |||
8b6d1d8a6f | |||
211fbd6428 | |||
2acb6808ed | |||
ee913e09ee | |||
ede79c2199 | |||
665df2a8c8 | |||
a0f234b9d0 | |||
5cdb98abb7 | |||
9399cbdcd7 | |||
c992215f94 | |||
55b90cc958 | |||
971483b2b7 | |||
c8d554220a | |||
8feae5d81d | |||
6d77c988db | |||
04b6ec2ac8 | |||
b5bddc929e | |||
04e4446c37 | |||
4b5e52014e | |||
8a71e7d51b | |||
668b9ad0fb | |||
11919ebc54 | |||
1754995aa0 | |||
c333fc0c67 | |||
f927fafb67 | |||
942d513a2a | |||
1bc35b6edd | |||
904d552801 | |||
1fa1919eaf | |||
2fa0130711 | |||
c068c219eb | |||
85051f0cb2 | |||
5eacfc90af | |||
2ebf68393f | |||
856d22e9f8 | |||
9151fb3469 | |||
d767c9b2e9 | |||
3943ba6cc8 | |||
cc9699c134 | |||
4264158ff2 | |||
0559060ceb | |||
ae391eb576 | |||
129c2971c7 | |||
3f88112d22 | |||
3fe76de9b5 | |||
e1a0d3850c | |||
1e34c885f3 | |||
1d330e7330 | |||
f468ddfe95 | |||
e7139bd474 | |||
6b72e84940 | |||
3901fef98b | |||
71536ddddf | |||
7995f34981 | |||
87f7ddf449 | |||
d94fe86b2a | |||
f58652fc28 | |||
e1caeb879a | |||
5b46f4fec7 | |||
b0f034a960 | |||
70632a2bb8 | |||
9d76f99dcf | |||
50bf15dd75 | |||
2de6f8232a | |||
8d4afb0570 | |||
67e2bf1a73 | |||
59269aa9f1 | |||
1c4a8b3ff5 | |||
a49921bb1b | |||
473e9566e7 | |||
f9cb2d6264 | |||
7856b3ab57 | |||
4dc3dc0dac | |||
abbab3f8b4 | |||
9aa26c46d0 | |||
7f682653e4 | |||
23edc8036f | |||
cb9d06f8a3 | |||
cc85a32e48 | |||
3b9e591ea0 | |||
adcef21034 | |||
2dc5463c31 | |||
4b8d669d01 | |||
a4c5b9d098 | |||
9c4e4d27c8 | |||
489078763d | |||
aa755278ec | |||
5c8e0f38fe | |||
5831fa4977 | |||
d7d0f1320b | |||
9f395805e1 | |||
e8d34e07a1 | |||
77df64b61b | |||
db44218d14 | |||
1b7d804701 | |||
c9ba643851 | |||
f301968ac3 | |||
f02bbfc5be | |||
50816c6bfc | |||
a0827fb4f5 | |||
28e42104ac | |||
2189fe9483 | |||
813fd6d82f | |||
1fbe2f7c2d | |||
e1c14f6c7e | |||
4992227614 | |||
7178b978ec | |||
ee01f26680 | |||
eede47bfad | |||
9d9519bdd4 | |||
f05c77e53c | |||
0b163d43ab | |||
d567229050 | |||
800a4a953f | |||
be5198c74b | |||
91d5a25fe9 | |||
760566acb9 | |||
a8bc932dbd | |||
6cd7817938 | |||
3d0e6b86e3 | |||
a027bdc5c2 | |||
0f490fdb61 | |||
795ab5746c | |||
771c53c7f1 | |||
805a5fc6e5 | |||
05c92f4cb0 | |||
d2d3d38782 | |||
15d66d394a | |||
280e40f077 | |||
8ee5e36fca | |||
dab1dd93f1 | |||
e2d817a497 | |||
d1b1012741 | |||
5c409dabc8 | |||
05db3658ad | |||
ef0de62d82 | |||
61e7028566 | |||
59bbdaddc7 | |||
7a9ad78e66 | |||
ec371bafff | |||
a617397aea | |||
74060922a4 | |||
e48dec15ac | |||
52389f21f0 | |||
d1e033c312 | |||
c89ef96347 | |||
4846eff298 | |||
5f25ea58a0 | |||
dceccffb72 | |||
0a4d3bcb77 | |||
913f93d24a | |||
70b5822fd5 | |||
f184714457 | |||
7beb490048 | |||
f2d8e31e2e | |||
6e05a9105f | |||
62bfbb4501 | |||
8bf40227e8 | |||
cf61b81f01 | |||
427937918e | |||
fe29497878 | |||
f3fcb8be4a | |||
36e13027f6 | |||
ef51ed2be2 | |||
6d313853f3 | |||
f46e8b81d8 | |||
864b85f254 | |||
ce02fb4a0e | |||
e345f187d8 | |||
fc00cc8be2 | |||
0dd2a665e2 | |||
6189f4f0e6 | |||
0616ff0a82 | |||
99452c8158 | |||
4098265a36 | |||
eab4454ac5 | |||
711fe2895e | |||
7cc1c77225 | |||
f0c4e85ac8 | |||
ea0145448c | |||
0281ee7dda | |||
f997da60e3 | |||
34df88aa76 | |||
c51c3c55a8 | |||
0e8c556e7d | |||
357e51acd1 | |||
66f9d582ec | |||
83a95d1412 | |||
a1417f6cf9 | |||
8ea4bbb11c | |||
f39aade500 | |||
004535e0bc | |||
6ae2f97f52 | |||
0326f2e3a8 | |||
9f065a63e8 | |||
b6316eb447 | |||
59dfa9c46f | |||
a4cb56b083 | |||
ad6979d25f | |||
addcefdd47 | |||
0637d6b3e9 | |||
f72c285d8b | |||
f24266014f | |||
c27cedc9b3 | |||
4c85e8b2f1 | |||
c75c02c9ce | |||
9de284123c | |||
93715461e6 | |||
fc6cf025be | |||
f809af1eec | |||
5b071d8d59 | |||
6d1e2d6e8b | |||
2ef8c967d2 | |||
b885b4e235 | |||
f717f5031b | |||
710cc3ecc3 | |||
0fc6b6571e | |||
48f50568b0 | |||
b8760e4d04 | |||
ae7209f254 | |||
9d4da63184 | |||
62a6311b6d | |||
b40510f3a0 | |||
e7a6e64473 | |||
f6c2657b23 | |||
91aabe75af | |||
946f929eaf | |||
8a870c093a | |||
bfe526604d | |||
79e505acf8 | |||
9a2e22cb6d | |||
b2add2b966 | |||
74202a8719 | |||
5305ebd4a6 | |||
4e22ad93f4 | |||
6730f864b1 | |||
56b04fc9ce | |||
55ff611095 | |||
aebe37bd28 | |||
413fb2f1ac | |||
73ad62eaa2 | |||
4fab4cc6e4 | |||
a41fad80d5 | |||
c9acb13d0b | |||
03d0f913ea | |||
a5c98d4fe9 | |||
9df8f1a92a | |||
c262934822 | |||
f1665ddd7d | |||
36f4ce0e3c | |||
59941f5dfa | |||
6d79ed5eb2 | |||
99a7445fcb | |||
d6b5fe8e1d | |||
11fb1b3a50 | |||
810a3da955 | |||
e8df3ef247 | |||
8d6ce3e4ac | |||
9793ca1ed9 | |||
d9b2c729f9 | |||
8fa351810a | |||
3752b95218 | |||
e0cb86d738 | |||
0ef76ee2d3 | |||
8a2ace9fc2 | |||
37c7b1dc02 | |||
ad755dc7f9 | |||
6027ac31c4 | |||
c34eb73555 | |||
f7df79a2d7 | |||
0fd2d9c8a8 | |||
e918b18ca7 | |||
0a7f1623f7 | |||
d02be816e2 | |||
8452f33407 | |||
a66b8b3035 | |||
ed60c14a44 | |||
cc1d459ea9 | |||
633d673bd7 | |||
a7e45ef64a | |||
10d63daf90 | |||
6c15598010 | |||
3608b5bc81 | |||
2d75a635de | |||
9cf3ba222e | |||
01d300f779 | |||
ba1027f6d5 | |||
b5d172cd32 | |||
f362ba8dba | |||
783cf68d10 | |||
c4fb7e6034 | |||
da0af1d96b | |||
9c9eac1875 | |||
ae0b7722ed | |||
bb2f89d044 | |||
24cad3ed5c | |||
ae7ddb7f86 | |||
e0b8ebc669 | |||
00b22ea79a | |||
eb8e470fe3 | |||
9088a5e2e6 | |||
25bc575e8a | |||
0ff3b391f1 | |||
11a78a8d64 | |||
2a9a4d2860 | |||
4874e78953 | |||
f4988480f6 | |||
44f5095047 | |||
2205461943 | |||
5d05034810 | |||
467b4d4ad9 | |||
ea6e18c834 | |||
4378741aad | |||
6458199812 | |||
d1adf16fa8 | |||
cda883bc39 | |||
b1ef763922 | |||
2cd7632720 | |||
92169c1295 | |||
e0aba11018 | |||
e8fe522a99 | |||
937874f03c | |||
9e085f5938 | |||
829a65f552 | |||
93b69798f4 | |||
3f6aa3b348 | |||
a1785415fd | |||
794ae2ad60 | |||
28c416a15c | |||
70aa573111 | |||
4cacd2fdc8 | |||
80f76ad956 | |||
906bb5d357 | |||
29d784b2b1 | |||
fc90722faa | |||
167c49ee6d | |||
0ed10e5e89 | |||
cd50db3a7f | |||
37a223b449 | |||
334838c079 | |||
0c3d89925e | |||
020661af95 | |||
79261d4d27 | |||
7326a3cfc5 | |||
fdcbd6df87 | |||
0c41d5f5d4 | |||
40c58417b2 | |||
97a41ddd99 | |||
954937cf97 | |||
2c620d1d67 | |||
5e7a7029d1 | |||
f1c1354c00 | |||
0f12de345b | |||
c332ab1a34 | |||
4403edb110 | |||
00bc5439fd | |||
da5f1bc4db | |||
52f5ad62c3 | |||
250ae06e7a | |||
bc7984769c | |||
130dc750be | |||
c6edbc0068 | |||
c0eeec6608 | |||
ee25dbaab6 | |||
e3ad9c3953 | |||
31df5c3e5e | |||
e9f20aea91 | |||
29aa75e158 | |||
8781779636 | |||
31c019b7e4 | |||
4d86559841 | |||
a5dcf9c260 | |||
a999d17f71 | |||
04c784cb16 | |||
a2ce74f981 | |||
b91bb84f3d | |||
35ace106c8 | |||
1861983469 | |||
1f5ea5e596 | |||
2936abe2a5 | |||
c9bc1f6b83 | |||
be5ec648c4 | |||
ab3639540f | |||
2517f55f15 | |||
1af12666e4 | |||
93f8718489 | |||
1071221468 | |||
a92bb1947f | |||
251968b4c6 | |||
638d82e989 | |||
0e37a4c2f9 | |||
ca2550b70e | |||
492fc284f2 | |||
ec06f3e39b | |||
850e4ec045 | |||
fe3d2034ef | |||
180e72a6aa | |||
93cf865071 | |||
b41aac982c | |||
8df688bada | |||
84917159ec | |||
750560851f | |||
9b29668250 | |||
a857d8419c | |||
0cf1c5e2eb | |||
ddec3e8425 | |||
2428e8529f | |||
3eb82d4095 | |||
589b48d06e | |||
67f35bc05d | |||
9724151f06 | |||
c04cc6dc7f | |||
3ee244e4c1 | |||
44bc089ee4 | |||
6ab4599a4d | |||
dac4b27e28 | |||
661f59d0fb | |||
5a6f873d2b | |||
788d4e0caa | |||
f1fbd98093 | |||
74fcb5b62b | |||
60279fea04 | |||
7877d417f8 | |||
44a8bf5802 | |||
b70a03cde0 | |||
8cf51e454a | |||
f1b1ac0ec1 | |||
06b0c0d3c2 | |||
f1a9721256 | |||
46c8099317 | |||
f44c68273b | |||
7f69f15637 | |||
3736508b2c | |||
4575ac3209 | |||
035f209bc4 | |||
e4651cf7b4 | |||
19a2fd11e3 | |||
feee4eaed2 | |||
b310a2c47c | |||
22afc40a08 | |||
c499456f97 | |||
34468ef2fd | |||
5cb8021864 | |||
468dba474e | |||
db42252ef2 | |||
57b328b209 | |||
05836e761e | |||
e8b33aa45b | |||
377d97e56a | |||
3a44bc809d | |||
45e5600249 | |||
ff595e62b1 | |||
a85a208b20 | |||
ecda3acfdf | |||
5477b7812d | |||
81951a4a14 | |||
0280593d4c | |||
f8e859f844 | |||
af4c1fddbb | |||
b58b3b4547 | |||
9184f8e2bf | |||
1e0e2193e0 | |||
38fd3468fe | |||
ebd977778b | |||
72dd8376cd | |||
b61752f89e | |||
8f59d529f4 | |||
711c436f04 | |||
ea531cdd44 | |||
73c21d1a59 | |||
a97ce1f950 | |||
4510abb3c8 | |||
6d132c2665 | |||
543c7ca6e9 | |||
efc978f6f8 | |||
5def1c584a | |||
865e443fcd | |||
893207453d | |||
5e5e0ece73 | |||
834f031442 | |||
0bd847e695 | |||
efe64ee6fd | |||
5f9f3560c8 | |||
9b9bb13f6a | |||
52eea5fe9f | |||
ab3f0b76fb | |||
528bbea7f5 | |||
f20eca01ac | |||
26d8d58e77 | |||
cf134604bb | |||
67b374ad37 | |||
d592f80364 | |||
3e40c80331 | |||
ac2082d56d | |||
a813e359c5 | |||
345562dbd0 | |||
13de4924ca | |||
f39b921121 | |||
43d5a7b833 | |||
b424012a08 | |||
192c2f4dd1 | |||
4622aa87e4 | |||
0b2c9bf005 | |||
081624d88e | |||
280bbfff1f | |||
a93fff6798 | |||
8abfa9d413 | |||
98a64b71b2 | |||
f2b26352b4 | |||
63128ed52f | |||
036efc2fb8 | |||
2582891307 | |||
ec42046297 | |||
522656845f | |||
6b22a5c583 | |||
e75958b881 | |||
8ec252276f | |||
16bf572cdf | |||
7bd25e95e1 | |||
cc12b848ac | |||
20d55c1469 | |||
06e6c63b7f | |||
89499f2a60 | |||
95e5169476 | |||
760f4e579e | |||
6d8f7a290a | |||
2a4e9d8301 | |||
961f38a399 | |||
5a48e568a8 | |||
524fce25ab | |||
46bde1af8b | |||
9a47bce6ac | |||
0a3be464be | |||
b2723d6f6a | |||
4f2ced57df | |||
88169b8721 | |||
f6db922732 | |||
e822d55aa5 | |||
ccb6cb80e5 | |||
e56ed810a0 | |||
7e8d67caa8 | |||
4e4f050374 | |||
51e75d4bb5 | |||
f4389fc552 | |||
8101923242 | |||
7e1bc4297a | |||
0f30329e38 | |||
25820ae4d4 | |||
528a69dab9 | |||
0c9e0e2f8c | |||
20eb7b8e81 | |||
ab02c4ce46 | |||
f9f06a5595 | |||
8ac540ebb6 | |||
fcab51da2b | |||
dc492c836f | |||
1eb03dd1b8 | |||
3163d6d1c3 | |||
5c7f4943ad | |||
378ebff566 | |||
572a94ca3a | |||
22aa59bd83 | |||
eb6a332da2 | |||
dd614642b2 | |||
036cf09360 | |||
7203671fc9 | |||
787ac3773c | |||
b16aa7a29e | |||
d8e8fc8adb | |||
0efeaa91fa | |||
8c0817941e | |||
e17b04cbb9 | |||
e904ebce72 | |||
a226019d5a | |||
d04cc1f04e | |||
2e77513674 | |||
1640e9c01d | |||
ddbfd1da18 | |||
bc7c6e97b3 | |||
45f05ed8fa | |||
72b676b939 | |||
637b0fd3ac | |||
ce62db6d33 | |||
f3ed7b6d1b | |||
57e5ae1719 | |||
a5bdecca77 | |||
5be25f29f8 | |||
cb78f0486a | |||
f5ac81daa0 | |||
da0aea96f8 | |||
3a11d45552 | |||
c5a6afbf5b | |||
a607f0f2d5 | |||
66da1716bc | |||
bfaa194468 | |||
c3956e307a | |||
3344268c24 | |||
8ff459b309 | |||
103d0a6cea | |||
8dc9bc9ae1 | |||
bb4ed4af51 | |||
ae2fda72fd | |||
bda09bc274 | |||
749ce17dbe | |||
8cf59d1cbf | |||
1d36ba4ed4 | |||
564ef5220e | |||
f84da84e15 | |||
86544c9188 | |||
4aec21ce19 | |||
0be94725bd | |||
9dce9d0f62 | |||
669e997602 | |||
0730c6e32b | |||
0d2e16c653 | |||
35eab7a51a | |||
2cfa7c45fc | |||
ab0de6d157 | |||
bd9cff2691 | |||
9b121f1c0a | |||
cfe22c8ef0 | |||
3ef53f64d4 | |||
4a10e0b2eb | |||
7b191d3caf | |||
277972a7f2 | |||
b1aa687d4f | |||
ec4c815264 | |||
12b9af99c5 | |||
d58c6c2070 | |||
06c7cc969c | |||
44b4b7a195 | |||
9869f9a372 | |||
85c4a5b4af | |||
3f96336610 | |||
a8cae77395 | |||
823eeaf082 | |||
823e6fee6e | |||
34f8c43d98 | |||
352a16f84d | |||
541fc16daf | |||
75e6644d2a | |||
7d40ea4609 | |||
451fb46ce1 | |||
70788dc1e5 | |||
c25ff75187 | |||
059a31618b | |||
e69e7f9b82 | |||
e93231114f | |||
08550751da | |||
49da3745bc | |||
e4fb0d694b | |||
798da058cc | |||
d91438de47 | |||
08e1244fe5 | |||
02f4a9dfe5 | |||
e80ad2356f | |||
21b1f00981 | |||
34bb62409a | |||
b901a4a569 | |||
39f47870a3 | |||
f4ee915678 | |||
192056e19b | |||
f6c2d9c31e | |||
b3200efa7e | |||
b57e146e7a | |||
0f99f66b42 | |||
4655888690 | |||
431c6300e5 | |||
e3cdf43afc | |||
6c016788d4 | |||
0b2d7bd655 | |||
27f51f48a4 | |||
34554d6b08 | |||
4df1d744d3 | |||
40b9ca4e28 | |||
19d5a87224 | |||
44aadccbec | |||
83f411384c | |||
861f99d64b | |||
6af44441fe | |||
0ce1db97d0 | |||
0c39d0a799 | |||
add82a247b | |||
bf6dae4a24 | |||
7d31eeaa5a | |||
daa94c5462 | |||
36403df91e | |||
a843e85c8b | |||
9a3a8f23d0 | |||
99f51b0fc0 | |||
4f3fcae9d9 | |||
a06d4e93ec | |||
13ea026dc9 | |||
dc8e572ca5 | |||
b2262522c9 | |||
9d0729fe42 | |||
a1e47ceaca | |||
2a18ba084c | |||
12e3761017 | |||
b8890ed297 | |||
063f30c193 | |||
bc72f20a2d | |||
78a9711447 | |||
55d9b25f57 | |||
7294092618 | |||
959073ac5c | |||
e746101ed2 | |||
65bf25f1d0 | |||
94e7c24b72 | |||
d6569192fc | |||
7d04ded1c2 | |||
5c3f46fd88 | |||
502129d4f9 | |||
b36b8a4cb3 | |||
3965852c26 | |||
93d2c427ad | |||
624deec2f0 | |||
c817df2032 | |||
236aefe8c6 | |||
2f3f1d474a | |||
cb4d95e7a3 | |||
1dadade661 | |||
2bc17c4ff2 | |||
ae473ecea6 | |||
3aeca3c972 | |||
57a28f118d | |||
018bf45df4 | |||
f8359fc3f7 | |||
249f7b9baf | |||
eaf7048ed7 | |||
f4321bbc33 | |||
96736feecc | |||
dc9e385365 | |||
a85cd81f00 | |||
1662678ebf | |||
9462315789 | |||
864f778099 | |||
bcf8527f74 | |||
72ab0f064f | |||
91f5c5379a | |||
19bad7dfa9 | |||
afb8f52516 | |||
6543c204b7 | |||
0438ce5763 | |||
471369f73b | |||
66d36fdc1c | |||
17247f2065 | |||
63f3f8020f | |||
b37001b591 | |||
60880362a9 | |||
91651fc98b | |||
997e799138 | |||
ff2e09849e | |||
8237b1010c | |||
cf311fb1c2 | |||
78b9c97fa9 | |||
a49c1b3f3d | |||
fff6e4506c | |||
a71c6a50ad | |||
5e703796c9 | |||
b88a01822f | |||
3bf07c088d | |||
724930d69d | |||
badb027c24 | |||
145a1b144b | |||
29c5e83975 | |||
1c02c55c2f | |||
74fc14eadf | |||
0729c06c20 | |||
6da96fb7ec | |||
ba610f5f7b | |||
7930c9bfe5 | |||
bafaf7cba4 | |||
3c14d19a27 | |||
13941a44ec | |||
ee4f85de85 | |||
9d6e5c12a2 | |||
da27f9be9f | |||
124565f36a | |||
46d468aea0 | |||
dc27c53739 | |||
7479d620b1 | |||
a8d32611a9 | |||
b6042a7ca1 | |||
dcf22af3c8 | |||
b58ff9bb53 | |||
68d9425c89 | |||
a95cd140ef | |||
e90966c5c2 | |||
e104f20c5d | |||
6883ba3b84 | |||
1c1c08bb68 | |||
a5eb4d7b4f | |||
d88f1b0a97 | |||
8d74184d30 | |||
3ea6d51ba4 | |||
22d27afed5 | |||
e9a78a30d1 | |||
e92f7fbb55 | |||
7ca2f5503a | |||
a34e17f2bd | |||
1f9e743ef2 | |||
4243c5c222 | |||
f687281be0 | |||
4c270699a1 | |||
b45e3adc67 | |||
8077c1a612 | |||
d9fcf06e0f | |||
815b99b98b | |||
bcb60f8f59 | |||
0877a6d995 | |||
71f5b446da | |||
512787f391 | |||
262d92265e | |||
409b92aac2 | |||
aea1a977bf | |||
a7237370e3 | |||
25005930ba | |||
74d79ea628 | |||
89c014bb05 | |||
c19237085d | |||
9c4e77b498 | |||
c2cf56cc48 | |||
6e2d88d466 | |||
cd3efdf382 | |||
53c7ec5886 | |||
e63368fe96 | |||
aa2eaa6886 | |||
bee82d00e8 | |||
02366fdc7e | |||
399999d7f7 | |||
8eea2baaa5 | |||
4d3950174f | |||
24a110ddb7 | |||
1dd0e600ac | |||
e49b978b9a | |||
9182c89a14 | |||
00622254a7 | |||
9977c0563d | |||
b604bf0b6c | |||
3b0a51d7b8 | |||
d8444dae97 | |||
0a5d1ac156 | |||
018cc9ceda | |||
ad0f8fe049 | |||
7f4a4d34d6 | |||
963a5a8be6 | |||
f04a4e4846 | |||
50ed66894f | |||
2bb5ce0986 | |||
3b7a24b20a | |||
81d83d4c6d | |||
61849dc7fd | |||
9f2c0e4001 | |||
4195b5b0ed | |||
02f1ff12a6 | |||
7447e00aec | |||
84202729fb | |||
70b0666f11 | |||
14f3361429 | |||
d7f0407300 | |||
ba99f5b66a | |||
a0e0adae8b | |||
46d5936806 | |||
104033e58b | |||
4c522aa0c4 | |||
d64f0e681e | |||
2b292f98de | |||
0b43758a34 | |||
e6d4609bf4 | |||
0de26571aa | |||
5597aa6038 | |||
425dc854ac | |||
a78186f502 | |||
60aa0cee13 | |||
7750216d1a | |||
eb73f6f772 | |||
db909451c9 | |||
b349b19869 | |||
e0841eacc1 | |||
44e0a040bd | |||
5feccb3c7c | |||
abd7db99b6 | |||
66c6d5bbb3 | |||
af586d5410 | |||
c8adf424e2 | |||
e36db3eb3d | |||
27c571636d | |||
d144cd0fc2 | |||
bb312ad74b | |||
df7beff2ef | |||
b7bfe72303 | |||
490fae770c | |||
a6817faae6 | |||
a8450eb1d3 | |||
355df7a48a | |||
5354b5f80f | |||
d095d6afd6 | |||
832c1991e4 | |||
19672aafff | |||
6b10771312 | |||
13fd41eb82 | |||
07fb26c4a5 | |||
13c474b768 | |||
f2641e4cd2 | |||
6a0ea28d22 | |||
04c7bb7da8 | |||
317834316a | |||
4e90303511 | |||
0379dc1d0d | |||
393d7d19c5 | |||
aa87425910 | |||
688c2f7721 | |||
1b711f1f29 | |||
65014b1ce4 | |||
af1a4c9061 | |||
5f83cb3c64 | |||
9a3eab9bf8 | |||
1dddbcff05 | |||
924ab12aeb | |||
6a474dd624 | |||
14a6e5953c | |||
9c0ad9fd81 | |||
84d44b18f2 | |||
a542f4e20c | |||
e5611af7be | |||
999b5af29a | |||
87210ae7ca | |||
75deb4f945 | |||
6a080a1284 | |||
d014d785b0 | |||
346680b52e | |||
c19412045c | |||
2b047e8683 | |||
010049a849 | |||
91c0d310f2 | |||
43af717d44 | |||
7a37d37a4e | |||
a07062d10d | |||
2d812f1d02 | |||
49cc35bccf | |||
67de97a492 | |||
7a0a1adc02 | |||
76b2ed510d | |||
7ca9d8e9d6 | |||
31c8c620c7 | |||
61e795c02d | |||
f652d301e7 | |||
a286e52a44 | |||
c49c27fb88 | |||
e212ee36a2 | |||
fc7f1ca3dc | |||
537c658eb4 | |||
4e9882eea4 | |||
d4339ae526 | |||
055a974257 | |||
05fb4368cc | |||
1bf5503bea | |||
b47d04f75c | |||
6978bb7417 | |||
7eb7255741 | |||
6c6268e968 | |||
1e7f15100f | |||
fbccc6b790 | |||
2ccc06e639 | |||
182629d59a | |||
fc963b1342 | |||
24b1bb93c0 | |||
528d0ce734 | |||
5068188059 | |||
5a1f81655f | |||
07ed31c0a1 | |||
f9d0050c67 | |||
86dd077b9d | |||
d5a1ce628c | |||
b86f3fbaff | |||
160fbad621 | |||
3085fca9e0 | |||
997bd5c24e |
5
.gitattributes
vendored
@ -1,2 +1,7 @@
|
||||
# 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
Normal file
@ -0,0 +1,163 @@
|
||||
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
Normal file
@ -0,0 +1,9 @@
|
||||
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
Normal file
@ -0,0 +1,84 @@
|
||||
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
Normal file
@ -0,0 +1,45 @@
|
||||
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
Normal file
@ -0,0 +1,11 @@
|
||||
# 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
Normal file
@ -0,0 +1,19 @@
|
||||
# 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
Normal file
@ -0,0 +1,33 @@
|
||||
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
Normal file
@ -0,0 +1,90 @@
|
||||
#---------------------------------#
|
||||
# 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
Normal file
@ -0,0 +1,73 @@
|
||||
# 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
Normal file
@ -0,0 +1,52 @@
|
||||
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
Normal file
@ -0,0 +1,65 @@
|
||||
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,17 +1,40 @@
|
||||
|
||||
## Those files should be taken from their repositary
|
||||
|
||||
vendor/*/*
|
||||
!vendor/*
|
||||
!vendor/psmodules/PsGet
|
||||
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/*
|
||||
|
||||
config/.history
|
||||
Thumbs.db
|
||||
*.exe
|
||||
*.dll
|
||||
build/
|
||||
Version v*
|
||||
/Version *
|
||||
*.bak
|
||||
config/user-*
|
||||
config/aliases
|
||||
config/profile.d
|
||||
.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
Normal file
@ -1,17 +1,17 @@
|
||||
# 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.
|
||||
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 development branch.
|
||||
* Create a feature branch based on the `master` branch.
|
||||
|
||||
## Making Changes
|
||||
|
||||
* Make changes in your seperate branch.
|
||||
* 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)
|
||||
@ -35,4 +35,4 @@ If you follow them your contribution will likely be pulled in quicker.
|
||||
|
||||
* [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/send-pull-requests/)
|
||||
* [GitHub pull request documentation](http://help.github.com/articles/creating-a-pull-request/)
|
||||
|
13
Cmder.bat
@ -1,11 +1,20 @@
|
||||
@echo off
|
||||
SET CMDER_ROOT=%~dp0
|
||||
|
||||
:: Remove trailing '\'
|
||||
:: 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\ConEmu.xml"
|
||||
start %~dp0/vendor/conemu-maximus5/ConEmu.exe /Icon "%CMDER_ROOT%\icons\cmder.ico" /Title Cmder /LoadCfgFile "%CMDER_ROOT%\config\user_ConEmu.xml"
|
||||
)
|
||||
|
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
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.
|
362
README.md
@ -1,25 +1,68 @@
|
||||
# Cmder
|
||||
|
||||
[](https://gitter.im/cmderdev/cmder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](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://github.com/mridgers/clink) (further enhanced by [clink-completions](https://github.com/vladimir-kotikov/clink-completions)) and a custom prompt layout.
|
||||
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 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
|
||||
3. (optional) Place your own executable files into the `bin` folder to be injected into your PATH.
|
||||
4. Run Cmder
|
||||
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`
|
||||
|
||||
## Integration
|
||||
### 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;
|
||||
|
||||
@ -28,7 +71,7 @@ So you've experimented with Cmder a little and want to give it a shot in a more
|
||||
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 a message "Access Denied" ensure you are executing the command in an **Administrator** prompt._
|
||||
_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.
|
||||
|
||||
@ -40,38 +83,45 @@ In a file explorer window right click in or on a directory to see "Cmder Here" i
|
||||
* <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>Shift</kbd> + <kbd>Up</kbd> : Traverse up in directory structure (lovely feature!)
|
||||
* <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)
|
||||
_(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 'powerhell.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|
|
||||
| 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.
|
||||
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.
|
||||
|
||||
Mintty tabs use a program called 'mintty' as the terminal that is not based on the Windows Console API so some differences in functionality are normal, as a result mintty specific config is done via the '[%USERPROFILE%|$HOME]/.minttyrc' file.
|
||||
⚠ *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.
|
||||
|
||||
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. For more on Mintty and its config click [here](https://code.google.com/p/mintty/).
|
||||
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:
|
||||
|
||||
@ -81,86 +131,266 @@ 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
|
||||
echo source \$CMDER_ROOT/vendor/mintty-colors-solarized/mintty-solarized-dark.sh>>$CMDER_ROOT/config/user_profile.sh
|
||||
```
|
||||
|
||||
### Cmder Portable Shell User Config
|
||||
User specific configuration is possible using the cmder specific shell config files. Edit the below files to add your own configuration:
|
||||
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).
|
||||
|
||||
|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|
|
||||
### Changing Cmder Default `cmd.exe` Prompt Config File
|
||||
|
||||
Note: Bash and Mintty sessions will also source the '$HOME/.bashrc' file it it exists after it sources '$CMDER_ROOT/config/user-profile.sh'.
|
||||
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:
|
||||
|
||||
### Linux like 'profile.d' support for all supported shell types.
|
||||
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.
|
||||
- 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`
|
||||
|
||||
|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|
|
||||
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
|
||||
#### 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](http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/doskey.mspx?mfr=true) for additional details on complex aliases/macros for 'cmd.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\aliases` file
|
||||
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 permanent add it to either your `$CMDER_ROOT/config/user-profile.sh` or your `$HOME/.bashrc`.
|
||||
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.
|
||||
|
||||
If you add bash aliases to `$CMDER_ROOT/config/user-profile.sh` they will portable and follow your Cmder folder if you copy it to another machine. `$HOME/.bashrc` defined aliases are not portable.
|
||||
To make an alias and/or any other profile settings permanent add it to one of the following:
|
||||
|
||||
#### 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.
|
||||
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 SSH agent simply call `start-ssh-agent`, which is in the `vendor/git-for-windows/cmd` folder.
|
||||
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).
|
||||
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).
|
||||
|
||||
### Using external Cygwin/Babun, MSys2, or Git for Windows SDK with Cmder.
|
||||
### Vendored Git
|
||||
|
||||
1. Setup a new task by pressing '<kbd>Win</kbd> +<kbd>Alt</kbd> + <kbd>T</kbd>'
|
||||
1. Click the '+' button to add a task.
|
||||
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:d:%USERPROFILE%``` to the Commands text box.
|
||||
1. Add `cmd /c "[path_to_external_env]\bin\bash --login -i" -new_console` to the `Commands` text box.
|
||||
|
||||
Recommended Optional Steps:
|
||||
**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.
|
||||
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.
|
||||
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
|
||||
* bash - Copy to `/etc/profile.d/cmder_exinit.sh`
|
||||
* zsh - Copy to `/etc/profile.d/cmder_exinit.zsh`
|
||||
|
||||
Uncomment and edit the below line in the script to use Cmder config even when launched from outside Cmder.
|
||||
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.
|
||||
```
|
||||
|
||||
## Todo
|
||||
### Customizing user sessions using `init.bat` custom arguments.
|
||||
|
||||
1. Check for clink and git before injecting them (Sort of done)
|
||||
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.
|
||||
|
||||
## Current development branch
|
||||
`init.bat` creates two shortcuts for using `cexec.cmd` in your profile scripts.
|
||||
|
||||
You can download builds of the current development branch by going to Appveyor via the following link:
|
||||
#### `%ccall%` - Evaluates flags, runs commands if found, and returns to the calling script and continues.
|
||||
|
||||
[](https://ci.appveyor.com/project/MartiUK/cmder/branch/development/artifacts)
|
||||
```
|
||||
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
|
||||
|
||||
@ -168,7 +398,7 @@ All software included is bundled with own license
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Samuel Vasko
|
||||
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
|
||||
|
24
SECURITY.md
Normal file
@ -0,0 +1,24 @@
|
||||
# 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
Normal file
@ -0,0 +1,66 @@
|
||||
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
|
57
appveyor.yml
@ -1,57 +0,0 @@
|
||||
#---------------------------------#
|
||||
# general configuration #
|
||||
#---------------------------------#
|
||||
|
||||
version: 1.0.{build}-{branch}
|
||||
|
||||
# branches to build
|
||||
branches:
|
||||
# blacklist
|
||||
except:
|
||||
- gh-pages
|
||||
|
||||
#---------------------------------#
|
||||
# environment configuration #
|
||||
#---------------------------------#
|
||||
|
||||
# Operating system (build VM template)
|
||||
os: Windows Server 2012 R2
|
||||
|
||||
#---------------------------------#
|
||||
# build configuration #
|
||||
#---------------------------------#
|
||||
|
||||
build_script:
|
||||
- ps: cd scripts; .\build.ps1 -Compile -verbose
|
||||
|
||||
after_build:
|
||||
- ps: .\pack.ps1 -verbose
|
||||
|
||||
# Disable test search, since we don't have any.
|
||||
test: off
|
||||
|
||||
#---------------------------------#
|
||||
# artifacts #
|
||||
#---------------------------------#
|
||||
|
||||
artifacts:
|
||||
- path: build\cmder.zip
|
||||
name: cmderzip
|
||||
|
||||
- path: build\cmder.7z
|
||||
name: cmder7z
|
||||
|
||||
- path: build\cmder_mini.zip
|
||||
name: cmdermini
|
||||
|
||||
#---------------------------------#
|
||||
# notifications #
|
||||
#---------------------------------#
|
||||
|
||||
notifications:
|
||||
# Webhook
|
||||
- provider: Webhook
|
||||
url: https://webhooks.gitter.im/e/d673abb1b2e659dcd625
|
||||
on_build_success: true
|
||||
on_build_failure: true
|
||||
on_build_status_changed: true
|
@ -1,64 +0,0 @@
|
||||
@echo off
|
||||
|
||||
set ALIASES=%CMDER_ROOT%\config\aliases
|
||||
setlocal
|
||||
:: handle quotes within command definition, e.g. quoted long file names
|
||||
set _x="%*"
|
||||
set _x=%_x:"=%
|
||||
|
||||
:: check command usage
|
||||
if ["%_x%"] == [""] echo Use /? for help & echo. & goto :p_show
|
||||
if ["%1"] == ["/?"] goto:p_help
|
||||
if ["%1"] == ["/reload"] goto:p_reload
|
||||
:: /d flag for delete existing alias
|
||||
if ["%1"] == ["/d"] goto:p_del %*
|
||||
:: if arg is an existing alias, display it
|
||||
if ["%2"] == [""] (
|
||||
doskey /macros | findstr /b %1= && goto:eof
|
||||
echo Insufficient parameters. & goto:p_help
|
||||
)
|
||||
|
||||
:: validate alias
|
||||
for /f "delims== tokens=1" %%G in ("%_x%") do set alias=%%G
|
||||
set _temp=%alias: =%
|
||||
|
||||
if not ["%_temp%"] == ["%alias%"] (
|
||||
echo Your alias name can not contain a space
|
||||
endlocal
|
||||
goto:eof
|
||||
)
|
||||
|
||||
:: replace already defined alias
|
||||
findstr /b /v /i "%alias%=" "%ALIASES%" >> "%ALIASES%.tmp"
|
||||
echo %* >> "%ALIASES%.tmp" && type "%ALIASES%.tmp" > "%ALIASES%" & @del /f /q "%ALIASES%.tmp"
|
||||
doskey /macrofile="%ALIASES%"
|
||||
endlocal
|
||||
goto:eof
|
||||
|
||||
:p_del
|
||||
findstr /b /v /i "%2=" "%ALIASES%" >> "%ALIASES%.tmp"
|
||||
type "%ALIASES%".tmp > "%ALIASES%" & @del /f /q "%ALIASES%.tmp"
|
||||
doskey /macrofile=%ALIASES%
|
||||
goto:eof
|
||||
|
||||
:p_reload
|
||||
doskey /macrofile="%ALIASES%"
|
||||
echo Aliases reloaded
|
||||
goto:eof
|
||||
|
||||
:p_show
|
||||
type "%ALIASES%" || echo No aliases found at "%ALIASES%"
|
||||
goto :eof
|
||||
|
||||
:p_help
|
||||
echo.Usage:
|
||||
echo. alias [/reload] [/d] [name=full command]
|
||||
echo. /reload Reload the aliases file
|
||||
echo. /d Delete an alias (must be followed by the alias name)
|
||||
echo.
|
||||
echo. If alias is called with any parameters, it will display the list of existing aliases.
|
||||
echo. In the command, you can use the following notations:
|
||||
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/?
|
@ -3,12 +3,14 @@
|
||||
All config files must be in this folder. If there is no option to set this folder
|
||||
directly, it has to be hardlinked.
|
||||
|
||||
* `aliases`: aliases in cmd; called form vendor\init.bat; autocreated from
|
||||
`vendor\aliases.example`.
|
||||
* `*.lua`: clink completitions and prompt filters; called from vendor\cmder.lua after all
|
||||
other prompt filter and clink completitons are initialized; add your own.
|
||||
* `user_profile.{sh|bat|ps1}`: startup files for bash|cmd|powershell tasks; called from their
|
||||
respective startup scripts in `vendor\`; autocreated on first start of such a task
|
||||
* `.history`: the current commandline history; autoupdated on close
|
||||
* `settings`: settings for readline; overwritten on update
|
||||
* `ConEmu.xml`: settings from ConEmu (=the UI of cmder -> Preferences); overwritten on update
|
||||
* `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.
|
||||
|
3
config/profile.d/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
## Profile.d Folder
|
||||
|
||||
* Files in this folder named `*.{sh|cmd|ps1}`: Will be executed by the appropriate shell when starting the shell.
|
BIN
icons/cmder_blue.ico
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
icons/cmder_green.ico
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
icons/cmder_orange.ico
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
icons/cmder_purple.ico
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
icons/cmder_red.ico
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
icons/cmder_yellow.ico
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
icons/icon_16_blue.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
icons/icon_16_green.png
Normal file
After Width: | Height: | Size: 264 B |
BIN
icons/icon_16_orange.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
icons/icon_16_purple.png
Normal file
After Width: | Height: | Size: 271 B |
BIN
icons/icon_16_red.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
icons/icon_16_yellow.png
Normal file
After Width: | Height: | Size: 264 B |
BIN
icons/icon_256_blue.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
icons/icon_256_green.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
icons/icon_256_orange.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
icons/icon_256_purple.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
icons/icon_256_red.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
icons/icon_256_yellow.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
icons/icon_32_blue.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
icons/icon_32_green.png
Normal file
After Width: | Height: | Size: 369 B |
BIN
icons/icon_32_orange.png
Normal file
After Width: | Height: | Size: 364 B |
BIN
icons/icon_32_purple.png
Normal file
After Width: | Height: | Size: 392 B |
BIN
icons/icon_32_red.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
icons/icon_32_yellow.png
Normal file
After Width: | Height: | Size: 372 B |
BIN
icons/icon_48_blue.png
Normal file
After Width: | Height: | Size: 514 B |
BIN
icons/icon_48_green.png
Normal file
After Width: | Height: | Size: 498 B |
BIN
icons/icon_48_orange.png
Normal file
After Width: | Height: | Size: 499 B |
BIN
icons/icon_48_purple.png
Normal file
After Width: | Height: | Size: 521 B |
BIN
icons/icon_48_red.png
Normal file
After Width: | Height: | Size: 501 B |
BIN
icons/icon_48_yellow.png
Normal file
After Width: | Height: | Size: 493 B |
@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
@ -9,12 +9,18 @@ Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
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}.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
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
@ -9,25 +9,47 @@
|
||||
<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>v140_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140_xp</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">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@ -38,6 +60,12 @@
|
||||
<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'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
@ -47,6 +75,14 @@
|
||||
<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'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>Cmder</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
@ -59,7 +95,14 @@
|
||||
<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)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
@ -79,13 +122,63 @@
|
||||
<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>
|
||||
</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'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MinSpace</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>false</IntrinsicFunctions>
|
||||
<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>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<AdditionalManifestFiles>src/app.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
||||
</Manifest>
|
||||
<PostBuildEvent>
|
||||
<Command>copy $(TargetPath) $(SolutionDir)..\$(TargetFileName)</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="src\Resource.rc">
|
||||
<ResourceCompile Include="src\resource.rc">
|
||||
<FileType>RC</FileType>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
|
@ -3,9 +3,14 @@
|
||||
#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."
|
||||
@ -13,11 +18,11 @@
|
||||
|
||||
#define USE_TASKBAR_API (_WIN32_WINNT >= _WIN32_WINNT_WIN7)
|
||||
|
||||
#define XP (_WIN32_WINNT < _WIN32_WINNT_VISTA)
|
||||
|
||||
#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 streqi(a, b) (_wcsicmp((a), (b)) == 0)
|
||||
|
||||
@ -27,11 +32,44 @@
|
||||
|
||||
#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)
|
||||
NULL, ec, 0, (LPWSTR)&buffer, 0, NULL) == 0)
|
||||
{
|
||||
buffer = L"Unknown error. FormatMessage failed.";
|
||||
}
|
||||
@ -54,34 +92,6 @@ typedef struct _option
|
||||
|
||||
typedef std::pair<std::wstring, std::wstring> optpair;
|
||||
|
||||
|
||||
optpair GetOption()
|
||||
{
|
||||
wchar_t * cmd = GetCommandLine();
|
||||
int argc;
|
||||
wchar_t ** argv = CommandLineToArgvW(cmd, &argc);
|
||||
optpair pair;
|
||||
|
||||
if (argc == 1)
|
||||
{
|
||||
// no commandline argument...
|
||||
pair = optpair(L"/START", L"");
|
||||
}
|
||||
else if (argc == 2 && argv[1][0] != L'/')
|
||||
{
|
||||
// only a single argument: this should be a path...
|
||||
pair = optpair(L"/START", argv[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
pair = optpair(argv[1], argc > 2 ? argv[2] : L"");
|
||||
}
|
||||
|
||||
LocalFree(argv);
|
||||
|
||||
return pair;
|
||||
}
|
||||
|
||||
bool FileExists(const wchar_t * filePath)
|
||||
{
|
||||
HANDLE hFile = CreateFile(filePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
@ -95,7 +105,7 @@ bool FileExists(const wchar_t * filePath)
|
||||
return false;
|
||||
}
|
||||
|
||||
void StartCmder(std::wstring path, bool is_single_mode)
|
||||
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"")
|
||||
{
|
||||
#if USE_TASKBAR_API
|
||||
wchar_t appId[MAX_PATH] = { 0 };
|
||||
@ -103,9 +113,30 @@ void StartCmder(std::wstring path, bool is_single_mode)
|
||||
wchar_t exeDir[MAX_PATH] = { 0 };
|
||||
wchar_t icoPath[MAX_PATH] = { 0 };
|
||||
wchar_t cfgPath[MAX_PATH] = { 0 };
|
||||
wchar_t oldCfgPath[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));
|
||||
|
||||
@ -115,68 +146,332 @@ void StartCmder(std::wstring path, bool is_single_mode)
|
||||
|
||||
PathRemoveFileSpec(exeDir);
|
||||
|
||||
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
||||
|
||||
// Check for machine-specific config file.
|
||||
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu-%COMPUTERNAME%.xml");
|
||||
ExpandEnvironmentStrings(oldCfgPath, oldCfgPath, sizeof(oldCfgPath) / sizeof(oldCfgPath[0]));
|
||||
if (!PathFileExists(oldCfgPath)) {
|
||||
PathCombine(oldCfgPath, exeDir, L"config\\ConEmu.xml");
|
||||
}
|
||||
|
||||
// Check for machine-specific config file.
|
||||
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu-%COMPUTERNAME%.xml");
|
||||
ExpandEnvironmentStrings(cfgPath, cfgPath, sizeof(cfgPath) / sizeof(cfgPath[0]));
|
||||
if (!PathFileExists(cfgPath)) {
|
||||
PathCombine(cfgPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.xml");
|
||||
}
|
||||
|
||||
PathCombine(conEmuPath, exeDir, L"vendor\\conemu-maximus5\\ConEmu.exe");
|
||||
|
||||
if (FileExists(oldCfgPath) && !FileExists(cfgPath))
|
||||
if (PathFileExists(iconPath.c_str()))
|
||||
{
|
||||
if (!CopyFile(oldCfgPath, cfgPath, FALSE))
|
||||
std::copy(iconPath.begin(), iconPath.end(), icoPath);
|
||||
icoPath[iconPath.length()] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
PathCombine(icoPath, exeDir, L"icons\\cmder.ico");
|
||||
}
|
||||
|
||||
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 ConEmu.xml file to new location! Restart cmder as administrator."
|
||||
: L"Failed to copy ConEmu.xml file to new location!", MB_TITLE, MB_ICONSTOP);
|
||||
? 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"/single /Icon \"%s\" /Title Cmder", icoPath);
|
||||
swprintf_s(args, L"%s /single", args);
|
||||
}
|
||||
else
|
||||
|
||||
if (!streqi(cmderTitle.c_str(), L""))
|
||||
{
|
||||
swprintf_s(args, L"/Icon \"%s\" /Title Cmder", icoPath);
|
||||
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());
|
||||
}
|
||||
|
||||
SetEnvironmentVariable(L"CMDER_ROOT", exeDir);
|
||||
if (!streqi(path.c_str(), L""))
|
||||
if (wcscmp(userConfigDirPath, configDirPath) != 0)
|
||||
{
|
||||
if (!SetEnvironmentVariable(L"CMDER_START", path.c_str())) {
|
||||
MessageBox(NULL, _T("Error trying to set CMDER_START to given path!"), _T("Error"), MB_OK);
|
||||
}
|
||||
SetEnvironmentVariable(L"CMDER_USER_CONFIG", userConfigDirPath);
|
||||
SetEnvironmentVariable(L"CMDER_USER_BIN", userBinDirPath);
|
||||
}
|
||||
|
||||
// Ensure EnvironmentVariables are propagated.
|
||||
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM)"Environment", SMTO_ABORTIFHUNG, 5000, NULL);
|
||||
SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, (LPARAM) L"Environment", SMTO_ABORTIFHUNG, 5000, NULL); // For Windows >= 8
|
||||
|
||||
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);
|
||||
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
|
||||
}
|
||||
|
||||
bool IsUserOnly(std::wstring opt)
|
||||
@ -206,8 +501,7 @@ 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
|
||||
{
|
||||
@ -217,8 +511,10 @@ HKEY GetRootKey(std::wstring opt)
|
||||
return root;
|
||||
}
|
||||
|
||||
void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||
void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName, std::wstring cfgRoot, bool single)
|
||||
{
|
||||
wchar_t userConfigDirPath[MAX_PATH] = { 0 };
|
||||
|
||||
// First, get the paths we will use
|
||||
|
||||
wchar_t exePath[MAX_PATH] = { 0 };
|
||||
@ -227,7 +523,23 @@ void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||
GetModuleFileName(NULL, exePath, sizeof(exePath));
|
||||
|
||||
wchar_t commandStr[MAX_PATH + 20] = { 0 };
|
||||
swprintf_s(commandStr, L"\"%s\" \"%%V\"", exePath);
|
||||
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);
|
||||
@ -235,13 +547,10 @@ void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||
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, keyBaseName, 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));
|
||||
@ -249,9 +558,7 @@ void RegisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||
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));
|
||||
|
||||
FAIL_ON_ERROR(RegSetValue(command, L"", REG_SZ, commandStr, NULL));
|
||||
|
||||
@ -264,18 +571,183 @@ void UnregisterShellMenu(std::wstring opt, wchar_t* keyBaseName)
|
||||
{
|
||||
HKEY root = GetRootKey(opt);
|
||||
HKEY cmderKey;
|
||||
FAIL_ON_ERROR(
|
||||
RegCreateKeyEx(root, keyBaseName, 0, NULL,
|
||||
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||
#if XP
|
||||
FAIL_ON_ERROR(SHDeleteKey(cmderKey, NULL));
|
||||
#else
|
||||
FAIL_ON_ERROR(RegCreateKeyEx(root, keyBaseName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &cmderKey, NULL));
|
||||
FAIL_ON_ERROR(RegDeleteTree(cmderKey, NULL));
|
||||
#endif
|
||||
RegDeleteKeyEx(root, keyBaseName, KEY_ALL_ACCESS, NULL);
|
||||
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,
|
||||
@ -285,30 +757,29 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
UNREFERENCED_PARAMETER(nCmdShow);
|
||||
|
||||
optpair opt = GetOption();
|
||||
cmderOptions cmderOptions = GetOption();
|
||||
|
||||
if (streqi(opt.first.c_str(), L"/START"))
|
||||
if (cmderOptions.registerApp == true)
|
||||
{
|
||||
StartCmder(opt.second, false);
|
||||
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);
|
||||
}
|
||||
else if (streqi(opt.first.c_str(), L"/SINGLE"))
|
||||
else if (cmderOptions.unRegisterApp == true)
|
||||
{
|
||||
StartCmder(opt.second, true);
|
||||
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);
|
||||
}
|
||||
else if (streqi(opt.first.c_str(), L"/REGISTER"))
|
||||
else if (cmderOptions.error == true)
|
||||
{
|
||||
RegisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_BACKGROUND);
|
||||
RegisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_LISTITEM);
|
||||
}
|
||||
else if (streqi(opt.first.c_str(), L"/UNREGISTER"))
|
||||
{
|
||||
UnregisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_BACKGROUND);
|
||||
UnregisterShellMenu(opt.second, SHELL_MENU_REGISTRY_PATH_LISTITEM);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox(NULL, L"Unrecognized parameter.\n\nValid options:\n /START <path>\n /SINGLE <path>\n /REGISTER [USER/ALL]\n /UNREGISTER [USER/ALL]", MB_TITLE, MB_OK);
|
||||
return 1;
|
||||
StartCmder(cmderOptions.cmderStart, cmderOptions.cmderSingle, cmderOptions.cmderTask, cmderOptions.cmderTitle, cmderOptions.cmderIcon, cmderOptions.cmderCfgRoot, cmderOptions.cmderUserCfg, cmderOptions.cmderConEmuArgs);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
54
launcher/src/app.manifest
Normal file
@ -0,0 +1,54 @@
|
||||
<?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>
|
109
launcher/src/resource.rc
Normal file
@ -0,0 +1,109 @@
|
||||
/* _
|
||||
___ _ __ ___ __| | ___ _ __
|
||||
/ __| '_ ` _ \ / _` |/ _ \ '__|
|
||||
| (__| | | | | | (_| | __/ |
|
||||
\___|_| |_| |_|\__,_|\___|_|
|
||||
=============================================================================
|
||||
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
|
12
launcher/src/strings.rc2
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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]"
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
27
launcher/src/version.rc2.sample
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
/**
|
||||
* 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
|
||||
/////////////////////////////////////////////////////////////////////////////
|
5
opt/Readme.md
Normal file
@ -0,0 +1,5 @@
|
||||
## 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.
|
20
packignore
@ -2,20 +2,28 @@ launcher
|
||||
.gitignore
|
||||
.gitattributes
|
||||
.git
|
||||
*.rb
|
||||
.github
|
||||
.vs
|
||||
.vscode
|
||||
.idea
|
||||
*.md
|
||||
build
|
||||
scripts
|
||||
config\.history
|
||||
packignore
|
||||
icons\Thumbs.db
|
||||
Thumbs.db
|
||||
icons\cmder_icon.psd
|
||||
icons\icon_16.png
|
||||
icons\icon_32.png
|
||||
icons\icon_48.png
|
||||
icons\icon_256.png
|
||||
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
|
||||
|
@ -11,11 +11,15 @@
|
||||
.EXAMPLE
|
||||
.\build.ps1
|
||||
|
||||
Executes the default build for Cmder; Conemu, clink. This is equivalent to the "minimum" style package in the releases
|
||||
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
|
||||
|
||||
@ -29,102 +33,149 @@
|
||||
Samuel Vasko, Jack Bennett
|
||||
Part of the Cmder project.
|
||||
.LINK
|
||||
http://cmder.net/ - Project Home
|
||||
http://cmder.app/ - Project Home
|
||||
#>
|
||||
[CmdletBinding(SupportsShouldProcess=$true)]
|
||||
[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 = "..\vendor\sources.json",
|
||||
[string]$sourcesPath = "$PSScriptRoot\..\vendor\sources.json",
|
||||
|
||||
# Vendor folder location
|
||||
[string]$saveTo = "..\vendor\",
|
||||
[string]$saveTo = "$PSScriptRoot\..\vendor\",
|
||||
|
||||
# Launcher folder location
|
||||
[string]$launcher = "..\launcher",
|
||||
[string]$launcher = "$PSScriptRoot\..\launcher",
|
||||
|
||||
# Config folder location
|
||||
[string]$config = "..\config",
|
||||
[string]$config = "$PSScriptRoot\..\config",
|
||||
|
||||
# New launcher if you have MSBuild tools installed
|
||||
# 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
|
||||
. ".\utils.ps1"
|
||||
. "$PSScriptRoot\utils.ps1"
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
Push-Location -Path $saveTo
|
||||
$sources = Get-Content $sourcesPath | Out-String | Convertfrom-Json
|
||||
if ($Compile) {
|
||||
# Check for requirements
|
||||
Ensure-Executable "msbuild"
|
||||
|
||||
# Check for requirements
|
||||
Ensure-Exists $sourcesPath
|
||||
Ensure-Executable "7z"
|
||||
New-Item -Type Directory -Path (Join-Path $saveTo "/tmp/") -ErrorAction SilentlyContinue >$null
|
||||
# Get the version string
|
||||
$version = Get-VersionStr
|
||||
|
||||
# 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 = "" }
|
||||
|
||||
$vend = $pwd
|
||||
foreach ($s in $sources) {
|
||||
Write-Verbose "Getting $($s.name) from URL $($s.url)"
|
||||
|
||||
# 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 user configuration
|
||||
if ($ConEmuXml -ne "") {
|
||||
Write-Verbose "Restore '$ConEmuXmlSave' to '$ConEmuXml'"
|
||||
Copy-Item $ConEmuXmlSave $ConEmuXml
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
|
||||
if($Compile) {
|
||||
Push-Location -Path $launcher
|
||||
msbuild CmderLauncher.vcxproj /p:configuration=Release
|
||||
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 executable."
|
||||
throw "MSBuild failed to build the launcher executable."
|
||||
}
|
||||
Pop-Location
|
||||
} else {
|
||||
Write-Warning "You are not building a launcher, Use -Compile"
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
# 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")
|
||||
Write-Verbose "Successfully built Cmder v$version!"
|
||||
|
||||
if ( $Env:APPVEYOR -eq 'True' ) {
|
||||
Add-AppveyorMessage -Message "Building Cmder v$version was successful." -Category Information
|
||||
}
|
||||
|
||||
# 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")
|
||||
if ( $Env:GITHUB_ACTIONS -eq 'true' ) {
|
||||
Write-Output "::notice title=Build Complete::Building Cmder v$version was successful."
|
||||
}
|
||||
|
||||
Write-Verbose "All good and done!"
|
||||
Write-Host -ForegroundColor green "All good and done!"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<#
|
||||
.Synopsis
|
||||
Pack cmder
|
||||
Pack Cmder
|
||||
.DESCRIPTION
|
||||
Use this script to pack cmder into release archives
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
Creates default archives for cmder
|
||||
.EXAMPLE
|
||||
.\build -verbose
|
||||
.\pack.ps1 -verbose
|
||||
|
||||
Creates default archives for cmder with plenty of information
|
||||
.NOTES
|
||||
@ -22,37 +22,55 @@
|
||||
https://github.com/cmderdev/cmder - Project Home
|
||||
#>
|
||||
|
||||
[CmdletBinding(SupportsShouldProcess=$true)]
|
||||
[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 = "..",
|
||||
[string]$cmderRoot = "$PSScriptRoot\..",
|
||||
|
||||
# Vendor folder locaton
|
||||
[string]$saveTo = "..\build"
|
||||
[string]$saveTo = "$PSScriptRoot\..\build"
|
||||
)
|
||||
|
||||
$cmderRoot = Resolve-Path $cmderRoot
|
||||
|
||||
. "$PSScriptRoot\utils.ps1"
|
||||
$ErrorActionPreference = "Stop"
|
||||
Ensure-Executable "7z"
|
||||
|
||||
$targets = @{
|
||||
"cmder.zip" = $null;
|
||||
"cmder.7z" = $null;
|
||||
"cmder_mini.zip" = "-x!`"vendor\git-for-windows`"";
|
||||
"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`"";
|
||||
}
|
||||
|
||||
Delete-Existing "..\Version*"
|
||||
Delete-Existing "..\build\*"
|
||||
Push-Location -Path $cmderRoot
|
||||
|
||||
$version = Invoke-Expression "git describe --abbrev=0 --tags"
|
||||
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-MD5 "$saveTo\$($t.Name)")
|
||||
Add-Content "$saveTo\hashes.txt" $hash
|
||||
}
|
||||
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
|
||||
|
8
scripts/packer/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# 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!
|
228
scripts/packer/answer_files/10_efi/Autounattend.xml
Normal file
@ -0,0 +1,228 @@
|
||||
<?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>
|
298
scripts/packer/answer_files/11/Autounattend.xml
Normal file
@ -0,0 +1,298 @@
|
||||
<?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>
|
3
scripts/packer/build_windows_10.bat
Normal file
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
|
||||
packer build --force --only=%~1-iso windows_10.json
|
3
scripts/packer/build_windows_10.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
packer build --force --only=$1-iso windows_10.json
|
4
scripts/packer/build_windows_11.bat
Normal file
@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
|
||||
packer build --only=%1-iso windows_11.json
|
||||
|
4
scripts/packer/build_windows_11.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
packer build --only=$1-iso windows_11.json
|
||||
|
BIN
scripts/packer/floppy/PinTo10.exe
Normal file
38
scripts/packer/floppy/ReadMe.txt
Normal file
@ -0,0 +1,38 @@
|
||||
: 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'
|
BIN
scripts/packer/floppy/WindowsPowershell.lnk
Executable file
26
scripts/packer/iso/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
### 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
scripts/packer/scripts/chocolatey.bat
Normal file
@ -0,0 +1 @@
|
||||
powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
|
26
scripts/packer/scripts/chocopacks.ps1
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
||||
}
|
||||
|
39
scripts/packer/scripts/compact.bat
Normal file
@ -0,0 +1,39 @@
|
||||
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:
|
||||
)
|
17
scripts/packer/scripts/compile-dotnet-assemblies.bat
Normal file
@ -0,0 +1,17 @@
|
||||
::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
|
33
scripts/packer/scripts/debloat-windows.ps1
Normal file
@ -0,0 +1,33 @@
|
||||
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
|
||||
}
|
20
scripts/packer/scripts/dis-updates.bat
Normal file
@ -0,0 +1,20 @@
|
||||
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%
|
||||
)
|
4
scripts/packer/scripts/disable-screensaver.ps1
Normal file
@ -0,0 +1,4 @@
|
||||
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
|
8
scripts/packer/scripts/disable-winrm.ps1
Normal file
@ -0,0 +1,8 @@
|
||||
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
|
@ -0,0 +1,4 @@
|
||||
$DefenderInstalled = Get-Command -Module Defender
|
||||
if($null -ne $DefenderInstalled) {
|
||||
Set-MpPreference -DisableRealtimeMonitoring $true
|
||||
}
|
2
scripts/packer/scripts/enable-rdp.bat
Normal file
@ -0,0 +1,2 @@
|
||||
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
|
27
scripts/packer/scripts/enable-winrm.ps1
Normal file
@ -0,0 +1,27 @@
|
||||
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..."
|
30
scripts/packer/scripts/fixnetwork.ps1
Normal file
@ -0,0 +1,30 @@
|
||||
# You cannot enable Windows PowerShell Remoting on network connections that are set to Public
|
||||
# Spin through all the network locations and if they are set to Public, set them to Private
|
||||
# using the INetwork interface:
|
||||
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa370750(v=vs.85).aspx
|
||||
# For more info, see:
|
||||
# http://blogs.msdn.com/b/powershell/archive/2009/04/03/setting-network-location-to-private.aspx
|
||||
|
||||
function Set-NetworkTypeToPrivate {
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPositionalParameters', '')]
|
||||
param()
|
||||
# Network location feature was only introduced in Windows Vista - no need to bother with this
|
||||
# if the operating system is older than Vista
|
||||
if ([environment]::OSVersion.version.Major -lt 6) { return }
|
||||
|
||||
# You cannot change the network location if you are joined to a domain, so abort
|
||||
if (1, 3, 4, 5 -contains (Get-CimInstance win32_computersystem).DomainRole) { return }
|
||||
|
||||
# Get network connections
|
||||
$networkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"))
|
||||
$connections = $networkListManager.GetNetworkConnections()
|
||||
|
||||
$connections | ForEach-Object {
|
||||
Write-Output $_.GetNetwork().GetName() "category was previously set to" $_.GetNetwork().GetCategory()
|
||||
#$_.GetNetwork().SetCategory(1)
|
||||
Write-Output $_.GetNetwork().GetName() "changed to category" $_.GetNetwork().GetCategory()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Set-NetworkTypeToPrivate
|
12
scripts/packer/scripts/microsoft-updates.bat
Normal file
@ -0,0 +1,12 @@
|
||||
net stop wuauserv
|
||||
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v EnableFeaturedSoftware /t REG_DWORD /d 1 /f
|
||||
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager") > "%temp%\temp.vbs"
|
||||
echo Set NewUpdateService = ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"") >> "%temp%\temp.vbs"
|
||||
|
||||
cscript "%temp%\temp.vbs"
|
||||
|
||||
net start wuauserv
|
12
scripts/packer/scripts/microsoft-updates.ps1
Normal file
@ -0,0 +1,12 @@
|
||||
Stop-Service -Name 'wuauserv'
|
||||
|
||||
Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update' -Name 'EnableFeaturedSoftware' -Value 1 -Type DWord
|
||||
Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update' -Name 'IncludeRecommendedUpdates' -Value 1 -Type DWord
|
||||
|
||||
"Set ServiceManager = CreateObject(""Microsoft.Update.ServiceManager"")" | Out-File -FilePath 'C:\temp.vbs'
|
||||
"Set NewUpdateService = ServiceManager.AddService2(""7971f918-a847-4430-9279-4a52d1efe18d"",7,"""")" | Out-File -FilePath 'C:\temp.vbs' -Append
|
||||
|
||||
cscript C:\temp.vbs
|
||||
Remove-Item -Path 'C:\temp.vbs' -Force
|
||||
|
||||
Start-Service -Name 'wuauserv'
|
16
scripts/packer/scripts/pin-powershell.bat
Normal file
@ -0,0 +1,16 @@
|
||||
rem https://connect.microsoft.com/PowerShell/feedback/details/1609288/pin-to-taskbar-no-longer-working-in-windows-10
|
||||
|
||||
set ps_link=A:\WindowsPowerShell.lnk
|
||||
if exist e:\WindowsPowerShell.lnk (
|
||||
set ps_link=e:\WindowsPowerShell.lnk
|
||||
)
|
||||
|
||||
set pin_to_10=A:\PinTo10.exe
|
||||
if exist e:\PinTo10.exe (
|
||||
set pin_to_10=e:\PinTo10.exe
|
||||
)
|
||||
|
||||
|
||||
copy "%ps_link%" "%TEMP%\Windows PowerShell.lnk"
|
||||
%pin_to_10% /PTFOL01:'%TEMP%' /PTFILE01:'Windows PowerShell.lnk'
|
||||
exit /b 0
|
19
scripts/packer/scripts/set-powerplan.ps1
Normal file
@ -0,0 +1,19 @@
|
||||
Try {
|
||||
Write-Output "Set power plan to high performance"
|
||||
|
||||
$HighPerf = powercfg -l | ForEach-Object { if ($_.contains("High performance")) { $_.split()[3] } }
|
||||
|
||||
# $HighPerf cannot be $null, we try activate this power profile with powercfg
|
||||
if ($null -eq $HighPerf) {
|
||||
throw "Error: HighPerf is null"
|
||||
}
|
||||
|
||||
$CurrPlan = $(powercfg -getactivescheme).split()[3]
|
||||
|
||||
if ($CurrPlan -ne $HighPerf) { powercfg -setactive $HighPerf }
|
||||
|
||||
}
|
||||
Catch {
|
||||
Write-Warning -Message "Unable to set power plan to high performance"
|
||||
Write-Warning $Error[0]
|
||||
}
|
21
scripts/packer/scripts/set-shortcut.ps1
Normal file
@ -0,0 +1,21 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter()]
|
||||
[string]$SourceExe,
|
||||
[string]$Arguments,
|
||||
[string]$DestinationPath,
|
||||
[string]$WorkingDirectory,
|
||||
[String]$IconLocation
|
||||
)
|
||||
|
||||
if ($IconLocation -eq '') {
|
||||
$IconLocation = $SourceExe
|
||||
}
|
||||
|
||||
$WshShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WshShell.CreateShortcut($destinationPath)
|
||||
$Shortcut.TargetPath = $SourceExe
|
||||
$Shortcut.Arguments = $Arguments
|
||||
$shortcut.WorkingDirectory = $WorkingDirectory
|
||||
$shortcut.IconLocation = $IconLocation
|
||||
$Shortcut.Save()
|
2
scripts/packer/scripts/set-winrm-automatic.bat
Normal file
@ -0,0 +1,2 @@
|
||||
echo Set WinRM start type to auto
|
||||
sc config winrm start= auto
|
1
scripts/packer/scripts/uac-enable.bat
Normal file
@ -0,0 +1 @@
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /f /v EnableLUA /t REG_DWORD /d 1
|
96
scripts/packer/scripts/vm-guest-tools.ps1
Normal file
@ -0,0 +1,96 @@
|
||||
if (!( Test-Path "C:\Windows\Temp\7z1900-x64.msi")) {
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')
|
||||
}
|
||||
if (!(Test-Path "C:\Windows\Temp\7z1900-x64.msi")) {
|
||||
Start-Sleep 5; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')
|
||||
}
|
||||
cmd /c msiexec /qb /i C:\Windows\Temp\7z1900-x64.msi
|
||||
|
||||
if ("$env:PACKER_BUILDER_TYPE" -eq "vmware-iso") {
|
||||
|
||||
Write-Output "Using VMware"
|
||||
if (Test-Path "C:\Users\vagrant\windows.iso") {
|
||||
Move-Item -force C:\Users\vagrant\windows.iso C:\Windows\Temp
|
||||
}
|
||||
|
||||
if (!(Test-Path "C:\Windows\Temp\windows.iso")) {
|
||||
Try {
|
||||
# Disabling the progress bar speeds up IWR https://github.com/PowerShell/PowerShell/issues/2138
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
$pageContentLinks = (Invoke-WebRequest('https://softwareupdate.vmware.com/cds/vmw-desktop/ws') -UseBasicParsing).Links | where-object { $_.href -Match "[0-9]" } | Select-Object href | ForEach-Object { $_.href.Trim('/') }
|
||||
$versionObject = $pageContentLinks | ForEach-Object { new-object System.Version ($_) } | sort-object -Descending | select-object -First 1 -Property:Major, Minor, Build
|
||||
$newestVersion = $versionObject.Major.ToString() + "." + $versionObject.Minor.ToString() + "." + $versionObject.Build.ToString() | out-string
|
||||
$newestVersion = $newestVersion.TrimEnd("`r?`n")
|
||||
|
||||
$nextURISubdirectoryObject = (Invoke-WebRequest("https://softwareupdate.vmware.com/cds/vmw-desktop/ws/$newestVersion/") -UseBasicParsing).Links | where-object { $_.href -Match "[0-9]" } | Select-Object href | where-object { $_.href -Match "[0-9]" }
|
||||
$nextUriSubdirectory = $nextURISubdirectoryObject.href | Out-String
|
||||
$nextUriSubdirectory = $nextUriSubdirectory.TrimEnd("`r?`n")
|
||||
$newestVMwareToolsURL = "https://softwareupdate.vmware.com/cds/vmw-desktop/ws/$newestVersion/$nextURISubdirectory/windows/packages/tools-windows.tar"
|
||||
Write-Output "The latest version of VMware tools has been determined to be downloadable from $newestVMwareToolsURL"
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile("$newestVMwareToolsURL", 'C:\Windows\Temp\vmware-tools.tar')
|
||||
}
|
||||
Catch {
|
||||
Write-Output "Unable to determine the latest version of VMware tools. Falling back to hardcoded URL."
|
||||
(New-Object System.Net.WebClient).DownloadFile('https://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.5.5/16285975/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')
|
||||
}
|
||||
cmd /c "C:\PROGRA~1\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp
|
||||
Move-Item c:\windows\temp\VMware-tools-windows-*.iso c:\windows\temp\windows.iso
|
||||
Try { Remove-Item "C:\Program Files (x86)\VMWare" -Recurse -Force -ErrorAction Stop } Catch { Write-Output "Directory didn't exist to be removed." }
|
||||
}
|
||||
|
||||
cmd /c "C:\PROGRA~1\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare
|
||||
cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"
|
||||
|
||||
Remove-Item -Force "C:\Windows\Temp\vmware-tools.tar"
|
||||
Remove-Item -Force "C:\Windows\Temp\windows.iso"
|
||||
Remove-Item -Force -Recurse "C:\Windows\Temp\VMware"
|
||||
}
|
||||
|
||||
if ("$env:PACKER_BUILDER_TYPE" -eq "virtualbox-iso") {
|
||||
Write-Output "Using Virtualbox"
|
||||
if (Test-Path "C:\Users\vagrant\VBoxGuestAdditions.iso") {
|
||||
Move-Item -Force C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
|
||||
}
|
||||
|
||||
if (!(Test-Path "C:\Windows\Temp\VBoxGuestAdditions.iso")) {
|
||||
Try {
|
||||
$pageContentLinks = (Invoke-WebRequest('https://download.virtualbox.org/virtualbox') -UseBasicParsing).Links | where-object { $_.href -Match "[0-9]" } | Select-Object href | where-object { $_.href -NotMatch "BETA" } | where-object { $_.href -NotMatch "RC" } | where-object { $_.href -Match "[0-9]\.[0-9]" } | ForEach-Object { $_.href.Trim('/') }
|
||||
$versionObject = $pageContentLinks | ForEach-Object { new-object System.Version ($_) } | sort-object -Descending | select-object -First 1 -Property:Major, Minor, Build
|
||||
$newestVersion = $versionObject.Major.ToString() + "." + $versionObject.Minor.ToString() + "." + $versionObject.Build.ToString() | out-string
|
||||
$newestVersion = $newestVersion.TrimEnd("`r?`n")
|
||||
|
||||
$nextURISubdirectoryObject = (Invoke-WebRequest("https://download.virtualbox.org/virtualbox/$newestVersion/") -UseBasicParsing).Links | Select-Object href | where-object { $_.href -Match "GuestAdditions" }
|
||||
$nextUriSubdirectory = $nextURISubdirectoryObject.href | Out-String
|
||||
$nextUriSubdirectory = $nextUriSubdirectory.TrimEnd("`r?`n")
|
||||
$newestVboxToolsURL = "https://download.virtualbox.org/virtualbox/$newestVersion/$nextUriSubdirectory"
|
||||
Write-Output "The latest version of VirtualBox tools has been determined to be downloadable from $newestVboxToolsURL"
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile("$newestVboxToolsURL", 'C:\Windows\Temp\VBoxGuestAdditions.iso')
|
||||
}
|
||||
Catch {
|
||||
Write-Output "Unable to determine the latest version of VBox tools. Falling back to hardcoded URL."
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://download.virtualbox.org/virtualbox/6.1.8/VBoxGuestAdditions_6.1.8.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')
|
||||
}
|
||||
}
|
||||
|
||||
cmd /c ""C:\PROGRA~1\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
|
||||
Get-ChildItem "C:\Windows\Temp\virtualbox\cert\" -Filter vbox*.cer | Foreach-Object { C:\Windows\Temp\virtualbox\cert\VBoxCertUtil add-trusted-publisher $_.FullName --root $_.FullName }
|
||||
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
|
||||
cmd /c rd /S /Q "C:\Windows\Temp\virtualbox"
|
||||
}
|
||||
|
||||
if ("$env:PACKER_BUILDER_TYPE" -eq "parallels-iso") {
|
||||
Write-Output "Using Parallels Desktop"
|
||||
# This is required when using Parallels Desktop
|
||||
# Currently the installation of Parallels Tools is broken if you're installing in Windows Server & Windows Server Core
|
||||
# You will encounter an error in printui.dll module not found message.
|
||||
# This feature will add the required libraries for printing services.
|
||||
|
||||
# Parallels Tools is required for sync_folder to work.
|
||||
# Vagrantfile config: v.update_guest_tools = true will be installed with no issues
|
||||
if ($(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName.StartsWith("Windows Server")) {
|
||||
Write-Output "Installing Print Server service"
|
||||
Install-WindowsFeature -Name Print-Server
|
||||
}
|
||||
}
|
||||
|
||||
cmd /c msiexec /qb /x C:\Windows\Temp\7z1900-x64.msi
|
260
scripts/packer/scripts/win-updates.ps1
Normal file
@ -0,0 +1,260 @@
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '')]
|
||||
param($global:RestartRequired = 0,
|
||||
$global:MoreUpdates = 0,
|
||||
$global:MaxCycles = 5,
|
||||
$MaxUpdatesPerCycle = 500,
|
||||
$BeginWithRestart = 0)
|
||||
|
||||
$Logfile = "C:\Windows\Temp\win-updates.log"
|
||||
|
||||
$enable_winrm_script = 'a:\enable-winrm.ps1'
|
||||
if (test-path 'e:\enable-winrm.ps1') {
|
||||
$enable_winrm_script = 'e:\enable-winrm.ps1'
|
||||
}
|
||||
|
||||
function LogWrite {
|
||||
Param ([string]$logstring)
|
||||
$now = Get-Date -format s
|
||||
Add-Content $Logfile -value "$now $logstring"
|
||||
Write-Output $logstring
|
||||
}
|
||||
|
||||
function Check-ContinueRestartOrEnd() {
|
||||
$RegistryKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
|
||||
$RegistryEntry = "InstallWindowsUpdates"
|
||||
switch ($global:RestartRequired) {
|
||||
0 {
|
||||
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry
|
||||
if ($prop) {
|
||||
LogWrite "Restart Registry Entry Exists - Removing It"
|
||||
Remove-ItemProperty -Path $RegistryKey -Name $RegistryEntry -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
LogWrite "No Restart Required"
|
||||
Check-WindowsUpdates
|
||||
|
||||
if (($global:MoreUpdates -eq 1) -and ($script:Cycles -le $global:MaxCycles)) {
|
||||
Install-WindowsUpdates
|
||||
}
|
||||
elseif ($script:Cycles -gt $global:MaxCycles) {
|
||||
LogWrite "Exceeded Cycle Count - Stopping"
|
||||
LogWrite "==> Running '$enable_winrm_script'..."
|
||||
& $enable_winrm_script
|
||||
}
|
||||
else {
|
||||
LogWrite "Done Installing Windows Updates"
|
||||
LogWrite "==> Running '$enable_winrm_script'..."
|
||||
& $enable_winrm_script
|
||||
}
|
||||
}
|
||||
1 {
|
||||
$prop = (Get-ItemProperty $RegistryKey).$RegistryEntry
|
||||
if (-not $prop) {
|
||||
LogWrite "Restart Registry Entry Does Not Exist - Creating It"
|
||||
Set-ItemProperty -Path $RegistryKey -Name $RegistryEntry -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File $($script:ScriptPath) -MaxUpdatesPerCycle $($MaxUpdatesPerCycle)"
|
||||
}
|
||||
else {
|
||||
LogWrite "Restart Registry Entry Exists Already"
|
||||
}
|
||||
|
||||
LogWrite "Restart Required - Restarting..."
|
||||
Restart-Computer
|
||||
}
|
||||
default {
|
||||
LogWrite "Unsure If A Restart Is Required"
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Install-WindowsUpdates()
|
||||
{
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '')]
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns', '')]
|
||||
param()
|
||||
$script:Cycles++
|
||||
LogWrite "Evaluating Available Updates with limit of $($MaxUpdatesPerCycle):"
|
||||
$UpdatesToDownload = New-Object -ComObject 'Microsoft.Update.UpdateColl'
|
||||
$script:i = 0;
|
||||
$CurrentUpdates = $SearchResult.Updates
|
||||
while ($script:i -lt $CurrentUpdates.Count -and $script:CycleUpdateCount -lt $MaxUpdatesPerCycle) {
|
||||
$Update = $CurrentUpdates.Item($script:i)
|
||||
if ($null -ne $Update) {
|
||||
[bool]$addThisUpdate = $false
|
||||
if ($Update.InstallationBehavior.CanRequestUserInput) {
|
||||
LogWrite "> Skipping: $($Update.Title) because it requires user input"
|
||||
}
|
||||
else {
|
||||
if (!($Update.EulaAccepted)) {
|
||||
LogWrite "> Note: $($Update.Title) has a license agreement that must be accepted. Accepting the license."
|
||||
$Update.AcceptEula()
|
||||
[bool]$addThisUpdate = $true
|
||||
$script:CycleUpdateCount++
|
||||
}
|
||||
else {
|
||||
[bool]$addThisUpdate = $true
|
||||
$script:CycleUpdateCount++
|
||||
}
|
||||
}
|
||||
|
||||
if ([bool]$addThisUpdate) {
|
||||
LogWrite "Adding: $($Update.Title)"
|
||||
$UpdatesToDownload.Add($Update) | Out-Null
|
||||
}
|
||||
}
|
||||
$script:i++
|
||||
}
|
||||
|
||||
if ($UpdatesToDownload.Count -eq 0) {
|
||||
LogWrite "No Updates To Download..."
|
||||
}
|
||||
else {
|
||||
LogWrite 'Downloading Updates...'
|
||||
$ok = 0;
|
||||
while (! $ok) {
|
||||
try {
|
||||
$Downloader = $UpdateSession.CreateUpdateDownloader()
|
||||
$Downloader.Updates = $UpdatesToDownload
|
||||
$Downloader.Download()
|
||||
$ok = 1;
|
||||
}
|
||||
catch {
|
||||
LogWrite $_.Exception | Format-List -force
|
||||
LogWrite "Error downloading updates. Retrying in 30s."
|
||||
$script:attempts = $script:attempts + 1
|
||||
Start-Sleep -s 30
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$UpdatesToInstall = New-Object -ComObject 'Microsoft.Update.UpdateColl'
|
||||
[bool]$rebootMayBeRequired = $false
|
||||
LogWrite 'The following updates are downloaded and ready to be installed:'
|
||||
foreach ($Update in $SearchResult.Updates) {
|
||||
if (($Update.IsDownloaded)) {
|
||||
LogWrite "> $($Update.Title)"
|
||||
$UpdatesToInstall.Add($Update) | Out-Null
|
||||
|
||||
if ($Update.InstallationBehavior.RebootBehavior -gt 0) {
|
||||
[bool]$rebootMayBeRequired = $true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($UpdatesToInstall.Count -eq 0) {
|
||||
LogWrite 'No updates available to install...'
|
||||
$global:MoreUpdates = 0
|
||||
$global:RestartRequired = 0
|
||||
LogWrite "==> Running '$enable_winrm_script'..."
|
||||
& $enable_winrm_script
|
||||
break
|
||||
}
|
||||
|
||||
if ($rebootMayBeRequired) {
|
||||
LogWrite 'These updates may require a reboot'
|
||||
$global:RestartRequired = 1
|
||||
}
|
||||
|
||||
LogWrite 'Installing updates...'
|
||||
|
||||
$Installer = $script:UpdateSession.CreateUpdateInstaller()
|
||||
$Installer.Updates = $UpdatesToInstall
|
||||
$InstallationResult = $Installer.Install()
|
||||
|
||||
LogWrite "Installation Result: $($InstallationResult.ResultCode)"
|
||||
LogWrite "Reboot Required: $($InstallationResult.RebootRequired)"
|
||||
LogWrite 'Listing of updates installed and individual installation results:'
|
||||
if ($InstallationResult.RebootRequired) {
|
||||
$global:RestartRequired = 1
|
||||
}
|
||||
else {
|
||||
$global:RestartRequired = 0
|
||||
}
|
||||
|
||||
for ($i = 0; $i -lt $UpdatesToInstall.Count; $i++) {
|
||||
New-Object -TypeName PSObject -Property @{
|
||||
Title = $UpdatesToInstall.Item($i).Title
|
||||
Result = $InstallationResult.GetUpdateResult($i).ResultCode
|
||||
}
|
||||
LogWrite "Item: $($UpdatesToInstall.Item($i).Title)"
|
||||
LogWrite "Result: $($InstallationResult.GetUpdateResult($i).ResultCode)"
|
||||
}
|
||||
|
||||
Check-ContinueRestartOrEnd
|
||||
}
|
||||
|
||||
function Check-WindowsUpdates() {
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '')]
|
||||
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns', '')]
|
||||
param()
|
||||
LogWrite "Checking For Windows Updates"
|
||||
$Username = $env:USERDOMAIN + "\" + $env:USERNAME
|
||||
LogWrite "Script: $script:ScriptPath `nScript User: $Username `nStarted: $(Get-Date)"
|
||||
|
||||
$script:UpdateSearcher = $script:UpdateSession.CreateUpdateSearcher()
|
||||
$script:successful = $FALSE
|
||||
$script:attempts = 0
|
||||
$script:maxAttempts = 12
|
||||
while (-not $script:successful -and $script:attempts -lt $script:maxAttempts) {
|
||||
try {
|
||||
$script:SearchResult = $script:UpdateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")
|
||||
$script:successful = $TRUE
|
||||
}
|
||||
catch {
|
||||
LogWrite $_.Exception | Format-List -force
|
||||
LogWrite "Search call to UpdateSearcher was unsuccessful. Retrying in 10s."
|
||||
$script:attempts = $script:attempts + 1
|
||||
Start-Sleep -s 10
|
||||
}
|
||||
}
|
||||
|
||||
if ($SearchResult.Updates.Count -ne 0) {
|
||||
$Message = "There are " + $SearchResult.Updates.Count + " more updates."
|
||||
LogWrite $Message
|
||||
try {
|
||||
for ($i = 0; $i -lt $script:SearchResult.Updates.Count; $i++) {
|
||||
LogWrite $script:SearchResult.Updates.Item($i).Title
|
||||
LogWrite $script:SearchResult.Updates.Item($i).Description
|
||||
LogWrite $script:SearchResult.Updates.Item($i).RebootRequired
|
||||
LogWrite $script:SearchResult.Updates.Item($i).EulaAccepted
|
||||
}
|
||||
$global:MoreUpdates = 1
|
||||
}
|
||||
catch {
|
||||
LogWrite $_.Exception | Format-List -force
|
||||
LogWrite "Showing SearchResult was unsuccessful. Rebooting."
|
||||
$global:RestartRequired = 1
|
||||
$global:MoreUpdates = 0
|
||||
Check-ContinueRestartOrEnd
|
||||
LogWrite "Show never happen to see this text!"
|
||||
Restart-Computer
|
||||
}
|
||||
}
|
||||
else {
|
||||
LogWrite 'There are no applicable updates'
|
||||
$global:RestartRequired = 0
|
||||
$global:MoreUpdates = 0
|
||||
}
|
||||
}
|
||||
|
||||
$script:ScriptName = $MyInvocation.MyCommand.ToString()
|
||||
$script:ScriptPath = $MyInvocation.MyCommand.Path
|
||||
$script:UpdateSession = New-Object -ComObject 'Microsoft.Update.Session'
|
||||
$script:UpdateSession.ClientApplicationID = 'Packer Windows Update Installer'
|
||||
$script:UpdateSearcher = $script:UpdateSession.CreateUpdateSearcher()
|
||||
$script:SearchResult = New-Object -ComObject 'Microsoft.Update.UpdateColl'
|
||||
$script:Cycles = 0
|
||||
$script:CycleUpdateCount = 0
|
||||
|
||||
if ($BeginWithRestart) {
|
||||
$global:RestartRequired = 1
|
||||
Check-ContinueRestartOrEnd
|
||||
}
|
||||
|
||||
Check-WindowsUpdates
|
||||
if ($global:MoreUpdates -eq 1) {
|
||||
Install-WindowsUpdates
|
||||
}
|
||||
else {
|
||||
Check-ContinueRestartOrEnd
|
||||
}
|