Skip to content

Commit

Permalink
Added the pre-built libraries for Windows XP
Browse files Browse the repository at this point in the history
  • Loading branch information
xuminic committed Sep 27, 2024
1 parent c564250 commit b6f2ec2
Show file tree
Hide file tree
Showing 39 changed files with 5,079 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ USE_GTK3=1 make
Managed to build the IUP in Windows XP, though there are many trade-offs.
Need to install MinGW 2013 from SourceForge, then
- set environment variable `MSYSTEM` to `MINGWXP`

```
export MSYSTEM=MINGWXP
```
so the build system will known the host system in Windows XP.
- It will set compiler path to `mingw3`, where is `/mingw/bin`
- It will disable the Draw driver with alpha and anti-aliasing

- manually building by `make iup_all`

- The pre-built libaraies for Windows XP are available in `WinXP_mingw4_lib`

You don't have to compile the IUP in Windows. The iup-porting packed a set of library for Windows XP
from the time machine in `WinXP_mingw4_lib`. It has been tested working in MinGW
You don't have to compile the IUP in Windows. The iup-porting packed a set of library for Windows XP
from the time machine in `WinXP_mingw4_lib`. It has been tested working in MinGW


51 changes: 51 additions & 0 deletions WinXP_mingw4_lib/etc/iup.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity
version="3.0.0.0"
processorArchitecture="x86"
name="IupApp"
type="win32"
/>
<description>Iup Application</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="x86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"
/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
</application>
</compatibility>
</assembly>
61 changes: 61 additions & 0 deletions WinXP_mingw4_lib/etc/iup.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
TECGRAF_ICON ICON "tecgraf.ico" /* the first icon will also defines the executable icon in Explorer */
CURSOR_PEN CURSOR "pen.cur"

/****************************************************/
/* Applications can change or remove this */

1 VERSIONINFO
FILEVERSION 3,21,0,0
PRODUCTVERSION 3,21,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "www.tecgraf.puc-rio.br/iup\0"
VALUE "CompanyName", "Tecgraf/PUC-Rio\0"
VALUE "FileDescription", "IUP - Portable User Interface\0"
VALUE "FileVersion", "3.21.0\0"
VALUE "LegalCopyright", "Copyright � 1994-2017 Tecgraf/PUC-Rio.\0"
VALUE "OriginalFilename", "iup.dll\0"
VALUE "ProductName", "IUP for Windows\0"
VALUE "ProductVersion", "3.21.0\0"
END
END
END

/****************************************************/
/* Used by IupFileDlg when SHOWPREVIEW=Yes */

/* To avoid the inclusion of <winuser.h> */
#define WS_CHILD 0x40000000L
#define WS_VISIBLE 0x10000000L
#define WS_CLIPSIBLINGS 0x04000000L
#define DS_3DLOOK 0x0004L
#define DS_CONTROL 0x0400L
#define SS_OWNERDRAW 0x0000000DL
#define WS_EX_STATICEDGE 0x00020000L

#define IUP_PREVIEWCANVAS 3000 /* 0x0BB8 */

iupPreviewDlg DIALOG DISCARDABLE 0, 0, 250, 95
STYLE WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | DS_3DLOOK | DS_CONTROL
FONT 8, "MS Shell Dlg"
BEGIN
/* ..., SS_OWNERDRAW, x, y, width, height, ... */
CONTROL "", IUP_PREVIEWCANVAS, "STATIC", SS_OWNERDRAW, 70, 0, 120, 90, WS_EX_STATICEDGE
END

/****************************************************/
/* The following lines will enable Windows XP/Vista Visual Styles */

/* don't add this if building the DLL */
#ifndef IUP_DLL
#ifdef TEC_64
1 24 "iup64.manifest"
#else
1 24 "iup.manifest"
#endif
#endif

/****************************************************/
51 changes: 51 additions & 0 deletions WinXP_mingw4_lib/etc/iup64.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity
version="3.0.0.0"
processorArchitecture="amd64"
name="IupApp"
type="win32"
/>
<description>Iup Application</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="amd64"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"
/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
</application>
</compatibility>
</assembly>
34 changes: 34 additions & 0 deletions WinXP_mingw4_lib/etc/iupstub.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* When using IUP as a DLL you must link with the "iupstub.lib" static library.
* But if you are using a compiler that is different
* from the one that built the "iupstub.lib" static library
* it can occour linking problems, usually argc and argv not being found.
* If that happen do not use the "iupstub.lib" static library
* and use this file instead.
*
* See Copyright Notice in "iup.h"
*/

#include <windows.h>

#include <stdlib.h> /* declaration of __argc and __argv */

extern int main(int, char **);

/* WinMain is NOT called for Console applications */
int WINAPI WinMain (HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int ncmdshow)
{
(void)hinst; /* NOT used */
(void)hprev;
(void)cmdline;
(void)ncmdshow;

/* this seems to work for all the compilers we tested, except Watcom compilers */
/* These are declared in <stdlib.h>, except for Cygwin. */
#ifdef __GNUC__
extern int __argc;
extern char** __argv;
#endif

return main(__argc, __argv);
}
Binary file added WinXP_mingw4_lib/etc/pen.cur
Binary file not shown.
Binary file added WinXP_mingw4_lib/etc/tecgraf.ico
Binary file not shown.
Loading

0 comments on commit b6f2ec2

Please sign in to comment.