5 ms·
Winbox (Mikrotik configuration tool). Mikrotik seems to go out of their way to make sure it is compatible with Wine.
by vetinari 4y ago
Winbox (Mikrotik configuration tool). Mikrotik seems to go out of their way to make sure it is compatible with Wine.
- julienfr112 4y agoI suspect mikrotik devs to work on linux...
- geokon 4y agoCan you compile code from within Linux to run on wine..? I know clang supports Windows, but I haven't heard anyone have a crosscompilation setup like that (sounds handy!)
- ta988 4y agoYes you can.https://swarminglogic.com/article/2014_11_crosscompile https://swarminglogic.com/article/2014_11_crosscompile
- squarefoot 4y agoIn many cases you wouldn't even need cross compilation if you can run Windows tools directly on WINE. Years ago I installed Delphi 6 on a Linux machine with WINE, and although I didn't write any complex stuff or imported 3rd party components, it compiled every Delphi code I threw at it, producing native Windows code that ran flawlessly on Windows machines.
- anthk 4y agoYou could use Lazarus just fine.
- squarefoot 4y agoYes of course, I meant a native Windows compiler/IDE in general.
- jononor 4y agoThe mingw toolchain is for cross compiling to target Windows. It is very mature and are used by many open source projects, especially desktop software which is popular on Windows but mostly developed by people running Linux.
- meibo 4y agoWe actually run MSVC builds for Linux by running the VC++ toolchain in Wine, it works very well apart from process startup times, which have been getting a lot better.
- squarefoot 4y agoLast time I used it was to configure two dual band ceiling access points and their PoE switch, and everything worked flawlessly, both on Debian (desktop) and Manjaro (this laptop). Happened roughly 2 months ago.
- vetinari 4y agoIt goes even further: 64-bit wine works with Rosetta. I'm running Winbox, via Wine, on M1 Mac.
- selectodude 4y agoYou got a tutorial for that? I tried to get wine working with rosetta a year ago and it didn’t go so well.
- cf100clunk 4y agoAgreed, that would be a great ''Show HN'' topic, vetinari
- vetinari 4y agoSee the next sibling, https://news.ycombinator.com/item?id=35412055 https://news.ycombinator.com/item?id=35412055
- acapybara 4y agovetinari, please do tell us how you did this
- vetinari 4y agoNot sure what is supposed to be complicated here: 1) install wine. Normally, you would do `brew install --cask --no-quarantine wine-stable`; however, if you managed to update to ventura 13.3, you will need wine 8.4 or newer, so `brew tap homebrew/cask-versions && brew install --cask --no-quarantine wine-staging`. 2) if you installed brew without `--no-quarantine`, try launching it now. The point is to appease Gatekeeper, so launching it in the future won't fail. It will also create a wineprefix, if you don't have one. 3) save your winbox64.exe binary somewhere. M1 doesn't support 32-bit mode (not even ARM one), so make sure it is 64-bit one. 4) launch it; wine64 /path/to/your/winbox64.exe. It will be handled by Rosetta automatically. It should work now. In the past, with some older wine version, it failed, because some wine script called 32-bit binary somewhere down the chain; since I don't remember what version it was and what exactly it did, suffice to say that it was enough to add '64' in the script to the name of the binary called. With wine 8.0 and newer, it should not be a problem. There are some fine details you can make it slightly better: 5) package it into MacOS app. Create the basic bundle structure (`mkdir -p WinBox.app/Contents/{MacOS,Resources}`), put: #!/bin/bash /Applications/Wine\ Staging.app/Contents/Resources/wine/bin/wine64 "$(dirname "$0")/../Resources/winbox64.exe into `Contents/MacOS/Winbox` and make it executable. Put winbox64.exe into `Contents/Resources`, some nice icon into `Contents/Resources/Icon.icns` (if you google, you can find winbox icon in the right format), and some basic metadata into `Contents/Info.plist`: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>WineProgramPath</key> <string>winbox64.exe</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>WinBox</string> <key>NSHumanReadableCopyright</key> <string>© MikroTik</string> <key>CFBundleIdentifier</key> <string>com.MikroTik.WinBox</string> <key>CFBundleName</key> <string>WinBox</string> <key>CFBundleVersion</key> <string>3.37.0</string> <key>CFBundleShortVersionString</key> <string>3.37.0</string> <key>CFBundleIconFile</key> <string>Icon.icns</string> <key>LSApplicationCategoryType</key> <string>public.app-category.utilities</string> </dict> </plist> (I don't remember where I copied this from). 6) You will have a problem saving a session state. This is again gatekeeper; if I run winbox from a terminal with developer tools privilege, it will work. If I run it as the above app package, it will silently fail at saving. You can play around with granting privileges, but I prepared my sessions throught the terminal launch instead, and by running it via app package, they are read only, so I don't accidentally rearrange something.