Skip to content

Commit

Permalink
Fix a few smaller build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrieseberg committed Feb 21, 2025
1 parent 16eb63e commit 3a7b37f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 24 deletions.
29 changes: 14 additions & 15 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ process.env.TEMP = process.env.TMP = `C:\\Users\\FelixRieseberg\\AppData\\Local\

const FLAGS = {
SIGNTOOL_PATH: process.env.SIGNTOOL_PATH,
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'),
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'),
AZURE_METADATA_JSON: process.env.AZURE_METADATA_JSON || path.resolve(__dirname, 'trusted-signing-metadata.json'),
AZURE_TENANT_ID: process.env.AZURE_TENANT_ID,
AZURE_CLIENT_ID: process.env.AZURE_CLIENT_ID,
AZURE_CLIENT_SECRET: process.env.AZURE_CLIENT_SECRET,
APPLE_ID: process.env.APPLE_ID,
APPLE_ID_PASSWORD: process.env.APPLE_ID_PASSWORD,
}

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

const windowsSign = {
signToolPath: FLAGS.SIGNTOOL_PATH,
signWithParams: `/v /dlib ${FLAGS.AZURE_CODE_SIGNING_DLIB} /dmdf ${FLAGS.AZURE_METADATA_JSON}`,
timestampServer: "http://timestamp.acs.microsoft.com",
hashes: ["sha256"],
}

module.exports = {
hooks: {
generateAssets: require('./tools/generateAssets'),
Expand All @@ -38,16 +47,11 @@ module.exports = {
identity: 'Developer ID Application: Felix Rieseberg (LT94ZKYDCJ)',
},
osxNotarize: {
appleId: process.env['APPLE_ID'],
appleIdPassword: process.env['APPLE_ID_PASSWORD'],
appleId: FLAGS.APPLE_ID,
appleIdPassword: FLAGS.APPLE_ID_PASSWORD,
teamId: 'LT94ZKYDCJ'
},
windowsSign: {
signToolPath: FLAGS.SIGNTOOL_PATH,
signWithParams: `/v /dlib ${process.env.AZURE_CODE_SIGNING_DLIB} /dmdf ${FLAGS.AZURE_METADATA_JSON}`,
timestampServer: "http://timestamp.acs.microsoft.com",
hashes: ["sha256"],
},
windowsSign,
ignore: [
/\/assets(\/?)/,
/\/docs(\/?)/,
Expand Down Expand Up @@ -90,12 +94,7 @@ module.exports = {
loadingGif: './assets/boot.gif',
setupExe: `windows95-${package.version}-setup-${arch}.exe`,
setupIcon: path.resolve(__dirname, 'assets', 'icon.ico'),
windowsSign: {
signToolPath: FLAGS.SIGNTOOL_PATH,
signWithParams: `/v /dlib ${process.env.AZURE_CODE_SIGNING_DLIB} /dmdf ${FLAGS.AZURE_METADATA_JSON}`,
timestampServer: "http://timestamp.acs.microsoft.com",
hashes: ["sha256"],
}
windowsSign
}
}
},
Expand Down
7 changes: 5 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import * as path from "path";

const IMAGES_PATH = path.join(__dirname, "../../images");

export const CONSTANTS = {
IMAGE_PATH: path.join(__dirname, "../../images/windows95_v4.raw"),
IMAGES_PATH,
IMAGE_PATH: path.join(IMAGES_PATH, "windows95.img"),
IMAGE_DEFAULT_SIZE: 1073741824, // 1GB
DEFAULT_STATE_PATH: path.join(__dirname, "../../images/default-state.bin"),
DEFAULT_STATE_PATH: path.join(IMAGES_PATH, "default-state.bin"),
};

export const IPC_COMMANDS = {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/card-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class CardSettings extends React.Component<
</p>
<p id="floppy-path">
{floppy
? `Inserted Floppy Disk: ${floppy.path}`
? `Inserted Floppy Disk: ${floppy.name}`
: `No floppy mounted`}
</p>
<button
Expand Down
16 changes: 10 additions & 6 deletions src/renderer/emulator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,11 @@ export class Emulator extends React.Component<{}, EmulatorState> {
wasm_path: path.join(__dirname, "build/v86.wasm"),
memory_size: 128 * 1024 * 1024,
vga_memory_size: 64 * 1024 * 1024,
screen_container: document.getElementById("emulator"),
// preserve_mac_from_state_image: true,
use_graphical_text: true,
screen: {
container: document.getElementById("emulator"),
scale: 0
},
preserve_mac_from_state_image: true,
net_device: {
relay_url: "fetch",
type: "ne2k",
Expand All @@ -296,9 +298,11 @@ export class Emulator extends React.Component<{}, EmulatorState> {
async: true,
size: await getDiskImageSize(CONSTANTS.IMAGE_PATH),
},
// fda: {
// buffer: this.state.floppyFile,
// },
fda: this.state.floppyFile
? {
buffer: this.state.floppyFile,
}
: undefined,
cdrom: this.state.cdromFile?.path
? {
url: this.state.cdromFile.path,
Expand Down

0 comments on commit 3a7b37f

Please # to comment.