Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71fc2d43b7 | ||
|
|
56c2ba79fc | ||
|
|
f3d1abf153 | ||
|
|
d8c2c9eb69 | ||
|
|
4028b6cae0 | ||
|
|
860c495002 | ||
|
|
b71e7e3674 | ||
|
|
6f75d2b3e9 | ||
|
|
3bb62c7089 | ||
|
|
bc7e470429 | ||
|
|
92cb91db1b | ||
|
|
2716832118 | ||
|
|
b81f4dd5e3 | ||
|
|
e09bbea607 | ||
|
|
430f154584 |
4
.editorconfig
Normal file
4
.editorconfig
Normal file
@@ -0,0 +1,4 @@
|
||||
root = true
|
||||
|
||||
[*.{c,h,rc}]
|
||||
indent_style = tab
|
||||
16
.gitignore
vendored
16
.gitignore
vendored
@@ -1,13 +1,7 @@
|
||||
/mingw32.exe
|
||||
/mingw32.res
|
||||
/mingw32.ini
|
||||
/mingw64.exe
|
||||
/mingw64.res
|
||||
/mingw64.ini
|
||||
/msys2.exe
|
||||
/msys2.res
|
||||
/msys2.ini
|
||||
/pkg/
|
||||
/src/
|
||||
/*.exe
|
||||
/*.res
|
||||
/*.ini
|
||||
/*.pkg.tar.xz
|
||||
/*.pkg.tar.xz.sig
|
||||
/pkg/
|
||||
/src/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
Copyright (c) 2015 David Macek
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
20
PKGBUILD
20
PKGBUILD
@@ -1,6 +1,6 @@
|
||||
_realname="msys2-launcher"
|
||||
pkgname=("${_realname}-git")
|
||||
pkgver=0.3.17.1a1c586
|
||||
pkgver=1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Helper for launching MSYS2 shells"
|
||||
arch=('x86_64' 'i686')
|
||||
@@ -11,15 +11,15 @@ conflicts=("${_realname}")
|
||||
depends=("mintty>=2.2.1")
|
||||
makedepends=('mingw-w64-cross-gcc')
|
||||
source=(launcher.{c,ini,rc} {macros,version}.h Makefile {mingw32,mingw64,msys2}.ico)
|
||||
md5sums=('e21db11d21f95aab30966a8c528efd9b'
|
||||
'7ab96cb34fef046e4839e270f9397a32'
|
||||
'3a3c9fd8d083716e5efd759641eb4f31'
|
||||
'57a40ae9972dac94df0830a1ab480895'
|
||||
'fef245f65b6826502b953b81fb397d97'
|
||||
'8d3fa1f8eb06343a13b72299c164f6cd'
|
||||
'797a8ea3012b22705caadcb17b1291c2'
|
||||
'0237b204a9d09dcadc955b435cefd311'
|
||||
'292ad5cdd78abac9d694cc06819a96fc')
|
||||
sha512sums=('eac22e62609e06a49931f70b12abaf0f1a412a98bcf349a2b6a0738b511d05ed7ce7731d2e30f9510926c3175d3521d0164e25cd70e9b18ba33aeb887deef11e'
|
||||
'5ed8a2e9997d9d2c1e17940292d68542f897e2716b274741d8a3ba7c8f46235c175b7e0a1252a879ba3c79b571504d25de2a8d6b004aedd117d263195bc2b185'
|
||||
'cf257f1f5b7fc69a32c63fe5bf5299db078621850b1e12358654d71da7777a94a0668d657c1834be308db099cad9d48a42fa7877ad58dfdbd576248150913a12'
|
||||
'6019ca0d67375c1261dda0d54d45fc411b02244c51b71d5c57d2613e9edfb4e8f9000754e5c7d632ed0101005c01cd0a98c3961d5b5f51c94d83eceba4296d35'
|
||||
'2e2669db2e8ef54ff6859f4e9a2657f867aef89094f29386da6df6a39931b55927bd16f92a5058fb4aecc5705a2bf3a867172740bc53bca560b98820790ad3c9'
|
||||
'270db9d92b944754cc71523053532473d8a477241725e7aded02dc34d35895a33cf135be7a87692c0f9d2204731e345b8ae82d33f15a1a197e73357552c564e0'
|
||||
'27b9591fa286a15b0eb76a381191f025184d545359285215b9958632a5bce99484de0130296ff4b285e38cec9d88299c09b2ce1fe4b4957b4ef295d31a620817'
|
||||
'b1ecd3def00a023a9e88806ff9bbb1bbd73086fbf7554799eb5fe8adb16bf96ed1a7da375bb2b9f9268fcf08e25dab4414bb4888e1ee6eff4587ee0973374f6f'
|
||||
'7f369b102391eba9ab56e1fb2157f820ecce41434b7232137da32b924b2d53840731e18ef80916703effc6770e862d1fee2986e66c1d03a8c8bb3feef4f08d58')
|
||||
|
||||
pkgver() {
|
||||
local _major=$(cat version.h | grep -F 'VER_MAJOR' | head -1 | sed -e 's/.* //')
|
||||
|
||||
16
README.md
16
README.md
@@ -6,4 +6,18 @@ A helper for launching MSYS2 shells. Features blink-less launching and correct t
|
||||
Installation
|
||||
------------
|
||||
|
||||
Just `make` and put the executables inside your MSYS2 root. Needs mintty v2.1.6 or newer (unreleased at the time of writing).
|
||||
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).
|
||||
|
||||
By default, only `MSYSTEM` is set, but options for inheriting `PATH` and tweaking `MSYS` are prepared, as well as `CHERE_INVOKING` for the shell to stay in the current working directory (instead of changing to the home directory).
|
||||
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
int _CRT_glob = 0;
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
@@ -224,7 +225,7 @@ int wmain(int argc, wchar_t* argv[]) {
|
||||
ShowError(L"Could not allocate memory", L"", 0);
|
||||
return __LINE__;
|
||||
}
|
||||
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, argc == 1 ? L"-i" : L"-c '$0 \"$@\"'", 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' -t 'MSYS2 %s Shell' --store-taskbar-properties -- %s %s", msysdir, exepath, exepath, msystem, APPID_REVISION, msystem, msystem, argc == 1 ? L"-" : L"/usr/bin/sh -lc '\"$@\"' sh", args);
|
||||
buflen *= 2;
|
||||
}
|
||||
if (code < 0) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#MSYS=winsymlinks:nativestrict
|
||||
#MSYS=error_start:mingw64/bin/qtcreator.exe|-debug|<process-id>
|
||||
#CHERE_INVOKING=1
|
||||
#PATH=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem
|
||||
#MSYS2_PATH_TYPE=inherit
|
||||
|
||||
26
launcher.rc
26
launcher.rc
@@ -4,20 +4,20 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION VER_MAJOR,VER_MINOR,0,0
|
||||
BEGIN
|
||||
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 "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)
|
||||
|
||||
BIN
mingw32.ico
BIN
mingw32.ico
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 25 KiB |
BIN
mingw32.pdn
BIN
mingw32.pdn
Binary file not shown.
BIN
mingw64.ico
BIN
mingw64.ico
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 25 KiB |
BIN
mingw64.pdn
BIN
mingw64.pdn
Binary file not shown.
Reference in New Issue
Block a user