Skip to content

Commit

Permalink
Added build script for creating release files under Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
wichmann committed Mar 21, 2020
1 parent 212eef8 commit 1de8f86
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions build_release.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

# clear build directories
Remove-Item -LiteralPath "dist" -Force -Recurse
Remove-Item -LiteralPath "build" -Force -Recurse

# build all subprojects
cmd.exe /c "build_cli.bat"
cmd.exe /c "build_gui.bat"
cmd.exe /c "build_editor.bat"

# create directories for each project
mkdir dist\moodle2pdf_cli
mkdir dist\moodle2pdf_gui\translate\
mkdir dist\moodleeditor\translate\

# put config file and executable into directory
copy config.toml dist\moodle2pdf_cli
copy config.toml dist\moodle2pdf_gui
copy config.toml dist\moodleeditor
copy translate\*.qm dist\moodle2pdf_gui\translate\
copy translate\*.qm dist\moodleeditor\translate\
move dist\moodle2pdf_cli.exe dist\moodle2pdf_cli
move dist\moodle2pdf_gui.exe dist\moodle2pdf_gui
move dist\moodleeditor.exe dist\moodleeditor

# zip each directory
Compress-Archive -Path dist\moodle2pdf_cli -DestinationPath dist\moodle2pdf_cli.zip
Compress-Archive -Path dist\moodle2pdf_gui -DestinationPath dist\moodle2pdf_gui.zip
Compress-Archive -Path dist\moodleeditor -DestinationPath dist\moodleeditor.zip

0 comments on commit 1de8f86

Please sign in to comment.