aboutsummaryrefslogtreecommitdiff
path: root/generator
diff options
context:
space:
mode:
Diffstat (limited to 'generator')
-rw-r--r--generator/Atomic-ARM.pkgproj4
-rw-r--r--generator/Atomic-x64.pkgproj4
-rw-r--r--generator/index.js27
-rw-r--r--generator/windows.iss54
4 files changed, 80 insertions, 9 deletions
diff --git a/generator/Atomic-ARM.pkgproj b/generator/Atomic-ARM.pkgproj
index 67d38c5..047471e 100644
--- a/generator/Atomic-ARM.pkgproj
+++ b/generator/Atomic-ARM.pkgproj
@@ -1008,7 +1008,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
- <string>1.0.1</string>
+ <string>1.1.0</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
@@ -1513,7 +1513,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
- <string>1.2.0</string>
+ <string>1.3.0</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
diff --git a/generator/Atomic-x64.pkgproj b/generator/Atomic-x64.pkgproj
index 5c47f21..3a2cd60 100644
--- a/generator/Atomic-x64.pkgproj
+++ b/generator/Atomic-x64.pkgproj
@@ -1008,7 +1008,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
- <string>1.0.1</string>
+ <string>1.1.0</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
@@ -1513,7 +1513,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
- <string>1.2.0</string>
+ <string>1.3.0</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
diff --git a/generator/index.js b/generator/index.js
index 0b92105..ce42e6a 100644
--- a/generator/index.js
+++ b/generator/index.js
@@ -16,6 +16,11 @@ cp.execSync("npm install electron@latest --platform=darwin --arch=x64", { cwd: "
fs.renameSync("./work/node_modules/electron/dist", "./work/electron-darwin-x64");
fs.rmSync("./work/node_modules", { recursive: true });
+console.log("# Downloading Electron for Windows x64");
+cp.execSync("npm install electron@latest --platform=win32 --arch=x64", { cwd: "./work", stdio: "inherit" });
+fs.renameSync("./work/node_modules/electron/dist", "./work/electron-win32-x64");
+fs.rmSync("./work/node_modules", { recursive: true });
+
let version = fs.readFileSync("./work/electron-darwin-arm64/version").toString().trim();
console.log("# Electron version: " + version);
@@ -29,6 +34,9 @@ fs.renameSync("./work/electron-darwin-arm64/Electron.app", "./work/root/arm/Atom
fs.renameSync("./work/root/x64/AtomicRuntime.framework/Contents/MacOS/Electron", "./work/root/x64/AtomicRuntime.framework/Contents/MacOS/Atomic");
fs.renameSync("./work/root/arm/AtomicRuntime.framework/Contents/MacOS/Electron", "./work/root/arm/AtomicRuntime.framework/Contents/MacOS/Atomic");
+fs.renameSync("./work/electron-win32-x64", "./work/root/x64/AtomicRuntime");
+fs.renameSync("./work/root/x64/AtomicRuntime/electron.exe", "./work/root/x64/AtomicRuntime/atomic.exe");
+
fs.rmSync("./work/root/arm/AtomicRuntime.framework/Contents/Info.plist");
fs.rmSync("./work/root/arm/AtomicRuntime.framework/Contents/PkgInfo");
fs.rmSync("./work/root/x64/AtomicRuntime.framework/Contents/Info.plist");
@@ -52,7 +60,7 @@ for (let file of fs.readdirSync("../converter/").filter(i => i.startsWith("launc
fs.copyFileSync("../converter/" + file, "./work/root/launcher/Atomic/Launcher/" + file);
}
-console.log("# Generating installer");
+console.log("# Generating installer for macOS x64");
let data = plist['parse'](fs.readFileSync("./Atomic-x64.pkgproj").toString());
data["PACKAGES"].filter(i => i["PACKAGE_SETTINGS"]["NAME"] === "Atomic Runtime")[0]["PACKAGE_SETTINGS"]["VERSION"] = version;
@@ -63,6 +71,12 @@ fs.writeFileSync("./Atomic-x64-work.pkgproj", plist['build'](data)
.replaceAll("<data/>", "<data></data>")
);
+cp.execSync("packagesbuild ./Atomic-x64-work.pkgproj", { stdio: "inherit" });
+
+console.log("# Generating installer for macOS ARM");
+
+cp.execSync("packagesbuild ./Atomic-ARM-work.pkgproj", { stdio: "inherit" });
+
data = plist['parse'](fs.readFileSync("./Atomic-ARM.pkgproj").toString());
data["PACKAGES"].filter(i => i["PACKAGE_SETTINGS"]["NAME"] === "Atomic Runtime")[0]["PACKAGE_SETTINGS"]["VERSION"] = version;
fs.writeFileSync("./Atomic-ARM-work.pkgproj", plist['build'](data)
@@ -72,18 +86,21 @@ fs.writeFileSync("./Atomic-ARM-work.pkgproj", plist['build'](data)
.replaceAll("<data/>", "<data></data>")
);
-cp.execSync("packagesbuild ./Atomic-x64-work.pkgproj", { stdio: "inherit" });
-cp.execSync("packagesbuild ./Atomic-ARM-work.pkgproj", { stdio: "inherit" });
+console.log("# Generating installer for Windows x64");
+fs.writeFileSync("./windows-work.iss", fs.readFileSync("./windows.iss").toString().replace(/#define MyAppVersion "(.*)"/gm, '#define MyAppVersion "' + version + '"'));
+cp.execSync("wine ~/.wine/drive_c/Program\\ Files\\ \\(x86\\)/Inno\\ Setup\\ 6/ISCC.exe \"Z:\\Volumes\\Projects\\atomic\\generator\\windows-work.iss\"", { stdio: "inherit" });
console.log("# Cleaning up");
fs.renameSync("./build/ARM/Atomic.pkg", "./build/Atomic-Mac-ARM64.pkg");
fs.renameSync("./build/x64/Atomic.pkg", "./build/Atomic-Mac-x64.pkg");
-fs.rmdirSync("./build/ARM");
-fs.rmdirSync("./build/x64");
+fs.rmSync("./build/ARM", { recursive: true });
+fs.rmSync("./build/x64", { recursive: true });
fs.rmSync("./work", { recursive: true });
fs.rmSync("./Atomic-ARM-work.pkgproj");
fs.rmSync("./Atomic-x64-work.pkgproj");
+fs.rmSync("./windows-work.iss");
console.log("# Publishing to GitLab");
cp.execSync(`curl -v --header "PRIVATE-TOKEN: $(cat ~/.deploy.txt)" --header "Content-Type: multipart/form-data" --upload-file Atomic-Mac-ARM64.pkg https://source.equestria.dev/api/v4/projects/186/packages/generic/atomic/${version}/Atomic-Mac-ARM64.pkg`, { cwd: "./build" });
cp.execSync(`curl -v --header "PRIVATE-TOKEN: $(cat ~/.deploy.txt)" --header "Content-Type: multipart/form-data" --upload-file Atomic-Mac-x64.pkg https://source.equestria.dev/api/v4/projects/186/packages/generic/atomic/${version}/Atomic-Mac-x64.pkg`, { cwd: "./build" });
+cp.execSync(`curl -v --header "PRIVATE-TOKEN: $(cat ~/.deploy.txt)" --header "Content-Type: multipart/form-data" --upload-file Atomic-Win32-x64.exe https://source.equestria.dev/api/v4/projects/186/packages/generic/atomic/${version}/Atomic-Win32-x64.exe`, { cwd: "./build" });
diff --git a/generator/windows.iss b/generator/windows.iss
new file mode 100644
index 0000000..c77461d
--- /dev/null
+++ b/generator/windows.iss
@@ -0,0 +1,54 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+#define MyAppName "Atomic Runtime for Windows"
+#define MyAppVersion "1.0.0"
+#define MyAppPublisher "Equestria.dev"
+#define MyAppURL "https://source.equestria.dev/equestria.dev/atomic"
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{34C445C9-205B-456A-88D2-B1862EB6550B}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+;AppVerName={#MyAppName} {#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+AppPublisherURL={#MyAppURL}
+AppSupportURL={#MyAppURL}
+AppUpdatesURL={#MyAppURL}
+DefaultDirName={autopf}\Common Files\Equestria.dev
+DisableDirPage=yes
+DefaultGroupName={#MyAppName}
+DisableProgramGroupPage=yes
+LicenseFile=Z:\Volumes\Projects\atomic\generator\license-en.rtf
+InfoBeforeFile=Z:\Volumes\Projects\atomic\generator\readme-en.rtf
+InfoAfterFile=Z:\Volumes\Projects\atomic\generator\post-en.rtf
+; Uncomment the following line to run in non administrative install mode (install for current user only.)
+;PrivilegesRequired=lowest
+OutputDir=Z:\Volumes\Projects\atomic\generator\build
+OutputBaseFilename=Atomic-Win32-x64
+Compression=lzma
+SolidCompression=yes
+WizardStyle=modern
+ArchitecturesInstallIn64BitMode=x64
+ArchitecturesAllowed=x64
+
+[Types]
+Name: "compact"; Description: "Atomic Runtime only (recommended)"
+Name: "full"; Description: "Full Atomic Platform"
+Name: "custom"; Description: "Custom"; Flags: iscustom
+
+[Components]
+Name: "runtime"; Description: "Atomic Runtime"; Types: full compact custom; Flags: fixed
+Name: "sdk"; Description: "UNIX Software Development Kit"; Types: full
+Name: "launcher"; Description: "Standalone Launcher"; Types: full
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Files]
+Source: "Z:\Volumes\Projects\atomic\generator\work\root\x64\AtomicRuntime\*"; DestDir: "{app}\AtomicRuntime"; Components: runtime; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "Z:\Volumes\Projects\atomic\generator\work\root\launcher\Atomic\Launcher\*"; DestDir: "{app}\AtomicStandaloneLauncher"; Components: launcher; Flags: ignoreversion recursesubdirs createallsubdirs
+Source: "Z:\Volumes\Projects\atomic\generator\work\root\sdk\Atomic\SDK\*"; DestDir: "{app}\AtomicSDK"; Components: sdk; Flags: ignoreversion recursesubdirs createallsubdirs
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files