Skip to content

Commit 3a7b37f

Browse files
Fix a few smaller build issues
1 parent 16eb63e commit 3a7b37f

File tree

4 files changed

+30
-24
lines changed

4 files changed

+30
-24
lines changed

forge.config.js

+14-15
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ process.env.TEMP = process.env.TMP = `C:\\Users\\FelixRieseberg\\AppData\\Local\
88

99
const FLAGS = {
1010
SIGNTOOL_PATH: process.env.SIGNTOOL_PATH,
11-
AZURE_CODE_SIGNING_DLIB: process.env.AZURE_CODE_SIGNING_DLIB || path.resolve(__dirname, 'Microsoft.Trusted.Signing.Client.1.0.60', 'bin', 'x64', 'Azure.CodeSigning.Dlib.dll'),
11+
AZURE_CODE_SIGNING_DLIB: process.env.AZURE_CODE_SIGNING_DLIB || path.join(__dirname, 'Microsoft.Trusted.Signing.Client.1.0.60/bin/x64/Azure.CodeSigning.Dlib.dll'),
1212
AZURE_METADATA_JSON: process.env.AZURE_METADATA_JSON || path.resolve(__dirname, 'trusted-signing-metadata.json'),
1313
AZURE_TENANT_ID: process.env.AZURE_TENANT_ID,
1414
AZURE_CLIENT_ID: process.env.AZURE_CLIENT_ID,
1515
AZURE_CLIENT_SECRET: process.env.AZURE_CLIENT_SECRET,
16+
APPLE_ID: process.env.APPLE_ID,
17+
APPLE_ID_PASSWORD: process.env.APPLE_ID_PASSWORD,
1618
}
1719

1820
fs.writeFileSync(FLAGS.AZURE_METADATA_JSON, JSON.stringify({
@@ -21,6 +23,13 @@ fs.writeFileSync(FLAGS.AZURE_METADATA_JSON, JSON.stringify({
2123
CertificateProfileName: process.env.AZURE_CODE_SIGNING_CERTIFICATE_PROFILE_NAME,
2224
}, null, 2));
2325

26+
const windowsSign = {
27+
signToolPath: FLAGS.SIGNTOOL_PATH,
28+
signWithParams: `/v /dlib ${FLAGS.AZURE_CODE_SIGNING_DLIB} /dmdf ${FLAGS.AZURE_METADATA_JSON}`,
29+
timestampServer: "http://timestamp.acs.microsoft.com",
30+
hashes: ["sha256"],
31+
}
32+
2433
module.exports = {
2534
hooks: {
2635
generateAssets: require('./tools/generateAssets'),
@@ -38,16 +47,11 @@ module.exports = {
3847
identity: 'Developer ID Application: Felix Rieseberg (LT94ZKYDCJ)',
3948
},
4049
osxNotarize: {
41-
appleId: process.env['APPLE_ID'],
42-
appleIdPassword: process.env['APPLE_ID_PASSWORD'],
50+
appleId: FLAGS.APPLE_ID,
51+
appleIdPassword: FLAGS.APPLE_ID_PASSWORD,
4352
teamId: 'LT94ZKYDCJ'
4453
},
45-
windowsSign: {
46-
signToolPath: FLAGS.SIGNTOOL_PATH,
47-
signWithParams: `/v /dlib ${process.env.AZURE_CODE_SIGNING_DLIB} /dmdf ${FLAGS.AZURE_METADATA_JSON}`,
48-
timestampServer: "http://timestamp.acs.microsoft.com",
49-
hashes: ["sha256"],
50-
},
54+
windowsSign,
5155
ignore: [
5256
/\/assets(\/?)/,
5357
/\/docs(\/?)/,
@@ -90,12 +94,7 @@ module.exports = {
9094
loadingGif: './assets/boot.gif',
9195
setupExe: `windows95-${package.version}-setup-${arch}.exe`,
9296
setupIcon: path.resolve(__dirname, 'assets', 'icon.ico'),
93-
windowsSign: {
94-
signToolPath: FLAGS.SIGNTOOL_PATH,
95-
signWithParams: `/v /dlib ${process.env.AZURE_CODE_SIGNING_DLIB} /dmdf ${FLAGS.AZURE_METADATA_JSON}`,
96-
timestampServer: "http://timestamp.acs.microsoft.com",
97-
hashes: ["sha256"],
98-
}
97+
windowsSign
9998
}
10099
}
101100
},

src/constants.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import * as path from "path";
22

3+
const IMAGES_PATH = path.join(__dirname, "../../images");
4+
35
export const CONSTANTS = {
4-
IMAGE_PATH: path.join(__dirname, "../../images/windows95_v4.raw"),
6+
IMAGES_PATH,
7+
IMAGE_PATH: path.join(IMAGES_PATH, "windows95.img"),
58
IMAGE_DEFAULT_SIZE: 1073741824, // 1GB
6-
DEFAULT_STATE_PATH: path.join(__dirname, "../../images/default-state.bin"),
9+
DEFAULT_STATE_PATH: path.join(IMAGES_PATH, "default-state.bin"),
710
};
811

912
export const IPC_COMMANDS = {

src/renderer/card-settings.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class CardSettings extends React.Component<
122122
</p>
123123
<p id="floppy-path">
124124
{floppy
125-
? `Inserted Floppy Disk: ${floppy.path}`
125+
? `Inserted Floppy Disk: ${floppy.name}`
126126
: `No floppy mounted`}
127127
</p>
128128
<button

src/renderer/emulator.tsx

+10-6
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,11 @@ export class Emulator extends React.Component<{}, EmulatorState> {
278278
wasm_path: path.join(__dirname, "build/v86.wasm"),
279279
memory_size: 128 * 1024 * 1024,
280280
vga_memory_size: 64 * 1024 * 1024,
281-
screen_container: document.getElementById("emulator"),
282-
// preserve_mac_from_state_image: true,
283-
use_graphical_text: true,
281+
screen: {
282+
container: document.getElementById("emulator"),
283+
scale: 0
284+
},
285+
preserve_mac_from_state_image: true,
284286
net_device: {
285287
relay_url: "fetch",
286288
type: "ne2k",
@@ -296,9 +298,11 @@ export class Emulator extends React.Component<{}, EmulatorState> {
296298
async: true,
297299
size: await getDiskImageSize(CONSTANTS.IMAGE_PATH),
298300
},
299-
// fda: {
300-
// buffer: this.state.floppyFile,
301-
// },
301+
fda: this.state.floppyFile
302+
? {
303+
buffer: this.state.floppyFile,
304+
}
305+
: undefined,
302306
cdrom: this.state.cdromFile?.path
303307
? {
304308
url: this.state.cdromFile.path,

0 commit comments

Comments
 (0)