summaryrefslogtreecommitdiff
path: root/src/miranda32
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-13 16:55:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-13 16:55:17 +0000
commitcbe3cb21f5bca61a03bbd4ae811ee906e09b3f4f (patch)
tree4854fb66f4d59940efa3c1590237915851074dbf /src/miranda32
parent351bcbec48ed77af5f8efcc4d5198707922c5d86 (diff)
- miranda32.exe now does nothing bug extends PATH to %miranda_root%\libs and loads mir_app.dll;
- everything that was in miranda32.exe (including resources) moved to mir_app.dll; - exports from mir_app.dll now available for using directly, without perversions; - src/stdplug.h deleted; git-svn-id: http://svn.miranda-ng.org/main/trunk@14143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/miranda32')
-rw-r--r--src/miranda32/miranda32.vcxproj30
-rw-r--r--src/miranda32/miranda32.vcxproj.filters4
-rw-r--r--src/miranda32/res/miranda32.exe.manifest25
-rw-r--r--src/miranda32/res/resource.rc21
-rw-r--r--src/miranda32/res/version.rc53
-rw-r--r--src/miranda32/src/miranda.cpp62
-rw-r--r--src/miranda32/src/stdafx.cxx19
-rw-r--r--src/miranda32/src/stdafx.h28
8 files changed, 242 insertions, 0 deletions
diff --git a/src/miranda32/miranda32.vcxproj b/src/miranda32/miranda32.vcxproj
new file mode 100644
index 0000000000..e6037379a5
--- /dev/null
+++ b/src/miranda32/miranda32.vcxproj
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>Miranda</ProjectName>
+ <TargetName Condition="'$(Platform)'=='Win32'">Miranda32</TargetName>
+ <TargetName Condition="'$(Platform)'=='x64'">Miranda64</TargetName>
+ <ProjectGuid>{F9916510-9055-4C9F-997A-3755DEC1511B}</ProjectGuid>
+ </PropertyGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(ProjectDir)..\..\build\vc.common\app.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/miranda32/miranda32.vcxproj.filters b/src/miranda32/miranda32.vcxproj.filters
new file mode 100644
index 0000000000..de5ad9f66c
--- /dev/null
+++ b/src/miranda32/miranda32.vcxproj.filters
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(ProjectDir)..\..\build\vc.common\common.filters" />
+</Project> \ No newline at end of file
diff --git a/src/miranda32/res/miranda32.exe.manifest b/src/miranda32/res/miranda32.exe.manifest
new file mode 100644
index 0000000000..b0c140a148
--- /dev/null
+++ b/src/miranda32/res/miranda32.exe.manifest
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <description>Miranda</description>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- 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>
diff --git a/src/miranda32/res/resource.rc b/src/miranda32/res/resource.rc
new file mode 100644
index 0000000000..ae457d069e
--- /dev/null
+++ b/src/miranda32/res/resource.rc
@@ -0,0 +1,21 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "..\..\mir_app\src\resource.h"
+
+#include <windows.h>
+#include <winres.h>
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_MIRANDA ICON "../../mir_app/res/miranda_logo.ico"
diff --git a/src/miranda32/res/version.rc b/src/miranda32/res/version.rc
new file mode 100644
index 0000000000..8f42a6229f
--- /dev/null
+++ b/src/miranda32/res/version.rc
@@ -0,0 +1,53 @@
+#ifdef APSTUDIO_INVOKED
+#error this file is not editable by Microsoft Visual C++
+#endif //APSTUDIO_INVOKED
+
+#include <windows.h>
+#include <winres.h>
+
+#include "../../include/m_version.h"
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION MIRANDA_VERSION_FILEVERSION
+ PRODUCTVERSION MIRANDA_VERSION_FILEVERSION
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "Comments", "Licensed under the terms of the GNU General Public License\0"
+ VALUE "CompanyName", "Miranda NG Team\0"
+ VALUE "FileDescription", "Miranda NG\0"
+ VALUE "FileVersion", MIRANDA_VERSION_DISPLAY
+ VALUE "InternalName", "miranda32\0"
+ VALUE "LegalCopyright", "Copyright © 2000-11 Miranda IM, 2012-15 Miranda NG project. This software is released under the terms of the GNU General Public License.\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "miranda32.exe\0"
+ VALUE "PrivateBuild", "\0"
+ VALUE "ProductName", "Miranda NG\0"
+ VALUE "ProductVersion", MIRANDA_VERSION_DISPLAY
+ VALUE "SpecialBuild", "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
+
+#endif // !_MAC
diff --git a/src/miranda32/src/miranda.cpp b/src/miranda32/src/miranda.cpp
new file mode 100644
index 0000000000..029c56562f
--- /dev/null
+++ b/src/miranda32/src/miranda.cpp
@@ -0,0 +1,62 @@
+/*
+
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org),
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "stdafx.h"
+
+int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR cmdLine, int)
+{
+ TCHAR tszPath[MAX_PATH];
+ GetModuleFileName(hInstance, tszPath, _countof(tszPath));
+
+ TCHAR *p = _tcsrchr(tszPath, '\\');
+ if (p)
+ p[1] = 0;
+
+ _tcsncat(tszPath, _T("libs"), _TRUNCATE);
+ DWORD cbPath = (DWORD)_tcslen(tszPath);
+
+ DWORD cbSize = GetEnvironmentVariable(_T("PATH"), NULL, 0);
+ TCHAR *ptszVal = new TCHAR[cbSize + MAX_PATH + 2];
+ _tcscpy(ptszVal, tszPath);
+ _tcscat(ptszVal, _T(";"));
+ GetEnvironmentVariable(_T("PATH"), ptszVal + cbPath + 1, cbSize);
+ SetEnvironmentVariable(_T("PATH"), ptszVal);
+
+ HINSTANCE hMirApp = LoadLibraryA("mir_app.dll");
+ if (hMirApp == NULL) {
+ MessageBox(NULL, _T("mir_app.dll cannot be loaded"), _T("Fatal error"), MB_ICONERROR | MB_OK);
+ return 1;
+ }
+
+ typedef int (WINAPI *pfnMain)(LPTSTR);
+ pfnMain fnMain = (pfnMain)GetProcAddress(hMirApp, "mir_main");
+ if (fnMain == NULL) {
+ MessageBox(NULL, _T("invalid mir_app.dll present, program exiting"), _T("Fatal error"), MB_ICONERROR | MB_OK);
+ return 2;
+ }
+
+ int retVal = fnMain(cmdLine);
+ FreeLibrary(hMirApp);
+ return retVal;
+}
diff --git a/src/miranda32/src/stdafx.cxx b/src/miranda32/src/stdafx.cxx
new file mode 100644
index 0000000000..5d3cae4e8e
--- /dev/null
+++ b/src/miranda32/src/stdafx.cxx
@@ -0,0 +1,19 @@
+/*
+
+Copyright (C) 2012-15 Miranda NG team (http://miranda-ng.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2
+of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "stdafx.h" \ No newline at end of file
diff --git a/src/miranda32/src/stdafx.h b/src/miranda32/src/stdafx.h
new file mode 100644
index 0000000000..4d29d7be51
--- /dev/null
+++ b/src/miranda32/src/stdafx.h
@@ -0,0 +1,28 @@
+/*
+
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-12 Miranda IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include <windows.h>
+
+#include <tchar.h>
+