RSS-Feed
Follow on Twitter
Share on Facebook
Share on Facebook

Forum for M.A.R.S.

Important: Due to some problems, it’s currently difficult to create an account for this forum. If you want to have one, please send us (marscoreteam@googlemail.com) your desired user name and we’ll create an account for you. Sorry for this inconvenience!

Guest  

Welcome Guest, posting in this forum requires registration.

Pages: [1]
Topic: resource.rc
Phille
Member
Posts: 5
resource.rc
on: May 26, 2011, 19:37

I am building mars with mingw and wondered why the exe has no icon. So I changed some things and even added some stuff to the resource.rc:

Index: resources/resource.rc
===================================================================
--- resources/resource.rc	(Revision 200)
+++ resources/resource.rc	(Arbeitskopie)
@@ -1,3 +1,27 @@
 # ifdef __WIN32__
-    IDR_ICO_MAIN ICON "resources/icon.ico"
+IDR_ICO_MAIN ICON "icon.ico"
+
+1 VERSIONINFO
+FILEVERSION     0,7,2,200
+PRODUCTVERSION  0,7,2,200
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "080904E4"
+    BEGIN
+      VALUE "CompanyName", "M.A.R.S"
+      VALUE "FileDescription", "A ridiculous Shooter"
+      VALUE "FileVersion", "0.7.2.200"
+      VALUE "InternalName", "mars"
+      VALUE "LegalCopyright", "2010 - 2011 by Felix Lauer and Simon Schneegans"
+      VALUE "OriginalFilename", "mars.exe"
+      VALUE "ProductName", "M.A.R.S."
+      VALUE "ProductVersion", "0.7.2.200"
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x809, 1252
+  END
+END
 # endif
Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt	(Revision 200)
+++ src/CMakeLists.txt	(Arbeitskopie)
@@ -44,6 +44,7 @@
 			main.cpp
 			${MARS_SOURCES}
 			${MARS_HEADERS}
+            ${MARS_SOURCE_DIR}/resources/resource.rc
 	)
 endif(APPLE)

This works for me. I am not sure why the path to the icon should be “resources/icon.ico”. What do you think?

Simon
Administrator
Posts: 35
Re: resource.rc
on: May 29, 2011, 16:08

Thanks a lot for this patch, too! I’ve included it in our SVN repository. I’ve currently no real windows machine to test it, but it works fine in VirtualBox.

Maybe the ressource.rc file looks for the icon in the directory where itself resides in…

Thanks a lot, the exe looks way better now :D

Developing M.A.R.S…. just for fun :D

Phille
Member
Posts: 5
Re: resource.rc
on: May 30, 2011, 19:47

No problem!
I am not sure about this but premake might need the include to be that way. Is that possible?

Pages: [1]
WP Forum Server by VastHTML | LucidCrew
Version: 1.6.1 ; Page loaded in: 0.034 seconds.


Powered by WordPress, © 2010-2011 by Simon Schneegans and Felix Lauer (IMPRESSUM). Hosted on Sourceforge.