MSYS2-packages icon indicating copy to clipboard operation
MSYS2-packages copied to clipboard

ConEmu alternative for mintty

Open Alexpux opened this issue 9 years ago • 30 comments

Here we will discuss about create package for ConEmu (http://conemu.github.io) as alternative for mintty. Previously we have some discussion here: https://github.com/Alexpux/MINGW-packages/pull/616 https://github.com/Alexpux/MINGW-packages/issues/664

I'm update patchset for building ConEmu from official repo: https://github.com/Alexpux/MSYS2-packages/commit/311c3df0cf1016c1482890f5cb2721f4b91687e2

ConEmu have a lot of warnings when building with GCC that need to be fixed I think, especially casting warnings. Here is build log - http://pastebin.com/WdTuxa6A

Alexpux avatar Jun 09 '15 06:06 Alexpux

Also, ARAIR it uses functions not available on xp sp3. Is this still the case?

mingwandroid avatar Jun 09 '15 07:06 mingwandroid

It? ConEmu supports Windows 2000. This is even less that xp. All functions not available in Win2k are dynamically linked!

Maximus5 avatar Jun 09 '15 08:06 Maximus5

What is the purpose of 0012-AssertMessageBox-is-not-supported-in-mingw-w64.patch?

Maximus5 avatar Jun 09 '15 08:06 Maximus5

And 0013-Add-guard-to-gestureinfo-as-it-is-defined-in-mingw-w.patch? ConEmu must be compiled for WINVER=0x500.

Maximus5 avatar Jun 09 '15 08:06 Maximus5

I think patch 0013 is right as it prevent redefines if they already present.

Alexpux avatar Jun 09 '15 08:06 Alexpux

With disabling patches 0019 we get a lot of errors: http://pastebin.com/8t8HUivt

Alexpux avatar Jun 09 '15 08:06 Alexpux

I see. OK

Maximus5 avatar Jun 09 '15 08:06 Maximus5

According to MSDN (https://msdn.microsoft.com/ru-ru/library/windows/desktop/bb760540(v=vs.85).aspx), TaskDialog function is available from Vista only.

Alexpux avatar Jun 09 '15 08:06 Alexpux

As I understand, ConEmu is for Windows only. Right? If yes, then maybe the better will be replace all if defined(__GNUC__) with if defined(__MINGW32__)

Alexpux avatar Jun 09 '15 08:06 Alexpux

I'm not sure about these flags. __GNUC__ was added long ago to support old gcc compiler (from mingw AFAIR). How about cygwin version and __MINGW32__?

Maximus5 avatar Jun 09 '15 08:06 Maximus5

Patches were applied into daily branch.

Maximus5 avatar Jun 09 '15 08:06 Maximus5

Are you support building ConEmu with Cygwin GCC? I don't think so.

Alexpux avatar Jun 09 '15 08:06 Alexpux

__MINGW32__ is defined for all mingw.org and mingw-w64 toolchains (cross and native)

Alexpux avatar Jun 09 '15 08:06 Alexpux

About patch 0012 I get errors without it:

compiling ConEmu.rc
linking ../../Release/ConEmu.exe
../../gcc/conemu/ConEmuApp.o:ConEmuApp.cpp:(.text+0x450f): undefined reference to `AssertMsgBox'
collect2: error: ld returned 1 exit status
makefile_gcc:240: recipe for target '../../Release/ConEmu.exe' failed
make[1]: *** [../../Release/ConEmu.exe] Error 1

Alexpux avatar Jun 09 '15 08:06 Alexpux

strange. it's defined in common/MAssert.h. will check this later

Maximus5 avatar Jun 09 '15 09:06 Maximus5

Having fun trying to figure out my patches guys :) I really should put in longer comments when making them.

martell avatar Jun 12 '15 17:06 martell

Almost all patches are clear enough.

Maximus5 avatar Jun 12 '15 21:06 Maximus5

I'm successfully build ConEmu without patches now.

Alexpux avatar Jun 21 '15 16:06 Alexpux

Was problem with missed GUIDs fixed by MinGW?

Maximus5 avatar Jun 21 '15 17:06 Maximus5

yes, it fixed in trunk.

Alexpux avatar Jun 21 '15 17:06 Alexpux

By this commit https://github.com/Alexpux/mingw-w64/commit/4421b4a8a06c206ecd18420bf095552e6822eebd

Alexpux avatar Jun 21 '15 17:06 Alexpux

Would this make it possible to get 256 colors in conemu (without mintty)?

oysteinkrog avatar Jun 29 '15 11:06 oysteinkrog

Within msys2? Not yet I think. However...

  • http://conemu.github.io/en/Xterm256Colors.html
  • http://conemu.github.io/en/CygwinAnsi.html
  • http://conemu.github.io/en/RoadMap.html#cygwin-terminal

I mean there are two possible ways and both require some additional code changes.

  1. Let msys2 core (ncurses AFAIK) write RAW ANSI to console without processing them internally.
  2. Let ConEmu support cygwin-compatible terminal API. This one requires much coding...

Maximus5 avatar Jun 29 '15 11:06 Maximus5

aa Using a program wrapping msys's shell may be a simpler solution.

http://pastebin.com/YKdL1Y9A Most code is from mintty, and it isn't working perfect. I'm not familiar with terminal protocol.

qingxbl avatar Nov 18 '15 02:11 qingxbl

@qingxbl That's pretty cool! What are the issues with it?

oysteinkrog avatar Nov 18 '15 14:11 oysteinkrog

Well, I can build this with cygwin (link to cygwin1.dll), but buid failed with msys. Seems like some packages are not installed.

What do I need to link executable with msys-2.0.dll or msys-1.0.dll (a lot of users are stuck on git 1.9)?

The problems start with includes "sys/wait.h", "w32api/wtypes.h" and others.

Maximus5 avatar Nov 19 '15 15:11 Maximus5

What do I need to link executable with msys-2.0.dll or msys-1.0.dll

The usual way would be to build the whole program using MSYS(2) gcc.

MSYS has some page about it on their wiki: HOWTO_Create_an_MSYS_Build_Environment MSYS2 provides the necessary software in base-devel and msys2-devel groups.

Or are you trying something else?

elieux avatar Nov 19 '15 18:11 elieux

What are the issues with it?

  1. The screen size is hard coded. It doesn't sync with current window size. And I don't know how to handle it correctly.
  2. Vim is broken in bash & ssh.
  3. tmux is not working completely.

Embedding mintty is acceptable for me, so I stop working on this.😜

qingxbl avatar Nov 20 '15 03:11 qingxbl

https://github.com/Maximus5/cygwin-connector

Maximus5 avatar Nov 20 '15 08:11 Maximus5

pinging for status info

goyalyashpal avatar Jul 09 '22 17:07 goyalyashpal