Compare commits

..

2 Commits

Author SHA1 Message Date
David Macek
541efef81b Add option to specify command to run in the .ini file 2015-11-17 22:15:24 +01:00
David Macek
f91905f6bb WIP: new icons 2015-11-15 17:48:27 +01:00
22 changed files with 78 additions and 349 deletions

View File

@ -1,4 +0,0 @@
root = true
[*.{c,h,rc}]
indent_style = tab

2
.gitattributes vendored
View File

@ -1,2 +0,0 @@
# Declare files that always have LF line endings on checkout
PKGBUILD text eol=lf

16
.gitignore vendored
View File

@ -1,7 +1,13 @@
/*.exe
/*.res
/*.ini
/*.pkg.tar.xz
/*.pkg.tar.xz.sig
/mingw32.exe
/mingw32.res
/mingw32.ini
/mingw64.exe
/mingw64.res
/mingw64.ini
/msys2.exe
/msys2.res
/msys2.ini
/pkg/
/src/
/*.pkg.tar.xz
/*.pkg.tar.xz.sig

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 David Macek
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,6 +1,6 @@
PREFIX=
all: msys2.exe msys2.ini mingw32.exe mingw32.ini mingw64.exe mingw64.ini ucrt64.exe ucrt64.ini clang64.exe clang64.ini clangarm64.exe clangarm64.ini
all: msys2.exe msys2.ini mingw32.exe mingw32.ini mingw64.exe mingw64.ini
.PHONY: all
@ -27,27 +27,3 @@ mingw64.res: launcher.rc mingw64.ico
$(PREFIX)windres -O COFF -o $@ $< -DMSYSTEM=MINGW64 -DICONFILE=mingw64.ico
mingw64.exe: launcher.c mingw64.res
$(PREFIX)gcc -std=c11 -Wall -Wextra -Werror -static -municode -mwindows -o $@ $^
ucrt64.ini: launcher.ini
cp -f $^ $@
echo MSYSTEM=UCRT64>> $@
ucrt64.res: launcher.rc ucrt64.ico
$(PREFIX)windres -O COFF -o $@ $< -DMSYSTEM=UCRT64 -DICONFILE=ucrt64.ico
ucrt64.exe: launcher.c ucrt64.res
$(PREFIX)gcc -std=c11 -Wall -Wextra -Werror -static -municode -mwindows -o $@ $^
clang64.ini: launcher.ini
cp -f $^ $@
echo MSYSTEM=CLANG64>> $@
clang64.res: launcher.rc clang64.ico
$(PREFIX)windres -O COFF -o $@ $< -DMSYSTEM=CLANG64 -DICONFILE=clang64.ico
clang64.exe: launcher.c clang64.res
$(PREFIX)gcc -std=c11 -Wall -Wextra -Werror -static -municode -mwindows -o $@ $^
clangarm64.ini: launcher.ini
cp -f $^ $@
echo MSYSTEM=CLANGARM64>> $@
clangarm64.res: launcher.rc clangarm64.ico
$(PREFIX)windres -O COFF -o $@ $< -DMSYSTEM=CLANGARM64 -DICONFILE=clangarm64.ico
clangarm64.exe: launcher.c clangarm64.res
$(PREFIX)gcc -std=c11 -Wall -Wextra -Werror -static -municode -mwindows -o $@ $^

View File

@ -1,28 +1,25 @@
_realname="msys2-launcher"
pkgname=("${_realname}-git")
pkgver=1.5
pkgver=0.3.17.1a1c586
pkgrel=1
pkgdesc="Helper for launching MSYS2 shells"
arch=('x86_64' 'i686')
license=('MIT')
backup=({msys2,mingw32,mingw64,ucrt64,clang64}.ini)
backup=({mingw32,mingw64,msys2}.ini)
provides=("${_realname}")
conflicts=("${_realname}")
depends=("mintty>=2.2.1")
makedepends=('mingw-w64-cross-gcc')
source=(launcher.{c,ini,rc} {macros,version}.h Makefile {msys2,mingw32,mingw64,ucrt64,clang64,clangarm64}.ico)
sha256sums=('8e3912d38ba631a525caec2be982b462181125c8767b0b5d7271d13df8ad85be'
'232eaa3de03c5c2cde8106a229b4df768d26f2343ea5df88e22e0e8c088f017e'
'0b118e093f514fdabfabf69dd6148d56a3a282b77add1d53ef31f50635c21d7a'
'ca88f2e77322c0d2a7930b84a981723897eb720131026356f4e14d2be8a35291'
'30b6807a39d8bf0857767daa0dfe0227fd3583c1ee099a496c35a7f9e75dbdac'
'd1e1298433ee116b0a61bfe738aa736422742acd6208f7999fb2ca3dad818578'
'793b9450a1a59a6c294e51fd0c2a47090d68c68ff2f33a25a11b45f6408c3917'
'f8f1b5943d385e8a7e3b5a4a2c7d64004108c94c17b2f936016e2ae50bdb65af'
'91b4a790aad38a102565f0cfcba6c0e6d274f6cda0b37b128d9cc43c5ad6b24d'
'733e97cbb823773e1a08a91a41035a7692bc0ff270d3c894224911b4b091db44'
'56d4080c15dff89a6263f3d5f9aa68849b2062179cabd6d78edfe0e3af6bf64a'
'3b7af99516768485383b34d606749e6f98a250372a8191bc8d3a962d66bdfe35')
source=(launcher.{c,ini,rc} {macros,version}.h Makefile {mingw32,mingw64,msys2}.ico)
md5sums=('e21db11d21f95aab30966a8c528efd9b'
'7ab96cb34fef046e4839e270f9397a32'
'3a3c9fd8d083716e5efd759641eb4f31'
'57a40ae9972dac94df0830a1ab480895'
'fef245f65b6826502b953b81fb397d97'
'8d3fa1f8eb06343a13b72299c164f6cd'
'797a8ea3012b22705caadcb17b1291c2'
'0237b204a9d09dcadc955b435cefd311'
'292ad5cdd78abac9d694cc06819a96fc')
pkgver() {
local _major=$(cat version.h | grep -F 'VER_MAJOR' | head -1 | sed -e 's/.* //')
@ -35,5 +32,5 @@ build() {
}
package() {
cp {msys2,mingw32,mingw64,ucrt64,clang64,clangarm64}.{exe,ini} "${pkgdir}"
cp {mingw32,mingw64,msys2}.{exe,ini} "${pkgdir}"
}

View File

@ -1,25 +1,9 @@
MSYS2 launcher
==============
A helper for launching MSYS2 shells. Features blink-less launching and correct taskbar/start pinning.
A helper for launching MSYS2 shells. Features blink-less launching and correct taskbar/start pinning.
Installation
------------
Just `make` and put the .exe and .ini files inside your MSYS2 root. Needs mintty v2.1.6 or newer.
Configuration
-------------
All three default launchers are the same (except for embedded icons and descriptions) and are configured by corresponding .ini files. The .ini file has to be in the same directory as the .exe file and have the same filename (except for the `.exe` -> `.ini` change).
The .ini file contains environment variables, each on a separate line, in the usual `VAR=val` format. Lines starting with `#` are ignored. The values are expanded using the current environment (use Windows `%var%` syntax), evaluated from top to bottom. By default, only `MSYSTEM` is set and the rest is inherited from the outside environment, but some common options are prepared and commented out in the files:
- `MSYS=...`: configures runtime behavior
- `CHERE_INVOKING=1`: prevent the login scripts from changing the working directory to the user's home directory
- `MSYS2_PATH_TYPE=strict|minimal|inherit`: configures how the login scripts set up `PATH`
Pinning
-------
As with many other applications, the correct way to pin a shortcut to the taskbar is by right-clicking the button of a running MSYS2 shell (started by this launcher) on the taskbar and choosing "Pin this program to taskbar". Pinning the `.exe` file itself won't create the shortcut correctly. There are tools to diagnose and fix such a situation (7+ Taskbar Tweaker and Win7AppId) in case re-pinning is not preferred.
Just `make` and put the executables inside your MSYS2 root. Needs mintty v2.1.6 or newer (unreleased at the time of writing).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,21 +0,0 @@
all: ../msys2.ico ../mingw32.ico ../mingw64.ico ../ucrt64.ico ../clang64.ico ../clangarm64.ico
sources=icon-large.svg icon-medium.svg icon-small.svg
../msys2.ico: $(sources)
./build.sh '#894c84' $@
../mingw32.ico: $(sources)
./build.sh '#748787' $@
../mingw64.ico: $(sources)
./build.sh '#276597' $@
../ucrt64.ico: $(sources)
./build.sh '#8b7b16' $@
../clang64.ico: $(sources)
./build.sh '#be643e' $@
../clangarm64.ico: $(sources)
./build.sh '#238423' $@

View File

@ -1,18 +0,0 @@
#!/bin/bash
set -e
cp icon-large.svg temp-large.svg
cp icon-medium.svg temp-medium.svg
cp icon-small.svg temp-small.svg
sed -i 's/#00ff00/#ffffff/g' temp-large.svg temp-medium.svg temp-small.svg
sed -i "s/#0000ff/$1/g" temp-large.svg temp-medium.svg temp-small.svg
sed -i 's/#ff0000/#ef7e19/g' temp-large.svg temp-medium.svg temp-small.svg
rsvg-convert temp-small.svg -w 16 -h 16 --output temp-16.png
rsvg-convert temp-small.svg -w 32 -h 32 --output temp-32.png
rsvg-convert temp-medium.svg -w 48 -h 48 --output temp-48.png
rsvg-convert temp-large.svg -w 64 -h 64 --output temp-64.png
rsvg-convert temp-large.svg -w 96 -h 96 --output temp-96.png
rsvg-convert temp-large.svg -w 256 -h 256 --output temp-256.png
convert temp-16.png temp-32.png temp-48.png temp-64.png temp-96.png temp-256.png +dither -colors 255 "$2"
rm temp-*.png temp-*.svg

View File

@ -1,56 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="36.777084mm"
height="36.777081mm"
viewBox="0 0 36.777084 36.777081"
version="1.1"
id="svg8">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
transform="translate(-122.70998,-169.48973)">
<rect
style="fill:#0000ff;stroke-width:0.274031"
id="rect951"
width="36.77462"
height="36.77879"
x="-159.4846"
y="-206.26767"
transform="scale(-1)" />
<path
id="rect988"
style="opacity:1;fill:#00ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:42.0953;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="M 48.765625 15.433594 C 48.12537 15.436326 47.453482 15.461252 46.746094 15.505859 C 39.516311 15.961784 35.694609 19.028941 39.773438 21.011719 C 41.520449 21.964273 40.998047 23.6342 40.998047 24.443359 C 40.998047 28.031265 18.099232 78.133071 11.476562 89.035156 C 7.0613297 96.303415 7.365176 98.526602 12.65625 97.667969 C 14.648598 97.344819 18.020944 95.926813 20.150391 94.517578 L 20.152344 94.517578 C 25.627216 90.894485 28.918264 85.062682 37.205078 64.292969 C 41.200473 54.279073 45.132095 44.734526 45.480469 45.398438 C 45.828828 46.062312 46.040347 52.324989 46.412109 57 C 47.772766 74.110526 51.92499 88.566082 57.207031 94.582031 C 60.611025 98.458957 62.903228 98.869769 65.447266 96.058594 C 66.413615 94.990802 71.174997 84.887245 76.027344 73.605469 C 80.87969 62.323692 85.509156 51.526955 86.083984 50.539062 C 86.871978 49.184782 86.952364 51.591433 86.990234 58 C 87.098329 76.311924 90.340434 87.5686 97.199219 93.439453 C 103.52282 98.852266 108.64429 98.64925 114.75 92.748047 C 118.53531 89.08954 118.8059 86.835797 115.90039 83.158203 L 113.80078 80.5 C 101.68569 57.142028 105.96623 40.854547 105.9668 29.310547 L 106.31445 23.998047 C 106.64403 21.214576 106.65947 18.276511 106.34766 17.46875 C 105.56038 15.417185 97.020212 15.545262 92.552734 17.675781 C 88.181257 19.760417 83.858978 27.777847 74.958984 50.308594 C 71.524603 59.002943 68.35986 65.752953 67.925781 65.308594 C 67.49174 64.864272 65.978563 56.590322 64.564453 46.921875 C 60.713445 20.592092 58.369448 15.392604 48.765625 15.433594 z M 81 99 C 75.657335 99 74 100.25987 74 104.32422 C 74 106.56295 75.173266 108.31374 79 111.78516 C 84.893039 117.13111 85.550038 120 80.882812 120 C 78.097679 120 77.817054 119.73431 78.244141 117.5 C 78.644771 115.40425 78.340742 115 76.361328 115 C 74.356591 115 74 115.49913 74 118.30078 C 74 123.04016 75.590688 124.13313 81.992188 123.79297 C 87.283602 123.82698 87.470021 123.96056 87.796875 118.94531 C 88.081851 114.57115 87.894384 114.22416 83.046875 110.13672 C 77.221754 105.22492 76.583622 103 81 103 C 83.533342 103 84 103.38891 84 105.5 C 84 107.33334 84.533317 108 86 108 C 87.595943 108 88 107.33253 88 104.69922 C 88 100.25465 86.458243 99 81 99 z M 93.208984 99 C 91.393791 99 90.940448 99.403718 91.402344 100.60742 C 91.741367 101.49134 93.175557 106.7722 94.587891 112.34375 C 96.999872 121.85898 97.090691 123.80368 95.439453 130.38281 C 94.889532 132.57377 95.1203 133 96.853516 133 C 98.40059 133 99.176906 132.05278 99.925781 129.25 C 101.17964 124.55734 107 100.02644 107 99.435547 C 107 99.195547 106.12199 99 105.04883 99 C 103.41872 99 102.81263 100.3242 101.36719 107.05078 C 100.41448 111.48424 99.327448 114.51746 98.947266 113.80078 C 98.567536 113.0849 97.666711 109.46248 96.945312 105.75 C 95.756916 99.634271 95.404777 99 93.208984 99 z M 117 99 C 111.5692 99 110 100.25741 110 104.60742 C 110 107.23083 110.90968 108.57541 115 112 C 120.83646 116.88659 121.61484 120 117 120 C 114.4667 120 114 119.61113 114 117.5 C 114 115.66666 113.46665 115 112 115 C 110.45689 115 110 115.66643 110 117.91797 C 110 123.57377 110.68146 124.11671 117.375 123.79492 C 123.74441 123.50201 123.405 124.96075 123.79883 118.89453 C 124.08947 114.41575 123.95908 114.18406 119.04883 110.43945 C 113.2036 105.98176 112.38244 103 117 103 C 119.53334 103 120 103.38891 120 105.5 C 120 107.33334 120.53332 108 122 108 C 123.59594 108 124 107.33253 124 104.69922 C 124 100.25465 122.45824 99 117 99 z "
transform="matrix(0.26458333,0,0,0.26458333,122.70998,169.48973)" />
<g
id="g957"
transform="translate(60.43039,43.792662)">
<path
id="path961"
style="fill:#00ff00;fill-opacity:1;stroke-width:0.264583"
d="m 92.863281,132.6875 c -1.325312,-0.004 -2.693816,0.50031 -3.740234,1.26367 -1.046418,0.76336 -1.779297,1.79104 -1.779297,2.85742 0,0.71898 0.268416,1.23699 0.6875,1.44532 0.419084,0.20832 0.954192,0.0768 1.404297,-0.39844 0.450001,-0.47516 0.803753,-0.72041 1.058594,-0.76563 0.12742,-0.0226 0.230649,-0.002 0.33789,0.0605 0.107242,0.063 0.21711,0.17432 0.328125,0.34375 0.299549,0.45717 0.235636,1.27504 -0.238281,2.42969 -0.473917,1.15465 -1.342844,2.63121 -2.568359,4.39062 -0.464348,0.66665 -0.796883,1.15334 -0.97461,1.52539 -0.08886,0.18603 -0.140395,0.34435 -0.140625,0.49414 -2.3e-4,0.1498 0.06691,0.29046 0.185547,0.38086 0.237266,0.18082 0.623937,0.22069 1.222656,0.24219 0.59872,0.0215 1.410329,0.008 2.46875,0.008 1.592343,0 2.492098,-0.0589 2.992188,-0.0234 0.250045,0.0177 0.390525,0.06 0.474609,0.12304 0.08408,0.0631 0.135468,0.15824 0.185547,0.3418 0.05667,0.20772 0.139906,0.36767 0.253906,0.47852 0.114001,0.11084 0.262319,0.16596 0.41211,0.16015 0.299581,-0.0116 0.593206,-0.22512 0.876953,-0.55664 0.567494,-0.66304 1.091253,-1.84401 1.208984,-3.21875 a 0.12981069,0.12981069 0 0 0 0,-0.002 c 0.03553,-0.43648 0.03598,-1.28253 -0.177734,-1.85547 -0.05343,-0.14324 -0.120244,-0.27125 -0.212891,-0.37109 -0.09265,-0.0999 -0.217058,-0.16986 -0.359375,-0.17969 -0.284634,-0.0197 -0.590018,0.17269 -0.966797,0.60742 -0.411927,0.44599 -0.766718,0.67969 -1.017578,0.75195 -0.125655,0.0362 -0.221297,0.0328 -0.292968,0.008 -0.07167,-0.025 -0.125748,-0.0698 -0.167969,-0.14844 -0.08444,-0.15731 -0.103572,-0.45837 0.0059,-0.84766 0.109431,-0.38928 0.342325,-0.8654 0.720703,-1.38086 0.940736,-1.28153 1.514114,-2.48066 1.708985,-3.58203 0.19487,-1.10137 0.0046,-2.10596 -0.574219,-2.96484 -0.39764,-0.59006 -0.816869,-0.99912 -1.345703,-1.25586 -0.528835,-0.25674 -1.15894,-0.3588 -1.976563,-0.36133 z" />
<path
id="path961-6"
style="fill:#ff0000;fill-opacity:1;stroke-width:0.264583"
d="m 92.408203,133.36719 c -1.772302,0.2148 -3.69312,1.19636 -4.329081,2.9583 -0.135384,0.44201 -0.158478,1.35851 0.467753,1.35224 0.735396,-0.41481 1.306877,-1.44088 2.291016,-1.22656 1.18361,0.34724 1.36333,1.84845 0.99414,2.86133 -0.771992,2.52505 -2.503328,4.57989 -3.853515,6.80078 0.196261,0.34154 1.113672,0.11648 1.577678,0.1956 1.661369,0.062 3.335542,-0.12942 4.988728,0.0329 0.508253,0.0868 0.794693,0.55821 0.910156,1.02148 1.140848,-0.94899 1.48432,-2.60526 1.396912,-4.03295 0.0095,-0.46427 -0.171503,-1.11507 -0.57074,-0.40845 -0.547745,0.63432 -1.630048,1.42355 -2.388672,0.67382 -0.711306,-0.9905 0.0185,-2.26055 0.619141,-3.125 1.094164,-1.51495 2.21118,-3.53951 1.346183,-5.41324 -0.469133,-1.08505 -1.580799,-1.77994 -2.765073,-1.70253 -0.228473,-0.02 -0.456216,0.004 -0.684626,0.0123 z" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -1,60 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="36.777084mm"
height="36.777081mm"
viewBox="0 0 36.777084 36.777081"
version="1.1"
id="svg8">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
transform="translate(-122.70998,-169.48973)">
<rect
style="fill:#0000ff;stroke-width:0.274031"
id="rect951"
width="36.77462"
height="36.77879"
x="-159.4846"
y="-206.26767"
transform="scale(-1)" />
<g
id="g30"
transform="translate(-0.28705631,3.3983444)">
<path
style="opacity:1;fill:#00ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:42.0953;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="m 48.765625,15.433594 c -0.640255,0.0027 -1.312143,0.02766 -2.019531,0.07226 -7.229783,0.455925 -11.051485,3.523082 -6.972656,5.50586 1.747011,0.952554 1.224609,2.622481 1.224609,3.43164 0,3.587906 -22.898815,53.689712 -29.521485,64.591797 -4.4152323,7.268259 -4.111386,9.491446 1.179688,8.632813 1.992348,-0.32315 5.364694,-1.741156 7.494141,-3.150391 h 0.002 c 5.474872,-3.623093 8.76592,-9.454896 17.052734,-30.224609 3.995395,-10.013896 7.927017,-19.558443 8.275391,-18.894531 0.348359,0.663874 0.559878,6.926551 0.93164,11.601562 1.360657,17.110526 5.512881,31.566082 10.794922,37.582031 3.403994,3.876926 5.696197,4.287738 8.240235,1.476563 0.966349,-1.067792 5.727731,-11.171349 10.580078,-22.453125 4.852346,-11.281777 9.481812,-22.078514 10.05664,-23.066407 0.787994,-1.35428 0.86838,1.052371 0.90625,7.460938 0.108095,18.311924 3.3502,29.5686 10.208985,35.439453 6.323604,5.412813 11.445074,5.209797 17.550784,-0.691406 3.78531,-3.658507 4.0559,-5.91225 1.15039,-9.589844 L 113.80078,80.5 C 101.68569,57.142028 105.96623,40.854547 105.9668,29.310547 l 0.34765,-5.3125 c 0.32958,-2.783471 0.34502,-5.721536 0.0332,-6.529297 -0.78728,-2.051565 -9.327448,-1.923488 -13.794926,0.207031 -4.371477,2.084636 -8.693756,10.102066 -17.59375,32.632813 -3.434381,8.694349 -6.599124,15.444359 -7.033203,15 C 67.49174,64.864272 65.978563,56.590322 64.564453,46.921875 60.713445,20.592092 58.369448,15.392604 48.765625,15.433594 Z"
transform="matrix(0.26458333,0,0,0.26458333,122.70998,169.48973)"
id="rect988" />
<g
id="g957"
transform="translate(60.43039,43.792662)">
<path
id="path961"
style="fill:#00ff00;fill-opacity:1;stroke-width:0.264583"
d="m 92.863281,132.31641 c -1.419677,-0.004 -2.851385,0.52795 -3.958984,1.33593 -1.107483,0.80791 -1.931641,1.92105 -1.931641,3.15625 0,0.81169 0.313887,1.48676 0.894532,1.77539 0.587911,0.29225 1.309991,0.0808 1.83789,-0.47656 0.426268,-0.45011 0.773073,-0.63807 0.853516,-0.65234 0.06288,-0.0112 0.03839,-0.0152 0.08789,0.0137 0.03415,0.02 0.114012,0.0895 0.205078,0.22852 0.173247,0.2644 0.185304,0.97777 -0.269531,2.08593 -0.455627,1.11009 -1.314311,2.57322 -2.53125,4.32032 -0.465181,0.66784 -0.803103,1.15579 -1.003906,1.57617 -0.09906,0.20734 -0.179324,0.41803 -0.179687,0.65429 -4.08e-4,0.26539 0.121803,0.51213 0.333984,0.67383 0.367145,0.2798 0.823553,0.29848 1.43164,0.32031 0.616315,0.0222 1.427215,0.008 2.482422,0.008 1.601607,0 2.526021,-0.0584 2.964844,-0.0273 0.218126,0.0155 0.29805,0.0634 0.28125,0.0508 -0.0024,-0.002 0.0065,-0.009 0.04883,0.14648 0.06786,0.24873 0.174162,0.47205 0.351563,0.64453 0.186808,0.18164 0.435323,0.27533 0.685547,0.26563 0.46396,-0.018 0.830461,-0.32055 1.144531,-0.6875 0.635383,-0.74235 1.170822,-1.97865 1.294922,-3.42774 a 0.27099488,0.27099488 0 0 0 0,-0.004 c 0.03854,-0.47353 0.05565,-1.33041 -0.199219,-2.01368 -0.06345,-0.17008 -0.148542,-0.34285 -0.287109,-0.49218 -0.145993,-0.15735 -0.354436,-0.28149 -0.605469,-0.29883 -0.467744,-0.0323 -0.86638,0.26695 -1.271484,0.73437 -0.379383,0.40825 -0.706435,0.60025 -0.839844,0.63867 -0.03105,0.009 -0.01926,0.005 -0.03125,0.006 -0.0039,-0.0229 -0.0521,-0.22671 0.03516,-0.53711 0.094,-0.33438 0.303657,-0.77803 0.660156,-1.26367 0.963396,-1.31241 1.566887,-2.5579 1.775391,-3.73633 0.208767,-1.17991 0.0019,-2.29738 -0.630859,-3.23632 -0.42065,-0.6242 -0.891127,-1.09196 -1.490235,-1.38282 -0.597983,-0.2903 -1.290922,-0.39581 -2.138672,-0.39843 z" />
<path
id="path961-6"
style="fill:#ff0000;fill-opacity:1;stroke-width:0.264583"
d="m 92.408203,133.36719 c -1.772302,0.2148 -3.69312,1.19636 -4.329081,2.9583 -0.135384,0.44201 -0.158478,1.35851 0.467753,1.35224 0.735396,-0.41481 1.306877,-1.44088 2.291016,-1.22656 1.18361,0.34724 1.36333,1.84845 0.99414,2.86133 -0.771992,2.52505 -2.503328,4.57989 -3.853515,6.80078 0.196261,0.34154 1.113672,0.11648 1.577678,0.1956 1.661369,0.062 3.335542,-0.12942 4.988728,0.0329 0.508253,0.0868 0.794693,0.55821 0.910156,1.02148 1.140848,-0.94899 1.48432,-2.60526 1.396912,-4.03295 0.0095,-0.46427 -0.171503,-1.11507 -0.57074,-0.40845 -0.547745,0.63432 -1.630048,1.42355 -2.388672,0.67382 -0.711306,-0.9905 0.0185,-2.26055 0.619141,-3.125 1.094164,-1.51495 2.21118,-3.53951 1.346183,-5.41324 -0.469133,-1.08505 -1.580799,-1.77994 -2.765073,-1.70253 -0.228473,-0.02 -0.456216,0.004 -0.684626,0.0123 z" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="36.777084mm"
height="36.777081mm"
viewBox="0 0 36.777084 36.777081"
version="1.1"
id="svg8">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
transform="translate(-122.70998,-169.48973)">
<rect
style="fill:#0000ff;stroke-width:0.274031"
id="rect951"
width="36.77462"
height="36.77879"
x="-159.4846"
y="-206.26767"
transform="scale(-1)" />
<g
id="g30"
transform="translate(-0.28705631,3.3983444)">
<path
style="opacity:1;fill:#00ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:12.7412;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
d="m 137.03665,172.00296 c -0.19379,8.3e-4 -0.39715,0.008 -0.61127,0.0219 -2.18827,0.138 -3.345,1.06635 -2.11044,1.66649 0.52877,0.28831 0.37066,0.79375 0.37066,1.03866 0,1.08597 -6.93089,16.25051 -8.9354,19.55029 -1.33637,2.19992 -1.24441,2.87282 0.35706,2.61294 0.60303,-0.0978 1.62376,-0.52702 2.26828,-0.95356 h 6.1e-4 c 1.6571,-1.09661 2.65322,-2.86174 5.16143,-9.1482 1.20931,-3.03095 2.39931,-5.91985 2.50475,-5.7189 0.10547,0.20094 0.16946,2.09649 0.28198,3.5115 0.41184,5.17892 1.66862,9.55425 3.26735,11.37512 1.03031,1.17345 1.72409,1.29778 2.4941,0.44691 0.29249,-0.32319 1.73365,-3.38128 3.20233,-6.79598 1.46868,-3.41471 2.8699,-6.68261 3.04389,-6.98162 0.2385,-0.4099 0.26282,0.31853 0.27429,2.25824 0.0327,5.54255 1.01402,8.94966 3.09,10.72662 1.91399,1.63832 3.46413,1.57687 5.31218,-0.20927 1.14571,-1.10734 1.22761,-1.78949 0.34819,-2.90261 l -0.63551,-0.80456 c -3.66694,-7.06986 -2.37133,-11.99967 -2.37116,-15.49374 l 0.10525,-1.60796 c 0.0998,-0.84249 0.10444,-1.73176 0.0103,-1.97625 -0.23828,-0.62096 -2.82318,-0.58219 -4.17537,0.0627 -1.32313,0.63097 -2.63137,3.05764 -5.32517,9.87712 -1.0395,2.63156 -1.99739,4.67461 -2.12878,4.54012 -0.13136,-0.13449 -0.58937,-2.6388 -1.01738,-5.56519 -1.1656,-7.96937 -1.87507,-9.54311 -4.7819,-9.53071 z"
id="rect988" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,4 +1,3 @@
#define __USE_MINGW_ANSI_STDIO 1
#define _UNICODE
#define _WIN32_WINNT 0x0601
#define WIN32_LEAN_AND_MEAN
@ -8,7 +7,6 @@
#include <stdbool.h>
#include <stdio.h>
#include <wchar.h>
int _CRT_glob = 0;
#include "macros.h"
@ -18,7 +16,7 @@ int _CRT_glob = 0;
static void ShowError(const wchar_t* desc, const wchar_t* err, const long code) {
wchar_t msg[1024];
swprintf(msg, 1024, L"%ls. Reason: %ls (0x%lx)", desc, err, code);
swprintf(msg, 1024, L"%s. Reason: %s (0x%lx)", desc, err, code);
MessageBox(NULL, msg, L"Launcher error", MB_ICONEXCLAMATION | MB_OK);
}
@ -39,22 +37,6 @@ static void ShowErrno(const wchar_t* desc) {
ShowError(desc, err, errno);
}
// adapted from http://www.partow.net/programming/hashfunctions/index.html
// MIT licensed
static unsigned int APHash(const wchar_t* str, size_t length) {
unsigned int hash = 0xAAAAAAAA;
size_t i = 0;
for (i = 0; i < length; ++str, ++i) {
hash ^= ((i & 1) == 0)
? ((hash << 7) ^ (*str) * (hash >> 3))
: (~((hash << 11) + ((*str) ^ (hash >> 5))))
;
}
return hash;
}
static PROCESS_INFORMATION StartChild(wchar_t* cmdline) {
STARTUPINFOW si;
PROCESS_INFORMATION pi;
@ -74,7 +56,7 @@ static PROCESS_INFORMATION StartChild(wchar_t* cmdline) {
return pi;
}
static wchar_t* SetEnv(wchar_t* conffile) {
static wchar_t* SetEnv(wchar_t* conffile, wchar_t** command) {
int code;
size_t buflen;
size_t expandedlen;
@ -83,7 +65,9 @@ static wchar_t* SetEnv(wchar_t* conffile) {
wchar_t* expanded;
wchar_t* msystem;
FILE* handle;
bool specialvar;
*command = NULL;
msystem = NULL;
handle = _wfopen(conffile, L"rt");
@ -115,6 +99,10 @@ static wchar_t* SetEnv(wchar_t* conffile) {
}
if (*buf != L'\0' && *buf != L'#') {
specialvar = *buf == L'=';
if (specialvar) {
++buf;
}
tmp = wcschr(buf, L'=');
if (tmp != NULL) {
*tmp++ = L'\0';
@ -136,9 +124,15 @@ static wchar_t* SetEnv(wchar_t* conffile) {
return NULL;
}
}
code = SetEnvironmentVariable(buf, expanded);
if (code == 0) {
ShowLastError(L"Could not set environment variable");
if (specialvar) {
if (0 == wcsicmp(L"command", buf)) {
*command = _wcsdup(expanded);
}
} else {
code = SetEnvironmentVariable(buf, expanded);
if (code == 0) {
ShowLastError(L"Could not set environment variable");
}
}
} else {
ShowError(L"Could not parse environment line", buf, 0);
@ -167,19 +161,22 @@ int wmain(int argc, wchar_t* argv[]) {
wchar_t* tmp;
wchar_t* args;
wchar_t* msystem;
wchar_t* msysdirhash;
wchar_t msysdir[PATH_MAX];
wchar_t exepath[PATH_MAX];
wchar_t confpath[PATH_MAX];
code = GetModuleFileName(NULL, exepath, sizeof(exepath) / sizeof(*exepath));
code = GetModuleFileName(NULL, exepath, sizeof(exepath) / sizeof(exepath[0]));
if (code == 0) {
ShowLastError(L"Could not determine executable path");
return __LINE__;
}
tmp = exepath;
while ((tmp = wcschr(tmp, L'/')) != NULL) {
while (true) {
tmp = wcschr(tmp, L'/');
if (tmp == NULL) {
break;
}
*tmp = L'\\';
}
@ -191,24 +188,9 @@ int wmain(int argc, wchar_t* argv[]) {
}
*tmp = L'\0';
msysdirhash = (wchar_t*)alloca(10 * sizeof(wchar_t)); // dot + unsigned int as %x + null
if (msysdirhash == NULL) {
ShowError(L"Could not allocate memory", L"", 0);
return __LINE__;
}
if (wcsicmp(msysdir, L"C:\\msys64") == 0) {
code = swprintf(msysdirhash, 10, L""); // no change in AppID for default installations
} else {
code = swprintf(msysdirhash, 10, L".%8x", APHash(msysdir, wcslen(msysdir)));
}
if (code < 0) {
ShowErrno(L"Could not write to buffer");
return __LINE__;
}
wcscpy(confpath, exepath);
tmp = confpath + wcslen(confpath) - 4;
if (wcsicmp(L".exe", tmp) != 0) {
if (0 != wcsicmp(L".exe", tmp)) {
ShowError(L"Could not find configuration file", confpath, 0);
return __LINE__;
}
@ -224,7 +206,7 @@ int wmain(int argc, wchar_t* argv[]) {
}
}
msystem = SetEnv(confpath);
msystem = SetEnv(confpath, &args);
if (msystem == NULL) {
ShowError(L"Did not find the MSYSTEM variable", confpath, 0);
return __LINE__;
@ -235,24 +217,16 @@ int wmain(int argc, wchar_t* argv[]) {
ShowLastError(L"Could not set environment variable");
}
args = GetCommandLine();
tmp = argv[0];
while (*tmp != L'\0') {
if (*args == *tmp) {
if (argc > 1) {
// can break, but hopefully won't for most use cases
args = GetCommandLine();
if (*args == L'"') {
args++;
}
args += wcslen(argv[0]);
if (*args == L'"') {
args++;
tmp++;
} else if (*args == L'"') {
args++;
} else {
ShowError(L"Could not parse command name", argv[0], 0);
return __LINE__;
}
}
while (*args == L'"') {
args++;
}
while (*args == L' ') {
args++;
}
code = -1;
@ -264,7 +238,7 @@ int wmain(int argc, wchar_t* argv[]) {
ShowError(L"Could not allocate memory", L"", 0);
return __LINE__;
}
code = swprintf(buf, buflen, L"%ls\\usr\\bin\\mintty.exe -i '%ls' -o 'AppLaunchCmd=%ls' -o 'AppID=MSYS2.Shell.%ls.%d%ls' -o 'AppName=MSYS2 %ls Shell' -t 'MSYS2 %ls Shell' --store-taskbar-properties -- %ls %ls", msysdir, exepath, exepath, msystem, APPID_REVISION, msysdirhash, msystem, msystem, argc == 1 ? L"-" : L"/usr/bin/sh -lc '\"$@\"' sh", args);
code = swprintf(buf, buflen, L"%s\\usr\\bin\\mintty.exe -i '%s' -o 'AppLaunchCmd=%s' -o 'AppID=MSYS2.Shell.%s.%d' -o 'AppName=MSYS2 %s Shell' --store-taskbar-properties -- /usr/bin/bash --login %s %s", msysdir, exepath, exepath, msystem, APPID_REVISION, msystem, args != NULL ? L"-c '$0 \"$@\"'" : L"-i" , args != NULL ? args : L"");
buflen *= 2;
}
if (code < 0) {

View File

@ -1,4 +1,4 @@
#MSYS=winsymlinks:nativestrict
#MSYS=error_start:mingw64/bin/qtcreator.exe|-debug|<process-id>
#CHERE_INVOKING=1
#MSYS2_PATH_TYPE=inherit
#PATH=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem

View File

@ -4,20 +4,20 @@
1 VERSIONINFO
FILEVERSION VER_MAJOR,VER_MINOR,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "ProductName", "Befator Inc. MSYS2"
VALUE "FileDescription", "MSYS2 " STRINGIFY_A(MSYSTEM) " shell launcher"
VALUE "FileVersion", STRINGIFY_A(VER_MAJOR) "." STRINGIFY_A(VER_MINOR)
END
END
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "ProductName", "MSYS2"
VALUE "FileDescription", "MSYS2 " STRINGIFY_A(MSYSTEM) " shell launcher"
VALUE "FileVersion", STRINGIFY_A(VER_MAJOR) "." STRINGIFY_A(VER_MINOR)
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
id ICON STRINGIFY_A(ICONFILE)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
msys2.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,7 +1,7 @@
#ifndef M2L_VERSION_H
#define M2L_VERSION_H
#define VER_MAJOR 1
#define VER_MINOR 5
#define VER_MAJOR 0
#define VER_MINOR 3
#endif