Skip to content

Commit

Permalink
Prepare for version 1.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPayne committed Aug 27, 2016
1 parent 7ccf25a commit 85f144b
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 87 deletions.
24 changes: 24 additions & 0 deletions License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org>
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ RC = windres

# Compile ANSI build only if CHARSET=ANSI
ifeq (${CHARSET}, ANSI)
CFLAGS= -O3 -std=c99 -D _WIN32_IE=0x0500 -D WINVER=0x500 ${WARNS}
CFLAGS = -O3 -std=c99 -D _WIN32_IE=0x0500 -D WINVER=0x500 ${WARNS}
else
CFLAGS= -O3 -std=c99 -D UNICODE -D _UNICODE -D _WIN32_IE=0x0500 -D WINVER=0x500 ${WARNS}
CFLAGS = -O3 -std=c99 -D UNICODE -D _UNICODE -D _WIN32_IE=0x0500 -D WINVER=0x500 ${WARNS}
endif


Expand All @@ -26,7 +26,10 @@ Win32App.exe: ${OBJS}
clean:
del obj\*.o "Win32App.exe"

obj/%.o: src/%.c ${HEADERS}
obj:
mkdir obj

obj/%.o: src/%.c ${HEADERS} obj
${CC} ${CFLAGS} ${INCLUDE_DIRS} -c $< -o $@

obj/resource.o: res/resource.rc res/Application.manifest res/Application.ico include/resource.h
Expand Down
74 changes: 74 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# MinGW Win32 Application

## Table of Contents

- [Introduction](#introduction)
- [Terms of Use](#terms-of-use)
- [Problems?](#problems)
- [Changelog](#changelog)

## Introduction

This application is an example Windows GUI application, written to demonstrate
how this can be done using MinGW. It accompanies the
[Win32 Apps with MinGW](http://www.transmissionzero.co.uk/computing/win32-apps-with-mingw/)
article on [Transmission Zero](http://www.transmissionzero.co.uk/).

To build the application on a Windows machine, open a command prompt, change to
the directory containing the Makefile, and type "mingw32-make". The application
should be compiled, linked, and output as "Win32App.exe".

To compile an ANSI build (i.e. if you want the application to run under Windows
9x), run "mingw32-make CHARSET=ANSI" from the command prompt.

To build under another operating system, the Makefile will probably require
some small changes. For example, under Fedora the C compiler and resource
compiler are named "i686-pc-mingw32-gcc" and "i686-pc-mingw32-windres". Also,
your version of the make utility may be named differently--please check the
documentation which came with your MinGW packages.

It should also be possible to build the application using any C or C++ compiler
which supports targeting Windows, for example Microsoft Visual C++ and Open
Watcom. You will of course need to set the projects up for yourself if you do
that. No source code modifications are required if you want to build a 64 bit
version of the application.

## Terms of Use

Refer to "License.txt" for terms of use.

## Problems?

If you have any problems or questions, please ensure you have read this readme
file and the
[Win32 Apps with MinGW](http://www.transmissionzero.co.uk/computing/win32-apps-with-mingw/)
article. If you are still having trouble, you can
[get in contact](http://www.transmissionzero.co.uk/contact/).

## Changelog

5. 2016-08-27: Version 1.4
- Added "supportedOS" to application manifest to indicate compatibility with
Windows Vista to Windows 10.

4. 2013-12-15: Version 1.3
- Added CHARSET variable to makefile so that an ANSI build can be compiled if
required.
- Updated image loading code for window class so that the correct small icon
is loaded on Windows 9x.

3. 2013-08-26: Version 1.2
- Minor tweaks to the VERSIONINFO resource so that it uses constants rather
than magic numbers.
- Modified "processorArchitecture" for common controls library in manifest, to
avoid errors when the application is built for and run on a 64 bit OS.

2. 2011-07-02: Version 1.1
- Minor tweaks to the code for consistency between Win16 and Win32 versions.
- Minor tweaks to the Makefile for consistency.

1. 2011-04-13: Version 1.0
- Initial release.

Transmission Zero
2016-08-27
78 changes: 0 additions & 78 deletions Readme.txt

This file was deleted.

18 changes: 16 additions & 2 deletions res/Application.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Supports Windows Vista / Server 2008 -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Supports Windows 7 / Server 2008 R2 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Supports Windows 8 / Server 2012 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Supports Windows 8.1 / Server 2012 R2 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Supports Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
Expand Down
8 changes: 4 additions & 4 deletions res/resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
IDI_APPICON ICON "Application.ico"

// Our main menu.
IDR_MAINMENU MENU
IDR_MAINMENU MENU
BEGIN
POPUP "&File"
BEGIN
Expand Down Expand Up @@ -42,7 +42,7 @@ BEGIN
VALUE "FileDescription", "Win32 Test application"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "Win32App"
VALUE "LegalCopyright", "�2013 Transmission Zero"
VALUE "LegalCopyright", "�2016 Transmission Zero"
VALUE "OriginalFilename", "Win32App.exe"
VALUE "ProductName", "Win32 Test application"
VALUE "ProductVersion", "1.0.0.0"
Expand All @@ -62,12 +62,12 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
ICON IDI_APPICON,IDC_STATIC,7,7,20,20
LTEXT "Win32 Test application.",IDC_STATIC,34,7,86,8
LTEXT "�2013 Transmission Zero",IDC_STATIC,34,17,86,8
LTEXT "�2016 Transmission Zero",IDC_STATIC,34,17,86,8
DEFPUSHBUTTON "OK",IDOK,90,46,50,14,WS_GROUP
END

// Our accelerators.
IDR_ACCELERATOR ACCELERATORS
IDR_ACCELERATOR ACCELERATORS
BEGIN
"A", ID_HELP_ABOUT, VIRTKEY, ALT, NOINVERT
END

0 comments on commit 85f144b

Please sign in to comment.