-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added build script for creating release files under Windows.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |