Skip to content

Commit

Permalink
feat: skeleton launch program
Browse files Browse the repository at this point in the history
  • Loading branch information
3Shain committed Mar 8, 2023
1 parent 1ebf487 commit 6884cf3
Show file tree
Hide file tree
Showing 17 changed files with 639 additions and 60 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-ontag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:

- name: Build app
run: |
./configure.sh
node ./build-app.js
- name: Tar app
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:

- name: Build app
run: |
./configure.sh
node ./build-app.js
- name: Tar app
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ node_modules
*.session
*.neu

/wine*
/wine*

/external

*.log
*.dxvk-cache
1 change: 1 addition & 0 deletions build-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ echo $APST_DIR
mkdir -p "$APST_DIR"
CONTENTS_DIR="$(dirname "$SCRIPT_DIR")"
rsync -rlptu "$CONTENTS_DIR/Resources/." "$APST_DIR"
cd "$APST_DIR"
PATH_LAUNCH="$(dirname "$CONTENTS_DIR")" exec "$SCRIPT_DIR/${appname}" --path="$APST_DIR"`
);

Expand Down
12 changes: 12 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
EXTERNAL="./external"

rm -rf "$EXTERNAL"
mkdir -p "$EXTERNAL"
mkdir -p ./tmp
git clone $(echo "aHR0cHM6Ly9ub3RhYnVnLm9yZy9Lcm9jay9kYXduCg==" | base64 --decode) ./tmp
cp -R ./tmp/350/patch_files/. "$EXTERNAL"
rm -rf ./tmp
pushd "$EXTERNAL"
# for file in * ; do echo "$file" "$(basename $file | base64 )"."${file##*.}" ; done
for file in * ; do mv "$file" "$(basename $file | base64 )"."${file##*.}" ; done
popd
Binary file added dxvk/d3d10core.dll
Binary file not shown.
Binary file added dxvk/d3d11.dll
Binary file not shown.
Binary file added dxvk/d3d9.dll
Binary file not shown.
Binary file added dxvk/dxgi.dll
Binary file not shown.
25 changes: 4 additions & 21 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,6 @@ export async function createApp() {
github,
aria2,
});
// return createCommonUpdateUI(async function *(){
// yield ['setStateText','测试进度'];
// for(let i=0;i<=100;i++) {
// yield ['setProgress', i];
// await wait(50);
// }
// yield ['setUndeterminedProgress'];
// await wait(2000);
// yield ['setStateText','完成'];
// });
if (!latest) {
if (
await prompt(
Expand All @@ -85,19 +75,12 @@ export async function createApp() {
}
}

// return () => (
// <div>
// If you are seeing this, it means everything works fine!
// <br /> Current version: {CURRENT_YAAGL_VERSION}
// </div>
// );

const { wineReady, wineUpdate, wineUpdateTag } = await checkWine();
const prefixPath = await resolve("./wineprefix");
const { wineReady, wineUpdate, wineUpdateTag } = await checkWine(github);
const prefixPath = await resolve("./wineprefix"); // CHECK: hardcoded path?
if (wineReady) {
const wine = await createWine({
installDir: "FIXME",
prefix: "FIXME",
installDir: await resolve("./wine"), // CHECK: hardcoded path?
prefix: prefixPath,
});
return await createLauncher({ aria2, wine });
} else {
Expand Down
40 changes: 38 additions & 2 deletions src/constants/server.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@

import b from "../../external/dW5pdHlwbGF5ZXJfcGF0Y2hfYmIudmNkaWZmCg==.vcdiff?url";
import c from "../../external/dW5pdHlwbGF5ZXJfcGF0Y2hfY24udmNkaWZmCg==.vcdiff?url";
import d from "../../external/dW5pdHlwbGF5ZXJfcGF0Y2hfb3MudmNkaWZmCg==.vcdiff?url";
import e from "../../external/eGx1YV9wYXRjaF9jbi52Y2RpZmYK.vcdiff?url";
import f from "../../external/eGx1YV9wYXRjaF9vcy52Y2RpZmYK.vcdiff?url";

export interface Server {
id: string;
url: string;
Expand Down Expand Up @@ -87,7 +94,7 @@ export interface ServerContentData {
retcode: number;
}

export const CN_SERVER: Server = {
export const CN_SERVER = {
id: "CN",
url: atob(
"aHR0cHM6Ly9zZGstc3RhdGljLm1paG95by5jb20vaGs0ZV9jbi9tZGsvbGF1bmNoZXIvYXBpL3Jlc291cmNlP2NoYW5uZWxfaWQ9MSZrZXk9ZVlkODlKbUombGF1bmNoZXJfaWQ9MTg="
Expand All @@ -97,14 +104,43 @@ export const CN_SERVER: Server = {
bg_url: atob(
"aHR0cHM6Ly9zZGstc3RhdGljLm1paG95by5jb20vaGs0ZV9jbi9tZGsvbGF1bmNoZXIvYXBpL2NvbnRlbnQ/ZmlsdGVyX2Fkdj10cnVlJmtleT1lWWQ4OUptSiZsYXVuY2hlcl9pZD0xOCZsYW5ndWFnZT16aC1jbg=="
),
dataDir: atob("WXVhblNoZW5fRGF0YQ=="),
patched: [
{
file: atob("VW5pdHlQbGF5ZXIuZGxs"),
diffUrl: c,
},
{
file: atob("WXVhblNoZW5fRGF0YS9QbHVnaW5zL3hsdWEuZGxs"),
diffUrl: e,
},
],
removed: [
"bWh5cGJhc2UuZGxs",
"WXVhblNoZW5fRGF0YS91cGxvYWRfY3Jhc2guZXhl",
"WXVhblNoZW5fRGF0YS9QbHVnaW5zL2NyYXNocmVwb3J0LmV4ZQ==",
"WXVhblNoZW5fRGF0YS9QbHVnaW5zL3Z1bGthbi0xLmRsbA==",
],
};

export const OS_SERVER: Server = {
export const OS_SERVER = {
id: "OS",
url: atob(
"aHR0cHM6Ly9zZGstb3Mtc3RhdGljLm1paG95by5jb20vaGs0ZV9nbG9iYWwvbWRrL2xhdW5jaGVyL2FwaS9yZXNvdXJjZT9jaGFubmVsX2lkPTEma2V5PWdjU3RnYXJoJmxhdW5jaGVyX2lkPTEw"
),
channel_id: 1,
subchannel_id: 0,
bg_url: "",
dataDir: atob("R2Vuc2hpbkltcGFjdF9EYXRh"),
patched: [
{
file: atob("VW5pdHlQbGF5ZXIuZGxs"),
diffUrl: d,
},
{
file: atob("R2Vuc2hpbkltcGFjdF9EYXRhL1BsdWdpbnMveGx1YS5kbGw="),
diffUrl: f,
},
],
removed: [] //FIXME: todo
};
5 changes: 5 additions & 0 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ export async function createGithubEndpoint() {
})
}

function acceleratedPath(path: string) {
return `${fastest}${path}`;
}

return {
api,
acceleratedPath
};
}

Expand Down
Loading

0 comments on commit 6884cf3

Please sign in to comment.