Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.5 KB

README.md

File metadata and controls

43 lines (32 loc) · 1.5 KB

ShakeScreen

About

Very basic win32 app for "shaking" the screen, written in C using GDI.

The code migt be bad, sorry for that. If you have any corrections, let me know on my Discord server (I'm grialion#4595)!

Why did I create this?

I created this program and documentation, because I want to archive all the steps of creating/compiling Win32 apps on Linux.

Obviously you can compile it on Windows too, but I recommend using WSL for that. The instructions should work under an Ubuntu WSL.

Okay, so how do I compile and test this?

  1. You need to install MinGW-w64

    • Arch Linux
      $ sudo pacman -S mingw-w64-gcc
    • Debian
      $ sudo apt install gcc-mingw-w64-i686 # for Win32
      $ sudo apt install gcc-mingw-w64-x86-64 # for Win64
  2. Compiling the source

    • Win32
      i686-w64-mingw32-gcc -std=c99 -g main.c -lgdi32 -s -Os -o shakescreen.exe
    • Win64
      x86_64-w64-mingw32-gcc -std=c99 -g main.c -lgdi32 -s -Os -o shakescreen.exe
  3. Running it

    I recommend using VirtualBox for this type of testing (if you know how to set up properly a Windows XP on qemu/kvm, please let me know on discord). Just set up a Windows XP, install guest additions and enable drag and drop and test it after compiling it.

Credit(s)

  • wipet for teaching me some of the methods used in the example code