-
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.
- Loading branch information
Showing
537 changed files
with
80,095 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,64 @@ | ||
name: Build WowUp Unlimited | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
wowup_branch: | ||
description: 'WowUp Branch' | ||
default: 'master' | ||
required: true | ||
release_name: | ||
description: 'WowUp Unlimited Release' | ||
default: 'vX.X.X' | ||
required: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: Initialize git config | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email [email protected] | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- name: Checkout WowUp-Unlimited (orphaned) | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.WORKFLOW_PAT }} | ||
- name: Checkout WowUp-Unlimited | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
path: 'WowUp-Unlimited' | ||
- name: Checkout WowUp | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: 'WowUp/WowUp' | ||
ref: ${{ inputs.wowup_branch }} | ||
path: 'WowUp' | ||
fetch-depth: 0 | ||
- name: Create Release Branch | ||
run: git switch --orphan "${{ inputs.release_name }}-Src" | ||
- name: Patch WowUp Workflow | ||
run: | | ||
mkdir -p .github/workflows | ||
cp WowUp/.github/workflows/electron-all-build.yml .github/workflows | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/01-WorkflowCheckouts.patch | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/02-CurseForgeMerge.patch | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/03-DefaultShell.patch | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/04-Trigger.patch | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/05-Env.patch | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/06-WorkspaceLocation.patch | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/07-RunPatch.patch | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/08-DisableCodeSigning.patch | ||
patch -p0 < ./WowUp-Unlimited/workflow-patches/09-WorkflowName.patch | ||
sed -i "s/WOWUP_BRANCH/${{ inputs.wowup_branch }}/g" .github/workflows/electron-all-build.yml | ||
sed -i "s/RELEASE_NAME/${{ inputs.release_name }}/g" .github/workflows/electron-all-build.yml | ||
git add .github/workflows/electron-all-build.yml | ||
git commit -m "Patched WowUp Build Workflow: WowUp ${{ inputs.wowup_branch }}" | ||
git push --force origin "${{ inputs.release_name }}-Src" |
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,14 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
GITHUB_WORKSPACE="${GITHUB_WORKSPACE:=${SCRIPT_DIR}/../}" | ||
|
||
CURR_REPO_DIR="${GITHUB_WORKSPACE}/WowUp" | ||
|
||
find "${SCRIPT_DIR}/unlimited-patches/" -name "*.patch" -type f -print | sort -n | | ||
while IFS= read -r f ; do | ||
echo "$(basename ${f})" | ||
patch -p0 -d "${CURR_REPO_DIR}" < "${f}" | ||
done |
239 changes: 239 additions & 0 deletions
239
WowUp-Unlimited/unlimited-patches/01-CurseForgeMerge.patch
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,239 @@ | ||
--- .github/workflows/electron-linux-build.yml | ||
+++ .github/workflows/electron-linux-build.yml | ||
@@ -39,17 +39,24 @@ | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Setup Flatpak | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt install flatpak flatpak-builder | ||
|
||
+ - name: Inject Token | ||
+ env: | ||
+ CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} | ||
+ run: | | ||
+ cd ./wowup-electron | ||
+ node ./inject-token.js | ||
+ | ||
- name: Install Angular CLI | ||
run: npm install -g @angular/cli | ||
|
||
- name: Build Linux App | ||
if: matrix.os == 'ubuntu-latest' | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
run: | | ||
cd ./wowup-electron | ||
npm i | ||
npm run electron:publish | ||
--- .github/workflows/electron-mac-build.yml | ||
+++ .github/workflows/electron-mac-build.yml | ||
@@ -35,12 +35,19 @@ | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
+ - name: Inject Token | ||
+ env: | ||
+ CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} | ||
+ run: | | ||
+ cd ./wowup-electron | ||
+ node ./inject-token.js | ||
+ | ||
- name: Install Angular CLI | ||
run: npm install -g @angular/cli | ||
|
||
- name: dmg-license | ||
run: | | ||
cd ./wowup-electron | ||
--- .github/workflows/electron-windows-build.yml | ||
+++ .github/workflows/electron-windows-build.yml | ||
@@ -35,16 +35,23 @@ | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
+ - name: Inject Token | ||
+ env: | ||
+ CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} | ||
+ run: | | ||
+ cd ./wowup-electron | ||
+ node ./inject-token.js | ||
+ | ||
- name: Install Angular CLI | ||
run: npm install -g @angular/cli | ||
|
||
- name: Build Windows App | ||
if: matrix.os == 'windows-latest' | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
CSC_LINK: ${{ secrets.WINDOWS_CSC_LINK }} | ||
CSC_KEY_PASSWORD: ${{ secrets.WINDOWS_CSC_KEY_PASSWORD }} | ||
run: cd ./wowup-electron && npm ci && npm run electron:publish | ||
--- wowup-electron/src/app/components/common/footer/footer.component.html | ||
+++ wowup-electron/src/app/components/common/footer/footer.component.html | ||
@@ -7,13 +7,13 @@ | ||
matTooltip="{{ 'PAGES.MY_ADDONS.PAGE_CONTEXT_FOOTER.JOIN_DISCORD' | translate }}"> | ||
<mat-icon class="tab-icon tab-icon-inactive" svgIcon="fab:discord"></mat-icon> | ||
</a> --> | ||
<p class="text-1">{{ sessionService.statusText$ | async }}</p> | ||
<div class="flex-grow-1"></div> | ||
<p class="mr-3">{{ sessionService.pageContextText$ | async }}</p> | ||
- <p>v{{ versionNumber | async }} {{ isCurseForge ? "CF" : "" }}</p> | ||
+ <p>v{{ versionNumber | async }} {{ false ? "CF" : "" }}</p> | ||
<div class="h-100 ml-3" [ngSwitch]="appUpdateState$ | async"> | ||
<div *ngSwitchCase="appUpdateState.CheckingForUpdate"> | ||
<p>{{ "APP.WOWUP_UPDATE.CHECKING_FOR_UPDATE" | translate }}</p> | ||
</div> | ||
<div *ngSwitchCase="appUpdateState.UpdateAvailable"> | ||
<p>{{ "APP.WOWUP_UPDATE.UPDATE_AVAILABLE" | translate }}</p> | ||
--- wowup-electron/src/app/components/common/vertical-tabs/vertical-tabs.component.ts | ||
+++ wowup-electron/src/app/components/common/vertical-tabs/vertical-tabs.component.ts | ||
@@ -178,18 +178,21 @@ | ||
|
||
public onClickTab(tabIndex: number): void { | ||
this.sessionService.selectedHomeTab = tabIndex; | ||
} | ||
|
||
public onClickAdExplainer(): void { | ||
- const dialogKey = this.isCurseForge ? "AD_EXPLAINER_DIALOG_CF" : "AD_EXPLAINER_DIALOG"; | ||
+ const dialogKeys = [ "AD_EXPLAINER_DIALOG", "AD_EXPLAINER_DIALOG_CF" ]; | ||
+ const message = dialogKeys.map((dialogKey: string) => { | ||
+ return this._translateService.instant(`ADS.${dialogKey}.MESSAGE`); | ||
+ }).join("\n"); | ||
this._dialog.open(AlertDialogComponent, { | ||
minWidth: 250, | ||
maxWidth: 400, | ||
disableClose: true, | ||
data: { | ||
- title: this._translateService.instant(`ADS.${dialogKey}.TITLE`), | ||
- message: this._translateService.instant(`ADS.${dialogKey}.MESSAGE`), | ||
+ title: this._translateService.instant(`ADS.${dialogKeys[0]}.TITLE`), | ||
+ message: message, | ||
}, | ||
}); | ||
} | ||
} | ||
--- wowup-electron/src/environments/environment.dev.ts | ||
+++ wowup-electron/src/environments/environment.dev.ts | ||
@@ -18,19 +18,19 @@ | ||
wago: { | ||
enabled: true, | ||
termsUrl: "https://addons.wago.io/agreements/terms-of-service", | ||
dataConsentUrl: "https://addons.wago.io/agreements/wowup-data-consent", | ||
}, | ||
curseforge: { | ||
- enabled: false, | ||
+ enabled: true, | ||
httpTimeoutMs: 60000, | ||
- apiKey: "", | ||
+ apiKey: "{{CURSEFORGE_API_KEY}}", | ||
}, | ||
autoUpdateIntervalMs: 3600000, // 1 hour | ||
appUpdateIntervalMs: 3600000, // 1 hour | ||
defaultHttpTimeoutMs: 10000, | ||
defaultHttpResetTimeoutMs: 30000, | ||
wowUpHubHttpTimeoutMs: 10000, | ||
wagoHttpTimeoutMs: 10000, | ||
newsRefreshIntervalMs: 3600000, // 1 hour | ||
featuredAddonsCacheTimeSec: 30, // 30 sec | ||
}; | ||
--- wowup-electron/src/environments/environment.prod.ts | ||
+++ wowup-electron/src/environments/environment.prod.ts | ||
@@ -13,19 +13,19 @@ | ||
wago: { | ||
enabled: true, | ||
termsUrl: "https://addons.wago.io/agreements/terms-of-service", | ||
dataConsentUrl: "https://addons.wago.io/agreements/wowup-data-consent", | ||
}, | ||
curseforge: { | ||
- enabled: false, | ||
+ enabled: true, | ||
httpTimeoutMs: 60000, | ||
- apiKey: "", | ||
+ apiKey: "{{CURSEFORGE_API_KEY}}", | ||
}, | ||
autoUpdateIntervalMs: 3600000, // 1 hour | ||
appUpdateIntervalMs: 3600000, // 1 hour | ||
defaultHttpTimeoutMs: 10000, | ||
defaultHttpResetTimeoutMs: 30000, | ||
wowUpHubHttpTimeoutMs: 10000, | ||
wagoHttpTimeoutMs: 10000, | ||
newsRefreshIntervalMs: 3600000, // 1 hour | ||
featuredAddonsCacheTimeSec: 30, // 30 sec | ||
}; | ||
--- wowup-electron/src/environments/environment.ts | ||
+++ wowup-electron/src/environments/environment.ts | ||
@@ -8,24 +8,24 @@ | ||
warcraftTavernNewsFeedUrl: | ||
"https://www.warcrafttavern.com/?call_custom_simple_rss=1&csrp_post_type=wow-classic-news,tbc-classic-news,retail-news&csrp_thumbnail_size=medium", | ||
azure: { | ||
applicationInsightsKey: "4a53e8d9-796c-4f80-b1a6-9a058374dd6d", | ||
}, | ||
wago: { | ||
- enabled: false, | ||
+ enabled: true, | ||
termsUrl: "https://addons.wago.io/agreements/terms-of-service", | ||
dataConsentUrl: "https://addons.wago.io/agreements/wowup-data-consent", | ||
}, | ||
curseforge: { | ||
- enabled: false, | ||
+ enabled: true, | ||
httpTimeoutMs: 60000, | ||
apiKey: "{{CURSEFORGE_API_KEY}}", | ||
}, | ||
autoUpdateIntervalMs: 3600000, // 1 hour | ||
appUpdateIntervalMs: 3600000, // 1 hour | ||
defaultHttpTimeoutMs: 10000, | ||
defaultHttpResetTimeoutMs: 30000, | ||
wowUpHubHttpTimeoutMs: 10000, | ||
wagoHttpTimeoutMs: 10000, | ||
newsRefreshIntervalMs: 3600000, // 1 hour | ||
featuredAddonsCacheTimeSec: 30, // 30 sec | ||
}; | ||
--- wowup-electron/gulpfile.js | ||
+++ wowup-electron/gulpfile.js | ||
@@ -50,18 +50,38 @@ | ||
function npmRun(cmd) { | ||
return function npmRunCmd(cb) { | ||
npmRunTask(cb, cmd); | ||
}; | ||
} | ||
|
||
+async function updateCfKey() { | ||
+ const cfApiKey = process.env.CURSEFORGE_API_KEY; | ||
+ console.log(cfApiKey); | ||
+ if (typeof cfApiKey !== "string" || cfApiKey.length === 0) { | ||
+ throw new Error("CURSEFORGE_API_KEY missing"); | ||
+ } | ||
+ | ||
+ const envPath = "src/environments"; | ||
+ const environments = await fs.readdir(envPath); | ||
+ | ||
+ for (let env of environments) { | ||
+ const filePath = path.join(envPath, env); | ||
+ let envData = await fs.readFile(filePath, { encoding: "utf-8" }); | ||
+ envData = envData.replace("{{CURSEFORGE_API_KEY}}", cfApiKey); | ||
+ | ||
+ await fs.writeFile(filePath, envData); | ||
+ console.log(envData); | ||
+ } | ||
+} | ||
+ | ||
const prePackageTasks = [ | ||
npmRun("lint"), | ||
npmRun("build:prod"), | ||
prePackageTask, | ||
prePackageCopyTask, | ||
packageChDir, | ||
npmRun("install:prod"), | ||
]; | ||
|
||
exports.default = defaultTask; | ||
-exports.package = gulp.series(...prePackageTasks, npmRun("electron:publish")); | ||
-exports.packageLocal = gulp.series(...prePackageTasks, npmRun("electron:publish:never:local")); | ||
+exports.package = gulp.series(...prePackageTasks, updateCfKey, npmRun("electron:publish")); | ||
+exports.packageLocal = gulp.series(...prePackageTasks, updateCfKey, npmRun("electron:publish:never:local")); |
47 changes: 47 additions & 0 deletions
47
WowUp-Unlimited/unlimited-patches/10-IncludePreviousEraAddons.patch
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,47 @@ | ||
--- wowup-electron/src/app/addon-providers/curse-addon-provider.ts | ||
+++ wowup-electron/src/app/addon-providers/curse-addon-provider.ts | ||
@@ -57,22 +57,22 @@ | ||
const GAME_TYPE_LISTS = [ | ||
{ | ||
flavor: "wow_classic", | ||
- typeId: 67408, | ||
+ typeId: [67408], | ||
matches: [WowClientType.ClassicEra, WowClientType.ClassicEraPtr], | ||
}, | ||
{ | ||
flavor: "wow-wrath-classic", | ||
- typeId: 73713, | ||
+ typeId: [73713, 73246], | ||
matches: [], | ||
}, | ||
{ | ||
flavor: "wow_retail", | ||
- typeId: 517, | ||
+ typeId: [517], | ||
matches: [WowClientType.Retail, WowClientType.RetailPtr, WowClientType.Beta, WowClientType.RetailXPtr], | ||
}, | ||
{ | ||
flavor: "wow-cataclysm-classic", | ||
- typeId: 77522, | ||
+ typeId: [77522, 73713, 73246], | ||
matches: [WowClientType.Classic, WowClientType.ClassicPtr, WowClientType.ClassicBeta], | ||
}, | ||
]; | ||
@@ -488,7 +488,7 @@ | ||
throw new Error(`Game type not found: ${clientType}`); | ||
} | ||
|
||
- return gameType.typeId; | ||
+ return gameType.typeId[0]; | ||
} | ||
|
||
private hasSortableGameVersion(file: cfv2.CF2File, typeId: number): boolean { | ||
@@ -802,7 +802,7 @@ | ||
private getValidClientTypes(file: cfv2.CF2File): WowClientType[] { | ||
const gameVersions: WowClientType[] = _.flatten( | ||
GAME_TYPE_LISTS.filter((type) => | ||
- file.sortableGameVersions.find((sgv) => sgv.gameVersionTypeId === type.typeId), | ||
+ file.sortableGameVersions.find((sgv) => type.typeId.includes(sgv.gameVersionTypeId)) | ||
).map((game) => game.matches), | ||
); | ||
|
17 changes: 17 additions & 0 deletions
17
WowUp-Unlimited/unlimited-patches/11-DisableCurseAds.patch
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,17 @@ | ||
--- wowup-electron/src/app/addon-providers/curse-addon-provider.ts | ||
+++ wowup-electron/src/app/addon-providers/curse-addon-provider.ts | ||
@@ -85,13 +85,13 @@ | ||
public readonly forceIgnore = false; | ||
public readonly allowChannelChange = true; | ||
public readonly allowReinstall = true; | ||
public readonly canBatchFetch = true; | ||
public readonly allowEdit = true; | ||
|
||
- public adRequired = true; | ||
+ public adRequired = false; | ||
public enabled = true; | ||
|
||
public constructor( | ||
private _cachingService: CachingService, | ||
private _networkService: NetworkService, | ||
private _tocService: TocService, |
Oops, something went wrong.