GithubHelp home page GithubHelp logo

dosycorps / w31slack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yeokm1/w31slack

0.0 1.0 0.0 4.04 MB

A proof-of-concept Slack client for Windows for Workgroups 3.11 with tests.

Home Page: http://yeokhengmeng.com/2019/12/building-a-new-win-3-1-app-in-2019-part-1-slack-client/

License: MIT License

C 86.31% Makefile 7.45% Go 4.79% C++ 1.45%

w31slack's Introduction

W31Slack

A proof-of-concept Slack client for Windows for Workgroups (WFW) 3.11 with tests. As there are no native HTTPS APIs for the ancient version of Winsock on WFW, a HTTP-to-HTTPS proxy like this one I've written is needed.

Screen

Screenshot of the app

Alt text

Video of the app in action with a modern Mac Slack client on the side for verification.

Development and compilation setup

To compile and run the application, you'll need Visual C++ (VC++) 1.52 running on a 32-bit Windows OS up to Windows 10. Windows 3.1 is not required. I use a Windows 2000 VM as it is the oldest and lightest 32-bit Windows OS with full Virtualbox support.

Screen

Coding the app can thus be done on a native Mac or Windows OS with modern text editors.

Even though a 16-bit app can run on modern 32-bit OS, I still recommend occasional testing on a native Windows 3.1 system as VMs are too perfect sometimes.

  1. Install Windows 2000 VM on a host PC. If you want to share files out of the Win 2K VM, set the network to Bridged.
  2. Install VC++ 1.52
  3. Set up Virtualbox shared folder between the host and Win 2K WM
  4. Map a network drive to the local shared folder
  5. VC++ 1.52 can see a network drive and open the w31slack.mak
  6. Just click Project -> Rebuild all.

Screen

The w16slack.exe binary should be available in the same directory.

Executing the unit tests

I wrote a custom unit test framework as I could not find a testing framework for C89 that'll work with VC++ 1.52. 2 Go Programs acting as mock servers are required to be run to test the network APIs.

  1. go run mockprox.go will reply the GET and POST requests by replaying the contents of the ou*.txt files.
  2. go run replay.go 30000 will replay whatever was received on a pure TCP socket connection. This is
  3. Edit the file tstconst.h to suit your system especially the TEST_MOCK_SERVER_IP
  4. Open the file test.mak
  5. Build Project as per normal and you'll see the following

Screen

Running the app

  1. First create an app for your associated workspace.
  2. Add these permissions to your app channels:history, channels:read, chat:write:user, groups:history, identify, im:history.
  3. Issue a user token to yourself https://api.slack.com/custom-integrations/legacy-tokens
  4. Start up http-to-https-proxy
  5. Modify the file w31slack.ini configuration file to suit your needs
  6. Start up the w31slack.exe
  7. Profit!

References

  1. Building Win16 GUI Applications in C
  2. Win16 Example Application

w31slack's People

Contributors

yeokm1 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.