mirror of
https://github.com/damp11113-software/ccIDE.git
synced 2025-04-27 06:28:14 +00:00
update 1.4
add better splash screen and update Advanced Peripherals module 9/13
This commit is contained in:
parent
5dbeeddca4
commit
b51f562de4
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,3 +2,5 @@ node_modules/
|
||||
.mcattributes
|
||||
package-lock.json
|
||||
dist/
|
||||
dist_debug/
|
||||
ccIDE.wheel
|
1
TestProject/geoscanner (example 4).ccp
Normal file
1
TestProject/geoscanner (example 4).ccp
Normal file
@ -0,0 +1 @@
|
||||
{"usedlibrary":["Advanced_Peripherals","CCPeripheral","CCTextutils","NativeIO"],"content":{"blocks":{"languageVersion":0,"blocks":[{"type":"ide_start","id":"_s{i,SzdnGk`iz}V{Ef,","x":30,"y":150,"inputs":{"DO":{"block":{"type":"variables_set","id":"4`t0A~mi9udqazuPFltl","fields":{"VAR":{"id":"b!G3HI*3Su-;s=l@m`{C"}},"inputs":{"VALUE":{"block":{"type":"io_open","id":"{s9Q{?YzVj[IT}u~g52k","fields":{"MODE":"w"},"inputs":{"FILENAME":{"block":{"type":"text","id":"}r@r{xS9G6@i@C{jDAOG","fields":{"TEXT":"test.json"}}}}}}},"next":{"block":{"type":"variables_set","id":"la(`]]2fjOy@W3|#H+j5","fields":{"VAR":{"id":"!60`+fJsl+LMzF5L;((_"}},"inputs":{"VALUE":{"block":{"type":"peripheral_wrap","id":"#gIy8pYRI5r;|Gpt((6D","inputs":{"NAME":{"shadow":{"type":"text","id":"s1SZ;+Ll-[Dn*[yCTh4^","fields":{"TEXT":"geoScanner_1"}}}}}}},"next":{"block":{"type":"io_write","id":"cXQ`rD/MHKTs*S:asoq`","inputs":{"DATA":{"shadow":{"type":"text","id":"j_Am~Q@Lu.p2e[cVK%_+","fields":{"TEXT":"Hello, world!"}},"block":{"type":"textutils_serialize_json","id":"7D;X/4FI7*aP+^+JG]w~","fields":{"NBT":false,"UNICODE":false,"ALLOWREPETI":false},"inputs":{"OBJECT":{"block":{"type":"advanced_peripherals_geo_scanner_scan","id":"=uxVRL!ZaUB=t@-]@;`4","inputs":{"RADIUS":{"shadow":{"type":"math_number","id":"e5oF_eP.dd+gJ@3YxYYJ","fields":{"NUM":2}}},"SCANNER":{"block":{"type":"variables_get","id":"Y`peao|kXro)ax|@x8v*","fields":{"VAR":{"id":"!60`+fJsl+LMzF5L;((_"}}}}}}}}}},"FILE":{"block":{"type":"variables_get","id":"-iS.RqK;e21F_P4Psbm+","fields":{"VAR":{"id":"b!G3HI*3Su-;s=l@m`{C"}}}}}}}}}}}}}]},"variables":[{"name":"scanner","id":"!60`+fJsl+LMzF5L;((_"},{"name":"file","id":"b!G3HI*3Su-;s=l@m`{C"}]}}
|
BIN
assets/dpsoftware.png
Normal file
BIN
assets/dpsoftware.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
@ -1199,5 +1199,314 @@
|
||||
"colour": 200,
|
||||
"tooltip": "Writes NBT data into the block.",
|
||||
"helpUrl": "https://advancedperipherals.netlify.app/peripherals/nbt_storage/#writetable"
|
||||
},
|
||||
|
||||
"advanced_peripherals_block_reader_get_block_name": {
|
||||
"message0": "Get current block name in front of reader %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "READER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "String",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the registry name of the block (ex. minecraft:dirt)"
|
||||
},
|
||||
"advanced_peripherals_block_reader_get_block_data": {
|
||||
"message0": "Get current block data in front of reader %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "READER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Array",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the block data of the block if block is a tile entity."
|
||||
},
|
||||
"advanced_peripherals_block_reader_get_block_states": {
|
||||
"message0": "Get current block states in front of reader %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "READER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Array",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the properties of a block and its state."
|
||||
},
|
||||
"advanced_peripherals_block_reader_is_tile_entity": {
|
||||
"message0": "Is entity in front of reader %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "READER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Boolean",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns true whether the block is a tile entity or not."
|
||||
},
|
||||
|
||||
"advanced_peripherals_geo_scanner_get_fuel_level": {
|
||||
"message0": "Get current fuel level from scanner %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "SCANNER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Number",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the amount of stored fuel."
|
||||
},
|
||||
"advanced_peripherals_geo_scanner_get_max_fuel_level": {
|
||||
"message0": "Get max fuel level from scanner %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "SCANNER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Number",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the maximum amount of possible stored fuel."
|
||||
},
|
||||
"advanced_peripherals_geo_scanner_cost": {
|
||||
"message0": "Calculate cost for scan in radius %1 with scanner %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "RADIUS",
|
||||
"check": "Number"
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "SCANNER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Number",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the cost in FE for a scan with the given radius."
|
||||
},
|
||||
"advanced_peripherals_geo_scanner_scan": {
|
||||
"message0": "Scan in radius %1 with scanner %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "RADIUS",
|
||||
"check": "Number"
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "SCANNER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": ["Array", "String"],
|
||||
"colour": 200,
|
||||
"tooltip": "Returns a list of data about all blocks in the radius. Or if the scan fails it returns nil and an error message.",
|
||||
"helpUrl": "https://advancedperipherals.netlify.app/peripherals/geo_scanner/#scan"
|
||||
},
|
||||
"advanced_peripherals_geo_get_scan_cooldown": {
|
||||
"message0": "Get cooldown scan time from scanner %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "SCANNER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Number",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the current time remaining until then next scan() can be ran."
|
||||
},
|
||||
"advanced_peripherals_geo_chunk_analyze": {
|
||||
"message0": "Analyze current chunk with scanner %1",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "SCANNER",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": ["Array", "String"],
|
||||
"colour": 200,
|
||||
"tooltip": "Returns a table of data about how many of each ore type is in the block's chunk. Or if the analyze fails it returns nil and an error message."
|
||||
},
|
||||
|
||||
"advanced_peripherals_redstone_integrator_get_input": {
|
||||
"message0": "Get redstone input from side %1 of integrator %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["North", "north"],
|
||||
["East", "east"],
|
||||
["West", "west"],
|
||||
["South", "south"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "INTEGRATOR",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Boolean",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns true or false depending on if the redstone at the given side is on."
|
||||
},
|
||||
"advanced_peripherals_redstone_integrator_get_output": {
|
||||
"message0": "Get redstone output from side %1 of integrator %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["North", "north"],
|
||||
["East", "east"],
|
||||
["West", "west"],
|
||||
["South", "south"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "INTEGRATOR",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Boolean",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns true or false depending on if the Redstone Integrator is sending a signal to the given side."
|
||||
},
|
||||
"advanced_peripherals_redstone_integrator_get_analog_input": {
|
||||
"message0": "Get redstone analog input from side %1 of integrator %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["North", "north"],
|
||||
["East", "east"],
|
||||
["West", "west"],
|
||||
["South", "south"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "INTEGRATOR",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Number",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the redstone level input on the given side. (0-15)"
|
||||
},
|
||||
"advanced_peripherals_redstone_integrator_get_analog_output": {
|
||||
"message0": "Get redstone analog output from side %1 of integrator %2",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["North", "north"],
|
||||
["East", "east"],
|
||||
["West", "west"],
|
||||
["South", "south"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "INTEGRATOR",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"output": "Number",
|
||||
"colour": 200,
|
||||
"tooltip": "Returns the redstone level being output by the Redstone Integrator on the given side. (0-15)"
|
||||
},
|
||||
"advanced_peripherals_redstone_integrator_set_output": {
|
||||
"message0": "Set redstone output %1 to side %2 of integrator %3",
|
||||
"args0": [
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "POWERED",
|
||||
"options": [
|
||||
["On", "ON"],
|
||||
["Off", "OFF"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["North", "north"],
|
||||
["East", "east"],
|
||||
["West", "west"],
|
||||
["South", "south"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "INTEGRATOR",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 200,
|
||||
"tooltip": "Sets the redstone level output to 0 or 15 on the given side depending on powered."
|
||||
},
|
||||
"advanced_peripherals_redstone_integrator_set_analog_output": {
|
||||
"message0": "Set redstone analog output level %1 to side %2 of integrator %3",
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "POWER",
|
||||
"check": "Number"
|
||||
},
|
||||
{
|
||||
"type": "field_dropdown",
|
||||
"name": "SIDE",
|
||||
"options": [
|
||||
["Top", "top"],
|
||||
["Bottom", "bottom"],
|
||||
["North", "north"],
|
||||
["East", "east"],
|
||||
["West", "west"],
|
||||
["South", "south"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "INTEGRATOR",
|
||||
"check": "Peripheral"
|
||||
}
|
||||
],
|
||||
"previousStatement": null,
|
||||
"nextStatement": null,
|
||||
"colour": 200,
|
||||
"tooltip": "Sets the redstone level output on the given side to the given power level. (0-15)"
|
||||
}
|
||||
}
|
||||
|
@ -434,3 +434,122 @@ luaGenerator.forBlock['advanced_peripherals_nbt_storage_write_table'] = function
|
||||
|
||||
return `${nbtstorage}.writeTable(${nbt})\n`;
|
||||
};
|
||||
|
||||
// Generator for Block Reader
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_block_reader_get_block_name'] = function(block, generator) {
|
||||
var reader = generator.valueToCode(block, 'READER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${reader}.getBlockName()`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_block_reader_get_block_data'] = function(block, generator) {
|
||||
var reader = generator.valueToCode(block, 'READER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${reader}.getBlockData()`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_block_reader_get_block_states'] = function(block, generator) {
|
||||
var reader = generator.valueToCode(block, 'READER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${reader}.getBlockStates()`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_block_reader_is_tile_entity'] = function(block, generator) {
|
||||
var reader = generator.valueToCode(block, 'READER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${reader}.isTileEntity()`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
// Generator for Geo Scanner
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_geo_scanner_get_fuel_level'] = function(block, generator) {
|
||||
var scanner = generator.valueToCode(block, 'SCANNER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${scanner}.getFuelLevel()`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_geo_scanner_get_max_fuel_level'] = function(block, generator) {
|
||||
var scanner = generator.valueToCode(block, 'SCANNER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${scanner}.getMaxFuelLevel()`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_geo_scanner_cost'] = function(block, generator) {
|
||||
var radius = generator.valueToCode(block, 'RADIUS', generator.ORDER_ATOMIC);
|
||||
var scanner = generator.valueToCode(block, 'SCANNER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${scanner}.cost(${radius})`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_geo_scanner_scan'] = function(block, generator) {
|
||||
var radius = generator.valueToCode(block, 'RADIUS', generator.ORDER_ATOMIC);
|
||||
var scanner = generator.valueToCode(block, 'SCANNER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${scanner}.scan(${radius})`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_geo_get_scan_cooldown'] = function(block, generator) {
|
||||
var scanner = generator.valueToCode(block, 'SCANNER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${scanner}.getScanCooldown()`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_geo_chunk_analyze'] = function(block, generator) {
|
||||
var scanner = generator.valueToCode(block, 'SCANNER', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${scanner}.chunkAnalyze()`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
// Generator for Redstone Integrator
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_redstone_integrator_get_input'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
var integrator = generator.valueToCode(block, 'INTEGRATOR', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${integrator}.getInput("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_redstone_integrator_get_output'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
var integrator = generator.valueToCode(block, 'INTEGRATOR', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${integrator}.getOutput("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_redstone_integrator_get_analog_input'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
var integrator = generator.valueToCode(block, 'INTEGRATOR', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${integrator}.getAnalogInput("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_redstone_integrator_get_analog_output'] = function(block, generator) {
|
||||
var side = block.getFieldValue('SIDE');
|
||||
var integrator = generator.valueToCode(block, 'INTEGRATOR', generator.ORDER_ATOMIC);
|
||||
|
||||
return [`${integrator}.getAnalogOutput("${side}")`, luaGenerator.ORDER_NONE];
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_redstone_integrator_set_output'] = function(block, generator) {
|
||||
var powered = block.getFieldValue('POWERED');
|
||||
var side = block.getFieldValue('SIDE');
|
||||
var integrator = generator.valueToCode(block, 'INTEGRATOR', generator.ORDER_ATOMIC);
|
||||
|
||||
var ispowerd;
|
||||
if (powered == "ON") {
|
||||
ispowerd = "true";
|
||||
} else {
|
||||
ispowerd = "false";
|
||||
}
|
||||
|
||||
return `${integrator}.setOutput("${side}", ${ispowerd})\n`;
|
||||
};
|
||||
|
||||
luaGenerator.forBlock['advanced_peripherals_redstone_integrator_set_analog_output'] = function(block, generator) {
|
||||
var power = generator.valueToCode(block, 'POWER', generator.ORDER_ATOMIC);
|
||||
var side = block.getFieldValue('SIDE');
|
||||
var integrator = generator.valueToCode(block, 'INTEGRATOR', generator.ORDER_ATOMIC);
|
||||
|
||||
return `${integrator}.setOutput("${side}", ${power})\n`;
|
||||
};
|
@ -14,8 +14,8 @@
|
||||
"basic": true,
|
||||
"adv": true,
|
||||
"command": true,
|
||||
"pocket": false,
|
||||
"advpocket": false,
|
||||
"pocket": true,
|
||||
"advpocket": true,
|
||||
"turtle": true,
|
||||
"advturtle": true
|
||||
}
|
||||
|
@ -416,6 +416,51 @@
|
||||
<block type="advanced_peripherals_nbt_storage_write_table"></block>
|
||||
|
||||
<label text="Block Reader"></label>
|
||||
<block type="advanced_peripherals_block_reader_get_block_name"></block>
|
||||
<block type="advanced_peripherals_block_reader_get_block_data"></block>
|
||||
<block type="advanced_peripherals_block_reader_get_block_states"></block>
|
||||
<block type="advanced_peripherals_block_reader_is_tile_entity"></block>
|
||||
|
||||
<label text="Geo Scanner"></label>
|
||||
<block type="advanced_peripherals_geo_scanner_get_fuel_level"></block>
|
||||
<block type="advanced_peripherals_geo_scanner_get_max_fuel_level"></block>
|
||||
<block type="advanced_peripherals_geo_scanner_cost">
|
||||
<value name="RADIUS">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="advanced_peripherals_geo_scanner_scan">
|
||||
<value name="RADIUS">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">1</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="advanced_peripherals_geo_get_scan_cooldown"></block>
|
||||
<block type="advanced_peripherals_geo_chunk_analyze"></block>
|
||||
|
||||
<label text="Redstone Integrator"></label>
|
||||
<block type="advanced_peripherals_redstone_integrator_get_input"></block>
|
||||
<block type="advanced_peripherals_redstone_integrator_get_output"></block>
|
||||
<block type="advanced_peripherals_redstone_integrator_get_analog_input"></block>
|
||||
<block type="advanced_peripherals_redstone_integrator_get_analog_output"></block>
|
||||
<block type="advanced_peripherals_redstone_integrator_set_output"></block>
|
||||
<block type="advanced_peripherals_redstone_integrator_set_analog_output">
|
||||
<value name="POWER">
|
||||
<shadow type="math_number">
|
||||
<field name="NUM">15</field>
|
||||
</shadow>
|
||||
</value>
|
||||
</block>
|
||||
|
||||
<label text="AR Controller"></label>
|
||||
|
||||
<label text="ME Bridge"></label>
|
||||
|
||||
<label text="RS Bridge"></label>
|
||||
|
||||
<label text="Colony Integrator"></label>
|
||||
</category>
|
||||
</xml>
|
||||
|
@ -10,7 +10,8 @@
|
||||
"args0": [
|
||||
{
|
||||
"type": "input_value",
|
||||
"name": "NAME"
|
||||
"name": "NAME",
|
||||
"check": "String"
|
||||
}
|
||||
],
|
||||
"output": "Boolean",
|
||||
|
@ -1,13 +1,47 @@
|
||||
<xml id="toolbox" style="display: none;">
|
||||
<category name="Peripheral" colour="240">
|
||||
<block type="peripheral_get_names"></block>
|
||||
<block type="peripheral_is_present"></block>
|
||||
<block type="peripheral_get_type"></block>
|
||||
<block type="peripheral_has_type"></block>
|
||||
<block type="peripheral_get_methods"></block>
|
||||
<block type="peripheral_is_present">
|
||||
<value name="NAME">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="peripheral_get_type">
|
||||
<value name="DEVICE">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="peripheral_has_type">
|
||||
<value name="DEVICE">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
<value name="TYPE">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="peripheral_get_methods">
|
||||
<value name="NAME">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="peripheral_get_name"></block>
|
||||
<block type="peripheral_call"></block>
|
||||
<block type="peripheral_wrap"></block>
|
||||
<block type="peripheral_find"></block>
|
||||
<block type="peripheral_call">
|
||||
<value name="NAME">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
<value name="METHOD">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="peripheral_wrap">
|
||||
<value name="NAME">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
<block type="peripheral_find">
|
||||
<value name="NAME">
|
||||
<shadow type="text"></shadow>
|
||||
</value>
|
||||
</block>
|
||||
</category>
|
||||
</xml>
|
||||
|
@ -6,8 +6,8 @@
|
||||
"type": "field_dropdown",
|
||||
"name": "STATE",
|
||||
"options": [
|
||||
["On", "OFF"],
|
||||
["Off", "ON"]
|
||||
["On", "ON"],
|
||||
["Off", "OFF"]
|
||||
]
|
||||
},
|
||||
{
|
||||
|
125
index.js
125
index.js
@ -5,10 +5,12 @@ const prompt = require('electron-prompt');
|
||||
const path = require('path');
|
||||
const pino = require('pino')
|
||||
const pretty = require('pino-pretty');
|
||||
const { log } = require('console');
|
||||
const https = require('node:https');
|
||||
const LocalStorage = require('node-localstorage').LocalStorage
|
||||
const ipc = ipcMain
|
||||
|
||||
const logger = pino(pretty())
|
||||
const localStorage = new LocalStorage('.');
|
||||
|
||||
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
|
||||
|
||||
@ -22,6 +24,7 @@ var isopennewproject = false;
|
||||
|
||||
var appstarted = false;
|
||||
var version;
|
||||
var gitver;
|
||||
|
||||
try {
|
||||
// Read package.json synchronously
|
||||
@ -32,18 +35,55 @@ try {
|
||||
|
||||
// Get project version
|
||||
version = packageJson.version;
|
||||
|
||||
console.log("Project version:", version);
|
||||
} catch (err) {
|
||||
console.error("Error reading package.json:", err);
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
function checkupdate() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const req = https.request({
|
||||
hostname: 'api.github.com',
|
||||
port: 443,
|
||||
path: '/repos/DPSoftware-Foundation/ccIDE/releases/latest',
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'User-Agent': 'ccIDE-Check-Update-Service', // GitHub API requires a User-Agent header
|
||||
}
|
||||
}, (res) => {
|
||||
let data = '';
|
||||
res.setEncoding('utf8');
|
||||
res.on('data', (chunk) => {
|
||||
data += chunk;
|
||||
});
|
||||
res.on('end', () => {
|
||||
try {
|
||||
const json = JSON.parse(data);
|
||||
resolve(json.tag_name); // Return the tag_name or other relevant data
|
||||
} catch (e) {
|
||||
reject('Error parsing JSON: ' + e.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', (e) => {
|
||||
reject('Error fetching release: ' + e.message);
|
||||
});
|
||||
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
|
||||
function normalizeVersion(version, length = 4) {
|
||||
// Split the version string into parts and pad with zeros if necessary
|
||||
return version.split('.').map(part => part.padStart(2, '0')).concat(Array(length).fill('00')).slice(0, length).join('.');
|
||||
}
|
||||
|
||||
app.whenReady().then(async () => {
|
||||
logger.info("Initializing splash window...")
|
||||
reloadall(false);
|
||||
var splash = new BrowserWindow({
|
||||
width: 600,
|
||||
height: 300,
|
||||
width: 720,
|
||||
height: 400,
|
||||
icon: path.join(__dirname, 'assets', 'ccIDEIcon.ico'),
|
||||
transparent: true,
|
||||
frame: false,
|
||||
@ -51,12 +91,72 @@ app.whenReady().then(() => {
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
}
|
||||
},
|
||||
resizable: false
|
||||
});
|
||||
|
||||
splash.loadFile('src/splash.html');
|
||||
|
||||
while (!splash.isVisible()) {}
|
||||
|
||||
// checkupdate
|
||||
logger.info("Checking for new update...")
|
||||
splash.webContents.send("change-status", "Checking for new update...")
|
||||
|
||||
try {
|
||||
const latestRelease = await checkupdate();
|
||||
// Store the version or use it as needed
|
||||
gitver = latestRelease;
|
||||
} catch (error) {
|
||||
logger.error('Error in update check:', error);
|
||||
}
|
||||
|
||||
logger.info("Version in github: " + gitver)
|
||||
logger.info("Current version: " + version)
|
||||
|
||||
const normalizedAppVersion = normalizeVersion(version);
|
||||
const normalizedReleaseVersion = normalizeVersion(gitver);
|
||||
|
||||
if (normalizedAppVersion >= normalizedReleaseVersion) {
|
||||
logger.info("Software is up-to-date.");
|
||||
} else {
|
||||
logger.info("A new update is available: " + gitver)
|
||||
var is_not_skip_update = localStorage.getItem('skip_update_version') != normalizedAppVersion;
|
||||
var is_ignore = localStorage.getItem('ignore_update');
|
||||
if (is_ignore || is_not_skip_update) {
|
||||
const result = dialog.showMessageBoxSync({
|
||||
type: 'question',
|
||||
buttons: ['Update', 'Ignore', 'Skip'],
|
||||
defaultId: 0,
|
||||
title: 'Update Available',
|
||||
message: `A new version (${gitver}) is available. Do you want to update now?`,
|
||||
detail: 'Click "Update" to go to the release page, "Ignore" to ignore this update, or "Skip" to skip this version.'
|
||||
});
|
||||
switch (result.response) {
|
||||
case 0: // 'Update'
|
||||
(async () => {
|
||||
try {
|
||||
const { default: open } = await import('open');
|
||||
|
||||
await open('https://github.com/DPSoftware-Foundation/ccIDE/releases/latest');
|
||||
console.log('URL opened in default browser');
|
||||
} catch (err) {
|
||||
console.error('Error opening URL:', err);
|
||||
}
|
||||
})();
|
||||
break;
|
||||
case 1: // 'Ignore'
|
||||
localStorage.setItem('ignore_update', true);
|
||||
break;
|
||||
case 2: // 'Skip'
|
||||
localStorage.setItem('skip_update_version', normalizedReleaseVersion);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("Initializing main windows...")
|
||||
splash.webContents.send("change-status", "Initializing main windows...")
|
||||
|
||||
const win = new BrowserWindow({
|
||||
width: 1280,
|
||||
@ -96,6 +196,15 @@ app.whenReady().then(() => {
|
||||
appstarted = true;
|
||||
});
|
||||
|
||||
ipc.on("splash-close", (event) => {
|
||||
if (appstarted) {
|
||||
splash.hide();
|
||||
} else {
|
||||
splash.close();
|
||||
win.close();
|
||||
}
|
||||
})
|
||||
|
||||
ipc.on('erroronstart', (event, errormessage) => {
|
||||
logger.error(errormessage)
|
||||
dialog.showErrorBox("Error on startup", errormessage);
|
||||
@ -508,7 +617,7 @@ app.whenReady().then(() => {
|
||||
|
||||
win.on("closed", () => {
|
||||
logger.info("Exiting...")
|
||||
if (splash) {
|
||||
if (!splash.isDestroyed()) {
|
||||
splash.close()
|
||||
}
|
||||
})
|
||||
|
263
package-lock.json
generated
263
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ccide",
|
||||
"version": "1.1",
|
||||
"version": "1.4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ccide",
|
||||
"version": "1.1",
|
||||
"version": "1.4",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@blockly/plugin-workspace-search": "^9.0.5",
|
||||
@ -14,6 +14,8 @@
|
||||
"blockly": "^11.1.1",
|
||||
"bootstrap": "^5.3.3",
|
||||
"electron-prompt": "^1.7.0",
|
||||
"node-localstorage": "^3.0.5",
|
||||
"open": "^10.1.0",
|
||||
"pino": "^9.3.2",
|
||||
"pino-pretty": "^11.2.2",
|
||||
"xmldom": "^0.6.0"
|
||||
@ -262,6 +264,20 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/bundle-name": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz",
|
||||
"integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==",
|
||||
"dependencies": {
|
||||
"run-applescript": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/cacheable-lookup": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
|
||||
@ -391,6 +407,32 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/default-browser": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz",
|
||||
"integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==",
|
||||
"dependencies": {
|
||||
"bundle-name": "^4.1.0",
|
||||
"default-browser-id": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/default-browser-id": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz",
|
||||
"integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/defer-to-connect": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
|
||||
@ -416,6 +458,17 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/define-lazy-prop": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
|
||||
"integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/define-properties": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
|
||||
@ -885,11 +938,64 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/imurmurhash": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
|
||||
"integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
|
||||
"engines": {
|
||||
"node": ">=0.8.19"
|
||||
}
|
||||
},
|
||||
"node_modules/is-docker": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
|
||||
"integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
|
||||
"bin": {
|
||||
"is-docker": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-inside-container": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
|
||||
"integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
|
||||
"dependencies": {
|
||||
"is-docker": "^3.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"is-inside-container": "cli.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/is-potential-custom-element-name": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
|
||||
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
|
||||
},
|
||||
"node_modules/is-wsl": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz",
|
||||
"integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==",
|
||||
"dependencies": {
|
||||
"is-inside-container": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/joycon": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
|
||||
@ -1024,6 +1130,17 @@
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/node-localstorage": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-3.0.5.tgz",
|
||||
"integrity": "sha512-GCwtK33iwVXboZWYcqQHu3aRvXEBwmPkAMRBLeaX86ufhqslyUkLGsi4aW3INEfdQYpUB5M9qtYf3eHvAk2VBg==",
|
||||
"dependencies": {
|
||||
"write-file-atomic": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-url": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
|
||||
@ -1065,6 +1182,23 @@
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"node_modules/open": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz",
|
||||
"integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==",
|
||||
"dependencies": {
|
||||
"default-browser": "^5.2.1",
|
||||
"define-lazy-prop": "^3.0.0",
|
||||
"is-inside-container": "^1.0.0",
|
||||
"is-wsl": "^3.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/p-cancelable": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
|
||||
@ -1278,6 +1412,17 @@
|
||||
"resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz",
|
||||
"integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw=="
|
||||
},
|
||||
"node_modules/run-applescript": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz",
|
||||
"integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
@ -1355,6 +1500,17 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
||||
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/sonic-boom": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.0.1.tgz",
|
||||
@ -1542,6 +1698,18 @@
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
},
|
||||
"node_modules/write-file-atomic": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
|
||||
"integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
|
||||
"dependencies": {
|
||||
"imurmurhash": "^0.1.4",
|
||||
"signal-exit": "^4.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||
@ -1754,6 +1922,14 @@
|
||||
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
|
||||
"integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="
|
||||
},
|
||||
"bundle-name": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz",
|
||||
"integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==",
|
||||
"requires": {
|
||||
"run-applescript": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"cacheable-lookup": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
|
||||
@ -1844,6 +2020,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"default-browser": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz",
|
||||
"integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==",
|
||||
"requires": {
|
||||
"bundle-name": "^4.1.0",
|
||||
"default-browser-id": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"default-browser-id": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz",
|
||||
"integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA=="
|
||||
},
|
||||
"defer-to-connect": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
|
||||
@ -1860,6 +2050,11 @@
|
||||
"gopd": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"define-lazy-prop": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
|
||||
"integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg=="
|
||||
},
|
||||
"define-properties": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
|
||||
@ -2185,11 +2380,37 @@
|
||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
|
||||
},
|
||||
"imurmurhash": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
|
||||
"integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="
|
||||
},
|
||||
"is-docker": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
|
||||
"integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="
|
||||
},
|
||||
"is-inside-container": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
|
||||
"integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
|
||||
"requires": {
|
||||
"is-docker": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"is-potential-custom-element-name": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
|
||||
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
|
||||
},
|
||||
"is-wsl": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz",
|
||||
"integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==",
|
||||
"requires": {
|
||||
"is-inside-container": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"joycon": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",
|
||||
@ -2292,6 +2513,14 @@
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node-localstorage": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/node-localstorage/-/node-localstorage-3.0.5.tgz",
|
||||
"integrity": "sha512-GCwtK33iwVXboZWYcqQHu3aRvXEBwmPkAMRBLeaX86ufhqslyUkLGsi4aW3INEfdQYpUB5M9qtYf3eHvAk2VBg==",
|
||||
"requires": {
|
||||
"write-file-atomic": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"normalize-url": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
|
||||
@ -2321,6 +2550,17 @@
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"open": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz",
|
||||
"integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==",
|
||||
"requires": {
|
||||
"default-browser": "^5.2.1",
|
||||
"define-lazy-prop": "^3.0.0",
|
||||
"is-inside-container": "^1.0.0",
|
||||
"is-wsl": "^3.1.0"
|
||||
}
|
||||
},
|
||||
"p-cancelable": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz",
|
||||
@ -2495,6 +2735,11 @@
|
||||
"resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz",
|
||||
"integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw=="
|
||||
},
|
||||
"run-applescript": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz",
|
||||
"integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A=="
|
||||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
@ -2543,6 +2788,11 @@
|
||||
"type-fest": "^0.13.1"
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
|
||||
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw=="
|
||||
},
|
||||
"sonic-boom": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.0.1.tgz",
|
||||
@ -2687,6 +2937,15 @@
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
},
|
||||
"write-file-atomic": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
|
||||
"integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
|
||||
"requires": {
|
||||
"imurmurhash": "^0.1.4",
|
||||
"signal-exit": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"ws": {
|
||||
"version": "8.17.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
||||
|
@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "ccide",
|
||||
"version": "1.3",
|
||||
"version": "1.4",
|
||||
"description": "ComputerCraft mod virtual lua IDE",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev": "electron .",
|
||||
"build": "electron-packager . ccIDE --platform=win32 --arch=x64 --icon=assets/ccIDEIcon.ico --out=dist --overwrite"
|
||||
"build": "electron-packager . ccIDE --platform=win32 --arch=x64 --icon=assets/ccIDEIcon.ico --out=dist --overwrite && for /d %i in (dist\\ccIDE-*) do copy package.json %i\\",
|
||||
"build_debug": "electron-packager . ccIDE --platform=win32 --arch=x64 --icon=assets/ccIDEIcon.ico --out=dist_debug --overwrite --debug && for /d %i in (dist_debug\\ccIDE-*) do copy package.json %i\\"
|
||||
},
|
||||
"author": "DPSoftware Foundation",
|
||||
"license": "GPL-3.0-or-later",
|
||||
@ -18,6 +19,8 @@
|
||||
"blockly": "^11.1.1",
|
||||
"bootstrap": "^5.3.3",
|
||||
"electron-prompt": "^1.7.0",
|
||||
"node-localstorage": "^3.0.5",
|
||||
"open": "^10.1.0",
|
||||
"pino": "^9.3.2",
|
||||
"pino-pretty": "^11.2.2",
|
||||
"xmldom": "^0.6.0"
|
||||
|
@ -91,7 +91,7 @@ Event: https://tweaked.cc/event/alarm.html
|
||||
| Mod | Status
|
||||
|------------|--------
|
||||
|[Create Additions](https://www.curseforge.com/minecraft/mc-mods/createaddition) | 🟩 Supported all
|
||||
|[Advanced Peripherals](https://www.curseforge.com/minecraft/mc-mods/advanced-peripherals) | 🟨 Unfinished 3/13
|
||||
|[Advanced Peripherals](https://www.curseforge.com/minecraft/mc-mods/advanced-peripherals) | 🟨 Partially Supported (9/13 Peripheral)
|
||||
|[Create](https://www.curseforge.com/minecraft/mc-mods/create) | 🟨 Third support
|
||||
|[CC:C Bridge](https://www.curseforge.com/minecraft/mc-mods/cccbridge) | 🟥 Unsupport
|
||||
|[Extreme Reactors](https://www.curseforge.com/minecraft/mc-mods/extreme-reactors) ([Command](https://ftbwiki.org/Reactor_Computer_Port)) | 🟥 Unsupport
|
||||
|
@ -1,7 +1,3 @@
|
||||
function delay(time) {
|
||||
return new Promise(resolve => setTimeout(resolve, time));
|
||||
}
|
||||
|
||||
const { luaGenerator } = require('blockly/lua'); // Use require syntax for Blockly module
|
||||
const { CCRemote } = require("./ccRemote")
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap" rel="stylesheet">
|
||||
<script>
|
||||
const bootstrap = require('bootstrap')
|
||||
const {shell} = require('electron');
|
||||
</script>
|
||||
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
||||
|
@ -11,6 +11,10 @@ window.onerror = function (message, source, lineno, colno, error) {
|
||||
return true; // Prevents the default browser error handling
|
||||
};
|
||||
|
||||
function delay(time) {
|
||||
return new Promise(resolve => setTimeout(resolve, time));
|
||||
}
|
||||
|
||||
console.originalLog = console.log;
|
||||
|
||||
console.log = function (...args) {
|
||||
@ -18,7 +22,6 @@ console.log = function (...args) {
|
||||
console.originalLog(...args)
|
||||
};
|
||||
|
||||
|
||||
console.log("Importing module...")
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
230
src/splash.html
230
src/splash.html
@ -2,87 +2,195 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Splash Screen</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Product Page</title>
|
||||
<style>
|
||||
body {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
background-color: #2c3e50;
|
||||
color: white;
|
||||
font-family: Arial, sans-serif;
|
||||
position: relative;
|
||||
}
|
||||
#splash-content {
|
||||
text-align: center;
|
||||
}
|
||||
#splash-content img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Added drop shadow */
|
||||
}
|
||||
.progress-bar {
|
||||
height: 4px;
|
||||
background-color: rgba(5, 114, 206, 0.2);
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.progress-bar-value {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgb(5, 114, 206);
|
||||
animation: indeterminateAnimation 1s infinite linear;
|
||||
transform-origin: 0% 50%;
|
||||
}
|
||||
@keyframes indeterminateAnimation {
|
||||
0% {
|
||||
transform: translateX(0) scaleX(0);
|
||||
body, html {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
40% {
|
||||
transform: translateX(0) scaleX(0.4);
|
||||
|
||||
#box {
|
||||
position: absolute;
|
||||
user-select: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
}
|
||||
100% {
|
||||
transform: translateX(100%) scaleX(0.5);
|
||||
|
||||
#logo {
|
||||
height: 16px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
top: 25px;
|
||||
left: 25px;
|
||||
}
|
||||
|
||||
#logo img {
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
#logo h6 {
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
font-weight: 200;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
letter-spacing: 0px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#box h1 {
|
||||
color: white;
|
||||
display: inline-block;
|
||||
font-size: 65px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 60%;
|
||||
transform: translateX(-50%) translateY(-120%);
|
||||
}
|
||||
|
||||
#box .text {
|
||||
color: white;
|
||||
font-weight: 400;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
}
|
||||
|
||||
#box h4 {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
opacity: 50%;
|
||||
}
|
||||
|
||||
#starting-txt {
|
||||
position: absolute;
|
||||
left: 25px;
|
||||
bottom: 13px;
|
||||
}
|
||||
|
||||
#author-txt {
|
||||
position: absolute;
|
||||
right: 25px;
|
||||
bottom: 13px;
|
||||
}
|
||||
|
||||
#author-txt a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.text img {
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
top: 60%;
|
||||
left: -20%;
|
||||
transform: translateY(40px);
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
border-radius: 5px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
#dot1 {
|
||||
animation: dotslide 2.8s infinite cubic-bezier(0.2, .8, .8, 0.2);
|
||||
}
|
||||
|
||||
#dot2 {
|
||||
animation: dotslide 2.8s .2s infinite cubic-bezier(0.2, .8, .8, 0.2);
|
||||
}
|
||||
|
||||
#dot3 {
|
||||
animation: dotslide 2.8s .4s infinite cubic-bezier(0.2, .8, .8, 0.2);
|
||||
}
|
||||
|
||||
#dot4 {
|
||||
animation: dotslide 2.8s .6s infinite cubic-bezier(0.2, .8, .8, 0.2);
|
||||
}
|
||||
|
||||
#dot5 {
|
||||
animation: dotslide 2.8s .8s infinite cubic-bezier(0.2, .8, .8, 0.2);
|
||||
}
|
||||
|
||||
@keyframes dotslide {
|
||||
0% {
|
||||
left: -20%;
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 120%;
|
||||
}
|
||||
}
|
||||
|
||||
#product-icon {
|
||||
position: absolute;
|
||||
top: 20%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100px; /* Adjust size as needed */
|
||||
height: 100px; /* Adjust size as needed */
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Added drop shadow */
|
||||
}
|
||||
|
||||
#close-btn {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 25px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: white;
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
opacity: 50%;
|
||||
}
|
||||
}
|
||||
#copyright {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
font-size: 12px;
|
||||
color: #bdc3c7;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="splash-content">
|
||||
<img src="../assets/ccIDEIcon.ico" alt="ccIDE Icon">
|
||||
<h1 id="title">Loading ccIDE...</h1>
|
||||
<div class="progress-bar" id="progressbar">
|
||||
<div class="progress-bar-value"></div>
|
||||
<div id="box" style="background-color:#2c3e50">
|
||||
<button id="close-btn">✖</button>
|
||||
<span id="logo">
|
||||
<img id="logo-img" src="../assets/dpsoftware.png"/>
|
||||
<h6 id="logo-text">DPSoftware Foundation</h6>
|
||||
</span>
|
||||
|
||||
<div id="product-review">
|
||||
<img id="product-icon" src="../assets/ccIDEIcon.ico" alt="ccIDE Icon"/>
|
||||
<h1 id="product" class="text">ccIDE</h1>
|
||||
</div>
|
||||
<h6 id="status">Initializing...</h6>
|
||||
</div>
|
||||
<div id="copyright">
|
||||
© 2024 DPSoftware Foundation. Licensed under GPL v3.
|
||||
<div id="loading-dots">
|
||||
<div class="dot" id="dot1"></div>
|
||||
<div class="dot" id="dot2"></div>
|
||||
<div class="dot" id="dot3"></div>
|
||||
<div class="dot" id="dot4"></div>
|
||||
<div class="dot" id="dot5"></div>
|
||||
</div>
|
||||
<h4 class="text" id="starting-txt">Loading ...</h4>
|
||||
<h4 class="text" id="author-txt">damp11113.xyz</h4>
|
||||
</div>
|
||||
<script>
|
||||
const { ipcRenderer } = require("electron");
|
||||
const ipc = ipcRenderer;
|
||||
|
||||
ipc.on('change-status', (event, status) => {
|
||||
document.getElementById('status').textContent = status;
|
||||
document.getElementById('starting-txt').textContent = status;
|
||||
});
|
||||
|
||||
ipc.on('change-title', (event, title) => {
|
||||
document.getElementById('title').textContent = title;
|
||||
document.getElementById('product').textContent = title;
|
||||
});
|
||||
|
||||
ipc.on('isloaded', (event) => {
|
||||
document.getElementById('progressbar').remove();
|
||||
document.getElementById('loading-dots').remove();
|
||||
});
|
||||
|
||||
document.getElementById('close-btn').addEventListener('click', () => {
|
||||
ipc.send('splash-close');
|
||||
});
|
||||
|
||||
</script>
|
||||
|
90
src/splash_old.html
Normal file
90
src/splash_old.html
Normal file
@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Splash Screen</title>
|
||||
<style>
|
||||
body {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
background-color: #2c3e50;
|
||||
color: white;
|
||||
font-family: Arial, sans-serif;
|
||||
position: relative;
|
||||
}
|
||||
#splash-content {
|
||||
text-align: center;
|
||||
}
|
||||
#splash-content img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Added drop shadow */
|
||||
}
|
||||
.progress-bar {
|
||||
height: 4px;
|
||||
background-color: rgba(5, 114, 206, 0.2);
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.progress-bar-value {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgb(5, 114, 206);
|
||||
animation: indeterminateAnimation 1s infinite linear;
|
||||
transform-origin: 0% 50%;
|
||||
}
|
||||
@keyframes indeterminateAnimation {
|
||||
0% {
|
||||
transform: translateX(0) scaleX(0);
|
||||
}
|
||||
40% {
|
||||
transform: translateX(0) scaleX(0.4);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(100%) scaleX(0.5);
|
||||
}
|
||||
}
|
||||
#copyright {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
font-size: 12px;
|
||||
color: #bdc3c7;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="splash-content">
|
||||
<img src="../assets/ccIDEIcon.ico" alt="ccIDE Icon">
|
||||
<h1 id="title">Loading ccIDE...</h1>
|
||||
<div class="progress-bar" id="progressbar">
|
||||
<div class="progress-bar-value"></div>
|
||||
</div>
|
||||
<h6 id="status">Initializing...</h6>
|
||||
</div>
|
||||
<div id="copyright">
|
||||
© 2024 DPSoftware Foundation. Licensed under GPL v3.
|
||||
</div>
|
||||
<script>
|
||||
const { ipcRenderer } = require("electron");
|
||||
const ipc = ipcRenderer;
|
||||
|
||||
ipc.on('change-status', (event, status) => {
|
||||
document.getElementById('status').textContent = status;
|
||||
});
|
||||
|
||||
ipc.on('change-title', (event, title) => {
|
||||
document.getElementById('title').textContent = title;
|
||||
});
|
||||
|
||||
ipc.on('isloaded', (event) => {
|
||||
document.getElementById('progressbar').remove();
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user