diff --git a/Jenkinsfile b/Jenkinsfile index 575bf85..4f7f881 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,6 +50,33 @@ pipeline { } } } + stage("Build on Windows") { + agent { + label "windows" + } + steps { + script { + bat 'del out\\.placeholder' + bat 'flutter pub get' + bat 'flutter build windows' + dir("build\\windows\\x64\\runner\\Release") { + bat 'tar -cvf ..\\..\\..\\..\\..\\windows.tgz .' + } + bat 'dart compile exe -o out\\nbteditor-cli.exe cli\\nbtcli.dart' + bat 'iscc wininst.iss' + } + } + + post { + always { + archiveArtifacts artifacts: "windows.tgz" + archiveArtifacts artifacts: "out\\NBTEditor-setup.exe" + archiveArtifacts artifacts: "out\\nbteditor-cli.exe" + + cleanWs() + } + } + } } } diff --git a/wininst.iss b/wininst.iss index f6610cb..ce272ef 100644 --- a/wininst.iss +++ b/wininst.iss @@ -49,6 +49,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl" Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] +Source: "out\nbtedit-cli.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "build\windows\x64\runner\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "build\windows\x64\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "build\windows\x64\runner\Release\url_launcher_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion