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

New build and pack scripts #152

Merged
merged 24 commits into from
Apr 10, 2014
Merged

New build and pack scripts #152

merged 24 commits into from
Apr 10, 2014

Conversation

samvasko
Copy link
Contributor

I started working on the pack an build scripts in Powershell. It makes much more sense and keeping ruby as a build requirement does not make any sense.

The other thing is the google code is pretty much dying. Clink has been migrated to github and conemu is using other distribution channels. Therefore I drafted sources.json - simple file that lists all the requirements for cmder. By using it, we will gain the power to control the versions of the software. I am hoping it can be turned into working updater one happy day.

I have never touched powershell language until today. So bare with me.

ToDo

Build script
  • Compilation of binary XP/Not XP
  • Flattening unnecessary subdirs for packages
  • Name and extension agnostic downloader
  • Information about current version
  • Error checking when downloading
Pack script
  • Rewrite the ruby

@Jackbennett
Copy link
Contributor

This is all cool. I want to help out how should I edit your work on this commit (new to github here).

Should we work on a powershell-build branch to be merged into master when finished?

@samvasko
Copy link
Contributor Author

Amazing I think you can just do this.

# Fork the repo
git clone <your fork> 
git remote add upstream <this repo>
# You might have to do: git pull origin scripts
git checkout scripts # the working branch for the powershell scripts
# do stuff in scripts folder
git commit
git push origin scripts # you might need -u here to set the tracking
# Submit a pull request to cmder/scripts 

Then we can accept your changes and they will be listed under this pull request. Feel free to poke around in whatever you find interesting. I am not planning to do any work today nor tomorrow 🚲 so no necessary collisions should happen.

@samvasko
Copy link
Contributor Author

Also when some changes happen on this branch I think you can do git pull upstream scripts to avoid having to fork the branch before each pull request.
Not sure if that makes any sense 😕

@MartiUK
Copy link
Member

MartiUK commented Feb 25, 2014

Do we want this for 1.1.4 considering the xp build nuances?

@Jackbennett
Copy link
Contributor

I don't think its worth holding up a release to add this work. Get some of the other updates out to people is my opinion.

incase url's that don't put the file in the url.
working script will;
Remove existing folders named in the sources
Download the packages listed in sources.json
Extracts the above packages
deletes the downloaded package
@Jackbennett
Copy link
Contributor

I guess I should reference #157 here.

Looks like I need the hub project to add to this PR and it didn't work outright so I won't try to fix it to get through a proxy right now.

Getting the build script to a working state
@samvasko
Copy link
Contributor Author

@Jackbennett And your commits are here! git-magic ⚡

@Jackbennett
Copy link
Contributor

This doesn't like folders in folders by the way.

clink.zip extracts to clink\clink_0.4\clink.exe whereas cmder wants clink\zlink.exe I think it may be better to get cmder to search anywhere within the vendor/<prackage>/* folder and cache the link path it finds as opposed to adding another special case to the sources.json for something like "extract level"

@samvasko
Copy link
Contributor Author

I suppose you can do what I did in the ruby version. Just check the if extracted dir contains exactly one folder. If it does, just flatten it somehow, by using temp folder name like I did or just copy the contents.

Removed some absolute path, and refactored the code so
it handles the nested folder archives
@samvasko
Copy link
Contributor Author

samvasko commented Mar 2, 2014

Jack, can you please check the modified build and tell me what you think?

@samvasko
Copy link
Contributor Author

samvasko commented Mar 5, 2014

@Jackbennett Do you have any experience with doing multiple threads in PS? Do you think that would be feasible do to extraction and downloading on different threads?

samvasko and others added 3 commits March 5, 2014 12:08
Removed some absolute path, and refactored the code so
it handles the nested folder archives
@Jackbennett
Copy link
Contributor

Some, but for the most part in my powershell needs it's been faster to leave the dumb sequential script I made in 2 minutes running and do another job than spend 20 minutes speeding it up.

You need to use the start-job, wait-job, receive-job type cmdlets to start the function in the background and carry on. I wrote this but I can't remember why I scrapped that approach. I'm going to have another go now.

I've read you changes but not run them myself so I've refrained from commenting. Will get back to you. I'm having a bit of a crazy week.

samvasko added a commit that referenced this pull request Apr 10, 2014
New build and pack scripts
@samvasko samvasko merged commit f6c3a0c into master Apr 10, 2014
@samvasko samvasko deleted the scripts branch April 10, 2014 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants