Skip to content

Commit

Permalink
Attach Build Artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Meowchestra committed Jan 26, 2025
1 parent 954590c commit 08c8886
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 49 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/xmake-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ jobs:
with:
xmake-version: latest

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.8.1'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2022_64'
modules: 'qtmultimedia'

- name: update repo
run: |
xrepo update-repo
Expand Down Expand Up @@ -57,13 +66,13 @@ jobs:
xmake doxygen --yes
- name: Release installer
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body_path: ${{ github.workspace }}/CHANGELOG.md
draft: ${{ startsWith(github.ref, 'refs/tags/nightly') }}
fail_on_unmatched_files: true
files: |
build/website/MidiEditor.exe
build/website/ProMidEdit.exe
- name: Publish website
run: |
Expand All @@ -73,3 +82,9 @@ jobs:
git add .
git commit -m "Generate Website for ${{ github.ref }}"
git push
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ProMidEdit-Installer
path: packaging/Install.exe
19 changes: 13 additions & 6 deletions .github/workflows/xmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
Expand All @@ -40,6 +36,10 @@ jobs:
run: |
xrepo update-repo
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: cache packages from xrepo
uses: actions/cache@v4
with:
Expand All @@ -62,6 +62,13 @@ jobs:
run: |
xmake config --yes --verbose --diagnosis
- name: build by xmake
- name: build and create installer
run: |
xmake build --verbose --diagnosis --jobs=2
xmake build --verbose --diagnosis --jobs=2
xmake install installer
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ProMidEdit-Installer
path: packaging/Install.exe
4 changes: 2 additions & 2 deletions packaging/org.midieditor.manual/meta/package.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<Package>
<DisplayName>Manual</DisplayName>
<Description>manual of ProMidEdit</Description>
<Description>Manual of ProMidEdit</Description>
<Version>3.9.0</Version>
<ReleaseDate>2025-01-24</ReleaseDate>
<ReleaseDate>2025-01-25</ReleaseDate>
<Name>org.midieditor.manual</Name>
<Default>true</Default>
<ForcedInstallation>false</ForcedInstallation>
Expand Down
4 changes: 2 additions & 2 deletions packaging/org.midieditor.midieditor/meta/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Package>
<DisplayName>ProMidEdit</DisplayName>
<Description>ProMidEdit is a free software providing an interface to edit, record, and play Midi data. Packed with all necessary dependencies.</Description>
<Version>3.4.0</Version>
<ReleaseDate>2022-01-31</ReleaseDate>
<Version>3.9.0</Version>
<ReleaseDate>2025-01-25</ReleaseDate>
<Name>org.midieditor.midieditor</Name>
<Licenses>
<License name="License Agreement" file="LICENSE" />
Expand Down
2 changes: 1 addition & 1 deletion scripts/packaging/windows/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<RunProgram>@TargetDir@/ProMidEdit.exe</RunProgram>
<RunProgramArguments>
</RunProgramArguments>
<RunProgramDescription>run midieditor</RunProgramDescription>
<RunProgramDescription>Run ProMidEdit</RunProgramDescription>
<StartMenuDir>ProMidEdit</StartMenuDir>
<AllowNonAsciiCharacters>true</AllowNonAsciiCharacters>

Expand Down
4 changes: 3 additions & 1 deletion scripts/xmake/packages.lua
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

function add_all_requires()
add_requires("qtifw")
end
59 changes: 24 additions & 35 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ option("generate-repository", {
showmenu = true,
})

includes("scripts/xmake/packages.lua")
add_all_requires()

local installdir = "packaging/org.midieditor.midieditor/data/"
target("ProMidEdit") do
set_languages("cxx17")
add_rules("qt.widgetapp")

-- Use system Qt6
add_includedirs("$(env QTDIR)/include")
add_linkdirs("$(env QTDIR)/lib")

-- Add Qt6 multimedia include paths explicitly
after_load(function (target)
local qt_dir = os.getenv("QTDIR")
Expand Down Expand Up @@ -77,7 +76,7 @@ target("manual") do
add_installfiles("manual/(**)")
end

target("installer") do
target("installer")
set_kind("phony")
add_deps("ProMidEdit")

Expand All @@ -87,36 +86,26 @@ target("installer") do
add_packages("qtifw")
after_install(function (target, opt)
import("core.project.config")

-- Create required directories
os.mkdir("packaging/org.midieditor.midieditor/data/bin")

-- Copy all files from release directory
os.cp("build/windows/x64/release/*", "packaging/org.midieditor.midieditor/data/bin/")

-- Copy additional resources
-- os.cp("run_environment/**", "packaging/org.midieditor.midieditor/data/")

-- Generate installer
local qtifw_dir = target:pkg("qtifw"):installdir()
local binarycreator_path = path.join(qtifw_dir, "/bin/binarycreator.exe")
local repogen_path = path.join(qtifw_dir, "/bin/repogen.exe")
if config.get("generate-repository") then
print("generate site")
print(" generate repository")
local repo_argv = {
"--update-new-components",
"--packages", "packaging",
path.join(config.buildir(), "website", "repository")
}
os.iorunv(repogen_path, repo_argv)
print(" generate installer")
local package_argv = {
"--config", "scripts/packaging/windows/config.xml",
"--packages", "packaging",
path.join(config.buildir(), "website", "ProMidEdit.exe")
}
os.iorunv(binarycreator_path, package_argv)
print(" copy online manual")
os.cp("manual/*", path.join(config.buildir(), "website"))
else
print("generate off-line installer")
local package_argv = {
"--config", "scripts/packaging/windows/config.xml",
"--packages", "packaging",
"packaging/Install.exe"
}
os.iorunv(binarycreator_path, package_argv)
end

print("generate off-line installer")
local package_argv = {
"--config", "scripts/packaging/windows/config.xml",
"--packages", "packaging",
"packaging/Install.exe"
}
os.iorunv(binarycreator_path, package_argv)
end)
end
end
end

0 comments on commit 08c8886

Please sign in to comment.