From c692c8a5e082bd02bd7dc7feb6e3f0056ea75f0b Mon Sep 17 00:00:00 2001 From: tobigun Date: Mon, 19 Apr 2010 16:09:09 +0000 Subject: - added manifest file to make ultrastardx UAC aware - this leverages usdx from a legacy app to a vista/win7 compatible app - disables the virtual-store and other dirty UAC legacy app stuff - checking for read-only files should work now - the manifest is embedded in the exe via the RC file (which previously only contained the icon) - alternatively the file ultrastardx.exe.manifest can be put in the game directory along with the .exe file. Vista/Win7 will autodetect this file. - to check if this works: - open the task-manager - right click on ultrastardx - if "UAC-Virtualization" is checked, the app is still executed in legacy mode which should not happen. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2249 b956fd51-792f-4845-bead-9b4dfca2ff2c --- icons/rccompile-delphi.bat | 2 -- icons/rccompile-fpc.bat | 4 ---- icons/ultrastardx-icon.rc | 1 - icons/ultrastardx-icon.res | Bin 22748 -> 0 bytes res/rccompile-delphi.bat | 2 ++ res/rccompile-fpc.bat | 4 ++++ res/ultrastardx.exe.manifest | 12 ++++++++++++ res/ultrastardx.rc | 4 ++++ res/ultrastardx.res | Bin 0 -> 23352 bytes src/ultrastardx.dpr | 2 +- 10 files changed, 23 insertions(+), 8 deletions(-) delete mode 100644 icons/rccompile-delphi.bat delete mode 100644 icons/rccompile-fpc.bat delete mode 100644 icons/ultrastardx-icon.rc delete mode 100644 icons/ultrastardx-icon.res create mode 100644 res/rccompile-delphi.bat create mode 100644 res/rccompile-fpc.bat create mode 100644 res/ultrastardx.exe.manifest create mode 100644 res/ultrastardx.rc create mode 100644 res/ultrastardx.res diff --git a/icons/rccompile-delphi.bat b/icons/rccompile-delphi.bat deleted file mode 100644 index 32f209a7..00000000 --- a/icons/rccompile-delphi.bat +++ /dev/null @@ -1,2 +0,0 @@ -@set RES_NAME=ultrastardx-icon -BRC32 -r -fo%RES_NAME%.res %RES_NAME%.rc diff --git a/icons/rccompile-fpc.bat b/icons/rccompile-fpc.bat deleted file mode 100644 index 30998c6d..00000000 --- a/icons/rccompile-fpc.bat +++ /dev/null @@ -1,4 +0,0 @@ -@set PATH=C:\Programme\lazarus\fpc\2.2.0\bin\i386-win32\;%PATH% -@set RES_NAME=ultrastardx-icon -windres.exe -i %RES_NAME%.rc -o %RES_NAME%.res - diff --git a/icons/ultrastardx-icon.rc b/icons/ultrastardx-icon.rc deleted file mode 100644 index 3d0b43fc..00000000 --- a/icons/ultrastardx-icon.rc +++ /dev/null @@ -1 +0,0 @@ -MAINICON ICON "ultrastardx.ico" diff --git a/icons/ultrastardx-icon.res b/icons/ultrastardx-icon.res deleted file mode 100644 index d79a3d0f..00000000 Binary files a/icons/ultrastardx-icon.res and /dev/null differ diff --git a/res/rccompile-delphi.bat b/res/rccompile-delphi.bat new file mode 100644 index 00000000..cb429f86 --- /dev/null +++ b/res/rccompile-delphi.bat @@ -0,0 +1,2 @@ +@set RES_NAME=ultrastardx +BRC32 -r -fo%RES_NAME%.res %RES_NAME%.rc diff --git a/res/rccompile-fpc.bat b/res/rccompile-fpc.bat new file mode 100644 index 00000000..fc31fd4d --- /dev/null +++ b/res/rccompile-fpc.bat @@ -0,0 +1,4 @@ +@set PATH=C:\Programme\lazarus\fpc\2.2.4\bin\i386-win32\;%PATH% +@set RES_NAME=ultrastardx +windres.exe -i %RES_NAME%.rc -o %RES_NAME%.res + diff --git a/res/ultrastardx.exe.manifest b/res/ultrastardx.exe.manifest new file mode 100644 index 00000000..20b58fb4 --- /dev/null +++ b/res/ultrastardx.exe.manifest @@ -0,0 +1,12 @@ + + + +UltraStar Deluxe + + + + + + + + \ No newline at end of file diff --git a/res/ultrastardx.rc b/res/ultrastardx.rc new file mode 100644 index 00000000..7c3dea60 --- /dev/null +++ b/res/ultrastardx.rc @@ -0,0 +1,4 @@ +#define MANIFEST_RESOURCE_ID 1 +#define RT_MANIFEST 24 +MANIFEST_RESOURCE_ID RT_MANIFEST "..\\res\\ultrastardx.exe.manifest" +MAINICON ICON "..\\icons\\ultrastardx.ico" diff --git a/res/ultrastardx.res b/res/ultrastardx.res new file mode 100644 index 00000000..813282ba Binary files /dev/null and b/res/ultrastardx.res differ diff --git a/src/ultrastardx.dpr b/src/ultrastardx.dpr index fe434142..f6c9558c 100644 --- a/src/ultrastardx.dpr +++ b/src/ultrastardx.dpr @@ -26,7 +26,7 @@ program ultrastardx; {$IFDEF MSWINDOWS} - {$R '..\icons\ultrastardx-icon.res' '..\icons\ultrastardx-icon.rc'} + {$R '..\res\ultrastardx.res' '..\res\ultrastardx.rc'} {$ENDIF} {$IFDEF FPC} -- cgit v1.2.3