Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy/package should detect if it is Windows. #36

Closed
soap opened this issue Sep 4, 2017 · 2 comments
Closed

Deploy/package should detect if it is Windows. #36

soap opened this issue Sep 4, 2017 · 2 comments

Comments

@soap
Copy link
Contributor

soap commented Sep 4, 2017

Deploy package did not work on Windows. As it cannot run symlink() on Windows. So this is what I have done to made it works on Windows.

	$this->createPackageZip();
        // Create symlink to current folder
        if ($this->isWindows())
        {
            $this->_exec('mklink /J ' . JPATH_BASE . "/dist/pkg-" . $this->getExtensionName() . "-current.zip". ' '. $this->getWindowsPath($this->target));
        }else{
            $this->_symlink($this->target, JPATH_BASE . "/dist/pkg-" . $this->getExtensionName() . "-current.zip");
        }

And in createComponentZip() we should check if folder /language exists before copying. Like this:-

        if (file_exists($this->current . '/language'))
        {
            $this->_copyDir($this->current . '/language', JPATH_BASE . $tmp_path . '/language');
        }
	$this->_copyDir($this->current . '/components', JPATH_BASE . $tmp_path . '/components');

	if (file_exists($this->current . '/media'))
	{
		$this->_copyDir($this->current . '/media', JPATH_BASE . $tmp_path . '/media');
	}

I have copied isWindows() and some others from RoboFile.php

Sorry for my English.

@soap
Copy link
Contributor Author

soap commented Sep 4, 2017

Ok I have created 2 pr for this issues.

@HLeithner
Copy link
Member

I would expect that's fixed with #38 and #37

I'm closing this and thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants