mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-29 04:10:23 -07:00
Compare commits
No commits in common. "58a8c7d3df6902f0b32d403bddb9a9adabf2237a" and "e918856fa46700ed41ebde531ca22ebbe4dc6264" have entirely different histories.
58a8c7d3df
...
e918856fa4
9 changed files with 16 additions and 111 deletions
2
.github/workflows/desktop-build.yml
vendored
2
.github/workflows/desktop-build.yml
vendored
|
|
@ -46,7 +46,7 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
configure:
|
configure:
|
||||||
name: Configure
|
name: Configure
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
tag: ${{steps.configure.outputs.tag}}
|
tag: ${{steps.configure.outputs.tag}}
|
||||||
sha: ${{steps.configure.outputs.sha}}
|
sha: ${{steps.configure.outputs.sha}}
|
||||||
|
|
|
||||||
4
.github/workflows/desktop-lint.yml
vendored
4
.github/workflows/desktop-lint.yml
vendored
|
|
@ -20,13 +20,13 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 20 # should be enough to find merge base
|
fetch-depth: 20 # should be enough to find merge base
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
2
.github/workflows/translations-pull.yml
vendored
2
.github/workflows/translations-pull.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
||||||
|
|
||||||
name: Pull languages
|
name: Pull languages
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
|
|
|
||||||
4
.github/workflows/translations-push.yml
vendored
4
.github/workflows/translations-push.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
||||||
|
|
||||||
name: Push strings
|
name: Push strings
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
|
|
@ -46,7 +46,7 @@ jobs:
|
||||||
|
|
||||||
- name: Render template
|
- name: Render template
|
||||||
id: template
|
id: template
|
||||||
uses: chuhlomin/render-template/binary@v1
|
uses: chuhlomin/render-template@v1
|
||||||
with:
|
with:
|
||||||
template: .ci/update_translation_source_strings_template.md
|
template: .ci/update_translation_source_strings_template.md
|
||||||
vars: |
|
vars: |
|
||||||
|
|
|
||||||
2
.github/workflows/web-lint.yml
vendored
2
.github/workflows/web-lint.yml
vendored
|
|
@ -10,7 +10,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ESLint:
|
ESLint:
|
||||||
runs-on: ubuntu-slim
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
|
|
||||||
|
|
@ -74,11 +74,11 @@ endif()
|
||||||
|
|
||||||
# A project name is needed for CPack
|
# A project name is needed for CPack
|
||||||
# Version can be overriden by git tags, see cmake/getversion.cmake
|
# Version can be overriden by git tags, see cmake/getversion.cmake
|
||||||
project("Cockatrice" VERSION 3.0.0)
|
project("Cockatrice" VERSION 2.11.0)
|
||||||
|
|
||||||
# Set release name if not provided via env/cmake var
|
# Set release name if not provided via env/cmake var
|
||||||
if(NOT DEFINED GIT_TAG_RELEASENAME)
|
if(NOT DEFINED GIT_TAG_RELEASENAME)
|
||||||
set(GIT_TAG_RELEASENAME "Graduation Day")
|
set(GIT_TAG_RELEASENAME "Omenpath")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Use c++20 for all targets
|
# Use c++20 for all targets
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ SetCompressor LZMA
|
||||||
Var NormalDestDir
|
Var NormalDestDir
|
||||||
Var PortableDestDir
|
Var PortableDestDir
|
||||||
Var PortableMode
|
Var PortableMode
|
||||||
Var ReinstallMode
|
|
||||||
|
|
||||||
!include LogicLib.nsh
|
!include LogicLib.nsh
|
||||||
!include FileFunc.nsh
|
!include FileFunc.nsh
|
||||||
|
|
@ -29,23 +28,13 @@ Var ReinstallMode
|
||||||
!define MUI_FINISHPAGE_RUN_TEXT "Run 'Cockatrice' now"
|
!define MUI_FINISHPAGE_RUN_TEXT "Run 'Cockatrice' now"
|
||||||
!define MUI_ICON "${NSIS_SOURCE_PATH}\cockatrice\resources\appicon.ico"
|
!define MUI_ICON "${NSIS_SOURCE_PATH}\cockatrice\resources\appicon.ico"
|
||||||
|
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfReinstall
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfReinstall
|
|
||||||
!insertmacro MUI_PAGE_LICENSE "${NSIS_SOURCE_PATH}\LICENSE"
|
!insertmacro MUI_PAGE_LICENSE "${NSIS_SOURCE_PATH}\LICENSE"
|
||||||
|
|
||||||
Page Custom PortableModePageCreate PortableModePageLeave
|
Page Custom PortableModePageCreate PortableModePageLeave
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE componentsPagePre
|
!define MUI_PAGE_CUSTOMFUNCTION_PRE componentsPagePre
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
|
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfReinstall
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfReinstall
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
!define MUI_PAGE_CUSTOMFUNCTION_PRE SkipIfReinstall
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
|
|
@ -84,7 +73,6 @@ ${IfNot} ${Errors}
|
||||||
MessageBox MB_ICONINFORMATION|MB_SETFOREGROUND "\
|
MessageBox MB_ICONINFORMATION|MB_SETFOREGROUND "\
|
||||||
/PORTABLE : Install in portable mode$\n\
|
/PORTABLE : Install in portable mode$\n\
|
||||||
/S : Silent install$\n\
|
/S : Silent install$\n\
|
||||||
/R : Silent upgrade$\n\
|
|
||||||
/D=%directory% : Specify destination directory$\n"
|
/D=%directory% : Specify destination directory$\n"
|
||||||
Quit
|
Quit
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
@ -102,16 +90,6 @@ ${Else}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
ClearErrors
|
|
||||||
${GetOptions} $9 "/R" $8
|
|
||||||
${IfNot} ${Errors}
|
|
||||||
StrCpy $ReinstallMode 1
|
|
||||||
SetSilent silent
|
|
||||||
SetAutoClose true
|
|
||||||
${Else}
|
|
||||||
StrCpy $ReinstallMode 0
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
${If} $InstDir == ""
|
${If} $InstDir == ""
|
||||||
; User did not use /D to specify a directory,
|
; User did not use /D to specify a directory,
|
||||||
; we need to set a default based on the install mode
|
; we need to set a default based on the install mode
|
||||||
|
|
@ -119,22 +97,6 @@ ${If} $InstDir == ""
|
||||||
${EndIf}
|
${EndIf}
|
||||||
Call SetModeDestinationFromInstdir
|
Call SetModeDestinationFromInstdir
|
||||||
|
|
||||||
; --- Detect portable install when using /R ---
|
|
||||||
${If} $ReinstallMode = 1
|
|
||||||
IfFileExists "$InstDir\portable.dat" 0 not_portable
|
|
||||||
StrCpy $PortableMode 1
|
|
||||||
Goto portable_done
|
|
||||||
|
|
||||||
not_portable:
|
|
||||||
StrCpy $PortableMode 0
|
|
||||||
|
|
||||||
portable_done:
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
${If} $ReinstallMode = 1
|
|
||||||
Call AutoUninstallIfNeeded
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function un.onInit
|
Function un.onInit
|
||||||
|
|
@ -164,46 +126,8 @@ ${Else}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function SkipIfReinstall
|
|
||||||
${If} $ReinstallMode = 1
|
|
||||||
Abort
|
|
||||||
${EndIf}
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function AutoUninstallIfNeeded
|
|
||||||
|
|
||||||
SetShellVarContext all
|
|
||||||
|
|
||||||
; --- 32-bit uninstall ---
|
|
||||||
SetRegView 32
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
|
||||||
|
|
||||||
StrCmp $R0 "" done32
|
|
||||||
DetailPrint "Removing previous version (32-bit)..."
|
|
||||||
ExecWait '$R0'
|
|
||||||
|
|
||||||
done32:
|
|
||||||
|
|
||||||
; --- 64-bit uninstall ---
|
|
||||||
${If} ${RunningX64}
|
|
||||||
SetRegView 64
|
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "QuietUninstallString"
|
|
||||||
|
|
||||||
StrCmp $R0 "" done64
|
|
||||||
DetailPrint "Removing previous version (64-bit)..."
|
|
||||||
ExecWait '$R0'
|
|
||||||
|
|
||||||
done64:
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
FunctionEnd
|
|
||||||
|
|
||||||
Function PortableModePageCreate
|
Function PortableModePageCreate
|
||||||
|
|
||||||
${If} $ReinstallMode = 1
|
|
||||||
Abort
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
Call SetModeDestinationFromInstdir ; If the user clicks BACK on the directory page we will remember their mode specific directory
|
Call SetModeDestinationFromInstdir ; If the user clicks BACK on the directory page we will remember their mode specific directory
|
||||||
!insertmacro MUI_HEADER_TEXT "Install Mode" "Choose how you want to install Cockatrice."
|
!insertmacro MUI_HEADER_TEXT "Install Mode" "Choose how you want to install Cockatrice."
|
||||||
nsDialogs::Create 1018
|
nsDialogs::Create 1018
|
||||||
|
|
@ -235,11 +159,6 @@ ${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function componentsPagePre
|
Function componentsPagePre
|
||||||
|
|
||||||
${If} $ReinstallMode = 1
|
|
||||||
Return
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
${If} $PortableMode = 0
|
${If} $PortableMode = 0
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
|
|
||||||
|
|
@ -249,12 +168,8 @@ ${If} $PortableMode = 0
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
||||||
StrCmp $R0 "" done32
|
StrCmp $R0 "" done32
|
||||||
|
|
||||||
${If} $ReinstallMode = 0
|
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst32
|
||||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst32
|
Abort
|
||||||
Abort
|
|
||||||
${Else}
|
|
||||||
Goto uninst32
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
uninst32:
|
uninst32:
|
||||||
ClearErrors
|
ClearErrors
|
||||||
|
|
@ -269,12 +184,8 @@ ${If} $PortableMode = 0
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Cockatrice" "UninstallString"
|
||||||
StrCmp $R0 "" done64
|
StrCmp $R0 "" done64
|
||||||
|
|
||||||
${If} $ReinstallMode = 0
|
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst64
|
||||||
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "A previous version of Cockatrice must be uninstalled before installing the new one." IDOK uninst64
|
Abort
|
||||||
Abort
|
|
||||||
${Else}
|
|
||||||
Goto uninst64
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
uninst64:
|
uninst64:
|
||||||
ClearErrors
|
ClearErrors
|
||||||
|
|
@ -366,12 +277,6 @@ ${Else}
|
||||||
FileWrite $0 "PORTABLE"
|
FileWrite $0 "PORTABLE"
|
||||||
FileClose $0
|
FileClose $0
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} $ReinstallMode = 1
|
|
||||||
IfFileExists "$INSTDIR\cockatrice.exe" 0 +2
|
|
||||||
Exec '"$INSTDIR\cockatrice.exe"'
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "Start menu item" SecStartMenu
|
Section "Start menu item" SecStartMenu
|
||||||
|
|
|
||||||
|
|
@ -219,9 +219,7 @@ void DlgUpdate::downloadSuccessful(const QUrl &filepath)
|
||||||
{
|
{
|
||||||
setLabel(tr("Installing..."));
|
setLabel(tr("Installing..."));
|
||||||
// Try to open the installer. If it opens, quit Cockatrice
|
// Try to open the installer. If it opens, quit Cockatrice
|
||||||
if (QProcess::startDetached(filepath.toLocalFile(),
|
if (QDesktopServices::openUrl(filepath)) {
|
||||||
QStringList()
|
|
||||||
<< "/R" << QString("/D=%1").arg(QCoreApplication::applicationDirPath()))) {
|
|
||||||
QMetaObject::invokeMethod(static_cast<MainWindow *>(parent()), "close", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(static_cast<MainWindow *>(parent()), "close", Qt::QueuedConnection);
|
||||||
qCInfo(DlgUpdateLog) << "Opened downloaded update file successfully - closing Cockatrice";
|
qCInfo(DlgUpdateLog) << "Opened downloaded update file successfully - closing Cockatrice";
|
||||||
close();
|
close();
|
||||||
|
|
|
||||||
|
|
@ -366,6 +366,8 @@ int OracleImporter::importCardsFromSet(const CardSetPtr ¤tSet, const QList
|
||||||
auto found_iter = splitCards.find(name + numProperty);
|
auto found_iter = splitCards.find(name + numProperty);
|
||||||
if (found_iter == splitCards.end()) {
|
if (found_iter == splitCards.end()) {
|
||||||
splitCards.insert(name + numProperty, {{split}, name});
|
splitCards.insert(name + numProperty, {{split}, name});
|
||||||
|
} else if (layout == "adventure" || layout == "prepare") {
|
||||||
|
found_iter->first.insert(0, split);
|
||||||
} else {
|
} else {
|
||||||
found_iter->first.append(split);
|
found_iter->first.append(split);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue