-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmake-manifests.cmd
More file actions
83 lines (77 loc) · 3.99 KB
/
Copy pathmake-manifests.cmd
File metadata and controls
83 lines (77 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@echo off
::
:: This script generates manifests for Vista UAC for UltraDefrag project.
:: Copyright (c) 2009-2013 Dmitri Arkhangelski (dmitriar@gmail.com).
:: Copyright (c) 2010-2013 Stefan Pendl (stefanpe@users.sourceforge.net).
::
:: 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., 675 Mass Ave, Cambridge, MA 02139, USA.
::
:: Suggested by Kerem Gumrukcu (http://entwicklung.junetz.de/).
if "%1" equ "" (
echo Processor Architecture must be specified!
exit /B 1
)
call :make_manifest %1 1.0.2.0 hibernate "Hibernate for Windows" >.\obj\hibernate\hibernate.manifest
call :make_manifest %1 %ULTRADFGVER%.0 udefrag "UltraDefrag console interface" >.\obj\console\console.manifest
call :make_manifest %1 %ULTRADFGVER%.0 wxultradefrag "UltraDefrag GUI" >.\obj\wxgui\res\ultradefrag.manifest
call :make_manifest %1 %ULTRADFGVER%.0 bootexctrl "BootExecute Control Program" >.\obj\bootexctrl\bootexctrl.manifest
call :make_manifest %1 5.1.2.0 Lua "Lua Console" >.\obj\lua\lua.manifest
call :make_manifest %1 5.1.2.0 Lua "Lua GUI" >.\obj\lua-gui\lua.manifest
if /i "%1" equ "X86" (
copy /Y .\obj\hibernate\hibernate.manifest .\hibernate\hibernate.manifest
copy /Y .\obj\console\console.manifest .\console\console.manifest
copy /Y .\obj\wxgui\res\ultradefrag.manifest .\wxgui\res\ultradefrag.manifest
copy /Y .\obj\bootexctrl\bootexctrl.manifest .\bootexctrl\bootexctrl.manifest
copy /Y .\obj\lua\lua.manifest .\lua\lua.manifest
copy /Y .\obj\lua-gui\lua.manifest .\lua-gui\lua.manifest
)
exit /B 0
rem Synopsis: call :make_manifest {arch} {version} {app_name} {full_app_name}
rem Example: call :make_manifest ia64 1.0.0.0 app "Application Name"
:make_manifest
echo ^<?xml version="1.0" encoding="UTF-8" standalone="yes"?^>
echo ^<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"^>
echo ^<assemblyIdentity version="%2" name="%3" processorArchitecture="%1" type="win32"/^>
echo ^<description^>%~4^</description^>
echo ^<dependency^>
echo ^<dependentAssembly^>
echo ^<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
echo version="6.0.0.0" processorArchitecture="%1"
echo publicKeyToken="6595b64144ccf1df" language="*" /^>
echo ^</dependentAssembly^>
echo ^</dependency^>
echo ^<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"^>
echo ^<security^>
echo ^<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"^>
echo ^<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /^>
echo ^</requestedPrivileges^>
echo ^</security^>
echo ^</trustInfo^>
echo ^<asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"^>
echo ^<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"^>
echo ^<dpiAware^>true^</dpiAware^>
echo ^</asmv3:windowsSettings^>
echo ^</asmv3:application^>
echo ^</assembly^>
goto :EOF
rem the following sequence is faster, but misty
:: type manifest.part1 > %1
:: echo version="%3" name="%4" processorArchitecture="%2" >> %1
:: type manifest.part2 >> %1
:: echo %~5 >> %1
:: type manifest.part3 >> %1
:: echo processorArchitecture="%2" >> %1
:: type manifest.part4 >> %1
::goto :EOF