diff --git a/installerbuilder/create-test-installer.bat b/installerbuilder/create-test-installer.bat deleted file mode 100644 index 14677999..00000000 --- a/installerbuilder/create-test-installer.bat +++ /dev/null @@ -1,70 +0,0 @@ -IF "%1" EQU "" ( - set OFFLINE_INSTALLER=true - set ONLINE_INSTALLER=true - set REPOGEN=true - set TEST_ONLINE_INSTALLER=false - set TEST_OFFLINE_INSTALLER=false -) else ( - set OFFLINE_INSTALLER=false - set ONLINE_INSTALLER=false - set REPOGEN=false - set TEST_ONLINE_INSTALLER=false - set TEST_OFFLINE_INSTALLER=false -) - -for %%i in (%1,%2,%3,%4,%5,%6,%7,%8,%9) DO ( - IF "%%i" EQU "offline" ( - set OFFLINE_INSTALLER=true - ) - IF "%%i" EQU "online" ( - set ONLINE_INSTALLER=true - ) - IF "%%i" EQU "repogen" ( - set REPOGEN=true - ) - IF "%%i" EQU "test_online" ( - set TEST_ONLINE_INSTALLER=true - ) - IF "%%i" EQU "test_offline" ( - set TEST_OFFLINE_INSTALLER=true - ) -) - -set AUTO_INSTALLATION_SCRIPT=--script %CD%\auto_installations_script.qs - -set LOCAL_REPOSITORY_PATH=file:///%CD%\bin\repository -set LOCAL_REPOSITORY_PATH=%LOCAL_REPOSITORY_PATH:\=/% - -call BatchSubstitute.bat http://www.xxxx.com/repository %LOCAL_REPOSITORY_PATH% ..\examples\testapp\config\config.xml > ..\examples\testapp\config\config.xml_new - -copy /Y ..\examples\testapp\config\config.xml ..\examples\testapp\config\config.xml_old -move /Y ..\examples\testapp\config\config.xml_new ..\examples\testapp\config\config.xml - -IF "%OFFLINE_INSTALLER%" EQU "true" ( - echo create offline installer - bin\binarycreator -t bin\installerbase.exe -v -p ..\examples\testapp\packages -c ..\examples\testapp\config --offline-only bin\test-installer-offline.exe com.nokia.testapp - IF errorlevel 1 pause ELSE echo ...done -) - -IF "%ONLINE_INSTALLER%" EQU "true" ( - echo create online installer - bin\binarycreator -t bin\installerbase.exe -v -n -p ..\examples\testapp\packages -c ..\examples\testapp\config bin\test-installer-online.exe com.nokia.testapp - IF errorlevel 1 pause ELSE echo ...done -) - -IF "%REPOGEN%" EQU "true" ( - echo create online repository - IF exist bin\repository rmdir /S /Q bin\repository - bin\repogen.exe -p ..\examples\testapp\packages -c ..\examples\testapp\config bin\repository com.nokia.testapp - IF errorlevel 1 pause ELSE echo ...done -) - -IF "%TEST_OFFLINE_INSTALLER%" EQU "true" ( - bin\test-installer-offline.exe --verbose %AUTO_INSTALLATION_SCRIPT% -) - -IF "%TEST_ONLINE_INSTALLER%" EQU "true" ( - bin\test-installer-online.exe --verbose %AUTO_INSTALLATION_SCRIPT% -) - -copy /Y ..\examples\testapp\config\config.xml_old ..\examples\testapp\config\config.xml diff --git a/installerbuilder/create-test-installer.sh b/installerbuilder/create-test-installer.sh deleted file mode 100644 index abf25b63..00000000 --- a/installerbuilder/create-test-installer.sh +++ /dev/null @@ -1 +0,0 @@ -./bin/binarycreator -t bin/installerbase -v -p ../examples/testapp/packages -c ../examples/testapp/config test-installer --offline-only com.nokia.testapp diff --git a/installerbuilder/installerbuilder.pro b/installerbuilder/installerbuilder.pro index c1621c68..c057eb26 100644 --- a/installerbuilder/installerbuilder.pro +++ b/installerbuilder/installerbuilder.pro @@ -1,12 +1,4 @@ TEMPLATE = subdirs CONFIG += ordered -SUBDIRS += libinstaller installerbase binarycreator repogen archivegen tests - -test.commands=(cd tests && $(MAKE) test) - -test.target=test -test.depends = $(TARGET) -QMAKE_EXTRA_TARGETS += test - -TRANSLATIONS += installerbase/translations/de_de.ts \ - installerbase/translations/en_us.ts +SUBDIRS += libinstaller installerbase binarycreator repogen archivegen +TRANSLATIONS += installerbase/translations/de_de.ts installerbase/translations/en_us.ts diff --git a/installerbuilder/tests/tests.pro b/installerbuilder/tests/tests.pro deleted file mode 100644 index 4cb064c5..00000000 --- a/installerbuilder/tests/tests.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE=subdirs - -DESTDIR = bin -SUBDIRS += extractarchiveoperationtest environmentvariable - -unix:test.commands=./bin/extractarchiveoperationtest -win32:test.commands=bin\\extractarchiveoperationtest.exe - -test.target=test -test.depends = $(TARGET) -QMAKE_EXTRA_TARGETS += test diff --git a/installerfw.pro b/installerfw.pro index 7d3a262a..a092158b 100644 --- a/installerfw.pro +++ b/installerfw.pro @@ -1,11 +1,11 @@ -TEMPLATE=subdirs CONFIG += ordered -SUBDIRS += installerbuilder examples tools -mac:SUBDIRS -= examples +TEMPLATE = subdirs +!macx:SUBDIRS += examples +SUBDIRS += installerbuilder tools -test.target=test -test.commands=(cd installerbuilder && $(MAKE) test) +test.target = test test.depends = $(TARGET) QMAKE_EXTRA_TARGETS += test +test.commands = (cd tests && $(QMAKE) && $(MAKE)) include (doc/doc.pri) diff --git a/installerbuilder/tests/environmentvariable/environmentvariable.pro b/tests/environmentvariable/environmentvariable.pro similarity index 51% rename from installerbuilder/tests/environmentvariable/environmentvariable.pro rename to tests/environmentvariable/environmentvariable.pro index 704cf8ff..036a4ff0 100644 --- a/installerbuilder/tests/environmentvariable/environmentvariable.pro +++ b/tests/environmentvariable/environmentvariable.pro @@ -8,13 +8,15 @@ CONFIG -= app_bundle QT += testlib script QT -= gui -INCLUDEPATH += ../../libinstaller .. -DEPENDPATH += ../../libinstaller ../../common +INCLUDEPATH += ../../installerbuilder/libinstaller .. +DEPENDPATH += ../../installerbuilder/libinstaller ../../installerbuilder/common -include(../../libinstaller/libinstaller.pri) +include(../../installerbuilder/libinstaller/libinstaller.pri) SOURCES = environmentvariabletest.cpp HEADERS = environmentvariabletest.h +LIBS = -L../../installerbuilder/lib -linstaller $$LIBS win32:LIBS += ole32.lib oleaut32.lib user32.lib win32:OBJECTS_DIR = .obj + diff --git a/installerbuilder/tests/environmentvariable/environmentvariabletest.cpp b/tests/environmentvariable/environmentvariabletest.cpp similarity index 100% rename from installerbuilder/tests/environmentvariable/environmentvariabletest.cpp rename to tests/environmentvariable/environmentvariabletest.cpp diff --git a/installerbuilder/tests/environmentvariable/environmentvariabletest.h b/tests/environmentvariable/environmentvariabletest.h similarity index 100% rename from installerbuilder/tests/environmentvariable/environmentvariabletest.h rename to tests/environmentvariable/environmentvariabletest.h diff --git a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp b/tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp similarity index 100% rename from installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp rename to tests/extractarchiveoperationtest/extractarchiveoperationtest.cpp diff --git a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.h b/tests/extractarchiveoperationtest/extractarchiveoperationtest.h similarity index 100% rename from installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.h rename to tests/extractarchiveoperationtest/extractarchiveoperationtest.h diff --git a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro b/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro similarity index 52% rename from installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro rename to tests/extractarchiveoperationtest/extractarchiveoperationtest.pro index 11ccc347..ce3551e1 100644 --- a/installerbuilder/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro +++ b/tests/extractarchiveoperationtest/extractarchiveoperationtest.pro @@ -8,13 +8,14 @@ CONFIG -= app_bundle QT += testlib script QT -= gui -INCLUDEPATH += ../../libinstaller .. -DEPENDPATH += ../../libinstaller ../../common +INCLUDEPATH += ../../installerbuilder/libinstaller .. +DEPENDPATH += ../../installerbuilder/libinstaller ../../installerbuilder/common -include(../../libinstaller/libinstaller.pri) +include(../../installerbuilder/libinstaller/libinstaller.pri) SOURCES = extractarchiveoperationtest.cpp HEADERS = extractarchiveoperationtest.h +LIBS = -L../../installerbuilder/lib -linstaller $$LIBS win32:LIBS += ole32.lib oleaut32.lib user32.lib win32:OBJECTS_DIR = .obj diff --git a/tools/fileengineclient/fileengineclient.cpp b/tests/fileengineclient/fileengineclient.cpp similarity index 100% rename from tools/fileengineclient/fileengineclient.cpp rename to tests/fileengineclient/fileengineclient.cpp diff --git a/tools/fileengineclient/fileengineclient.pro b/tests/fileengineclient/fileengineclient.pro similarity index 100% rename from tools/fileengineclient/fileengineclient.pro rename to tests/fileengineclient/fileengineclient.pro diff --git a/tools/fileengineserver/fileengineserver.cpp b/tests/fileengineserver/fileengineserver.cpp similarity index 100% rename from tools/fileengineserver/fileengineserver.cpp rename to tests/fileengineserver/fileengineserver.cpp diff --git a/tools/fileengineserver/fileengineserver.pro b/tests/fileengineserver/fileengineserver.pro similarity index 100% rename from tools/fileengineserver/fileengineserver.pro rename to tests/fileengineserver/fileengineserver.pro diff --git a/installerbuilder/BatchSubstitute.bat b/tests/test-installer/BatchSubstitute.bat similarity index 100% rename from installerbuilder/BatchSubstitute.bat rename to tests/test-installer/BatchSubstitute.bat diff --git a/installerbuilder/auto_installations_script.qs b/tests/test-installer/auto_installations_script.qs similarity index 100% rename from installerbuilder/auto_installations_script.qs rename to tests/test-installer/auto_installations_script.qs diff --git a/tests/test-installer/create-test-installer.bat b/tests/test-installer/create-test-installer.bat new file mode 100644 index 00000000..866e41f4 --- /dev/null +++ b/tests/test-installer/create-test-installer.bat @@ -0,0 +1,76 @@ +IF "%1" EQU "" ( + set OFFLINE_INSTALLER=true + set ONLINE_INSTALLER=true + set REPOGEN=true + set TEST_ONLINE_INSTALLER=false + set TEST_OFFLINE_INSTALLER=false +) else ( + set OFFLINE_INSTALLER=false + set ONLINE_INSTALLER=false + set REPOGEN=false + set TEST_ONLINE_INSTALLER=false + set TEST_OFFLINE_INSTALLER=false +) + +for %%i in (%1,%2,%3,%4,%5,%6,%7,%8,%9) DO ( + IF "%%i" EQU "offline" ( + set OFFLINE_INSTALLER=true + ) + IF "%%i" EQU "online" ( + set ONLINE_INSTALLER=true + ) + IF "%%i" EQU "repogen" ( + set REPOGEN=true + ) + IF "%%i" EQU "test_online" ( + set TEST_ONLINE_INSTALLER=true + ) + IF "%%i" EQU "test_offline" ( + set TEST_OFFLINE_INSTALLER=true + ) +) + +set AUTO_INSTALLATION_SCRIPT=--script %CD%\auto_installations_script.qs + +set BINARY_PATH_RELATIVE=%CD%\..\..\installerbuilder\bin +pushd . +cd %BINARY_PATH_RELATIVE% +set BINARY_PATH_ABSOLUTE=%CD% +popd + +set LOCAL_REPOSITORY=file:///%BINARY_PATH_ABSOLUTE%/repository +set LOCAL_REPOSITORY_PATH=%LOCAL_REPOSITORY:\=/% + +call BatchSubstitute.bat http://www.xxxx.com/repository %LOCAL_REPOSITORY_PATH% ..\..\examples\testapp\config\config.xml > ..\..\examples\testapp\config\config.xml_new + +copy /Y ..\..\examples\testapp\config\config.xml ..\..\examples\testapp\config\config.xml_old +move /Y ..\..\examples\testapp\config\config.xml_new ..\..\examples\testapp\config\config.xml + +IF "%OFFLINE_INSTALLER%" EQU "true" ( + echo create offline installer + ..\..\installerbuilder\bin\binarycreator -t ..\..\installerbuilder\bin\installerbase.exe -v -p ..\..\examples\testapp\packages -c ..\..\examples\testapp\config --offline-only ..\..\installerbuilder\bin\test-installer-offline.exe com.nokia.testapp + IF errorlevel 1 pause ELSE echo ...done +) + +IF "%ONLINE_INSTALLER%" EQU "true" ( + echo create online installer + ..\..\installerbuilder\bin\binarycreator -t ..\..\installerbuilder\bin\installerbase.exe -v -n -p ..\..\examples\testapp\packages -c ..\..\examples\testapp\config ..\..\installerbuilder\bin\test-installer-online.exe com.nokia.testapp + IF errorlevel 1 pause ELSE echo ...done +) + +IF "%REPOGEN%" EQU "true" ( + echo create online repository + IF exist ..\..\installerbuilder\bin\repository rmdir /S /Q ..\..\installerbuilder\bin\repository + ..\..\installerbuilder\bin\repogen.exe -p ..\..\examples\testapp\packages -c ..\..\examples\testapp\config ..\..\installerbuilder\bin\repository com.nokia.testapp + IF errorlevel 1 pause ELSE echo ...done +) + +IF "%TEST_OFFLINE_INSTALLER%" EQU "true" ( + ..\..\installerbuilder\bin\test-installer-offline.exe --verbose %AUTO_INSTALLATION_SCRIPT% +) + +IF "%TEST_ONLINE_INSTALLER%" EQU "true" ( + ..\..\installerbuilder\bin\test-installer-online.exe --verbose %AUTO_INSTALLATION_SCRIPT% +) + +copy /Y ..\..\examples\testapp\config\config.xml_old ..\..\examples\testapp\config\config.xml diff --git a/tests/test-installer/create-test-installer.sh b/tests/test-installer/create-test-installer.sh new file mode 100644 index 00000000..21889d50 --- /dev/null +++ b/tests/test-installer/create-test-installer.sh @@ -0,0 +1 @@ +../../installerbuilder/bin/binarycreator -t ../../installerbuilder/bin/installerbase -v -p ../../examples/testapp/packages -c ../../examples/testapp/config test-installer --offline-only com.nokia.testapp diff --git a/installerbuilder/tests/test-noarchive.7z b/tests/test-noarchive.7z similarity index 100% rename from installerbuilder/tests/test-noarchive.7z rename to tests/test-noarchive.7z diff --git a/installerbuilder/tests/test1.7z b/tests/test1.7z similarity index 100% rename from installerbuilder/tests/test1.7z rename to tests/test1.7z diff --git a/installerbuilder/tests/test2.7z b/tests/test2.7z similarity index 100% rename from installerbuilder/tests/test2.7z rename to tests/test2.7z diff --git a/tests/tests.pro b/tests/tests.pro new file mode 100644 index 00000000..f8eb9fc8 --- /dev/null +++ b/tests/tests.pro @@ -0,0 +1,7 @@ +TEMPLATE = subdirs + +DESTDIR = bin +SUBDIRS += extractarchiveoperationtest environmentvariable fileengineclient fileengineserver + +unix:test.commands = ./bin/extractarchiveoperationtest +win32:test.commands = bin\\extractarchiveoperationtest.exe diff --git a/tools/tools.pro b/tools/tools.pro index 1b7b31ee..4ec49ab0 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -1,5 +1,8 @@ -TEMPLATE=subdirs CONFIG += ordered -SUBDIRS += fileengineclient fileengineserver extractbinarydata +TEMPLATE = subdirs +SUBDIRS += extractbinarydata \ + maddehelper \ + repocompare \ + repogenfromonlinerepo