Beispiel #1
0
    def testInstallWineVersion(self):
        time.sleep(2)
        ServiceManagerGetter().init(
            "com.playonlinux.contexts.WineVersionServicesContext")

        setupWizard = SetupWizard("Mock setup wizard")
        setupWizard.init()

        wineVersionManager = ServiceManagerGetter.serviceManager.getService(
            WineVersionManager)

        while (wineVersionManager.isUpdating()):
            print "Updating wine version list..."
            time.sleep(2)

        if (wineVersionManager.hasFailed()):
            raise Exception("Failed to download the list of wineversions")

        wineInstallation = WineVersion("1.7.36", "upstream-x86", setupWizard)
        wineInstallation.install()

        installationPath = "%s/engines/wine/upstream-%s-x86/1.7.36/bin/wine" %\
                           (Environment.getUserRoot(), OperatingSystem.fetchCurrentOperationSystem().getNameForWinePackages())

        ServiceManagerGetter.serviceManager.shutdown()

        print "Checking that wine binary is installed in %s" % installationPath

        self.assertTrue(os.path.exists(installationPath))
Beispiel #2
0
    def testInstallWineVersion(self):
        time.sleep(2)
        ServiceManagerGetter().init("com.playonlinux.contexts.WineVersionServicesContext")

        setupWizard = SetupWizard("Mock setup wizard")
        setupWizard.init()

        wineVersionManager = ServiceManagerGetter.serviceManager.getService(WineVersionManager)

        while(wineVersionManager.isUpdating()):
            print "Updating wine version list..."
            time.sleep(2)

        if(wineVersionManager.hasFailed()):
            raise Exception("Failed to download the list of wineversions")

        wineInstallation = WineVersion("1.7.36", "upstream-x86", setupWizard)
        wineInstallation.install()

        installationPath = "%s/engines/wine/upstream-%s-x86/1.7.36/bin/wine" %\
                           (Environment.getUserRoot(), OperatingSystem.fetchCurrentOperationSystem().getWinePackage())

        ServiceManagerGetter.serviceManager.shutdown()

        print "Checking that wine binary is installed in %s" % installationPath

        self.assertTrue(os.path.exists(installationPath))
Beispiel #3
0
 def setup(setupWindowNetcatServer):
     os.environ["PLAYONLINUX"] = os.path.realpath(os.path.join(os.path.dirname(__file__), "../", "../" "bash"))
     os.environ["POL_PORT"] = str(setupWindowNetcatServer.getPort())
     os.environ["POL_COOKIE"] = setupWindowNetcatServer.getCookie()
     os.environ["POL_OS"] = Environment.getOperatinSystem().fetchLegacyName()
     os.environ["POL_USER_ROOT"] = Environment.getUserRoot()
     os.environ["AMD64_COMPATIBLE"] = str(Environment.getArchitecture().name() == "AMD64").upper()
     os.environ["PATH"] = Environment.getPath()
     os.environ["LD_LIBRARY_PATH"] = Environment.getLibraryPath()
     os.environ["DYLD_LIBRARY_PATH"] = Environment.getDyldLibraryPath()
Beispiel #4
0
    def main(self):
        print "Removing a file in playonlinux root"
        Files().mkdir(Environment.getUserRoot() + "/test").remove(Environment.getUserRoot() + "/test")

        print "Removing a file outside playonlinux root"
        Files().mkdir("/tmp/test").remove("/tmp/test")
Beispiel #5
0
 def testRemoveAFileInsidePlayOnLinuxRoot(self):
     Files().mkdir(Environment.getUserRoot() + "/test").remove(Environment.getUserRoot() + "/test")