-
Notifications
You must be signed in to change notification settings - Fork 60
/
release.bat
38 lines (31 loc) · 1.12 KB
/
release.bat
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
@echo off
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:--------------------------------------
rm -rf release release.zip
mkdir release
set PATH=c:\progra~1\7-zip;%PATH%
haxe -xml haxedoc.xml --macro include('format',true,['format.tools.MemoryInput','format.tools.MemoryBytes','format.hxsl.Shader'])
cp -R format haxelib.json haxedoc.xml CHANGES.txt release
rm -rf release/*/.svn release/*/*/.svn
chmod -R 777 release
7z a -tzip release.zip release
rm -rf release
haxelib submit release.zip
pause