- modified icons to properly work with windows (bothh ico files and vc++ projeect files etc)
This commit is contained in:
parent
1a8250d2d2
commit
15ee2da57f
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" standalone="yes"?>
|
||||
<configuration>
|
||||
<title value="Mega Glest"/>
|
||||
<file-name value="glest.ini"/>
|
||||
<file-name value="megaglest.ini"/>
|
||||
<icon value="true" path="glest.ico"/>
|
||||
<field-groups>
|
||||
<field-group name="General">
|
||||
|
|
|
@ -10,8 +10,9 @@ rm -rf $RELEASEDIR
|
|||
mkdir -p $RELEASEDIR
|
||||
# copy sources
|
||||
pushd "`pwd`/../../data/glest_game"
|
||||
find glest.ico \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
|
||||
find megaglest.ico \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
|
||||
find servers.ini \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
|
||||
find glestkeys.ini \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
|
||||
find data/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
|
||||
find docs/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
|
||||
find maps/ \( -name "*.*" \) -exec cp -p --parents "{}" $RELEASEDIR ';'
|
||||
|
|
|
@ -132,6 +132,7 @@ if [ $REPACKONLY -eq 0 ]; then
|
|||
find glest -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find glest.bin -exec cp -p --parents "{}" ${INSTALLDATADIR}bin ';'
|
||||
find glest.ini -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find glestkeys.ini -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find glest_configurator -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find glest_editor -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find glest_g3dviewer -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
|
@ -146,7 +147,7 @@ if [ $REPACKONLY -eq 0 ]; then
|
|||
pushd "`pwd`/$megaglest_data_path"
|
||||
|
||||
find configuration.xml -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find glest.ico -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find megaglest.ico -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find data/ \( -name "*.*" \) -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find docs/ \( -name "*.*" \) -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
find maps/ \( -name "*.*" \) -exec cp -p --parents "{}" $INSTALLDATADIR ';'
|
||||
|
|
|
@ -55,10 +55,33 @@ Setup.Package
|
|||
genericname = _("MegaGlest"),
|
||||
tooltip = _("A real time strategy game."),
|
||||
builtin_icon = false,
|
||||
icon = "glest.ico",
|
||||
icon = "megaglest.ico",
|
||||
commandline = "%0/glest",
|
||||
category = "Game"
|
||||
}
|
||||
Setup.DesktopMenuItem
|
||||
{
|
||||
disabled = false,
|
||||
name = _("MegaGlest Map Editor"),
|
||||
genericname = _("MegaGlest"),
|
||||
tooltip = _("A real time strategy game."),
|
||||
builtin_icon = false,
|
||||
icon = "editor.ico",
|
||||
commandline = "%0/editor",
|
||||
category = "Game"
|
||||
}
|
||||
Setup.DesktopMenuItem
|
||||
{
|
||||
disabled = false,
|
||||
name = _("MegaGlest G3D Model Viewer"),
|
||||
genericname = _("MegaGlest"),
|
||||
tooltip = _("A real time strategy game."),
|
||||
builtin_icon = false,
|
||||
icon = "g3dviewer.ico",
|
||||
commandline = "%0/g3dviewer",
|
||||
category = "Game"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
|
@ -2,16 +2,16 @@
|
|||
; General Attributes
|
||||
|
||||
!define APNAME Mega-Glest
|
||||
!define APVER 3.3.4
|
||||
!define APVER 3.3.5
|
||||
|
||||
Name "${APNAME} ${APVER}"
|
||||
SetCompressor /FINAL /SOLID lzma
|
||||
SetCompressorDictSize 64
|
||||
OutFile "${APNAME}-Installer-${APVER}_i386_win32.exe"
|
||||
Icon "..\glest.ico"
|
||||
UninstallIcon "..\glest.ico"
|
||||
!define MUI_ICON "..\glest.ico"
|
||||
!define MUI_UNICON "..\glest.ico"
|
||||
Icon "..\megaglest.ico"
|
||||
UninstallIcon "..\megaglest.ico"
|
||||
!define MUI_ICON "..\megaglest.ico"
|
||||
!define MUI_UNICON "..\megaglest.ico"
|
||||
InstallDir "$PROGRAMFILES\${APNAME}_${APVER}"
|
||||
ShowInstDetails show
|
||||
BGGradient 0xDF9437 0xffffff
|
||||
|
@ -123,8 +123,9 @@ Section "${APNAME} (required)"
|
|||
File "..\..\..\data\glest_game\glest_configurator.exe"
|
||||
File "..\..\..\data\glest_game\g3d_viewer.exe"
|
||||
File "..\..\..\data\glest_game\configuration.xml"
|
||||
File "..\..\..\data\glest_game\glest.ico"
|
||||
File "..\..\..\data\glest_game\megaglest.ico"
|
||||
File "..\..\..\data\glest_game\glest.ini"
|
||||
File "..\..\..\data\glest_game\glestkeys.ini"
|
||||
File "..\..\..\data\glest_game\servers.ini"
|
||||
# File "..\..\..\data\glest_game\dsound.dll"
|
||||
File "..\..\..\data\glest_game\openal32.dll"
|
||||
|
@ -192,8 +193,9 @@ Section "Uninstall"
|
|||
Delete $INSTDIR\glest_configurator.exe
|
||||
Delete $INSTDIR\g3d_viewer.exe
|
||||
Delete $INSTDIR\configuration.xml
|
||||
Delete $INSTDIR\glest.ico
|
||||
Delete $INSTDIR\megaglest.ico
|
||||
Delete $INSTDIR\glest.ini
|
||||
Delete $INSTDIR\glestkeys.ini
|
||||
Delete $INSTDIR\servers.ini
|
||||
# Delete $INSTDIR\dsound.dll
|
||||
Delete $INSTDIR\openal32.dll
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
IDI_ICON1 ICON DISCARDABLE "megaglest_g3dviewer.ico"
|
|
@ -40,14 +40,14 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd";"..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc";..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;"..\..\source\win32_deps\wxWidgets-2.8.10\include""
|
||||
PreprocessorDefinitions="MWIN;__WXMSW__;__WXDEBUG__"
|
||||
AdditionalIncludeDirectories=""..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd";"..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc";..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;"..\..\source\win32_deps\wxWidgets-2.8.10\include";..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;"../../source/win32_deps/SDL-1.2.14/include";"../../source/win32_deps/curl-7.20.1/include";..\..\source\glest_game\graphics;..\..\source\shared_lib\include\xml;"../../source/win32_deps/xerces-c-3.0.1/src";..\..\source\glest_game\global;..\..\source\glest_game\sound;..\..\source\shared_lib\include\sound;..\..\source\glest_game\game"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;CURL_STATICLIB"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderThrough=""
|
||||
PrecompiledHeaderFile="c:\temp\$(TargetName).pch"
|
||||
PrecompiledHeaderFile=""
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
|
@ -63,10 +63,10 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="wxbase28d.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib wxjpegd.lib wxmsw28d_adv.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxmsw28d_gl.lib wxmsw28d_html.lib wxmsw28d_media.lib wxmsw28d_qa.lib wxmsw28d_richtext.lib wxmsw28d_xrc.lib wxpngd.lib wxregexd.lib wxtiffd.lib wxzlibd.lib ..\libglest.lib kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib comctl32.lib comdlg32.lib uuid.lib advapi32.lib shell32.lib winmm.lib rpcrt4.lib"
|
||||
AdditionalDependencies="wxbase28d.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib wxjpegd.lib wxmsw28d_adv.lib wxmsw28d_aui.lib wxmsw28d_core.lib wxmsw28d_gl.lib wxmsw28d_html.lib wxmsw28d_media.lib wxmsw28d_qa.lib wxmsw28d_richtext.lib wxmsw28d_xrc.lib wxpngd.lib wxregexd.lib wxtiffd.lib wxzlibd.lib winmm.lib rpcrt4.lib kernel32.lib user32.lib gdi32.lib ole32.lib oleaut32.lib comctl32.lib comdlg32.lib uuid.lib advapi32.lib shell32.lib libglest.lib Dbghelp.lib sdl.lib sdlmain.lib dxguid.lib libstreflop.lib libcurl.lib ws2_32.lib xerces-c_3d.lib"
|
||||
OutputFile="$(OutDir)\G3D_Viewer.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\..\source\win32_deps\lib"
|
||||
AdditionalLibraryDirectories="../../source/win32_deps/lib;"../../build/$(ConfigurationName)/libglest";../../source/shared_lib/sources/streflop/libstreflop"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"
|
||||
|
@ -196,7 +196,7 @@
|
|||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\glest.rc"
|
||||
RelativePath=".\g3d_viewer.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
IDI_ICON1 ICON DISCARDABLE "megaglest.ico"
|
|
@ -0,0 +1 @@
|
|||
IDI_ICON1 ICON DISCARDABLE "megaglest_editor.ico"
|
|
@ -204,7 +204,7 @@
|
|||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\glest.rc"
|
||||
RelativePath=".\glest_editor.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
|
@ -115,6 +115,12 @@ MainWindow::MainWindow(const string &modelPath)
|
|||
|
||||
CreateStatusBar();
|
||||
|
||||
#ifdef WIN32
|
||||
wxInitAllImageHandlers();
|
||||
wxIcon icon("IDI_ICON1");
|
||||
SetIcon(icon);
|
||||
#endif
|
||||
|
||||
timer = new wxTimer(this);
|
||||
timer->Start(100);
|
||||
|
||||
|
@ -126,6 +132,7 @@ MainWindow::~MainWindow(){
|
|||
delete model;
|
||||
delete timer;
|
||||
delete glCanvas;
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::init(){
|
||||
|
|
|
@ -289,6 +289,12 @@ MainWindow::MainWindow()
|
|||
this->panel->SetSizer(boxsizer);
|
||||
this->Layout();
|
||||
|
||||
#ifdef WIN32
|
||||
wxInitAllImageHandlers();
|
||||
wxIcon icon("IDI_ICON1");
|
||||
SetIcon(icon);
|
||||
#endif
|
||||
|
||||
//#ifndef WIN32
|
||||
timer = new wxTimer(this);
|
||||
timer->Start(100);
|
||||
|
|
|
@ -50,6 +50,8 @@ void message(string message);
|
|||
bool ask(string message);
|
||||
void exceptionMessage(const exception &excp);
|
||||
string getCommandLine();
|
||||
void init_win32();
|
||||
void done_win32();
|
||||
|
||||
}}//end namespace
|
||||
|
||||
|
|
|
@ -65,9 +65,17 @@ Window::Window() {
|
|||
lastMouseEvent = 0;
|
||||
mousePos = Vec2i(0);
|
||||
mouseState.clear();
|
||||
|
||||
#ifdef WIN32
|
||||
init_win32();
|
||||
#endif
|
||||
}
|
||||
|
||||
Window::~Window() {
|
||||
#ifdef WIN32
|
||||
done_win32();
|
||||
#endif
|
||||
|
||||
assert(global_window == this);
|
||||
global_window = 0;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <cassert>
|
||||
#include <algorithm>
|
||||
#include <string.h>
|
||||
#include "SDL_syswm.h"
|
||||
|
||||
#include "leak_dumper.h"
|
||||
|
||||
|
@ -179,4 +180,27 @@ void exceptionMessage(const exception &excp){
|
|||
// return GetSystemMetrics(SM_CYSCREEN);
|
||||
//}
|
||||
|
||||
// This lets us set the SDL Window Icon in Windows
|
||||
// since its a console application
|
||||
HICON icon;
|
||||
|
||||
void init_win32() {
|
||||
HINSTANCE handle = ::GetModuleHandle(NULL);
|
||||
icon = ::LoadIcon(handle, "IDI_ICON1");
|
||||
|
||||
SDL_SysWMinfo wminfo;
|
||||
SDL_VERSION(&wminfo.version)
|
||||
if (SDL_GetWMInfo(&wminfo) != 1)
|
||||
{
|
||||
// error: wrong SDL version
|
||||
}
|
||||
|
||||
HWND hwnd = wminfo.window;
|
||||
|
||||
::SetClassLong(hwnd, GCL_HICON, (LONG) icon);
|
||||
}
|
||||
void done_win32() {
|
||||
::DestroyIcon(icon);
|
||||
}
|
||||
|
||||
}}//end namespace
|
||||
|
|
Loading…
Reference in New Issue