summaryrefslogtreecommitdiffstats
path: root/bin/createpackage.bat
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-06-08 11:48:19 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-06-08 11:48:19 (GMT)
commita73a43e036159f49a3d422790acfbdbaed5610b9 (patch)
tree9a04eb0df8aa7c46ca807ecb4f4845d8ac4ef947 /bin/createpackage.bat
parent23ae8b6badfd688f962590268a6147771d27266c (diff)
downloadQt-a73a43e036159f49a3d422790acfbdbaed5610b9.zip
Qt-a73a43e036159f49a3d422790acfbdbaed5610b9.tar.gz
Qt-a73a43e036159f49a3d422790acfbdbaed5610b9.tar.bz2
Changed created sisx package extension to sis and also cleaned
up the createpackage script a bit in general.
Diffstat (limited to 'bin/createpackage.bat')
-rw-r--r--bin/createpackage.bat63
1 files changed, 44 insertions, 19 deletions
diff --git a/bin/createpackage.bat b/bin/createpackage.bat
index 1c6e94d..116d52b 100644
--- a/bin/createpackage.bat
+++ b/bin/createpackage.bat
@@ -1,5 +1,16 @@
@echo off
+set installsigned_old=%installsigned%
+set pkgfile_old=%pkgfile%
+set basename_old=%basename%
+set signsis1_old=%signsis1%
+set signsis2_old=%signsis2%
+set signsis3_old=%signsis3%
+set unsigned_sis_name_old=%unsigned_sis_name%
+set signed_sis_name_old=%signed_sis_name%
+set scriptpath_old=%scriptpath%
+set certificate_old=%certificate%
+
rem Help text
if "%1"=="" (
echo Convenience script for creating signed packages you can install on your phone.
@@ -13,14 +24,14 @@ if "%1"=="" (
)
if "%1"=="-i" (
- set installsisx=true
+ set installsigned=true
set pkgfile=%2
set basename=%~n2
set signsis1=%3
set signsis2=%4
set signsis3=%5
) else (
- set installsisx=false
+ set installsigned=false
set pkgfile=%1
set basename=%~n1
set signsis1=%2
@@ -28,34 +39,37 @@ if "%1"=="-i" (
set signsis3=%4
)
+set unsigned_sis_name=%basename%_unsigned.sis
+set signed_sis_name=%basename%.sis
+
+rem Get absolute path to this script
+set scriptpath=%~dp0
+
rem Check the .pkg actually exists.
if not exist %pkgfile% (
echo Error: Package description file '%pkgfile%' does not exist.
goto done
)
-rem Get absolute path to this script
-set scriptpath=%~dp0
-
-rem Remove any existing .sis or .sisx packages
-if exist %basename%.sis del %basename%.sis
-if exist %basename%.sisx del %basename%.sisx
+rem Remove any existing .sis packages
+if exist %signed_sis_name% del %signed_sis_name%
+if exist %unsigned_sis_name% del %unsigned_sis_name%
rem Create .sis package
-makesis %pkgfile%
+makesis %pkgfile% %unsigned_sis_name%
rem If no certificate is given, check default options
if x%signsis1% == x (
rem If RnD certificate is not found, sign with self signed certificate
if not exist %scriptpath%..\rd.cer (
set certificate=Self signed
- signsis %basename%.sis %basename%.sisx %scriptpath%..\selfsigned.cer %scriptpath%..\selfsigned.key
+ signsis %unsigned_sis_name% %signed_sis_name% %scriptpath%..\selfsigned.cer %scriptpath%..\selfsigned.key
goto install
)
rem Sign with RnD certificate
set certificate=RnD
- signsis %basename%.sis %basename%.sisx %scriptpath%..\rd.cer %scriptpath%..\rd-key.pem
+ signsis %unsigned_sis_name% %signed_sis_name% %scriptpath%..\rd.cer %scriptpath%..\rd-key.pem
) else (
if x%signsis2% == x (
echo Custom certificate key file parameter missing.
@@ -63,19 +77,30 @@ if x%signsis1% == x (
)
set certificate=%signsis1%
- signsis %basename%.sis %basename%.sisx %signsis1% %signsis2% %signsis3%
+ signsis %unsigned_sis_name% %signed_sis_name% %signsis1% %signsis2% %signsis3%
)
:install
-if exist %basename%.sisx (
- echo Successfully created %basename%.sisx using certificate %certificate%
- if "%installsisx%" == "true" (
- echo Installing %basename%.sisx...
- call %basename%.sisx
+if exist %signed_sis_name% (
+ echo Successfully created %signed_sis_name% using certificate %certificate%
+ if "%installsigned%" == "true" (
+ echo Installing %signed_sis_name%...
+ call %signed_sis_name%
)
)
:cleanup
-if exist %basename%.sis del %basename%.sis
+if exist %unsigned_sis_name% del %unsigned_sis_name%
+
+:done
-:done \ No newline at end of file
+set installsigned=%installsigned_old%
+set pkgfile=%pkgfile_old%
+set basename=%basename_old%
+set signsis1=%signsis1_old%
+set signsis2=%signsis2_old%
+set signsis3=%signsis3_old%
+set unsigned_sis_name=%unsigned_sis_name_old%
+set signed_sis_name=%signed_sis_name_old%
+set scriptpath=%scriptpath_old%
+set certificate=%certificate_old%