Add Windows GitHub Action
This commit is contained in:
31
.github/workflows/windows.yml
vendored
Normal file
31
.github/workflows/windows.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
name: "Build for Windows"
|
||||||
|
jobs:
|
||||||
|
windows:
|
||||||
|
name: "Build"
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: MSYS2
|
||||||
|
uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
msystem: UCRT64
|
||||||
|
update: true
|
||||||
|
install: mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-libadwaita mingw-w64-ucrt-x86_64-python-gobject mingw-w64-ucrt-x86_64-python-yaml mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-ca-certificates mingw-w64-ucrt-x86_64-meson git
|
||||||
|
- name: Compile
|
||||||
|
shell: msys2 {0}
|
||||||
|
run: |
|
||||||
|
meson _build
|
||||||
|
ninja -C _build install
|
||||||
|
pacman --noconfirm -Rs mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-meson git
|
||||||
|
- name: "Inno Setup"
|
||||||
|
run: iscc ".\.windows\Cartridges.iss"
|
||||||
|
- name: "Upload Artifact"
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: "Installer"
|
||||||
|
path: ".windows/Output/Cartridges Setup.exe"
|
||||||
59
.windows/Cartridges.iss
Normal file
59
.windows/Cartridges.iss
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
#define MyAppName "Cartridges"
|
||||||
|
#define MyAppVersion "0.1.2"
|
||||||
|
#define MyAppPublisher "kramo"
|
||||||
|
#define MyAppURL "https://github.com/kra-mo/cartridges"
|
||||||
|
#define MyAppExeName "pythonw.exe"
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
AppId={{BC3F8D32-4BDC-4715-B149-D79F589CD7F0}
|
||||||
|
AppName={#MyAppName}
|
||||||
|
AppVersion={#MyAppVersion}
|
||||||
|
AppVerName={#MyAppName} {#MyAppVersion}
|
||||||
|
AppPublisher={#MyAppPublisher}
|
||||||
|
AppPublisherURL={#MyAppURL}
|
||||||
|
AppSupportURL=https://github.com/kra-mo/cartridges/issues
|
||||||
|
AppUpdatesURL={#MyAppURL}
|
||||||
|
DefaultDirName={autopf}\{#MyAppName}
|
||||||
|
DisableProgramGroupPage=yes
|
||||||
|
LicenseFile=..\LICENSE
|
||||||
|
PrivilegesRequiredOverridesAllowed=dialog
|
||||||
|
OutputBaseFilename=Cartridges Setup
|
||||||
|
SetupIconFile=icon.ico
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
WizardStyle=modern
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "cartridges"; DestDir: "{app}\bin"; Flags: ignoreversion
|
||||||
|
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\bin\pythonw.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\bin\python.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\bin\gdbus.exe"; DestDir: "{app}\bin"; Flags: ignoreversion
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\bin\*.dll"; DestDir: "{app}\bin"; Flags: recursesubdirs ignoreversion
|
||||||
|
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\etc\ssl\*"; DestDir: "{app}\etc\ssl"; Flags: recursesubdirs ignoreversion
|
||||||
|
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\lib\gdk-pixbuf-2.0\*"; DestDir: "{app}\lib\gdk-pixbuf-2.0"; Flags: recursesubdirs ignoreversion
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\lib\girepository-1.0\*"; DestDir: "{app}\lib\girepository-1.0"; Flags: recursesubdirs ignoreversion
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\lib\python3.10\*"; DestDir: "{app}\lib\python3.10"; Flags: recursesubdirs ignoreversion
|
||||||
|
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\share\cartridges\*"; DestDir: "{app}\share\cartridges"; Flags: recursesubdirs ignoreversion
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\share\icons\*"; DestDir: "{app}\share\icons"; Flags: recursesubdirs ignoreversion
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\share\glib-2.0\*"; DestDir: "{app}\share\glib-2.0"; Flags: recursesubdirs ignoreversion
|
||||||
|
Source: "D:\a\_temp\msys64\ucrt64\share\gtk-4.0\*"; DestDir: "{app}\share\gtk-4.0"; Flags: recursesubdirs ignoreversion
|
||||||
|
|
||||||
|
Source: "icon.ico"; DestDir: "{app}"; Flags: recursesubdirs ignoreversion
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\bin\{#MyAppExeName}"; Parameters: """{app}\bin\cartridges"""; IconFilename: "{app}\icon.ico"
|
||||||
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\bin\{#MyAppExeName}"; Parameters: """{app}\bin\cartridges"""; IconFilename: "{app}\icon.ico"; Tasks: desktopicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{app}\bin\{#MyAppExeName}"; Parameters: """{app}\bin\cartridges"""; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait skipifsilent
|
||||||
|
|
||||||
41
.windows/cartridges
Normal file
41
.windows/cartridges
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Cartridges
|
||||||
|
#
|
||||||
|
# Copyright 2022 kramo
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import signal
|
||||||
|
import gettext
|
||||||
|
|
||||||
|
VERSION = '0.1.2'
|
||||||
|
pkgdatadir = os.path.join(os.path.dirname(__file__), '..', 'share', 'cartridges')
|
||||||
|
localedir = os.path.join(os.path.dirname(__file__), '..', 'share', 'locale')
|
||||||
|
|
||||||
|
sys.path.insert(1, pkgdatadir)
|
||||||
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
|
gettext.install('cartridges', localedir)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
import gi
|
||||||
|
|
||||||
|
from gi.repository import Gio
|
||||||
|
resource = Gio.Resource.load(os.path.join(pkgdatadir, 'cartridges.gresource'))
|
||||||
|
resource._register()
|
||||||
|
|
||||||
|
from cartridges import main
|
||||||
|
sys.exit(main.main(VERSION))
|
||||||
BIN
.windows/icon.ico
Normal file
BIN
.windows/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 155 KiB |
Reference in New Issue
Block a user