Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working for altium designer 22 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ __Previews/
*.exe

node_modules/
package-lock.json
5 changes: 5 additions & 0 deletions AD-LCSC-Addons.iss
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ Source: ".\src\AD-LCSC-Addons.js"; DestDir: "{app}"; Flags: ignoreversion
Source: ".\src\AD-LCSC-Addons.pas"; DestDir: "{app}"; Flags: ignoreversion
Source: ".\src\config.json"; DestDir: "{app}"; DestName: "config.json"; Flags: ignoreversion; Check: IsEn() and not ConfigExisted();
Source: ".\src\config_cn.json"; DestDir: "{app}"; DestName: "config.json"; Flags: ignoreversion; Check: IsCn () and not ConfigExisted();
Source: ".\api\index.js"; DestDir: "{app}\backend"; DestName: "index.js"; Flags: ignoreversion; Check: IsCn () and not ConfigExisted();
Source: ".\api\jsapi.min.js"; DestDir: "{app}\backend"; DestName: "jsapi.min.js"; Flags: ignoreversion; Check: IsCn () and not ConfigExisted();
Source: ".\api\package.json"; DestDir: "{app}\backend"; DestName: "package.json"; Flags: ignoreversion; Check: IsCn () and not ConfigExisted();

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Dirs]
Name: "{app}\cache"
Name: "{app}\download"
Name: "{app}\backend"

[Icons]
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,24 @@ You can use Inno Setup to compile it yourself.
1. The generated Altium Design file format cannot be 100% complete, please make sure to check carefully after importing the schematic and PCB, the author does not guarantee that no errors will be generated!
2. The author does not assume any responsibility for any damages caused by library errors and formatting errors! If you do not agree, please do not use it!
3. Altium Designer 19 is not supported at the moment, the exported files need to be opened in Altium Designer 18 and below, **Altium Designer 17 is recommended**.
4. The plugin works on Altium Designer 22.11.1

## Optimization points
## Using the plugin
1. Launch the installer provided in the releases tab
2. Get required dependencies and run the backend server
```
cd %userprofile%\documents\AD-LCSC-Addons\backend\
npm install
node index.js
```

The backend server needs to be running every time you want to use the plugin.

## Known problems
- Imported schematic does not feature ERC
- Backend endpoint tends to freeze

## Optimization points
- Altium Design version check
- ~~Automatically set the maximum width of search results~~ (Finished)
- ~~Enter search after typing~~ (Finished)
Expand Down
4 changes: 2 additions & 2 deletions api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const lcsc = require("./jsapi.min.js");
const app = express();
app.use(bodyParser.json());
app.use(morgan("combined"));
const port = 80;
const port = 1456; //seems like its free to use

app.get("/", (req, res) => {
res.send(
Expand All @@ -23,7 +23,7 @@ app.post("/", (req, res) => {
let httpResponse = {};

request(
`https://lceda.cn/api/components/${id}`,
`https://easyeda.com/api/components/${id}`,
function (error, response, body) {
if (error) {
httpResponse = {
Expand Down
Loading